Go to the documentation of this file.
44 #ifndef MAT_DEBUGPOLICIES
45 #define MAT_DEBUGPOLICIES
51 #define ASSERTALWAYS(x) \
52 this->assertAlways(__FILE__, __LINE__, __DATE__, __TIME__,x)
53 #define ASSERTDEBUG(x) \
54 this->assertDebug(__FILE__, __LINE__, __DATE__, __TIME__,x)
57 class DebugLevelHigh {
59 void assertAlways(
char const * theFile,
int const theLine,
60 char const * theDate,
char const * theTime,
61 bool const statement)
const {
63 std::cout<<
"Assertion failed: "<<theFile<<
":"<<theLine
64 <<
" Compiled on "<<theDate<<
" at "<<theTime<<
".\n";
68 inline void assertDebug(
char const * theFile,
int const theLine,
69 char const * theDate,
char const * theTime,
70 bool const statement)
const {
71 assertAlways(theFile, theLine, theDate, theTime, statement);
74 class DebugLevelMedium :
public DebugLevelHigh {};
75 class DebugLevelLow :
public DebugLevelMedium {
77 inline void assertDebug(
char const * theFile,
int const theLine,
78 char const * theDate,
char const * theTime,
79 bool const statement)
const {}
85 #define ASSERTALWAYS(x) \
86 this->assertAlways(__FILE__, __LINE__, __ID__,x)
87 #define ASSERTDEBUG(x) \
88 this->assertDebug(__FILE__, __LINE__, __ID__,x)
94 char const * theId,
bool const statement)
const {
96 std::cout<<
"Assertion failed: "<<theFile<<
":"<<theLine
97 <<
" svn info: "<<theId<<
".\n";
102 char const * theId,
bool const statement)
const {
110 char const * theId,
bool const statement)
const {}
static void tomatlabfile(char *name, T *values, int s, std::ofstream &output)
Definition: DebugPolicies.h:106
ergo_real real
Definition: test.cc:46
Definition: DebugPolicies.h:107
static void gemm(const char *ta, const char *tb, const int *n, const int *k, const int *l, const T *alpha, const T *A, const int *lda, const T *B, const int *ldb, const T *beta, T *C, const int *ldc)
Definition: mat_gblas.h:232
Definition: DebugPolicies.h:91
Definition: allocate.cc:39
void assertDebug(char const *theFile, int const theLine, char const *theId, bool const statement) const
Definition: DebugPolicies.h:109
static const int SIZE_INCREMENT
Definition: blastime.cc:49
static const int MIN_TIME_PER_STEP
Definition: blastime.cc:48
static double get_wall_seconds()
Definition: blastime.cc:51
int mainFun(int maxDim, double *timev, double *gflops, bool writeTomFile)
Definition: blastime.cc:62
int main(int argc, char *argv[])
Definition: blastime.cc:160
void assertDebug(char const *theFile, int const theLine, char const *theId, bool const statement) const
Definition: DebugPolicies.h:101
void assertAlways(char const *theFile, int const theLine, char const *theId, bool const statement) const
Definition: DebugPolicies.h:93