#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 L1_CACHE_LINE_SIZE 64 |
Referenced by AllocAligned().
| #define LOWER_MASK 0x7fffffffUL |
| #define M 397 |
Definition at line 319 of file util.cpp.
Referenced by genrand_int32(), and Transform::operator()().
| #define MATRIX_A 0x9908b0dfUL |
| #define N 624 |
Definition at line 318 of file util.cpp.
Referenced by CreateShape(), genrand_int32(), init_genrand(), Sphere::Intersect(), Paraboloid::Intersect(), Hyperboloid::Intersect(), Cylinder::Intersect(), Cone::Intersect(), SingleScattering::Li(), and EmissionIntegrator::Li().
| #define PBRT_ERROR_ABORT 2 |
| #define PBRT_ERROR_CONTINUE 1 |
| #define PBRT_ERROR_IGNORE 0 |
| #define UPPER_MASK 0x80000000UL |
| typedef map<std::pair<string, string>, StatTracker *> TrackerMap |
| static void addTracker | ( | StatTracker * | newTracker | ) | [static] |
Definition at line 196 of file util.cpp.
References StatTracker::category, StatTracker::name, StatTracker::ptra, StatTracker::ptrb, and trackers.
Referenced by StatsCounter::StatsCounter(), StatsPercentage::StatsPercentage(), and StatsRatio::StatsRatio().
| COREDLL void* AllocAligned | ( | size_t | size | ) |
Definition at line 389 of file util.cpp.
References L1_CACHE_LINE_SIZE.
Referenced by MemoryArena::Alloc(), ObjectArena< Voxel >::Alloc(), BlockedArray< Spectrum >::BlockedArray(), KdTreeAccel::buildTree(), GridAccel::GridAccel(), KdTree< NodeData, LookupProc >::KdTree(), KdTreeAccel::KdTreeAccel(), MemoryArena::MemoryArena(), MIPMap< T >::MIPMap(), RandomSampler::RandomSampler(), Sample::Sample(), and StratifiedSampler::StratifiedSampler().
| COREDLL void Error | ( | const char * | format, | |
| ... | ||||
| ) |
Definition at line 86 of file util.cpp.
References PBRT_ERROR_CONTINUE, and processError().
Referenced by CreateFloatTexture(), CreateShape(), CreateSpectrumTexture(), CreateSurfaceIntegrator(), CreateVolumeRegion(), TextureParams::GetFloatTexture(), GetPlugin(), TextureParams::GetSpectrumTexture(), Matrix4x4::Inverse(), main(), pbrtAttributeEnd(), pbrtCleanup(), pbrtInit(), pbrtLightSource(), pbrtObjectBegin(), pbrtObjectEnd(), pbrtObjectInstance(), pbrtTexture(), pbrtTransformEnd(), Plugin::Plugin(), PhotonIntegrator::Preprocess(), ExPhotonIntegrator::Preprocess(), ReadImage(), Scene::Render(), and WriteRGBAImage().
| COREDLL void FreeAligned | ( | void * | ptr | ) |
Definition at line 395 of file util.cpp.
Referenced by KdTreeAccel::buildTree(), ObjectArena< Voxel >::FreeAll(), BlockedArray< Spectrum >::~BlockedArray(), GridAccel::~GridAccel(), KdTree< Photon, PhotonProcess >::~KdTree(), KdTreeAccel::~KdTreeAccel(), MemoryArena::~MemoryArena(), RandomSampler::~RandomSampler(), Sample::~Sample(), and StratifiedSampler::~StratifiedSampler().
| 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 | ) |
| COREDLL float genrand_real2 | ( | void | ) |
| COREDLL void Info | ( | const char * | format, | |
| ... | ||||
| ) |
| static void init_genrand | ( | u_long | seed | ) | [static] |
| 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.
| COREDLL void Severe | ( | const char * | format, | |
| ... | ||||
| ) |
Definition at line 92 of file util.cpp.
References PBRT_ERROR_ABORT, and processError().
Referenced by Shape::Area(), Aggregate::GetAreaLight(), Aggregate::GetBSDF(), Plugin::GetSymbol(), include_push(), Shape::Intersect(), Shape::IntersectP(), DebugIntegrator::Li(), main(), RenderOptions::MakeScene(), SDFace::otherVert(), pbrtObjectInstance(), pbrtShape(), pbrtWorldEnd(), Shape::Refine(), Primitive::Refine(), Shape::Sample(), Timer::Timer(), and SDFace::vnum().
| COREDLL bool SolveLinearSystem2x2 | ( | const float | A[2][2], | |
| const float | B[2], | |||
| float | x[2] | |||
| ) |
Definition at line 99 of file util.cpp.
Referenced by DifferentialGeometry::ComputeDifferentials(), and Triangle::GetShadingGeometry().
| void StatsCleanup | ( | ) |
| void StatsPrint | ( | FILE * | dest | ) |
Definition at line 228 of file util.cpp.
References StatTracker::category, StatTracker::name, StatTracker::percentage, StatTracker::ptra, StatTracker::ptrb, StatsPrintVal(), and trackers.
Referenced by pbrtWorldEnd().
| static void StatsPrintVal | ( | FILE * | f, | |
| StatsCounterType | v1, | |||
| StatsCounterType | v2 | |||
| ) | [static] |
| static void StatsPrintVal | ( | FILE * | f, | |
| StatsCounterType | v | |||
| ) | [static] |
| COREDLL void Warning | ( | const char * | format, | |
| ... | ||||
| ) |
Definition at line 80 of file util.cpp.
References PBRT_ERROR_CONTINUE, and processError().
Referenced by AreaLight::AreaLight(), Camera::Camera(), Checkerboard2D< T >::Checkerboard2D(), CreateShape(), CreateSurfaceIntegrator(), LDSampler::LDSampler(), Light::Light(), pbrtShape(), pbrtTexture(), pbrtWorldEnd(), RenderOptions::RenderOptions(), and Scene::Scene().
unsigned long mt[N] [static] |
int mti = N+1 [static] |
TrackerMap trackers [static] |
Definition at line 195 of file util.cpp.
Referenced by addTracker(), StatsCleanup(), and StatsPrint().
1.5.6