vSMC
vSMC: Scalable Monte Carlo
Classes | Namespaces | Macros
assert.hpp File Reference
#include <vsmc/internal/config.h>
#include <cassert>
#include <cstdio>
#include <stdexcept>
#include <string>

Go to the source code of this file.

Classes

class  vsmc::RuntimeAssert
 
class  vsmc::RuntimeWarning
 

Namespaces

 vsmc
 

Macros

#define VSMC_RUNTIME_ASSERT(cond, msg)
 
#define VSMC_RUNTIME_WARNING(cond, msg)
 

Macro Definition Documentation

#define VSMC_RUNTIME_ASSERT (   cond,
  msg 
)
Value:
{ \
if (!(cond)) { \
std::fprintf(stderr, "vSMC runtime assertion failded:%s:%d:%s\n", \
__FILE__, __LINE__, msg); \
}; \
assert(cond); \
}

Definition at line 53 of file assert.hpp.

#define VSMC_RUNTIME_WARNING (   cond,
  msg 
)
Value:
{ \
if (!(cond)) { \
std::fprintf(stderr, \
"vSMC runtime warning; File: %s; Line: %d\n%s\n", __FILE__, \
__LINE__, msg); \
std::fflush(stderr); \
}; \
}

Definition at line 75 of file assert.hpp.