openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
Classes | Namespaces | Macros | Typedefs | Functions
LUT.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <stdbool.h>
#include "limpet_types.h"
#include "target.h"
Include dependency graph for LUT.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  limpet::LUT
 lookup table structure More...
 

Namespaces

 limpet
 

Macros

#define LUT_DEV_ONLY
 
#define LUT_entry(A, I, J)   (A)->tab[I][J]
 
#define LUT_constrain(T, V, W, N)
 

Typedefs

typedef double limpet::LUT_data_t
 

Functions

void limpet::LUT_alloc (LUT *plut, int cols, float mn, float mx, float res, const char *name, Target target)
 
int limpet::LUT_dump (LUT *plut, const char *fname)
 
int limpet::check_LUT (LUT *lut)
 
LUT_data_t limpet::LUT_interp (LUT *t, int i, int j, GlobalData_t x)
 
LUT_data_t limpet::LUT_derror (LUT *t, int idx, GlobalData_t x)
 
LUT_data_t limpet::LUT_interpRow (LUT *const tab, GlobalData_t val, int i, LUT_data_t *row)
 
void limpet::LUT_problem (LUT *lt, double val, int wv, const char *tabname)
 
void limpet::IIF_warn (const int wv, const char *error)
 
void limpet::destroy_lut (LUT *plut, Target target)
 
template<typename T >
T ** limpet::build_matrix_ns (int m, int n, int size, Target target)
 
LUT_data_t * limpet::LUT_row (LUT *lut, GlobalData_t val, int locind)
 
void limpet::LUT_interpRow_n_elements (char *table, char *val_ptr, int offset, int distance, int index, int n, char *row_ptr, int lut_numelements)
 
void limpet::LUT_interpRow_mlir (char *table, int i, char *row_ptr, int lut_num_elements, int vector_size)
 
void limpet::LUT_problem_mlir (char *tab, GlobalData_t val, int locind)
 
int limpet::LUT_index (LUT *tab, GlobalData_t val, int locind)
 

Macro Definition Documentation

◆ LUT_constrain

#define LUT_constrain (   T,
  V,
  W,
 
)
Value:
if( V>=T->mx){/*fprintf(stderr, "table overbound: %g\n", V );*/V=T->mx;}\
if( V<=T->mn){/*fprintf(stderr, "table underbound: %g\n", V );*/V=T->mn;}

constrain value to table bounds.

If a value lies outside the table, return it to the closest edge. It calls LUT_index().

Parameters
Tpointer to lookup table
Vvalue to check
Windex of value in its array
Nstring for table type
Note
If IMP_FAST is defined, this is ignored

Definition at line 182 of file LUT.h.

◆ LUT_DEV_ONLY

#define LUT_DEV_ONLY

Definition at line 30 of file LUT.h.

◆ LUT_entry

#define LUT_entry (   A,
  I,
 
)    (A)->tab[I][J]

access an entry in the table

Parameters
Atable
Irow
Jcolumn

Definition at line 143 of file LUT.h.