Proto  3.2
Namespaces | Macros | Functions
Proto_PAssert.H File Reference
#include <cassert>
#include <cstdio>
#include <stdio.h>
#include <cstdlib>
#include <string>
#include <sstream>
#include <vector>
Include dependency graph for Proto_PAssert.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 ProtoUtils
 

Macros

#define __PROTO_ASSERT__
 
#define PROTO_ASSERT(stmt, args...)
 
#define PR_DEBUG_MSG(N, args...)
 
#define PR_assert(stmt)   assert( (stmt) );
 
#define PR_error(stmt)
 
#define PR_warning(stmt)   fprintf(stderr,"warning thrown = `" #stmt "` !!!\n\t");
 

Functions

std::vector< std::string > ProtoUtils::split_string (const std::string &s, char delim)
 

Macro Definition Documentation

◆ __PROTO_ASSERT__

#define __PROTO_ASSERT__

◆ PROTO_ASSERT

#define PROTO_ASSERT (   stmt,
  args... 
)

◆ PR_DEBUG_MSG

#define PR_DEBUG_MSG (   N,
  args... 
)
Value:
if (N <= PR_VERBOSE) \
{ \
auto words = ProtoUtils::split_string(__FILE__, '/'); \
string filename = words[words.size()-1]; \
char prefix[100]; \
char message[500]; \
(fprintf(stdout, "DEBUG | %s:%d: ", filename.c_str(), __LINE__) && \
fprintf(stdout, args) && \
fprintf(stdout, "\n")); \
}
std::vector< std::string > split_string(const std::string &s, char delim)
Definition: Proto_PAssert.H:14

◆ PR_assert

#define PR_assert (   stmt)    assert( (stmt) );

Referenced by Proto::initKernel().

◆ PR_error

#define PR_error (   stmt)
Value:
fprintf(stderr,"error thrown = `" #stmt "`!!!\n\t"); \
std::abort();

◆ PR_warning

#define PR_warning (   stmt)    fprintf(stderr,"warning thrown = `" #stmt "` !!!\n\t");