parallel.cpp File Reference

#include "stdafx.h"
#include "parallel.h"
#include "memory.h"
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <sys/sysctl.h>
#include <errno.h>
#include <list>

Go to the source code of this file.

Functions

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

Variables

static pthread_t * threads
static MutextaskQueueMutex = Mutex::Create()
static std::vector< Task * > taskQueue
static SemaphoreworkerSemaphore
static uint32_t numUnfinishedTasks
static ConditionVariabletasksRunningCondition

Function Documentation

void EnqueueTasks ( const vector< Task * > &  tasks  ) 
int NumSystemCores (  ) 
static void * taskEntry ( void *  arg  )  [static]
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 (  ) 

Variable Documentation

uint32_t numUnfinishedTasks [static]

Definition at line 58 of file parallel.cpp.

Referenced by EnqueueTasks(), taskEntry(), and WaitForAllTasks().

std::vector<Task *> taskQueue [static]

Definition at line 54 of file parallel.cpp.

Referenced by EnqueueTasks(), taskEntry(), and TasksCleanup().

Mutex* taskQueueMutex = Mutex::Create() [static]

Definition at line 53 of file parallel.cpp.

Definition at line 59 of file parallel.cpp.

pthread_t* threads [static]

Definition at line 47 of file parallel.cpp.

Referenced by EnqueueTasks(), TasksCleanup(), and TasksInit().

Definition at line 57 of file parallel.cpp.

Generated on Sat Aug 28 20:00:12 2010 for pbrt by  doxygen 1.6.3