aboutsummaryrefslogtreecommitdiff
path: root/matrix/generic/elem_type.h
blob: bffe9402d72d2d39fc7ce7e32ae6f8cf483b98f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifdef MATRIX_USE_FLOAT

#define MATRIX_ELEM float
#define MATRIX_ELEM_FMT "%f"
#define MATRIX_ELEM_WRITE_FMT "%.8f"
#define MATRIX_ELEM_PTR(self) ((self)->data.f)

#elif defined(MATRIX_USE_DOUBLE)

#define MATRIX_ELEM double
#define MATRIX_ELEM_FMT "%lf"
#define MATRIX_ELEM_WRITE_FMT "%.8lf"
#define MATRIX_ELEM_PTR(self) ((self)->data.d)

#elif defined(MATRIX_USE_INT)

#define MATRIX_ELEM long
#define MATRIX_ELEM_FMT "%ld"
#define MATRIX_ELEM_WRITE_FMT "%ld"
#define MATRIX_ELEM_PTR(self) ((self)->data.i)

#endif