#include "MiniCL/cl.h"
#include "BulletMultiThreaded/Win32ThreadSupport.h"
#include "BulletMultiThreaded/PlatformDefinitions.h"
#include "BulletMultiThreaded/PosixThreadSupport.h"
#include "BulletMultiThreaded/SequentialThreadSupport.h"
#include "MiniCLTaskScheduler.h"
#include "MiniCLTask/MiniCLTask.h"
#include "LinearMath/btMinMax.h"
#include <stdio.h>
#include <stddef.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 | clGetPlatformIDs (cl_uint num_entries, cl_platform_id *platforms, cl_uint *num_platforms) CL_API_SUFFIX__VERSION_1_0 |
CL_API_ENTRY cl_int CL_API_CALL | clGetPlatformInfo (cl_platform_id platform, cl_platform_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_int CL_API_CALL | clGetDeviceInfo (cl_device_id device, cl_device_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_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 (const cl_context_properties *, cl_device_type 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 | clGetDeviceIDs (cl_platform_id, cl_device_type, cl_uint, cl_device_id *, cl_uint *) CL_API_SUFFIX__VERSION_1_0 |
CL_API_ENTRY cl_context CL_API_CALL | clCreateContext (const cl_context_properties *properties, cl_uint num_devices, const cl_device_id *devices, void(*pfn_notify)(const char *, const void *, size_t, void *), void *user_data, 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 command_queue) CL_API_SUFFIX__VERSION_1_0 |
CL_API_ENTRY cl_int CL_API_CALL | clGetProgramInfo (cl_program, cl_program_info, size_t, void *, size_t *) 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 const char * | spPlatformID = "MiniCL, SCEA" |
static const char * | spDriverVersion = "1.0" |
static int | sLocalMemBuf [LOCAL_BUF_SIZE *4+16] |
static int * | spLocalBufCurr = NULL |
static int | sLocalBufUsed = LOCAL_BUF_SIZE |
#define __PHYSICS_COMMON_H__ 1 |
Definition at line 19 of file MiniCL.cpp.
#define LOCAL_BUF_SIZE 32768 |
Definition at line 472 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 575 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 598 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 614 of file MiniCL.cpp.
CL_API_ENTRY cl_context CL_API_CALL clCreateContext | ( | const cl_context_properties * | properties, | |
cl_uint | num_devices, | |||
const cl_device_id * | devices, | |||
void(*)(const char *, const void *, size_t, void *) | pfn_notify, | |||
void * | user_data, | |||
cl_int * | errcode_ret | |||
) |
Definition at line 726 of file MiniCL.cpp.
CL_API_ENTRY cl_context CL_API_CALL clCreateContextFromType | ( | const cl_context_properties * | , | |
cl_device_type | device_type, | |||
void(*)(const char *, const void *, size_t, void *) | pfn_notify, | |||
void * | , | |||
cl_int * | errcode_ret | |||
) |
Definition at line 655 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 533 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 585 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 391 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 429 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 357 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 401 of file MiniCL.cpp.
CL_API_ENTRY cl_int CL_API_CALL clFinish | ( | cl_command_queue | command_queue | ) |
wait for all work items to be completed
Definition at line 749 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 420 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 623 of file MiniCL.cpp.
CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDs | ( | cl_platform_id | , | |
cl_device_type | , | |||
cl_uint | , | |||
cl_device_id * | , | |||
cl_uint * | ||||
) |
Definition at line 716 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 * | param_value_size_ret | |||
) |
Definition at line 111 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 768 of file MiniCL.cpp.
CL_API_ENTRY cl_int CL_API_CALL clGetPlatformIDs | ( | cl_uint | num_entries, | |
cl_platform_id * | platforms, | |||
cl_uint * | num_platforms | |||
) |
Definition at line 42 of file MiniCL.cpp.
CL_API_ENTRY cl_int CL_API_CALL clGetPlatformInfo | ( | cl_platform_id | platform, | |
cl_platform_info | param_name, | |||
size_t | param_value_size, | |||
void * | param_value, | |||
size_t * | param_value_size_ret | |||
) |
Definition at line 63 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 377 of file MiniCL.cpp.
CL_API_ENTRY cl_int CL_API_CALL clGetProgramInfo | ( | cl_program | , | |
cl_program_info | , | |||
size_t | , | |||
void * | , | |||
size_t * | ||||
) |
Definition at line 758 of file MiniCL.cpp.
CL_API_ENTRY cl_int CL_API_CALL clReleaseCommandQueue | ( | cl_command_queue | ) |
Definition at line 340 of file MiniCL.cpp.
CL_API_ENTRY cl_int CL_API_CALL clReleaseContext | ( | cl_context | context | ) |
Definition at line 737 of file MiniCL.cpp.
Definition at line 350 of file MiniCL.cpp.
Definition at line 333 of file MiniCL.cpp.
CL_API_ENTRY cl_int CL_API_CALL clReleaseProgram | ( | cl_program | ) |
Definition at line 345 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 493 of file MiniCL.cpp.
static void* localBufMalloc | ( | int | size | ) | [static] |
Definition at line 476 of file MiniCL.cpp.
int sLocalBufUsed = LOCAL_BUF_SIZE [static] |
Definition at line 475 of file MiniCL.cpp.
int sLocalMemBuf[LOCAL_BUF_SIZE *4+16] [static] |
Definition at line 473 of file MiniCL.cpp.
const char* spDriverVersion = "1.0" [static] |
Definition at line 40 of file MiniCL.cpp.
int* spLocalBufCurr = NULL [static] |
Definition at line 474 of file MiniCL.cpp.
const char* spPlatformID = "MiniCL, SCEA" [static] |
Definition at line 39 of file MiniCL.cpp.