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

Go to the source code of this file.

Classes

class  vsmc::RuntimeAssert
 
class  vsmc::RuntimeWarning
 

Namespaces

 vsmc
 
 vsmc::internal
 

Macros

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

Functions

template<typename IntType , typename SizeType >
void vsmc::internal::size_check (SizeType n, const char *f)
 

Macro Definition Documentation

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

Definition at line 59 of file assert.hpp.

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

Definition at line 81 of file assert.hpp.