#include "MiniCL/cl.h"#include "BulletMultiThreaded/SequentialThreadSupport.h"#include "MiniCLTaskScheduler.h"#include "MiniCLTask/MiniCLTask.h"#include "LinearMath/btMinMax.h"
Go to the source code of this file.
Defines | |
| #define | __PHYSICS_COMMON_H__ 1 |
| #define | LOCAL_BUF_SIZE 32768 |
Functions | |
| CL_API_ENTRY cl_int CL_API_CALL | clGetDeviceInfo (cl_device_id device, cl_device_info param_name, size_t param_value_size, void *param_value, size_t *) CL_API_SUFFIX__VERSION_1_0 |
| 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 | clReleaseCommandQueue (cl_command_queue) CL_API_SUFFIX__VERSION_1_0 |
| CL_API_ENTRY cl_int CL_API_CALL | clReleaseProgram (cl_program) CL_API_SUFFIX__VERSION_1_0 |
| CL_API_ENTRY cl_int CL_API_CALL | clReleaseKernel (cl_kernel) CL_API_SUFFIX__VERSION_1_0 |
| CL_API_ENTRY cl_int CL_API_CALL | clEnqueueReadBuffer (cl_command_queue command_queue, cl_mem buffer, cl_bool, size_t offset, size_t cb, void *ptr, cl_uint, const cl_event *, cl_event *) CL_API_SUFFIX__VERSION_1_0 |
| CL_API_ENTRY cl_int | clGetProgramBuildInfo (cl_program, cl_device_id, cl_program_build_info, size_t, void *, size_t *) CL_API_SUFFIX__VERSION_1_0 |
| CL_API_ENTRY cl_program | clCreateProgramWithSource (cl_context context, cl_uint, const char **, const size_t *, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0 |
| CL_API_ENTRY cl_int CL_API_CALL | clEnqueueWriteBuffer (cl_command_queue command_queue, cl_mem buffer, cl_bool, size_t offset, size_t cb, const void *ptr, cl_uint, const cl_event *, cl_event *) CL_API_SUFFIX__VERSION_1_0 |
| CL_API_ENTRY cl_int CL_API_CALL | clFlush (cl_command_queue command_queue) |
| CL_API_ENTRY cl_int CL_API_CALL | clEnqueueNDRangeKernel (cl_command_queue, cl_kernel clKernel, cl_uint work_dim, const size_t *, const size_t *global_work_size, const size_t *, cl_uint, const cl_event *, cl_event *) CL_API_SUFFIX__VERSION_1_0 |
| static void * | localBufMalloc (int size) |
| CL_API_ENTRY cl_int CL_API_CALL | clSetKernelArg (cl_kernel clKernel, cl_uint arg_index, size_t arg_size, const void *arg_value) CL_API_SUFFIX__VERSION_1_0 |
| CL_API_ENTRY cl_kernel CL_API_CALL | clCreateKernel (cl_program program, const char *kernel_name, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0 |
| CL_API_ENTRY cl_int CL_API_CALL | clBuildProgram (cl_program, cl_uint, const cl_device_id *, const char *, void(*pfn_notify)(cl_program, void *), void *) CL_API_SUFFIX__VERSION_1_0 |
| CL_API_ENTRY cl_program CL_API_CALL | clCreateProgramWithBinary (cl_context context, cl_uint, const cl_device_id *, const size_t *, const unsigned char **, cl_int *, cl_int *) CL_API_SUFFIX__VERSION_1_0 |
| CL_API_ENTRY cl_mem CL_API_CALL | clCreateBuffer (cl_context, cl_mem_flags flags, size_t size, void *host_ptr, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0 |
| CL_API_ENTRY cl_command_queue CL_API_CALL | clCreateCommandQueue (cl_context context, cl_device_id, cl_command_queue_properties, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0 |
| CL_API_ENTRY cl_int CL_API_CALL | clGetContextInfo (cl_context, cl_context_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0 |
| CL_API_ENTRY cl_context CL_API_CALL | clCreateContextFromType (cl_context_properties *, cl_device_type, void(*pfn_notify)(const char *, const void *, size_t, void *), void *, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0 |
| CL_API_ENTRY cl_int CL_API_CALL | clReleaseContext (cl_context context) CL_API_SUFFIX__VERSION_1_0 |
| CL_API_ENTRY cl_int CL_API_CALL | clFinish (cl_command_queue) CL_API_SUFFIX__VERSION_1_0 |
| CL_API_ENTRY cl_int CL_API_CALL | clGetKernelWorkGroupInfo (cl_kernel kernel, cl_device_id, cl_kernel_work_group_info wgi, size_t sz, void *ptr, size_t *) CL_API_SUFFIX__VERSION_1_0 |
Variables | |
| static int | sLocalMemBuf [32768 *4+16] |
| static int * | spLocalBufCurr = NULL |
| static int | sLocalBufUsed = 32768 |
| #define __PHYSICS_COMMON_H__ 1 |
Definition at line 19 of file MiniCL.cpp.
| #define LOCAL_BUF_SIZE 32768 |
Definition at line 253 of file MiniCL.cpp.
| CL_API_ENTRY cl_int CL_API_CALL clBuildProgram | ( | cl_program | , | |
| cl_uint | , | |||
| const cl_device_id * | , | |||
| const char * | , | |||
| void(*)(cl_program, void *) | pfn_notify, | |||
| void * | ||||
| ) |
Definition at line 353 of file MiniCL.cpp.
| CL_API_ENTRY cl_mem CL_API_CALL clCreateBuffer | ( | cl_context | , | |
| cl_mem_flags | flags, | |||
| size_t | size, | |||
| void * | host_ptr, | |||
| cl_int * | errcode_ret | |||
| ) |
Definition at line 376 of file MiniCL.cpp.
| CL_API_ENTRY cl_command_queue CL_API_CALL clCreateCommandQueue | ( | cl_context | context, | |
| cl_device_id | , | |||
| cl_command_queue_properties | , | |||
| cl_int * | errcode_ret | |||
| ) |
Definition at line 392 of file MiniCL.cpp.
| CL_API_ENTRY cl_context CL_API_CALL clCreateContextFromType | ( | cl_context_properties * | , | |
| cl_device_type | , | |||
| void(*)(const char *, const void *, size_t, void *) | pfn_notify, | |||
| void * | , | |||
| cl_int * | errcode_ret | |||
| ) |
todo: add posix thread support for other platforms
Definition at line 431 of file MiniCL.cpp.
| CL_API_ENTRY cl_kernel CL_API_CALL clCreateKernel | ( | cl_program | program, | |
| const char * | kernel_name, | |||
| cl_int * | errcode_ret | |||
| ) |
Definition at line 314 of file MiniCL.cpp.
| CL_API_ENTRY cl_program CL_API_CALL clCreateProgramWithBinary | ( | cl_context | context, | |
| cl_uint | , | |||
| const cl_device_id * | , | |||
| const size_t * | , | |||
| const unsigned char ** | , | |||
| cl_int * | , | |||
| cl_int * | ||||
| ) |
Definition at line 363 of file MiniCL.cpp.
| CL_API_ENTRY cl_program clCreateProgramWithSource | ( | cl_context | context, | |
| cl_uint | , | |||
| const char ** | , | |||
| const size_t * | , | |||
| cl_int * | errcode_ret | |||
| ) |
Definition at line 174 of file MiniCL.cpp.
| CL_API_ENTRY cl_int CL_API_CALL clEnqueueNDRangeKernel | ( | cl_command_queue | , | |
| cl_kernel | clKernel, | |||
| cl_uint | work_dim, | |||
| const size_t * | , | |||
| const size_t * | global_work_size, | |||
| const size_t * | , | |||
| cl_uint | , | |||
| const cl_event * | , | |||
| cl_event * | ||||
| ) |
Definition at line 212 of file MiniCL.cpp.
| CL_API_ENTRY cl_int CL_API_CALL clEnqueueReadBuffer | ( | cl_command_queue | command_queue, | |
| cl_mem | buffer, | |||
| cl_bool | , | |||
| size_t | offset, | |||
| size_t | cb, | |||
| void * | ptr, | |||
| cl_uint | , | |||
| const cl_event * | , | |||
| cl_event * | ||||
| ) |
wait for all work items to be completed
Definition at line 140 of file MiniCL.cpp.
| CL_API_ENTRY cl_int CL_API_CALL clEnqueueWriteBuffer | ( | cl_command_queue | command_queue, | |
| cl_mem | buffer, | |||
| cl_bool | , | |||
| size_t | offset, | |||
| size_t | cb, | |||
| const void * | ptr, | |||
| cl_uint | , | |||
| const cl_event * | , | |||
| cl_event * | ||||
| ) |
wait for all work items to be completed
Definition at line 184 of file MiniCL.cpp.
| CL_API_ENTRY cl_int CL_API_CALL clFinish | ( | cl_command_queue | ) |
Definition at line 487 of file MiniCL.cpp.
| CL_API_ENTRY cl_int CL_API_CALL clFlush | ( | cl_command_queue | command_queue | ) |
wait for all work items to be completed
Definition at line 203 of file MiniCL.cpp.
| CL_API_ENTRY cl_int CL_API_CALL clGetContextInfo | ( | cl_context | , | |
| cl_context_info | param_name, | |||
| size_t | param_value_size, | |||
| void * | param_value, | |||
| size_t * | param_value_size_ret | |||
| ) |
Definition at line 401 of file MiniCL.cpp.
| CL_API_ENTRY cl_int CL_API_CALL clGetDeviceInfo | ( | cl_device_id | device, | |
| cl_device_info | param_name, | |||
| size_t | param_value_size, | |||
| void * | param_value, | |||
| size_t * | ||||
| ) |
Definition at line 34 of file MiniCL.cpp.
| CL_API_ENTRY cl_int CL_API_CALL clGetKernelWorkGroupInfo | ( | cl_kernel | kernel, | |
| cl_device_id | , | |||
| cl_kernel_work_group_info | wgi, | |||
| size_t | sz, | |||
| void * | ptr, | |||
| size_t * | ||||
| ) |
Definition at line 494 of file MiniCL.cpp.
| CL_API_ENTRY cl_int clGetProgramBuildInfo | ( | cl_program | , | |
| cl_device_id | , | |||
| cl_program_build_info | , | |||
| size_t | , | |||
| void * | , | |||
| size_t * | ||||
| ) |
Definition at line 160 of file MiniCL.cpp.
| CL_API_ENTRY cl_int CL_API_CALL clReleaseCommandQueue | ( | cl_command_queue | ) |
Definition at line 123 of file MiniCL.cpp.
| CL_API_ENTRY cl_int CL_API_CALL clReleaseContext | ( | cl_context | context | ) |
Definition at line 475 of file MiniCL.cpp.
| CL_API_ENTRY cl_int CL_API_CALL clReleaseKernel | ( | cl_kernel | ) |
Definition at line 133 of file MiniCL.cpp.
| CL_API_ENTRY cl_int CL_API_CALL clReleaseMemObject | ( | cl_mem | ) |
Definition at line 116 of file MiniCL.cpp.
| CL_API_ENTRY cl_int CL_API_CALL clReleaseProgram | ( | cl_program | ) |
Definition at line 128 of file MiniCL.cpp.
| CL_API_ENTRY cl_int CL_API_CALL clSetKernelArg | ( | cl_kernel | clKernel, | |
| cl_uint | arg_index, | |||
| size_t | arg_size, | |||
| const void * | arg_value | |||
| ) |
Definition at line 274 of file MiniCL.cpp.
| static void* localBufMalloc | ( | int | size | ) | [static] |
Definition at line 257 of file MiniCL.cpp.
int sLocalBufUsed = 32768 [static] |
Definition at line 256 of file MiniCL.cpp.
int sLocalMemBuf[32768 *4+16] [static] |
Definition at line 254 of file MiniCL.cpp.
int* spLocalBufCurr = NULL [static] |
Definition at line 255 of file MiniCL.cpp.
1.6.1