luxrays::OpenCLIntersectionDevice Class Reference

#include <intersectiondevice.h>

Inheritance diagram for luxrays::OpenCLIntersectionDevice:
luxrays::HardwareIntersectionDevice luxrays::IntersectionDevice luxrays::Device

List of all members.

Public Member Functions

 OpenCLIntersectionDevice (const Context *context, OpenCLDeviceDescription *desc, const unsigned int index, const unsigned int forceWGSize)
 ~OpenCLIntersectionDevice ()
void SetDataSet (const DataSet *newDataSet)
void Start ()
void Interrupt ()
void Stop ()
RayBufferNewRayBuffer ()
size_t GetQueueSize ()
void PushRayBuffer (RayBuffer *rayBuffer)
RayBufferPopRayBuffer ()
const OpenCLDeviceDescriptionGetDeviceDesc () const
double GetLoad () const
void SetQBVHDisableImageStorage (const bool v)
cl::Context & GetOpenCLContext ()
cl::Device & GetOpenCLDevice ()
cl::CommandQueue & GetOpenCLQueue ()
unsigned int GetForceWorkGroupSize () const
void EnqueueTraceRayBuffer (cl::Buffer &rBuff, cl::Buffer &hBuff, const unsigned int rayCount)

Static Public Attributes

static size_t RayBufferSize = OPENCL_RAYBUFFER_SIZE

Protected Member Functions

void SetExternalRayBufferQueue (RayBufferQueue *queue)
void UpdateDataSet ()

Private Member Functions

void TraceRayBuffer (RayBuffer *rayBuffer, cl::Event *event)
void FreeDataSetBuffers ()

Static Private Member Functions

static void IntersectionThread (OpenCLIntersectionDevice *renderDevice)

Private Attributes

unsigned int forceWorkGroupSize
OpenCLDeviceDescriptiondeviceDesc
boost::thread * intersectionThread
cl::CommandQueue * oclQueue
cl::Kernel * bvhKernel
size_t bvhWorkGroupSize
cl::Buffer * vertsBuff
cl::Buffer * trisBuff
cl::Buffer * bvhBuff
cl::Kernel * qbvhKernel
size_t qbvhWorkGroupSize
cl::Buffer * qbvhBuff
cl::Buffer * qbvhTrisBuff
cl::Kernel * qbvhImageKernel
size_t qbvhImageWorkGroupSize
cl::Image2D * qbvhImageBuff
cl::Image2D * qbvhTrisImageBuff
cl::Kernel * mqbvhKernel
size_t mqbvhWorkGroupSize
cl::Buffer * mqbvhBuff
cl::Buffer * mqbvhMemMapBuff
cl::Buffer * mqbvhLeafBuff
cl::Buffer * mqbvhLeafQuadTrisBuff
cl::Buffer * mqbvhInvTransBuff
cl::Buffer * mqbvhTrisOffsetBuff
cl::Buffer * raysBuff
cl::Buffer * hitsBuff
RayBufferQueueO2O rayBufferQueue
RayBufferQueueexternalRayBufferQueue
bool reportedPermissionError
bool qbvhUseImage
bool qbvhDisableImageStorage

Friends

class Context

Detailed Description

Definition at line 114 of file intersectiondevice.h.


Constructor & Destructor Documentation

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

Member Function Documentation

void OpenCLIntersectionDevice::EnqueueTraceRayBuffer ( cl::Buffer &  rBuff,
cl::Buffer &  hBuff,
const unsigned int  rayCount 
)
void OpenCLIntersectionDevice::FreeDataSetBuffers (  )  [private]
const OpenCLDeviceDescription* luxrays::OpenCLIntersectionDevice::GetDeviceDesc (  )  const [inline]

Definition at line 130 of file intersectiondevice.h.

References deviceDesc.

unsigned int luxrays::OpenCLIntersectionDevice::GetForceWorkGroupSize (  )  const [inline]

Definition at line 148 of file intersectiondevice.h.

References forceWorkGroupSize.

double luxrays::OpenCLIntersectionDevice::GetLoad (  )  const [inline, virtual]
cl::Context& luxrays::OpenCLIntersectionDevice::GetOpenCLContext (  )  [inline]
cl::Device& luxrays::OpenCLIntersectionDevice::GetOpenCLDevice (  )  [inline]
cl::CommandQueue& luxrays::OpenCLIntersectionDevice::GetOpenCLQueue (  )  [inline]

Definition at line 147 of file intersectiondevice.h.

References oclQueue.

size_t luxrays::OpenCLIntersectionDevice::GetQueueSize (  )  [inline, virtual]
void OpenCLIntersectionDevice::Interrupt (  )  [virtual]

Implements luxrays::Device.

Definition at line 685 of file openclidevice.cpp.

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

void OpenCLIntersectionDevice::IntersectionThread ( OpenCLIntersectionDevice renderDevice  )  [static, private]
RayBuffer * OpenCLIntersectionDevice::NewRayBuffer (  )  [virtual]

Implements luxrays::IntersectionDevice.

Definition at line 104 of file openclidevice.cpp.

References RayBufferSize.

RayBuffer * OpenCLIntersectionDevice::PopRayBuffer (  )  [virtual]
void OpenCLIntersectionDevice::PushRayBuffer ( RayBuffer rayBuffer  )  [virtual]
void OpenCLIntersectionDevice::SetDataSet ( const DataSet newDataSet  )  [virtual]

Reimplemented from luxrays::IntersectionDevice.

Definition at line 170 of file openclidevice.cpp.

References luxrays::DataSet::accel, luxrays::ACCEL_BVH, luxrays::ACCEL_MQBVH, luxrays::ACCEL_QBVH, luxrays::MQBVHAccel::accels, bvhBuff, bvhKernel, luxrays::BVHAccel::bvhTree, bvhWorkGroupSize, luxrays::QBVHNode::children, luxrays::IntersectionDevice::dataSet, luxrays::Device::deviceContext, deviceDesc, luxrays::Device::deviceName, luxrays::QBVHNode::FirstQuadIndex(), forceWorkGroupSize, FreeDataSetBuffers(), luxrays::DataSet::GetAcceleratorType(), luxrays::OpenCLDeviceDescription::GetImage2DMaxHeight(), luxrays::OpenCLDeviceDescription::GetImage2DMaxWidth(), luxrays::Transform::GetMatrix(), luxrays::OpenCLDeviceDescription::GetOCLContext(), luxrays::OpenCLDeviceDescription::GetOCLDevice(), luxrays::DataSet::GetTotalTriangleCount(), luxrays::DataSet::GetTotalVertexCount(), luxrays::TriangleMesh::GetTriangles(), luxrays::TriangleMesh::GetVertices(), luxrays::OpenCLDeviceDescription::HasImageSupport(), hitsBuff, luxrays::QBVHNode::IsEmpty(), luxrays::QBVHNode::IsLeaf(), luxrays::KernelSource_BVH, luxrays::KernelSource_MQBVH, luxrays::KernelSource_QBVH, luxrays::MQBVHAccel::leafs, luxrays::MQBVHAccel::leafsInvTransform, luxrays::MQBVHAccel::leafsOffset, LR_LOG, mqbvhBuff, mqbvhInvTransBuff, mqbvhKernel, mqbvhLeafBuff, mqbvhLeafQuadTrisBuff, mqbvhMemMapBuff, mqbvhTrisOffsetBuff, mqbvhWorkGroupSize, luxrays::QBVHNode::NbQuadPrimitives(), luxrays::MQBVHAccel::nLeafs, luxrays::MQBVHAccel::nNodes, luxrays::QBVHAccel::nNodes, luxrays::BVHAccel::nNodes, luxrays::MQBVHAccel::nodes, luxrays::QBVHAccel::nodes, luxrays::QBVHAccel::nQuads, oclQueue, luxrays::BVHAccel::preprocessedMesh, luxrays::QBVHAccel::prims, qbvhBuff, qbvhDisableImageStorage, qbvhImageBuff, qbvhImageKernel, qbvhImageWorkGroupSize, qbvhKernel, qbvhTrisBuff, qbvhTrisImageBuff, qbvhUseImage, qbvhWorkGroupSize, RayBufferSize, raysBuff, trisBuff, luxrays::OpenCLDeviceDescription::usedMemory, and vertsBuff.

void OpenCLIntersectionDevice::SetExternalRayBufferQueue ( RayBufferQueue queue  )  [protected, virtual]
void luxrays::OpenCLIntersectionDevice::SetQBVHDisableImageStorage ( const bool  v  )  [inline]

Definition at line 137 of file intersectiondevice.h.

References qbvhDisableImageStorage.

void OpenCLIntersectionDevice::Start (  )  [virtual]
void OpenCLIntersectionDevice::Stop (  )  [virtual]
void OpenCLIntersectionDevice::TraceRayBuffer ( RayBuffer rayBuffer,
cl::Event *  event 
) [private]
void OpenCLIntersectionDevice::UpdateDataSet (  )  [protected]

Friends And Related Function Documentation

friend class Context [friend]

Reimplemented from luxrays::IntersectionDevice.

Definition at line 151 of file intersectiondevice.h.


Member Data Documentation

Definition at line 177 of file intersectiondevice.h.

Referenced by FreeDataSetBuffers(), OpenCLIntersectionDevice(), and SetDataSet().

Definition at line 174 of file intersectiondevice.h.

Referenced by EnqueueTraceRayBuffer(), SetDataSet(), and TraceRayBuffer().

Definition at line 205 of file intersectiondevice.h.

Referenced by FreeDataSetBuffers(), SetDataSet(), and TraceRayBuffer().

Definition at line 167 of file intersectiondevice.h.

Referenced by Interrupt(), OpenCLIntersectionDevice(), Start(), and Stop().

Definition at line 199 of file intersectiondevice.h.

Referenced by FreeDataSetBuffers(), OpenCLIntersectionDevice(), and SetDataSet().

Definition at line 200 of file intersectiondevice.h.

Referenced by FreeDataSetBuffers(), OpenCLIntersectionDevice(), and SetDataSet().

Definition at line 198 of file intersectiondevice.h.

Referenced by FreeDataSetBuffers(), OpenCLIntersectionDevice(), and SetDataSet().

Definition at line 202 of file intersectiondevice.h.

Referenced by FreeDataSetBuffers(), OpenCLIntersectionDevice(), and SetDataSet().

Definition at line 196 of file intersectiondevice.h.

Referenced by EnqueueTraceRayBuffer(), SetDataSet(), and TraceRayBuffer().

cl::CommandQueue* luxrays::OpenCLIntersectionDevice::oclQueue [private]

Definition at line 184 of file intersectiondevice.h.

Referenced by FreeDataSetBuffers(), OpenCLIntersectionDevice(), and SetDataSet().

Definition at line 191 of file intersectiondevice.h.

Referenced by FreeDataSetBuffers(), OpenCLIntersectionDevice(), and SetDataSet().

Definition at line 189 of file intersectiondevice.h.

Referenced by EnqueueTraceRayBuffer(), SetDataSet(), and TraceRayBuffer().

Definition at line 185 of file intersectiondevice.h.

Referenced by FreeDataSetBuffers(), OpenCLIntersectionDevice(), and SetDataSet().

Definition at line 192 of file intersectiondevice.h.

Referenced by FreeDataSetBuffers(), OpenCLIntersectionDevice(), and SetDataSet().

Definition at line 183 of file intersectiondevice.h.

Referenced by EnqueueTraceRayBuffer(), SetDataSet(), and TraceRayBuffer().

size_t OpenCLIntersectionDevice::RayBufferSize = OPENCL_RAYBUFFER_SIZE [static]

Definition at line 153 of file intersectiondevice.h.

Referenced by NewRayBuffer(), and SetDataSet().

Definition at line 204 of file intersectiondevice.h.

Referenced by FreeDataSetBuffers(), SetDataSet(), and TraceRayBuffer().

Definition at line 210 of file intersectiondevice.h.

Referenced by OpenCLIntersectionDevice(), and Start().

Definition at line 176 of file intersectiondevice.h.

Referenced by FreeDataSetBuffers(), OpenCLIntersectionDevice(), and SetDataSet().

Definition at line 175 of file intersectiondevice.h.

Referenced by FreeDataSetBuffers(), OpenCLIntersectionDevice(), and SetDataSet().


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