#include <ICLUtils/CompatMacros.h>
#include <ICLUtils/BasicTypes.h>
#include <iostream>
#include <stdlib.h>
#include <cmath>
Go to the source code of this file.
◆ DEBUG_LOG
◆ DEBUG_LOG0
#define DEBUG_LOG0 |
( |
|
x | ) |
{ std::cerr << "[" __FILE__ ":" << __FUNCTION__ << ",line: " << __LINE__ << "] " << x << std::endl; } |
◆ DEBUG_LOG1
#define DEBUG_LOG1 |
( |
|
x | ) |
{ std::cerr << "[" __FILE__ ":" << __FUNCTION__ << ",line: " << __LINE__ << "] " << x << std::endl; } |
◆ DEBUG_LOG2
◆ DEBUG_LOG3
◆ DEBUG_LOG4
◆ DEBUG_LOG5
◆ DEBUGLEVEL_1
◆ ERROR_LOG
#define ERROR_LOG |
( |
|
x | ) |
DEBUG_LOG0("ERROR: " << x); |
critical log messages, that may cause application failure
◆ FUNCTION_LOG
#define FUNCTION_LOG |
( |
|
x | ) |
DEBUG_LOG2("FUNCTION: " << x); |
notification of function calls
◆ ICL_DELETE
#define ICL_DELETE |
( |
|
X | ) |
if((X)){ delete (X); (X)=0; } |
◆ ICL_DELETE_ARRAY
#define ICL_DELETE_ARRAY |
( |
|
X | ) |
if((X)){ delete [] (X); (X)=0; } |
◆ ICL_DEPRECATED
#define ICL_DEPRECATED __attribute__((deprecated)) |
◆ ICL_INSTANTIATE_ALL_DEPTHS
#define ICL_INSTANTIATE_ALL_DEPTHS |
Value:ICL_INSTANTIATE_ALL_INT_DEPTHS \
ICL_INSTANTIATE_ALL_FLOAT_DEPTHS
◆ ICL_INSTANTIATE_ALL_DEPTHS_2
#define ICL_INSTANTIATE_ALL_DEPTHS_2 |
Value: ICL_INSTANTIATE_ALL_SECOND_DEPTHS(16s) \
ICL_INSTANTIATE_ALL_SECOND_DEPTHS(32s) \
ICL_INSTANTIATE_ALL_SECOND_DEPTHS(32f) \
ICL_INSTANTIATE_ALL_SECOND_DEPTHS(64f)
#define ICL_INSTANTIATE_ALL_SECOND_DEPTHS(D)
Definition: Macros.h:180
◆ ICL_INSTANTIATE_ALL_FLOAT_DEPTHS
#define ICL_INSTANTIATE_ALL_FLOAT_DEPTHS |
Value: ICL_INSTANTIATE_DEPTH(64f)
#define ICL_INSTANTIATE_DEPTH(D)
Definition: Range.h:129
◆ ICL_INSTANTIATE_ALL_INT_DEPTHS
#define ICL_INSTANTIATE_ALL_INT_DEPTHS |
Value: ICL_INSTANTIATE_DEPTH(16s) \
ICL_INSTANTIATE_DEPTH(32s)
#define ICL_INSTANTIATE_DEPTH(D)
Definition: Range.h:129
◆ ICL_INSTANTIATE_ALL_SECOND_DEPTHS
#define ICL_INSTANTIATE_ALL_SECOND_DEPTHS |
( |
|
D | ) |
|
Value: ICL_INSTANTIATE_DEPTH(D, 16s) \
ICL_INSTANTIATE_DEPTH(D, 32s) \
ICL_INSTANTIATE_DEPTH(D, 32f) \
ICL_INSTANTIATE_DEPTH(D, 64f)
#define ICL_INSTANTIATE_DEPTH(D)
Definition: Range.h:129
◆ ICL_UNLIKELY
#define ICL_UNLIKELY |
( |
|
expr | ) |
expr |
◆ ICLASSERT
Value:if(!(X)){ \
ERROR_LOG("ICL ASSERTION ERROR:" << #X) \
}
generate an assertion error if condition evaluates false
◆ ICLASSERT_RETURN
#define ICLASSERT_RETURN |
( |
|
X | ) |
|
Value:if(!(X)){ \
ERROR_LOG("ICL ASSERTION ERROR:" << #X << "(returning!)"); \
return; \
}
generate an assertion error and return (from void function) if condition evaluates false
◆ ICLASSERT_RETURN_VAL
#define ICLASSERT_RETURN_VAL |
( |
|
X, |
|
|
|
VALUE |
|
) |
| |
Value:if(!(X)){ \
ERROR_LOG("ICL ASSERTION ERROR:" << #X << "(returning!)"); \
return VALUE; \
}
generate an assertion error and return with value if condition evaluates false
◆ ICLASSERT_THROW
#define ICLASSERT_THROW |
( |
|
X, |
|
|
|
OBJ |
|
) |
| |
Value:if(!(X)){ \
throw OBJ; \
}
generate the given exception if the condition evaluates false
◆ iclMax
#define iclMax |
( |
|
A, |
|
|
|
B |
|
) |
| ((A)>(B)?(A):(B)) |
◆ iclMin
#define iclMin |
( |
|
A, |
|
|
|
B |
|
) |
| ((A)<(B)?(A):(B)) |
Utility macros and defines
◆ INFO_LOG
uncritical log messages, for global information
◆ LOOP_LOG
log messages in long loops like pixel ops
◆ SECTION_LOG
#define SECTION_LOG |
( |
|
x | ) |
DEBUG_LOG3("SECTION: " << x); |
notification of code sections
◆ SHOW
#define SHOW |
( |
|
X | ) |
{ std::cout << (#X) << ":\n" << X << std::endl; } |
Simple show command. Shows name and value of streamed variables on std::cout (without trailing file,function and line info)
◆ SHOWX
#define SHOWX |
( |
|
X | ) |
{ std::cout << "[" __FILE__ ":" << __FUNCTION__ << ",line: " << __LINE__ << "] " << (#X) << ":\n" << X << std::endl; } |
Extended show command. Shows name and value of streamed variables on std::cout (with trailing file,function and line info)
◆ SUBSECTION_LOG
#define SUBSECTION_LOG |
( |
|
x | ) |
DEBUG_LOG4("SUBSECTION: " << x); |
notification of code subsections
◆ TODO_LOG
also critical log messages things that must still be done
◆ WARNING_LOG
#define WARNING_LOG |
( |
|
x | ) |
DEBUG_LOG1("WARNING: " << x); |
uncritical log messages, that may cause calculation errors