luxrays::OpenCLPixelDevice Class Reference

#include <pixeldevice.h>

Inheritance diagram for luxrays::OpenCLPixelDevice:
luxrays::PixelDevice luxrays::Device

List of all members.

Public Member Functions

 OpenCLPixelDevice (const Context *context, OpenCLDeviceDescription *desc, const unsigned int index)
 ~OpenCLPixelDevice ()
void Init (const unsigned int w, const unsigned int h)
void ClearFrameBuffer ()
void ClearSampleFrameBuffer ()
void SetGamma (const float gamma=2.2f)
void Start ()
void Interrupt ()
void Stop ()
SampleBufferGetFreeSampleBuffer ()
void FreeSampleBuffer (SampleBuffer *sampleBuffer)
void AddSampleBuffer (const FilterType type, SampleBuffer *sampleBuffer)
void Merge (const SampleFrameBuffer *sfb)
const SampleFrameBufferGetSampleFrameBuffer () const
void UpdateFrameBuffer (const ToneMapParams &params)
const FrameBufferGetFrameBuffer () const
const OpenCLDeviceDescriptionGetDeviceDesc () const
unsigned int GetFreeDevBufferCount ()
unsigned int GetTotalDevBufferCount ()

Static Public Attributes

static size_t SampleBufferSize = 65536

Private Member Functions

void CompileKernel (cl::Context &ctx, cl::Device &device, const std::string &src, const char *kernelName, cl::Kernel **kernel)

Private Attributes

OpenCLDeviceDescriptiondeviceDesc
SampleFrameBuffersampleFrameBuffer
FrameBufferframeBuffer
boost::mutex splatMutex
cl::CommandQueue * oclQueue
cl::Kernel * clearFBKernel
size_t clearFBWorkGroupSize
cl::Kernel * clearSampleFBKernel
cl::Kernel * addSampleBufferKernel
cl::Kernel * addSampleBufferPreviewKernel
cl::Kernel * addSampleBufferGaussian2x2Kernel
cl::Kernel * updateFrameBufferKernel
cl::Buffer * sampleFrameBuff
cl::Buffer * frameBuff
std::vector< OpenCLSampleBuffer * > sampleBuffers
std::deque< OpenCLSampleBuffer * > freeSampleBuffers
cl::Buffer * gammaTableBuff
cl::Buffer * filterTableBuff
float gammaTable [GammaTableSize]
float Gaussian2x2_filterTable [FilterTableSize *FilterTableSize]

Static Private Attributes

static const unsigned int GammaTableSize = 1024
static const unsigned int FilterTableSize = 16

Friends

class Context
class OpenCLSampleBuffer

Detailed Description

Definition at line 236 of file pixeldevice.h.


Constructor & Destructor Documentation

OpenCLPixelDevice::OpenCLPixelDevice ( const Context context,
OpenCLDeviceDescription desc,
const unsigned int  index 
)
OpenCLPixelDevice::~OpenCLPixelDevice (  ) 

Member Function Documentation

void OpenCLPixelDevice::AddSampleBuffer ( const FilterType  type,
SampleBuffer sampleBuffer 
) [virtual]
void OpenCLPixelDevice::ClearFrameBuffer (  )  [virtual]
void OpenCLPixelDevice::ClearSampleFrameBuffer (  )  [virtual]
void OpenCLPixelDevice::CompileKernel ( cl::Context &  ctx,
cl::Device &  device,
const std::string &  src,
const char *  kernelName,
cl::Kernel **  kernel 
) [private]

Definition at line 185 of file openclpdevice.cpp.

References luxrays::Device::deviceContext, luxrays::Device::deviceName, and LR_LOG.

Referenced by OpenCLPixelDevice().

void OpenCLPixelDevice::FreeSampleBuffer ( SampleBuffer sampleBuffer  )  [virtual]

Implements luxrays::PixelDevice.

Definition at line 327 of file openclpdevice.cpp.

References freeSampleBuffers, and splatMutex.

const OpenCLDeviceDescription* luxrays::OpenCLPixelDevice::GetDeviceDesc (  )  const [inline]

Definition at line 261 of file pixeldevice.h.

References deviceDesc.

const FrameBuffer* luxrays::OpenCLPixelDevice::GetFrameBuffer (  )  const [inline, virtual]

Implements luxrays::PixelDevice.

Definition at line 259 of file pixeldevice.h.

References frameBuffer.

unsigned int luxrays::OpenCLPixelDevice::GetFreeDevBufferCount (  )  [inline]

Definition at line 263 of file pixeldevice.h.

References freeSampleBuffers, and splatMutex.

SampleBuffer * OpenCLPixelDevice::GetFreeSampleBuffer (  )  [virtual]
const SampleFrameBuffer * OpenCLPixelDevice::GetSampleFrameBuffer (  )  const [virtual]

Implements luxrays::PixelDevice.

Definition at line 423 of file openclpdevice.cpp.

References sampleFrameBuffer.

unsigned int luxrays::OpenCLPixelDevice::GetTotalDevBufferCount (  )  [inline]

Definition at line 268 of file pixeldevice.h.

References sampleBuffers, and splatMutex.

void OpenCLPixelDevice::Init ( const unsigned int  w,
const unsigned int  h 
) [virtual]
void OpenCLPixelDevice::Interrupt (  )  [virtual]

Implements luxrays::Device.

Definition at line 286 of file openclpdevice.cpp.

References splatMutex, and luxrays::Device::started.

void OpenCLPixelDevice::Merge ( const SampleFrameBuffer sfb  )  [virtual]

Implements luxrays::PixelDevice.

Definition at line 419 of file openclpdevice.cpp.

void OpenCLPixelDevice::SetGamma ( const float  gamma = 2.2f  )  [virtual]

Implements luxrays::PixelDevice.

Definition at line 266 of file openclpdevice.cpp.

References luxrays::Clamp(), gammaTable, gammaTableBuff, GammaTableSize, and oclQueue.

Referenced by OpenCLPixelDevice().

void OpenCLPixelDevice::Start (  )  [virtual]

Reimplemented from luxrays::PixelDevice.

Definition at line 280 of file openclpdevice.cpp.

References splatMutex.

void OpenCLPixelDevice::Stop (  )  [virtual]

Reimplemented from luxrays::Device.

Definition at line 291 of file openclpdevice.cpp.

References oclQueue, and splatMutex.

Referenced by ~OpenCLPixelDevice().

void OpenCLPixelDevice::UpdateFrameBuffer ( const ToneMapParams params  )  [virtual]

Friends And Related Function Documentation

friend class Context [friend]

Reimplemented from luxrays::PixelDevice.

Definition at line 276 of file pixeldevice.h.

friend class OpenCLSampleBuffer [friend]

Definition at line 277 of file pixeldevice.h.

Referenced by GetFreeSampleBuffer().


Member Data Documentation

Definition at line 302 of file pixeldevice.h.

Referenced by AddSampleBuffer(), OpenCLPixelDevice(), and ~OpenCLPixelDevice().

Definition at line 300 of file pixeldevice.h.

Referenced by AddSampleBuffer(), OpenCLPixelDevice(), and ~OpenCLPixelDevice().

Definition at line 301 of file pixeldevice.h.

Referenced by AddSampleBuffer(), OpenCLPixelDevice(), and ~OpenCLPixelDevice().

Definition at line 296 of file pixeldevice.h.

Referenced by ClearFrameBuffer(), OpenCLPixelDevice(), and ~OpenCLPixelDevice().

Definition at line 297 of file pixeldevice.h.

Definition at line 299 of file pixeldevice.h.

Referenced by ClearSampleFrameBuffer(), OpenCLPixelDevice(), and ~OpenCLPixelDevice().

Definition at line 313 of file pixeldevice.h.

Referenced by AddSampleBuffer(), OpenCLPixelDevice(), and ~OpenCLPixelDevice().

const unsigned int luxrays::OpenCLPixelDevice::FilterTableSize = 16 [static, private]

Definition at line 281 of file pixeldevice.h.

Referenced by OpenCLPixelDevice().

Definition at line 315 of file pixeldevice.h.

Referenced by SetGamma().

Definition at line 312 of file pixeldevice.h.

Referenced by OpenCLPixelDevice(), SetGamma(), UpdateFrameBuffer(), and ~OpenCLPixelDevice().

const unsigned int luxrays::OpenCLPixelDevice::GammaTableSize = 1024 [static, private]

Definition at line 280 of file pixeldevice.h.

Referenced by OpenCLPixelDevice(), and SetGamma().

Definition at line 316 of file pixeldevice.h.

Referenced by OpenCLPixelDevice().

cl::CommandQueue* luxrays::OpenCLPixelDevice::oclQueue [private]
size_t OpenCLPixelDevice::SampleBufferSize = 65536 [static]

Definition at line 287 of file pixeldevice.h.

Referenced by GetSampleFrameBuffer(), Init(), OpenCLPixelDevice(), and ~OpenCLPixelDevice().

Definition at line 303 of file pixeldevice.h.

Referenced by OpenCLPixelDevice(), UpdateFrameBuffer(), and ~OpenCLPixelDevice().


The documentation for this class was generated from the following files:
Generated on Sat Aug 21 14:06:20 2010 for LuxRays by  doxygen 1.6.3