PSCF v1.1
Macros
global.h File Reference

File containing preprocessor macros for error handling. More...

#include <mpi.h>
#include <util/misc/Log.h>
#include "assert.h"
#include "misc/Exception.h"

Go to the source code of this file.

Macros

#define NDEBUG
 Include access to a Log file. More...
 
#define UTIL_FUNC   __PRETTY_FUNCTION__
 Macro for the name of the current function (compiler dependent). More...
 
#define UTIL_THROW(msg)
 Macro for throwing an Exception, reporting function, file and line number. More...
 
#define UTIL_CHECK(condition)    if (!(condition)) { UTIL_THROW("Failed assertion: " #condition); }
 Assertion macro suitable for serial or parallel production code. More...
 
#define UTIL_ASSERT(condition)   {}
 Assertion macro suitable for debugging serial or parallel code. More...
 

Detailed Description

File containing preprocessor macros for error handling.

Definition in file global.h.

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Include access to a Log file.

If defined, disable all C assert(...) statements.

Definition at line 32 of file global.h.

◆ UTIL_FUNC

#define UTIL_FUNC   __PRETTY_FUNCTION__

Macro for the name of the current function (compiler dependent).

Definition at line 42 of file global.h.

◆ UTIL_THROW

#define UTIL_THROW (   msg)
Value:
{ \
Exception e(UTIL_FUNC, msg, __FILE__, __LINE__); \
MpiThrow(e); }
#define UTIL_FUNC
Macro for the name of the current function (compiler dependent).
Definition: global.h:42

Macro for throwing an Exception, reporting function, file and line number.

Definition at line 51 of file global.h.

◆ UTIL_CHECK

#define UTIL_CHECK (   condition)     if (!(condition)) { UTIL_THROW("Failed assertion: " #condition); }

Assertion macro suitable for serial or parallel production code.

Definition at line 68 of file global.h.

◆ UTIL_ASSERT

#define UTIL_ASSERT (   condition)    {}

Assertion macro suitable for debugging serial or parallel code.

Definition at line 75 of file global.h.