IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
PAssert.h File Reference
#include <exception>
#include <stdexcept>
#include <string>
#include "Utility/IpplInfo.h"
Include dependency graph for PAssert.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  IpplCTAssert< B >
struct  IpplCTAssert< true >
class  assertion

Macros

#define CTAssert(c)
#define PAssert(c)
#define PAssert_CMP(cmp, a, b)
#define PAssert_EQ(a, b)
#define PAssert_NE(a, b)
#define PAssert_LT(a, b)
#define PAssert_LE(a, b)
#define PAssert_GT(a, b)
#define PAssert_GE(a, b)
#define PInsist(c, m)

Functions

void toss_cookies (const char *cond, const char *file, int line)
template<class S, class T>
void toss_cookies (const char *cond, const char *astr, const char *bstr, S a, T b, const char *file, int line)
void insist (const char *cond, const char *msg, const char *file, int line)

Macro Definition Documentation

◆ CTAssert

#define CTAssert ( c)
Value:
IpplCTAssert<(c)>::test()

Definition at line 40 of file PAssert.h.

◆ PAssert

◆ PAssert_CMP

#define PAssert_CMP ( cmp,
a,
b )
Value:
if (!(cmp)) \
toss_cookies(#cmp, #a, #b, a, b, __FILE__, __LINE__);

Definition at line 119 of file PAssert.h.

◆ PAssert_EQ

#define PAssert_EQ ( a,
b )
Value:
PAssert_CMP(a == b, a, b)
#define PAssert_CMP(cmp, a, b)
Definition PAssert.h:119

Definition at line 123 of file PAssert.h.

Referenced by ippl::detail::Partitioner< Dim >::split(), ippl::Index::split(), ippl::Index::split(), ippl::Index::split(), and IpplTimings::stash().

◆ PAssert_GE

#define PAssert_GE ( a,
b )
Value:
PAssert_CMP(a >= b, a, b)

Definition at line 128 of file PAssert.h.

Referenced by ippl::do_intersect(), and ippl::Index::Index().

◆ PAssert_GT

#define PAssert_GT ( a,
b )

◆ PAssert_LE

#define PAssert_LE ( a,
b )
Value:
PAssert_CMP(a <= b, a, b)

Definition at line 126 of file PAssert.h.

Referenced by ippl::BareField< T, Dim, ViewArgs... >::getFieldRangePolicy().

◆ PAssert_LT

#define PAssert_LT ( a,
b )
Value:
PAssert_CMP(a < b, a, b)

Definition at line 125 of file PAssert.h.

Referenced by ippl::UniformCartesian< T, Dim >::getMeshSpacing(), and ippl::Index::split().

◆ PAssert_NE

#define PAssert_NE ( a,
b )
Value:
PAssert_CMP(a != b, a, b)

Definition at line 124 of file PAssert.h.

Referenced by ippl::Index::Index().

◆ PInsist

#define PInsist ( c,
m )
Value:
if (!(c)) \
insist(#c, m, __FILE__, __LINE__);

Definition at line 139 of file PAssert.h.

Function Documentation

◆ insist()

void insist ( const char * cond,
const char * msg,
const char * file,
int line )

Definition at line 84 of file PAssert.cpp.

◆ toss_cookies() [1/2]

template<class S, class T>
void toss_cookies ( const char * cond,
const char * astr,
const char * bstr,
S a,
T b,
const char * file,
int line )

Definition at line 81 of file PAssert.h.

◆ toss_cookies() [2/2]

void toss_cookies ( const char * cond,
const char * file,
int line )

Definition at line 73 of file PAssert.cpp.