Program listing for file numerics/src/tools/sn_logger.h

Program listing for file numerics/src/tools/sn_logger.h#

 1#ifndef SN_LOGGER_H
 2#define SN_LOGGER_H
 3
 4
 5typedef enum {
 6  SN_LOGLEVEL_NO,
 7  SN_LOGLEVEL_BASIC,
 8  SN_LOGLEVEL_LIGHT,
 9  SN_LOGLEVEL_VEC,
10  SN_LOGLEVEL_MAT,
11  SN_LOGLEVEL_ALL
12} SN_loglevels;
13
14#define SN_LOG_LIGHT(log_lvl, expr) if (log_lvl >= SN_LOGLEVEL_LIGHT) expr;
15#define SN_LOG_SCALAR(log_lvl, expr) SN_LOG_LIGHT(log_lvl, expr)
16#define SN_LOG_VEC(log_lvl, expr) if (log_lvl >= SN_LOGLEVEL_VEC) expr;
17#define SN_LOG_MAT(log_lvl, expr) if (log_lvl >= SN_LOGLEVEL_MAT) expr;
18
19#endif