parallel.h File Reference

#include "pbrt.h"
#include <pthread.h>
#include <semaphore.h>
#include "core/probes.h"

Go to the source code of this file.

Classes

class  Mutex
struct  MutexLock
class  RWMutex
struct  RWMutexLock
class  Semaphore
class  ConditionVariable
class  Task

Typedefs

typedef volatile int32_t AtomicInt32

Enumerations

enum  RWMutexLockType { READ, WRITE }

Functions

int32_t AtomicAdd (AtomicInt32 *v, int32_t delta)
int32_t AtomicCompareAndSwap (AtomicInt32 *v, int32_t newValue, int32_t oldValue)
template<typename T >
T * AtomicCompareAndSwapPointer (T **v, T *newValue, T *oldValue)
float AtomicAdd (volatile float *val, float delta)
void TasksInit ()
void TasksCleanup ()
void EnqueueTasks (const vector< Task * > &tasks)
void WaitForAllTasks ()
int NumSystemCores ()

Typedef Documentation

typedef volatile int32_t AtomicInt32

Definition at line 59 of file parallel.h.


Enumeration Type Documentation

Enumerator:
READ 
WRITE 

Definition at line 265 of file parallel.h.


Function Documentation

float AtomicAdd ( volatile float *  val,
float  delta 
) [inline]

Definition at line 180 of file parallel.h.

References AtomicCompareAndSwap().

int32_t AtomicAdd ( AtomicInt32 v,
int32_t  delta 
) [inline]
int32_t AtomicCompareAndSwap ( AtomicInt32 v,
int32_t  newValue,
int32_t  oldValue 
) [inline]

Definition at line 98 of file parallel.h.

Referenced by AtomicAdd().

template<typename T >
T* AtomicCompareAndSwapPointer ( T **  v,
T *  newValue,
T *  oldValue 
) [inline]

Definition at line 116 of file parallel.h.

void EnqueueTasks ( const vector< Task * > &  tasks  ) 
int NumSystemCores (  ) 
void TasksCleanup (  ) 
void TasksInit (  ) 

Definition at line 714 of file parallel.cpp.

References Options::nCores, NumSystemCores(), PbrtOptions, Severe(), taskEntry(), and threads.

Referenced by EnqueueTasks().

void WaitForAllTasks (  ) 
Generated on Sat Aug 28 20:00:12 2010 for pbrt by  doxygen 1.6.3