31 #define ALWAYS_INLINE __attribute__((__always_inline__))
49 #define STATIC_ASSERT_ALWAYS(expr, msg) \
51 class ERROR_##msg {}; \
52 (CompileTimeChecker<(expr) != 0>(ERROR_##msg())); \
56 #define STATIC_ASSERT_DEBUG(expr, msg) STATIC_ASSERT_ALWAYS(expr, msg)
58 #define STATIC_ASSERT_DEBUG(expr, msg)
76 inline static int get(
int const row,
int const col,
77 int const rows,
int const cols ) {
78 return row * cols + col;
80 template<
int T_row,
int T_col,
int T_rows,
int T_cols>
82 static int const index = T_row * T_cols + T_col;
91 inline static int get(
int const row,
int const col,
92 int const rows,
int const cols ) {
93 return row + col * rows;
95 template<
int T_row,
int T_col,
int T_rows,
int T_cols>
97 static int const index = T_row + T_col * T_rows;
Class template for use in static asserts.
Definition: common.h:40
CompileTimeChecker(...)
Definition: common.h:41
Struct for access to matrix elements stored in row wise order.
Definition: common.h:75
static int const index
Definition: common.h:82
static int const index
Definition: common.h:97
Struct for access to matrix elements stored in column wise order.
Definition: common.h:90