61 void LUT_alloc(
LUT *psv,
int cols,
float mn,
float mx,
float res,
62 const char*,
Target target );
67 #if defined MLIR_CODEGEN && (defined __CUDA__ || defined __HIP__)
75 #if defined MLIR_CODEGEN && (defined __CUDA__ || defined __HIP__)
80 void LUT_problem( LUT *,
double,
int,
const char * );
81 void IIF_warn(
const int wv,
const char* error);
104 buf = allocate_on_target<T>(target, m * n);
106 log_msg(0, 5, 0,
"Not enough memory for matrix\n" );
110 ptr = allocate_on_target<T*>(target, m);
111 for (
int i=0; i<m; i++ )
127 int index,
int n,
char* row_ptr,
int lut_numelements);
130 int lut_num_elements,
int vector_size);
143 #define LUT_entry(A, I, J) (A)->tab[I][J]
152 #define LUT_index( T, V, W ) (int)((V)*T->step)
153 #define LUT_constrain( T, V, W )
182 #define LUT_constrain(T, V, W, N ) \
183 if( V>=T->mx){V=T->mx;}\
184 if( V<=T->mn){V=T->mn;}
double distance(const Point &a, const Point &b)
void IIF_warn(const int wv, const char error[])
Target
enum that represents different targets to run ionic models on.
void LUT_alloc(LUT *plut, int cols, float mn, float mx, float res, const char *name, Target target)
LUT_data_t LUT_interp(LUT *t, int i, int j, GlobalData_t x)
void LUT_problem_mlir(char *tab, GlobalData_t val, int locind)
LUT_data_t LUT_interpRow(LUT *const tab, GlobalData_t val, int i, LUT_data_t *row)
int LUT_dump(LUT *plut, const char *fname)
LUT_data_t * LUT_row(LUT *lut, GlobalData_t val, int locind)
int LUT_index(LUT *tab, GlobalData_t val, int locind)
void destroy_lut(LUT *plut, Target target)
void LUT_interpRow_mlir(char *table, int i, char *row_ptr, int lut_num_elements, int vector_size)
void LUT_interpRow_n_elements(char *table, char *val_ptr, int offset, int distance, int index, int n, char *row_ptr, int lut_numelements)
void LUT_problem(LUT *lt, double val, int wv, const char *tabname)
T ** build_matrix_ns(int m, int n, int size, Target target)
LUT_data_t LUT_derror(LUT *t, int idx, GlobalData_t x)
FILE_SPEC f_open(const char *fname, const char *mode)
Open a FILE_SPEC.
char * dupstr(const char *old_str)
void log_msg(FILE_SPEC out, int level, unsigned char flag, const char *fmt,...)
Defines valid targets for an ionic model to run on and an allocator for allocating memory on a specif...