#include <btSoftBodySolverTriangleData_OpenCL.h>
Classes | |
struct | btSomePair |
Start and length values for computation batches over link data. More... | |
Public Member Functions | |
btSoftBodyTriangleDataOpenCL (cl_command_queue queue, cl_context ctx) | |
virtual | ~btSoftBodyTriangleDataOpenCL () |
virtual void | createTriangles (int numTriangles) |
Allocate enough space in all link-related arrays to fit numLinks links. | |
virtual void | setTriangleAt (const btSoftBodyTriangleData::TriangleDescription &triangle, int triangleIndex) |
Insert the link described into the correct data structures assuming space has already been allocated by a call to createLinks. | |
virtual bool | onAccelerator () |
Return true if data is on the accelerator. | |
virtual bool | moveToAccelerator () |
Move data from host memory to the accelerator. | |
virtual bool | moveFromAccelerator () |
Move data from host memory from the accelerator. | |
void | generateBatches () |
Generate (and later update) the batching for the entire triangle set. | |
Public Attributes | |
bool | m_onGPU |
cl_command_queue | m_queue |
btOpenCLBuffer < btSoftBodyTriangleData::TriangleNodeSet > | m_clVertexIndices |
btOpenCLBuffer< float > | m_clArea |
btOpenCLBuffer < Vectormath::Aos::Vector3 > | m_clNormal |
btAlignedObjectArray< int > | m_triangleAddresses |
Link addressing information for each cloth. | |
btAlignedObjectArray< btSomePair > | m_batchStartLengths |
Definition at line 25 of file btSoftBodySolverTriangleData_OpenCL.h.
btSoftBodyTriangleDataOpenCL::btSoftBodyTriangleDataOpenCL | ( | cl_command_queue | queue, | |
cl_context | ctx | |||
) |
Definition at line 392 of file btSoftBodySolver_OpenCL.cpp.
btSoftBodyTriangleDataOpenCL::~btSoftBodyTriangleDataOpenCL | ( | ) | [virtual] |
Definition at line 400 of file btSoftBodySolver_OpenCL.cpp.
void btSoftBodyTriangleDataOpenCL::createTriangles | ( | int | numTriangles | ) | [virtual] |
Allocate enough space in all link-related arrays to fit numLinks links.
Reimplemented from btSoftBodyTriangleData.
Definition at line 405 of file btSoftBodySolver_OpenCL.cpp.
void btSoftBodyTriangleDataOpenCL::generateBatches | ( | ) |
Generate (and later update) the batching for the entire triangle set.
This redoes a lot of work because it batches the entire set when each cloth is inserted. In theory we could delay it until just before we need the cloth. It's a one-off overhead, though, so that is a later optimisation.
Definition at line 461 of file btSoftBodySolver_OpenCL.cpp.
bool btSoftBodyTriangleDataOpenCL::moveFromAccelerator | ( | ) | [virtual] |
Move data from host memory from the accelerator.
The CPU version will always return that it has moved it.
Reimplemented from btSoftBodyTriangleData.
Definition at line 442 of file btSoftBodySolver_OpenCL.cpp.
bool btSoftBodyTriangleDataOpenCL::moveToAccelerator | ( | ) | [virtual] |
Move data from host memory to the accelerator.
The CPU version will always return that it has moved it.
Reimplemented from btSoftBodyTriangleData.
Definition at line 429 of file btSoftBodySolver_OpenCL.cpp.
bool btSoftBodyTriangleDataOpenCL::onAccelerator | ( | ) | [virtual] |
Return true if data is on the accelerator.
The CPU version of this class will return true here because the CPU is the same as the accelerator.
Reimplemented from btSoftBodyTriangleData.
Definition at line 424 of file btSoftBodySolver_OpenCL.cpp.
void btSoftBodyTriangleDataOpenCL::setTriangleAt | ( | const btSoftBodyTriangleData::TriangleDescription & | triangle, | |
int | triangleIndex | |||
) | [virtual] |
Insert the link described into the correct data structures assuming space has already been allocated by a call to createLinks.
Reimplemented from btSoftBodyTriangleData.
Definition at line 417 of file btSoftBodySolver_OpenCL.cpp.
Definition at line 54 of file btSoftBodySolverTriangleData_OpenCL.h.
Definition at line 32 of file btSoftBodySolverTriangleData_OpenCL.h.
Definition at line 33 of file btSoftBodySolverTriangleData_OpenCL.h.
btOpenCLBuffer<btSoftBodyTriangleData::TriangleNodeSet> btSoftBodyTriangleDataOpenCL::m_clVertexIndices |
Definition at line 31 of file btSoftBodySolverTriangleData_OpenCL.h.
Definition at line 28 of file btSoftBodySolverTriangleData_OpenCL.h.
Definition at line 29 of file btSoftBodySolverTriangleData_OpenCL.h.
Link addressing information for each cloth.
Allows link locations to be computed independently of data batching.
Definition at line 39 of file btSoftBodySolverTriangleData_OpenCL.h.