16 #ifndef BT_SOFT_BODY_SOLVER_BUFFER_OPENCL_H
17 #define BT_SOFT_BODY_SOLVER_BUFFER_OPENCL_H
25 #include <OpenCL/OpenCL.h>
32 #define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
59 if( preexistingBuffer )
70 size =
sizeof(ElementType);
74 btAssert(
"Buffer::Buffer(m_buffer)");
140 btAssert(
"CommandQueue::enqueueWriteBuffer(m_buffer)" );
167 btAssert(
"CommandQueue::enqueueReadBuffer(m_buffer)" );
193 btAssert(
"CommandQueue::enqueueReadBuffer(m_buffer)");
209 #endif // #ifndef BT_SOFT_BODY_SOLVER_BUFFER_OPENCL_H
struct _cl_context * cl_context
CL_API_ENTRY cl_int CL_API_CALL clReleaseMemObject(cl_mem) CL_API_SUFFIX__VERSION_1_0
CL_API_ENTRY cl_int CL_API_CALL clEnqueueReadBuffer(cl_command_queue, cl_mem, cl_bool, size_t, size_t, void *, cl_uint, const cl_event *, cl_event *) CL_API_SUFFIX__VERSION_1_0
bool createBuffer(cl_mem *preexistingBuffer=0)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
btAlignedObjectArray< ElementType > * m_CPUBuffer
CL_API_ENTRY cl_mem CL_API_CALL clCreateBuffer(cl_context, cl_mem_flags, size_t, void *, cl_int *) CL_API_SUFFIX__VERSION_1_0
btOpenCLBuffer(cl_command_queue commandQue, cl_context ctx, btAlignedObjectArray< ElementType > *CPUBuffer, bool readOnly)
int size() const
return the number of elements in the array
CL_API_ENTRY cl_int CL_API_CALL clEnqueueWriteBuffer(cl_command_queue, cl_mem, cl_bool, size_t, size_t, const void *, cl_uint, const cl_event *, cl_event *) CL_API_SUFFIX__VERSION_1_0
cl_command_queue m_cqCommandQue
virtual void changedOnCPU()
struct _cl_command_queue * cl_command_queue
#define CL_MEM_READ_WRITE