62 const char*,
Target target );
67 #if defined MLIR_CODEGEN && (defined __CUDA__ || defined __HIP__) 71 #endif // ifdef __cplusplus 75 #if defined MLIR_CODEGEN && (defined __CUDA__ || defined __HIP__) 78 #endif // ifdef __cplusplus 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++ )
122 #endif // ifdef __cplusplus 127 int index,
int n,
char* row_ptr,
int lut_numelements);
130 int lut_num_elements,
int vector_size);
136 #endif // ifdef __cplusplus 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;}
char * dupstr(const char *old_str)
void LUT_interpRow_n_elements(char *table, char *val_ptr, int offset, int distance, int index, int n, char *row_ptr, int lut_numelements)
LUT_data_t * LUT_row(LUT *lut, GlobalData_t val, int locind)
void destroy_lut(LUT *plut, Target target)
void LUT_problem_mlir(char *tab, GlobalData_t val, int locind)
void IIF_warn(const int wv, const char error[])
void LUT_alloc(LUT *plut, int cols, float mn, float mx, float res, const char *name, Target target)
LUT_data_t LUT_interpRow(LUT *const tab, GlobalData_t val, int i, LUT_data_t *row)
LUT_data_t LUT_derror(LUT *t, int idx, GlobalData_t x)
int LUT_index(LUT *tab, GlobalData_t val, int locind)
double distance(const Point &a, const Point &b)
int LUT_dump(LUT *plut, const char *fname)
void LUT_problem(LUT *lt, double val, int wv, const char *tabname)
LUT_data_t LUT_interp(LUT *t, int i, int j, GlobalData_t x)
void LUT_interpRow_mlir(char *table, int i, char *row_ptr, int lut_num_elements, int vector_size)
Defines valid targets for an ionic model to run on and an allocator for allocating memory on a specif...
void log_msg(FILE_SPEC out, int level, unsigned char flag, const char *fmt,...)
Target
enum that represents different targets to run ionic models on.
T ** build_matrix_ns(int m, int n, int size, Target target)
FILE_SPEC f_open(const char *fname, const char *mode)
Open a FILE_SPEC.