MediaProcessors
Macros
check_utils.h File Reference
#include "log.h"
Include dependency graph for check_utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CHECK_UTILS_DO_(COND, ACTION, LOG)
 
#define ASSERT(COND)   CHECK_UTILS_DO_(COND, , LOGE("Assertion failed.\n"))
 
#define CHECK_DO(COND, ACTION)   CHECK_UTILS_DO_(COND, ACTION, LOGE("Check point failed.\n"))
 

Detailed Description

Author
Rafael Antoniello

Definition in file check_utils.h.

Macro Definition Documentation

#define ASSERT (   COND)    CHECK_UTILS_DO_(COND, , LOGE("Assertion failed.\n"))

Simple ASSERT implementation: does not exit the program but just outputs an error trace.

Definition at line 51 of file check_utils.h.

#define CHECK_DO (   COND,
  ACTION 
)    CHECK_UTILS_DO_(COND, ACTION, LOGE("Check point failed.\n"))

Generic trace for tracking check-points failures.

Definition at line 57 of file check_utils.h.

#define CHECK_UTILS_DO_ (   COND,
  ACTION,
  LOG 
)
Value:
if(!(COND)) {\
LOG;\
ACTION;\
}

Definition at line 41 of file check_utils.h.