BenchTimer.h File Reference
#include <unistd.h>
#include <Eigen/Core>

Go to the source code of this file.

Classes

class  Eigen::BenchTimer
 

Namespaces

 Eigen
 Namespace containing all symbols from the Eigen library.
 

Macros

#define BENCH(TIMER, TRIES, REP, CODE)
 

Enumerations

enum  { Eigen::CPU_TIMER = 0 , Eigen::REAL_TIMER = 1 }
 

Functions

static void escape (void *p)
 
static void clobber ()
 

Macro Definition Documentation

◆ BENCH

#define BENCH (   TIMER,
  TRIES,
  REP,
  CODE 
)
Value:
{ \
TIMER.reset(); \
for (int uglyvarname1 = 0; uglyvarname1 < TRIES; ++uglyvarname1) { \
TIMER.start(); \
for (int uglyvarname2 = 0; uglyvarname2 < REP; ++uglyvarname2) { \
CODE; \
} \
TIMER.stop(); \
clobber(); \
} \
}
#define TRIES
Definition: bench_reverse.cpp:12

Function Documentation

◆ clobber()

static void clobber ( )
static
36  {
37 #if EIGEN_COMP_GNUC || EIGEN_COMP_CLANG
38  asm volatile("" : : : "memory");
39 #endif
40 }

◆ escape()

static void escape ( void *  p)
static
30  {
31 #if EIGEN_COMP_GNUC || EIGEN_COMP_CLANG
32  asm volatile("" : : "g"(p) : "memory");
33 #endif
34 }
float * p
Definition: Tutorial_Map_using.cpp:9

References p.

Referenced by rapidjson::GenericReader< Encoding, Allocator >::ParseString(), and rapidjson::Writer< Stream, Encoding, Allocator >::WriteString().