imate
C++/CUDA Reference
Loading...
Searching...
No Matches
debugging.h File Reference
#include <iostream>
Include dependency graph for debugging.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ASSERT(condition, message)
 

Macro Definition Documentation

◆ ASSERT

#define ASSERT (   condition,
  message 
)
Value:
do { \
if (!(condition)) { \
std::cerr << "Assertion `" #condition "` failed in " << __FILE__ \
<< " line " << __LINE__ << ": " << message << std::endl; \
std::terminate(); \
} \
} while (false)

Definition at line 20 of file debugging.h.

21 { \
22 if (!(condition)) { \
23 std::cerr << "Assertion `" #condition "` failed in " << __FILE__ \
24 << " line " << __LINE__ << ": " << message << std::endl; \
25 std::terminate(); \
26 } \
27 } while (false)