util.cpp File Reference

#include "pbrt.h"
#include "timer.h"
#include <map>
#include <stdarg.h>

Go to the source code of this file.

Classes

struct  StatTracker

Defines

#define PBRT_ERROR_IGNORE   0
#define PBRT_ERROR_CONTINUE   1
#define PBRT_ERROR_ABORT   2
#define N   624
#define M   397
#define MATRIX_A   0x9908b0dfUL
#define UPPER_MASK   0x80000000UL
#define LOWER_MASK   0x7fffffffUL
#define L1_CACHE_LINE_SIZE   64

Typedefs

typedef map< std::pair< string,
string >, StatTracker * > 
TrackerMap

Functions

static void processError (const char *format, va_list args, const char *message, int disposition)
COREDLL void Info (const char *format,...)
COREDLL void Warning (const char *format,...)
COREDLL void Error (const char *format,...)
COREDLL void Severe (const char *format,...)
COREDLL bool SolveLinearSystem2x2 (const float A[2][2], const float B[2], float x[2])
static void addTracker (StatTracker *newTracker)
static void StatsPrintVal (FILE *f, StatsCounterType v)
static void StatsPrintVal (FILE *f, StatsCounterType v1, StatsCounterType v2)
void StatsPrint (FILE *dest)
void StatsCleanup ()
static void init_genrand (u_long seed)
COREDLL unsigned long genrand_int32 (void)
COREDLL float genrand_real1 (void)
COREDLL float genrand_real2 (void)
COREDLL void * AllocAligned (size_t size)
COREDLL void FreeAligned (void *ptr)

Variables

static TrackerMap trackers
static unsigned long mt [N]
static int mti = N+1


Define Documentation

#define L1_CACHE_LINE_SIZE   64

Referenced by AllocAligned().

#define LOWER_MASK   0x7fffffffUL

Definition at line 322 of file util.cpp.

Referenced by genrand_int32().

#define M   397

Definition at line 319 of file util.cpp.

Referenced by genrand_int32(), and Transform::operator()().

#define MATRIX_A   0x9908b0dfUL

Definition at line 320 of file util.cpp.

Referenced by genrand_int32().

#define N   624

#define PBRT_ERROR_ABORT   2

Definition at line 34 of file util.cpp.

Referenced by processError(), and Severe().

#define PBRT_ERROR_CONTINUE   1

Definition at line 33 of file util.cpp.

Referenced by Error(), Info(), processError(), and Warning().

#define PBRT_ERROR_IGNORE   0

Definition at line 32 of file util.cpp.

Referenced by processError().

#define UPPER_MASK   0x80000000UL

Definition at line 321 of file util.cpp.

Referenced by genrand_int32().


Typedef Documentation

typedef map<std::pair<string, string>, StatTracker *> TrackerMap

Definition at line 194 of file util.cpp.


Function Documentation

static void addTracker ( StatTracker newTracker  )  [static]

COREDLL void* AllocAligned ( size_t  size  ) 

COREDLL void Error ( const char *  format,
  ... 
)

COREDLL void FreeAligned ( void *  ptr  ) 

COREDLL unsigned long genrand_int32 ( void   ) 

Definition at line 340 of file util.cpp.

References init_genrand(), LOWER_MASK, M, MATRIX_A, mt, mti, N, and UPPER_MASK.

Referenced by genrand_real1(), genrand_real2(), and RandomUInt().

COREDLL float genrand_real1 ( void   ) 

Definition at line 377 of file util.cpp.

References genrand_int32().

COREDLL float genrand_real2 ( void   ) 

Definition at line 383 of file util.cpp.

References genrand_int32().

Referenced by RandomFloat().

COREDLL void Info ( const char *  format,
  ... 
)

Definition at line 74 of file util.cpp.

References PBRT_ERROR_CONTINUE, and processError().

static void init_genrand ( u_long  seed  )  [static]

Definition at line 327 of file util.cpp.

References mt, mti, and N.

Referenced by genrand_int32().

static void processError ( const char *  format,
va_list  args,
const char *  message,
int  disposition 
) [static]

Definition at line 36 of file util.cpp.

References current_file, line_num, PBRT_ERROR_ABORT, PBRT_ERROR_CONTINUE, and PBRT_ERROR_IGNORE.

Referenced by Error(), Info(), Severe(), and Warning().

COREDLL void Severe ( const char *  format,
  ... 
)

COREDLL bool SolveLinearSystem2x2 ( const float  A[2][2],
const float  B[2],
float  x[2] 
)

void StatsCleanup (  ) 

Definition at line 277 of file util.cpp.

References trackers.

Referenced by pbrtCleanup().

void StatsPrint ( FILE *  dest  ) 

static void StatsPrintVal ( FILE *  f,
StatsCounterType  v1,
StatsCounterType  v2 
) [static]

Definition at line 269 of file util.cpp.

static void StatsPrintVal ( FILE *  f,
StatsCounterType  v 
) [static]

Definition at line 263 of file util.cpp.

Referenced by StatsPrint().

COREDLL void Warning ( const char *  format,
  ... 
)


Variable Documentation

unsigned long mt[N] [static]

Definition at line 324 of file util.cpp.

Referenced by genrand_int32(), and init_genrand().

int mti = N+1 [static]

Definition at line 325 of file util.cpp.

Referenced by genrand_int32(), and init_genrand().

TrackerMap trackers [static]

Definition at line 195 of file util.cpp.

Referenced by addTracker(), StatsCleanup(), and StatsPrint().


Generated on Mon Jul 20 17:31:54 2009 for pbrt by  doxygen 1.5.6