45 #define ALWAYS_INLINE __attribute__((__always_inline__)) 63 #define STATIC_ASSERT_ALWAYS(expr, msg) \ 65 class ERROR_##msg {}; \ 66 (CompileTimeChecker<(expr) != 0>(ERROR_##msg())); \ 70 #define STATIC_ASSERT_DEBUG(expr, msg) STATIC_ASSERT_ALWAYS(expr, msg) 72 #define STATIC_ASSERT_DEBUG(expr, msg) 90 inline static int get(
int const row,
int const col,
92 return row *
cols + col;
94 template<
int T_row,
int T_col,
int T_rows,
int T_cols>
96 static int const index = T_row * T_cols + T_col;
105 inline static int get(
int const row,
int const col,
107 return row + col *
rows;
109 template<
int T_row,
int T_col,
int T_rows,
int T_cols>
111 static int const index = T_row + T_col * T_rows;
Class template for use in static asserts.
Definition: common.h:54
CompileTimeChecker(...)
Definition: common.h:55
Struct for access to matrix elements stored in row wise order.
Definition: common.h:89
mat::SizesAndBlocks rows
Definition: test.cc:51
mat::SizesAndBlocks cols
Definition: test.cc:52
static int const index
Definition: common.h:96
static int const index
Definition: common.h:111
Struct for access to matrix elements stored in column wise order.
Definition: common.h:104