OPALX (Object Oriented Parallel Accelerator Library for Exascale) MINIorX
OPALX
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)   IpplCTAssert<(c)>::test()
 
#define PAssert(c)
 
#define PAssert_CMP(cmp, a, b)
 
#define PAssert_EQ(a, b)   PAssert_CMP(a == b, a, b)
 
#define PAssert_NE(a, b)   PAssert_CMP(a != b, a, b)
 
#define PAssert_LT(a, b)   PAssert_CMP(a < b, a, b)
 
#define PAssert_LE(a, b)   PAssert_CMP(a <= b, a, b)
 
#define PAssert_GT(a, b)   PAssert_CMP(a > b, a, b)
 
#define PAssert_GE(a, b)   PAssert_CMP(a >= b, 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)
 

Class Documentation

◆ IpplCTAssert

struct IpplCTAssert
template<bool B>
struct IpplCTAssert< B >

Definition at line 30 of file PAssert.h.

Collaboration diagram for IpplCTAssert< B >:
Collaboration graph

Macro Definition Documentation

◆ CTAssert

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

Definition at line 40 of file PAssert.h.

◆ PAssert

#define PAssert (   c)
Value:
if (!(c)) \
toss_cookies(#c, __FILE__, __LINE__);
constexpr double c
The velocity of light in m/s.
Definition: Physics.h:45

Definition at line 116 of file PAssert.h.

◆ PAssert_CMP

#define PAssert_CMP (   cmp,
  a,
 
)
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,
 
)    PAssert_CMP(a == b, a, b)

Definition at line 123 of file PAssert.h.

◆ PAssert_GE

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

Definition at line 128 of file PAssert.h.

◆ PAssert_GT

#define PAssert_GT (   a,
 
)    PAssert_CMP(a > b, a, b)

Definition at line 127 of file PAssert.h.

◆ PAssert_LE

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

Definition at line 126 of file PAssert.h.

◆ PAssert_LT

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

Definition at line 125 of file PAssert.h.

◆ PAssert_NE

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

Definition at line 124 of file PAssert.h.

◆ PInsist

#define PInsist (   c,
 
)
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,
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.