| Modifier and Type | Field and Description |
|---|---|
static int |
CL_ABGR
cl_channel_order
|
static int |
CL_COMMAND_SVM_FREE
cl_command_type
|
static int |
CL_COMMAND_SVM_MAP
cl_command_type
|
static int |
CL_COMMAND_SVM_MEMCPY
cl_command_type
|
static int |
CL_COMMAND_SVM_MEMFILL
cl_command_type
|
static int |
CL_COMMAND_SVM_UNMAP
cl_command_type
|
static int |
CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE
cl_device_info
|
static int |
CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE
cl_device_info
|
static int |
CL_DEVICE_MAX_ON_DEVICE_EVENTS
cl_device_info
|
static int |
CL_DEVICE_MAX_ON_DEVICE_QUEUES
cl_device_info
|
static int |
CL_DEVICE_MAX_PIPE_ARGS
cl_device_info
|
static int |
CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS
cl_device_info
|
static int |
CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS
cl_device_info
|
static int |
CL_DEVICE_PIPE_MAX_PACKET_SIZE
cl_device_info
|
static int |
CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT
cl_device_info
|
static int |
CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT
cl_device_info
|
static int |
CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT
cl_device_info
|
static int |
CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE
cl_device_info
|
static int |
CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE
cl_device_info
|
static int |
CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES
cl_device_info
|
static int |
CL_DEVICE_QUEUE_ON_HOST_PROPERTIES
cl_device_info
|
static int |
CL_DEVICE_SVM_ATOMICS
cl_device_svm_capabilities
|
static int |
CL_DEVICE_SVM_CAPABILITIES
cl_device_info
|
static int |
CL_DEVICE_SVM_COARSE_GRAIN_BUFFER
cl_device_svm_capabilities
|
static int |
CL_DEVICE_SVM_FINE_GRAIN_BUFFER
cl_device_svm_capabilities
|
static int |
CL_DEVICE_SVM_FINE_GRAIN_SYSTEM
cl_device_svm_capabilities
|
static int |
CL_INVALID_DEVICE_QUEUE
Error Codes
|
static int |
CL_INVALID_PIPE_SIZE
Error Codes
|
static int |
CL_KERNEL_ARG_TYPE_PIPE
cl_kernel_arg_type_qualifier
|
static int |
CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM
cl_kernel_exec_info
|
static int |
CL_KERNEL_EXEC_INFO_SVM_PTRS
cl_kernel_exec_info
|
static int |
CL_MEM_OBJECT_PIPE
cl_mem_object_type
|
static int |
CL_MEM_SVM_ATOMICS
cl_svm_mem_flags
|
static int |
CL_MEM_SVM_FINE_GRAIN_BUFFER
cl_svm_mem_flags
|
static int |
CL_MEM_USES_SVM_POINTER
cl_mem_info
|
static int |
CL_PIPE_MAX_PACKETS
cl_pipe_info
|
static int |
CL_PIPE_PACKET_SIZE
cl_pipe_info
|
static int |
CL_PROFILING_COMMAND_COMPLETE
cl_profiling_info
|
static int |
CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE
cl_program_build_info
|
static int |
CL_QUEUE_ON_DEVICE
cl_command_queue_properties
|
static int |
CL_QUEUE_ON_DEVICE_DEFAULT
cl_command_queue_properties
|
static int |
CL_QUEUE_SIZE
cl_command_queue_info
|
static int |
CL_SAMPLER_LOD_MAX
cl_sampler_info
|
static int |
CL_SAMPLER_LOD_MIN
cl_sampler_info
|
static int |
CL_SAMPLER_MIP_FILTER_MODE
cl_sampler_info
|
static int |
CL_sBGRA
cl_channel_order
|
static int |
CL_sRGB
cl_channel_order
|
static int |
CL_sRGBA
cl_channel_order
|
static int |
CL_sRGBx
cl_channel_order
|
static int |
CL_VERSION_2_0
OpenCL Version.
|
CL_BLOCKING, CL_COMMAND_BARRIER, CL_COMMAND_FILL_BUFFER, CL_COMMAND_FILL_IMAGE, CL_COMMAND_MIGRATE_MEM_OBJECTS, CL_COMPILE_PROGRAM_FAILURE, CL_CONTEXT_INTEROP_USER_SYNC, CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE, CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE, CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE, CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE, CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE, CL_DEVICE_AFFINITY_DOMAIN_NUMA, CL_DEVICE_BUILT_IN_KERNELS, CL_DEVICE_DOUBLE_FP_CONFIG, CL_DEVICE_IMAGE_MAX_ARRAY_SIZE, CL_DEVICE_IMAGE_MAX_BUFFER_SIZE, CL_DEVICE_LINKER_AVAILABLE, CL_DEVICE_PARENT_DEVICE, CL_DEVICE_PARTITION_AFFINITY_DOMAIN, CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN, CL_DEVICE_PARTITION_BY_COUNTS, CL_DEVICE_PARTITION_BY_COUNTS_LIST_END, CL_DEVICE_PARTITION_EQUALLY, CL_DEVICE_PARTITION_FAILED, CL_DEVICE_PARTITION_MAX_SUB_DEVICES, CL_DEVICE_PARTITION_PROPERTIES, CL_DEVICE_PARTITION_TYPE, CL_DEVICE_PREFERRED_INTEROP_USER_SYNC, CL_DEVICE_PRINTF_BUFFER_SIZE, CL_DEVICE_REFERENCE_COUNT, CL_DEVICE_TYPE_CUSTOM, CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT, CL_IMAGE_ARRAY_SIZE, CL_IMAGE_BUFFER, CL_IMAGE_NUM_MIP_LEVELS, CL_IMAGE_NUM_SAMPLES, CL_INVALID_COMPILER_OPTIONS, CL_INVALID_DEVICE_PARTITION_COUNT, CL_INVALID_IMAGE_DESCRIPTOR, CL_INVALID_LINKER_OPTIONS, CL_KERNEL_ARG_ACCESS_NONE, CL_KERNEL_ARG_ACCESS_QUALIFIER, CL_KERNEL_ARG_ACCESS_READ_ONLY, CL_KERNEL_ARG_ACCESS_READ_WRITE, CL_KERNEL_ARG_ACCESS_WRITE_ONLY, CL_KERNEL_ARG_ADDRESS_CONSTANT, CL_KERNEL_ARG_ADDRESS_GLOBAL, CL_KERNEL_ARG_ADDRESS_LOCAL, CL_KERNEL_ARG_ADDRESS_PRIVATE, CL_KERNEL_ARG_ADDRESS_QUALIFIER, CL_KERNEL_ARG_INFO_NOT_AVAILABLE, CL_KERNEL_ARG_NAME, CL_KERNEL_ARG_TYPE_CONST, CL_KERNEL_ARG_TYPE_NAME, CL_KERNEL_ARG_TYPE_NONE, CL_KERNEL_ARG_TYPE_QUALIFIER, CL_KERNEL_ARG_TYPE_RESTRICT, CL_KERNEL_ARG_TYPE_VOLATILE, CL_KERNEL_ATTRIBUTES, CL_KERNEL_GLOBAL_WORK_SIZE, CL_LINK_PROGRAM_FAILURE, CL_LINKER_NOT_AVAILABLE, CL_MAP_WRITE_INVALIDATE_REGION, CL_MEM_HOST_NO_ACCESS, CL_MEM_HOST_READ_ONLY, CL_MEM_HOST_WRITE_ONLY, CL_MEM_OBJECT_IMAGE1D, CL_MEM_OBJECT_IMAGE1D_ARRAY, CL_MEM_OBJECT_IMAGE1D_BUFFER, CL_MEM_OBJECT_IMAGE2D_ARRAY, CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED, CL_MIGRATE_MEM_OBJECT_HOST, CL_NON_BLOCKING, CL_PROGRAM_BINARY_TYPE, CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT, CL_PROGRAM_BINARY_TYPE_EXECUTABLE, CL_PROGRAM_BINARY_TYPE_LIBRARY, CL_PROGRAM_BINARY_TYPE_NONE, CL_PROGRAM_KERNEL_NAMES, CL_PROGRAM_NUM_KERNELS, CL_VERSION_1_2CL_ADDRESS_MIRRORED_REPEAT, CL_BUFFER_CREATE_TYPE_REGION, CL_COMMAND_COPY_BUFFER_RECT, CL_COMMAND_READ_BUFFER_RECT, CL_COMMAND_USER, CL_COMMAND_WRITE_BUFFER_RECT, CL_CONTEXT_NUM_DEVICES, CL_DEVICE_HOST_UNIFIED_MEMORY, CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR, CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE, CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT, CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF, CL_DEVICE_NATIVE_VECTOR_WIDTH_INT, CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG, CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT, CL_DEVICE_OPENCL_C_VERSION, CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF, CL_EVENT_CONTEXT, CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST, CL_FP_SOFT_FLOAT, CL_INVALID_PROPERTY, CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE, CL_KERNEL_PRIVATE_MEM_SIZE, CL_MEM_ASSOCIATED_MEMOBJECT, CL_MEM_OFFSET, CL_MISALIGNED_SUB_BUFFER_OFFSET, CL_RGBx, CL_RGx, CL_Rx, CL_VERSION_1_1CL_A, CL_ADDRESS_CLAMP, CL_ADDRESS_CLAMP_TO_EDGE, CL_ADDRESS_NONE, CL_ADDRESS_REPEAT, CL_ARGB, CL_BGRA, CL_BUILD_ERROR, CL_BUILD_IN_PROGRESS, CL_BUILD_NONE, CL_BUILD_PROGRAM_FAILURE, CL_BUILD_SUCCESS, CL_COMMAND_ACQUIRE_GL_OBJECTS, CL_COMMAND_COPY_BUFFER, CL_COMMAND_COPY_BUFFER_TO_IMAGE, CL_COMMAND_COPY_IMAGE, CL_COMMAND_COPY_IMAGE_TO_BUFFER, CL_COMMAND_MAP_BUFFER, CL_COMMAND_MAP_IMAGE, CL_COMMAND_MARKER, CL_COMMAND_NATIVE_KERNEL, CL_COMMAND_NDRANGE_KERNEL, CL_COMMAND_READ_BUFFER, CL_COMMAND_READ_IMAGE, CL_COMMAND_RELEASE_GL_OBJECTS, CL_COMMAND_TASK, CL_COMMAND_UNMAP_MEM_OBJECT, CL_COMMAND_WRITE_BUFFER, CL_COMMAND_WRITE_IMAGE, CL_COMPILER_NOT_AVAILABLE, CL_COMPLETE, CL_CONTEXT_DEVICES, CL_CONTEXT_PLATFORM, CL_CONTEXT_PROPERTIES, CL_CONTEXT_REFERENCE_COUNT, CL_DEVICE_ADDRESS_BITS, CL_DEVICE_AVAILABLE, CL_DEVICE_COMPILER_AVAILABLE, CL_DEVICE_ENDIAN_LITTLE, CL_DEVICE_ERROR_CORRECTION_SUPPORT, CL_DEVICE_EXECUTION_CAPABILITIES, CL_DEVICE_EXTENSIONS, CL_DEVICE_GLOBAL_MEM_CACHE_SIZE, CL_DEVICE_GLOBAL_MEM_CACHE_TYPE, CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE, CL_DEVICE_GLOBAL_MEM_SIZE, CL_DEVICE_IMAGE_SUPPORT, CL_DEVICE_IMAGE2D_MAX_HEIGHT, CL_DEVICE_IMAGE2D_MAX_WIDTH, CL_DEVICE_IMAGE3D_MAX_DEPTH, CL_DEVICE_IMAGE3D_MAX_HEIGHT, CL_DEVICE_IMAGE3D_MAX_WIDTH, CL_DEVICE_LOCAL_MEM_SIZE, CL_DEVICE_LOCAL_MEM_TYPE, CL_DEVICE_MAX_CLOCK_FREQUENCY, CL_DEVICE_MAX_COMPUTE_UNITS, CL_DEVICE_MAX_CONSTANT_ARGS, CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE, CL_DEVICE_MAX_MEM_ALLOC_SIZE, CL_DEVICE_MAX_PARAMETER_SIZE, CL_DEVICE_MAX_READ_IMAGE_ARGS, CL_DEVICE_MAX_SAMPLERS, CL_DEVICE_MAX_WORK_GROUP_SIZE, CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS, CL_DEVICE_MAX_WORK_ITEM_SIZES, CL_DEVICE_MAX_WRITE_IMAGE_ARGS, CL_DEVICE_MEM_BASE_ADDR_ALIGN, CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE, CL_DEVICE_NAME, CL_DEVICE_NOT_AVAILABLE, CL_DEVICE_NOT_FOUND, CL_DEVICE_PLATFORM, CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR, CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE, CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT, CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT, CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG, CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT, CL_DEVICE_PROFILE, CL_DEVICE_PROFILING_TIMER_RESOLUTION, CL_DEVICE_QUEUE_PROPERTIES, CL_DEVICE_SINGLE_FP_CONFIG, CL_DEVICE_TYPE, CL_DEVICE_TYPE_ACCELERATOR, CL_DEVICE_TYPE_ALL, CL_DEVICE_TYPE_CPU, CL_DEVICE_TYPE_DEFAULT, CL_DEVICE_TYPE_GPU, CL_DEVICE_VENDOR, CL_DEVICE_VENDOR_ID, CL_DEVICE_VERSION, CL_DRIVER_VERSION, CL_EVENT_COMMAND_EXECUTION_STATUS, CL_EVENT_COMMAND_QUEUE, CL_EVENT_COMMAND_TYPE, CL_EVENT_REFERENCE_COUNT, CL_EXEC_KERNEL, CL_EXEC_NATIVE_KERNEL, CL_FALSE, CL_FILTER_LINEAR, CL_FILTER_NEAREST, CL_FLOAT, CL_FP_DENORM, CL_FP_FMA, CL_FP_INF_NAN, CL_FP_ROUND_TO_INF, CL_FP_ROUND_TO_NEAREST, CL_FP_ROUND_TO_ZERO, CL_GLOBAL, CL_HALF_FLOAT, CL_IMAGE_DEPTH, CL_IMAGE_ELEMENT_SIZE, CL_IMAGE_FORMAT, CL_IMAGE_FORMAT_MISMATCH, CL_IMAGE_FORMAT_NOT_SUPPORTED, CL_IMAGE_HEIGHT, CL_IMAGE_ROW_PITCH, CL_IMAGE_SLICE_PITCH, CL_IMAGE_WIDTH, CL_INTENSITY, CL_INVALID_ARG_INDEX, CL_INVALID_ARG_SIZE, CL_INVALID_ARG_VALUE, CL_INVALID_BINARY, CL_INVALID_BUFFER_SIZE, CL_INVALID_BUILD_OPTIONS, CL_INVALID_COMMAND_QUEUE, CL_INVALID_CONTEXT, CL_INVALID_DEVICE, CL_INVALID_DEVICE_TYPE, CL_INVALID_EVENT, CL_INVALID_EVENT_WAIT_LIST, CL_INVALID_GLOBAL_OFFSET, CL_INVALID_GLOBAL_WORK_SIZE, CL_INVALID_HOST_PTR, CL_INVALID_IMAGE_FORMAT_DESCRIPTOR, CL_INVALID_IMAGE_SIZE, CL_INVALID_KERNEL, CL_INVALID_KERNEL_ARGS, CL_INVALID_KERNEL_DEFINITION, CL_INVALID_KERNEL_NAME, CL_INVALID_MEM_OBJECT, CL_INVALID_OPERATION, CL_INVALID_PLATFORM, CL_INVALID_PROGRAM, CL_INVALID_PROGRAM_EXECUTABLE, CL_INVALID_QUEUE_PROPERTIES, CL_INVALID_SAMPLER, CL_INVALID_VALUE, CL_INVALID_WORK_DIMENSION, CL_INVALID_WORK_GROUP_SIZE, CL_INVALID_WORK_ITEM_SIZE, CL_KERNEL_COMPILE_WORK_GROUP_SIZE, CL_KERNEL_CONTEXT, CL_KERNEL_FUNCTION_NAME, CL_KERNEL_LOCAL_MEM_SIZE, CL_KERNEL_NUM_ARGS, CL_KERNEL_PROGRAM, CL_KERNEL_REFERENCE_COUNT, CL_KERNEL_WORK_GROUP_SIZE, CL_LOCAL, CL_LUMINANCE, CL_MAP_FAILURE, CL_MAP_READ, CL_MAP_WRITE, CL_MEM_ALLOC_HOST_PTR, CL_MEM_CONTEXT, CL_MEM_COPY_HOST_PTR, CL_MEM_COPY_OVERLAP, CL_MEM_FLAGS, CL_MEM_HOST_PTR, CL_MEM_MAP_COUNT, CL_MEM_OBJECT_ALLOCATION_FAILURE, CL_MEM_OBJECT_BUFFER, CL_MEM_OBJECT_IMAGE2D, CL_MEM_OBJECT_IMAGE3D, CL_MEM_READ_ONLY, CL_MEM_READ_WRITE, CL_MEM_REFERENCE_COUNT, CL_MEM_SIZE, CL_MEM_TYPE, CL_MEM_USE_HOST_PTR, CL_MEM_WRITE_ONLY, CL_NONE, CL_OUT_OF_HOST_MEMORY, CL_OUT_OF_RESOURCES, CL_PLATFORM_EXTENSIONS, CL_PLATFORM_NAME, CL_PLATFORM_PROFILE, CL_PLATFORM_VENDOR, CL_PLATFORM_VERSION, CL_PROFILING_COMMAND_END, CL_PROFILING_COMMAND_QUEUED, CL_PROFILING_COMMAND_START, CL_PROFILING_COMMAND_SUBMIT, CL_PROFILING_INFO_NOT_AVAILABLE, CL_PROGRAM_BINARIES, CL_PROGRAM_BINARY_SIZES, CL_PROGRAM_BUILD_LOG, CL_PROGRAM_BUILD_OPTIONS, CL_PROGRAM_BUILD_STATUS, CL_PROGRAM_CONTEXT, CL_PROGRAM_DEVICES, CL_PROGRAM_NUM_DEVICES, CL_PROGRAM_REFERENCE_COUNT, CL_PROGRAM_SOURCE, CL_QUEUE_CONTEXT, CL_QUEUE_DEVICE, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, CL_QUEUE_PROFILING_ENABLE, CL_QUEUE_PROPERTIES, CL_QUEUE_REFERENCE_COUNT, CL_QUEUED, CL_R, CL_RA, CL_READ_ONLY_CACHE, CL_READ_WRITE_CACHE, CL_RG, CL_RGB, CL_RGBA, CL_RUNNING, CL_SAMPLER_ADDRESSING_MODE, CL_SAMPLER_CONTEXT, CL_SAMPLER_FILTER_MODE, CL_SAMPLER_NORMALIZED_COORDS, CL_SAMPLER_REFERENCE_COUNT, CL_SIGNED_INT16, CL_SIGNED_INT32, CL_SIGNED_INT8, CL_SNORM_INT16, CL_SNORM_INT8, CL_SUBMITTED, CL_SUCCESS, CL_TRUE, CL_UNORM_INT_101010, CL_UNORM_INT16, CL_UNORM_INT8, CL_UNORM_SHORT_555, CL_UNORM_SHORT_565, CL_UNSIGNED_INT16, CL_UNSIGNED_INT32, CL_UNSIGNED_INT8, CL_VERSION_1_0| Modifier and Type | Method and Description |
|---|---|
static long |
clCreateCommandQueueWithProperties(long context,
long device,
long[] properties,
int[] errcode_ret)
Array version of:
CreateCommandQueueWithProperties |
static long |
clCreateCommandQueueWithProperties(long context,
long device,
java.nio.LongBuffer properties,
java.nio.IntBuffer errcode_ret)
Creates a host or device command-queue on a specific device.
|
static long |
clCreatePipe(long context,
long flags,
int pipe_packet_size,
int pipe_max_packets,
int[] properties,
int[] errcode_ret)
Array version of:
CreatePipe |
static long |
clCreatePipe(long context,
long flags,
int pipe_packet_size,
int pipe_max_packets,
java.nio.IntBuffer properties,
java.nio.IntBuffer errcode_ret)
Creates a pipe object.
|
static long |
clCreateSamplerWithProperties(long context,
int[] sampler_properties,
int[] errcode_ret)
Array version of:
CreateSamplerWithProperties |
static long |
clCreateSamplerWithProperties(long context,
java.nio.IntBuffer sampler_properties,
java.nio.IntBuffer errcode_ret)
Creates a sampler object.
|
static int |
clEnqueueSVMFree(long command_queue,
org.lwjgl.PointerBuffer svm_pointers,
CLSVMFreeCallbackI pfn_free_func,
long user_data,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to free the shared virtual memory buffer allocated using
SVMAlloc or a shared system memory pointer. |
static int |
clEnqueueSVMMap(long command_queue,
boolean blocking_map,
long map_flags,
java.nio.ByteBuffer svm_ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command that will allow the host to update a region of a SVM buffer.
|
static int |
clEnqueueSVMMemcpy(long command_queue,
boolean blocking_copy,
java.nio.ByteBuffer dst_ptr,
java.nio.ByteBuffer src_ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to do a
memcpy operation. |
static int |
clEnqueueSVMMemFill(long command_queue,
java.nio.ByteBuffer svm_ptr,
java.nio.ByteBuffer pattern,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to fill a region in memory with a pattern of a given pattern size.
|
static int |
clEnqueueSVMUnmap(long command_queue,
java.nio.ByteBuffer svm_ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to indicate that the host has completed updating the region given by
svm_ptr and which was specified in a previous call to
EnqueueSVMMap. |
static int |
clGetPipeInfo(long pipe,
int param_name,
java.nio.ByteBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Queries information specific to a pipe object.
|
static int |
clGetPipeInfo(long pipe,
int param_name,
int[] param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Array version of:
GetPipeInfo |
static int |
clGetPipeInfo(long pipe,
int param_name,
java.nio.IntBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Queries information specific to a pipe object.
|
static int |
clSetKernelArgSVMPointer(long kernel,
int arg_index,
java.nio.ByteBuffer arg_value)
Set a SVM pointer as the argument value for a specific argument of a kernel.
|
static int |
clSetKernelExecInfo(long kernel,
int param_name,
java.nio.ByteBuffer param_value)
Can be used to pass additional information other than argument values to a kernel.
|
static int |
clSetKernelExecInfo(long kernel,
int param_name,
int[] param_value)
Array version of:
SetKernelExecInfo |
static int |
clSetKernelExecInfo(long kernel,
int param_name,
java.nio.IntBuffer param_value)
Can be used to pass additional information other than argument values to a kernel.
|
static int |
clSetKernelExecInfo(long kernel,
int param_name,
org.lwjgl.PointerBuffer param_value)
Can be used to pass additional information other than argument values to a kernel.
|
static java.nio.ByteBuffer |
clSVMAlloc(long context,
long flags,
long size,
int alignment)
Allocates a shared virtual memory buffer (referred to as a SVM buffer) that can be shared by the host and all devices in an OpenCL context that support
shared virtual memory.
|
static void |
clSVMFree(long context,
java.nio.ByteBuffer svm_pointer)
Frees a shared virtual memory buffer allocated using
SVMAlloc. |
static long |
nclCreateCommandQueueWithProperties(long context,
long device,
long properties,
long errcode_ret)
Unsafe version of:
CreateCommandQueueWithProperties |
static long |
nclCreatePipe(long context,
long flags,
int pipe_packet_size,
int pipe_max_packets,
long properties,
long errcode_ret)
Unsafe version of:
CreatePipe |
static long |
nclCreateSamplerWithProperties(long context,
long sampler_properties,
long errcode_ret)
Unsafe version of:
CreateSamplerWithProperties |
static int |
nclEnqueueSVMFree(long command_queue,
int num_svm_pointers,
long svm_pointers,
long pfn_free_func,
long user_data,
int num_events_in_wait_list,
long event_wait_list,
long event)
Unsafe version of:
EnqueueSVMFree |
static int |
nclEnqueueSVMMap(long command_queue,
int blocking_map,
long map_flags,
long svm_ptr,
long size,
int num_events_in_wait_list,
long event_wait_list,
long event)
Unsafe version of:
EnqueueSVMMap |
static int |
nclEnqueueSVMMemcpy(long command_queue,
int blocking_copy,
long dst_ptr,
long src_ptr,
long size,
int num_events_in_wait_list,
long event_wait_list,
long event)
Unsafe version of:
EnqueueSVMMemcpy |
static int |
nclEnqueueSVMMemFill(long command_queue,
long svm_ptr,
long pattern,
long pattern_size,
long size,
int num_events_in_wait_list,
long event_wait_list,
long event)
Unsafe version of:
EnqueueSVMMemFill |
static int |
nclEnqueueSVMUnmap(long command_queue,
long svm_ptr,
int num_events_in_wait_list,
long event_wait_list,
long event)
Unsafe version of:
EnqueueSVMUnmap |
static int |
nclGetPipeInfo(long pipe,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
Unsafe version of:
GetPipeInfo |
static int |
nclSetKernelArgSVMPointer(long kernel,
int arg_index,
long arg_value)
Unsafe version of:
SetKernelArgSVMPointer |
static int |
nclSetKernelExecInfo(long kernel,
int param_name,
long param_value_size,
long param_value)
Unsafe version of:
SetKernelExecInfo |
static long |
nclSVMAlloc(long context,
long flags,
long size,
int alignment)
Unsafe version of:
SVMAlloc |
static void |
nclSVMFree(long context,
long svm_pointer)
Unsafe version of:
SVMFree |
clCompileProgram, clCompileProgram, clCreateImage, clCreateImage, clCreateImage, clCreateImage, clCreateImage, clCreateImage, clCreateImage, clCreateImage, clCreateProgramWithBuiltInKernels, clCreateProgramWithBuiltInKernels, clCreateProgramWithBuiltInKernels, clCreateProgramWithBuiltInKernels, clCreateProgramWithBuiltInKernels, clCreateSubDevices, clCreateSubDevices, clEnqueueBarrierWithWaitList, clEnqueueFillBuffer, clEnqueueFillImage, clEnqueueFillImage, clEnqueueFillImage, clEnqueueFillImage, clEnqueueFillImage, clEnqueueMarkerWithWaitList, clEnqueueMigrateMemObjects, clGetExtensionFunctionAddressForPlatform, clGetExtensionFunctionAddressForPlatform, clGetKernelArgInfo, clGetKernelArgInfo, clGetKernelArgInfo, clGetKernelArgInfo, clGetKernelArgInfo, clLinkProgram, clLinkProgram, clLinkProgram, clReleaseDevice, clRetainDevice, clUnloadPlatformCompiler, nclCompileProgram, nclCreateImage, nclCreateProgramWithBuiltInKernels, nclCreateSubDevices, nclEnqueueBarrierWithWaitList, nclEnqueueFillBuffer, nclEnqueueFillImage, nclEnqueueMarkerWithWaitList, nclEnqueueMigrateMemObjects, nclGetExtensionFunctionAddressForPlatform, nclGetKernelArgInfo, nclLinkProgramclCreateSubBuffer, clCreateSubBuffer, clCreateUserEvent, clCreateUserEvent, clEnqueueCopyBufferRect, clEnqueueReadBufferRect, clEnqueueReadBufferRect, clEnqueueReadBufferRect, clEnqueueReadBufferRect, clEnqueueReadBufferRect, clEnqueueReadBufferRect, clEnqueueReadBufferRect, clEnqueueReadBufferRect, clEnqueueReadBufferRect, clEnqueueWriteBufferRect, clEnqueueWriteBufferRect, clEnqueueWriteBufferRect, clEnqueueWriteBufferRect, clEnqueueWriteBufferRect, clEnqueueWriteBufferRect, clEnqueueWriteBufferRect, clEnqueueWriteBufferRect, clEnqueueWriteBufferRect, clSetEventCallback, clSetMemObjectDestructorCallback, clSetUserEventStatus, nclCreateSubBuffer, nclCreateUserEvent, nclEnqueueCopyBufferRect, nclEnqueueReadBufferRect, nclEnqueueWriteBufferRect, nclSetEventCallback, nclSetMemObjectDestructorCallbackclBuildProgram, clBuildProgram, clBuildProgram, clCreateBuffer, clCreateBuffer, clCreateBuffer, clCreateBuffer, clCreateBuffer, clCreateBuffer, clCreateBuffer, clCreateBuffer, clCreateBuffer, clCreateBuffer, clCreateBuffer, clCreateCommandQueue, clCreateCommandQueue, clCreateContext, clCreateContext, clCreateContext, clCreateContextFromType, clCreateContextFromType, clCreateImage2D, clCreateImage2D, clCreateImage2D, clCreateImage2D, clCreateImage2D, clCreateImage2D, clCreateImage2D, clCreateImage2D, clCreateImage3D, clCreateImage3D, clCreateImage3D, clCreateImage3D, clCreateImage3D, clCreateImage3D, clCreateImage3D, clCreateImage3D, clCreateKernel, clCreateKernel, clCreateKernel, clCreateKernel, clCreateKernelsInProgram, clCreateKernelsInProgram, clCreateProgramWithBinary, clCreateProgramWithBinary, clCreateProgramWithBinary, clCreateProgramWithBinary, clCreateProgramWithSource, clCreateProgramWithSource, clCreateProgramWithSource, clCreateProgramWithSource, clCreateSampler, clCreateSampler, clEnqueueBarrier, clEnqueueCopyBuffer, clEnqueueCopyBufferToImage, clEnqueueCopyImage, clEnqueueCopyImageToBuffer, clEnqueueMapBuffer, clEnqueueMapBuffer, clEnqueueMapImage, clEnqueueMapImage, clEnqueueMapImage, clEnqueueMapImage, clEnqueueMarker, clEnqueueNativeKernel, clEnqueueNativeKernel, clEnqueueNDRangeKernel, clEnqueueReadBuffer, clEnqueueReadBuffer, clEnqueueReadBuffer, clEnqueueReadBuffer, clEnqueueReadBuffer, clEnqueueReadBuffer, clEnqueueReadBuffer, clEnqueueReadBuffer, clEnqueueReadBuffer, clEnqueueReadImage, clEnqueueReadImage, clEnqueueReadImage, clEnqueueReadImage, clEnqueueReadImage, clEnqueueReadImage, clEnqueueReadImage, clEnqueueReadImage, clEnqueueReadImage, clEnqueueTask, clEnqueueUnmapMemObject, clEnqueueWaitForEvents, clEnqueueWaitForEvents, clEnqueueWriteBuffer, clEnqueueWriteBuffer, clEnqueueWriteBuffer, clEnqueueWriteBuffer, clEnqueueWriteBuffer, clEnqueueWriteBuffer, clEnqueueWriteBuffer, clEnqueueWriteBuffer, clEnqueueWriteBuffer, clEnqueueWriteImage, clEnqueueWriteImage, clEnqueueWriteImage, clEnqueueWriteImage, clEnqueueWriteImage, clEnqueueWriteImage, clEnqueueWriteImage, clEnqueueWriteImage, clEnqueueWriteImage, clFinish, clFlush, clGetCommandQueueInfo, clGetCommandQueueInfo, clGetCommandQueueInfo, clGetCommandQueueInfo, clGetCommandQueueInfo, clGetCommandQueueInfo, clGetContextInfo, clGetContextInfo, clGetContextInfo, clGetContextInfo, clGetDeviceIDs, clGetDeviceIDs, clGetDeviceInfo, clGetDeviceInfo, clGetDeviceInfo, clGetDeviceInfo, clGetDeviceInfo, clGetDeviceInfo, clGetEventInfo, clGetEventInfo, clGetEventInfo, clGetEventInfo, clGetEventProfilingInfo, clGetEventProfilingInfo, clGetEventProfilingInfo, clGetExtensionFunctionAddress, clGetExtensionFunctionAddress, clGetImageInfo, clGetImageInfo, clGetImageInfo, clGetImageInfo, clGetKernelInfo, clGetKernelInfo, clGetKernelInfo, clGetKernelInfo, clGetKernelWorkGroupInfo, clGetKernelWorkGroupInfo, clGetKernelWorkGroupInfo, clGetKernelWorkGroupInfo, clGetKernelWorkGroupInfo, clGetKernelWorkGroupInfo, clGetMemObjectInfo, clGetMemObjectInfo, clGetMemObjectInfo, clGetMemObjectInfo, clGetMemObjectInfo, clGetMemObjectInfo, clGetPlatformIDs, clGetPlatformIDs, clGetPlatformInfo, clGetPlatformInfo, clGetPlatformInfo, clGetProgramBuildInfo, clGetProgramBuildInfo, clGetProgramBuildInfo, clGetProgramBuildInfo, clGetProgramInfo, clGetProgramInfo, clGetProgramInfo, clGetProgramInfo, clGetSamplerInfo, clGetSamplerInfo, clGetSamplerInfo, clGetSamplerInfo, clGetSupportedImageFormats, clGetSupportedImageFormats, clReleaseCommandQueue, clReleaseContext, clReleaseEvent, clReleaseKernel, clReleaseMemObject, clReleaseProgram, clReleaseSampler, clRetainCommandQueue, clRetainContext, clRetainEvent, clRetainKernel, clRetainMemObject, clRetainProgram, clRetainSampler, clSetKernelArg, clSetKernelArg, clSetKernelArg, clSetKernelArg, clSetKernelArg, clSetKernelArg, clSetKernelArg, clSetKernelArg, clSetKernelArg, clSetKernelArg, clSetKernelArg, clSetKernelArg, clSetKernelArg, clSetKernelArg1b, clSetKernelArg1d, clSetKernelArg1f, clSetKernelArg1i, clSetKernelArg1l, clSetKernelArg1p, clSetKernelArg1s, clSetKernelArg2b, clSetKernelArg2d, clSetKernelArg2f, clSetKernelArg2i, clSetKernelArg2l, clSetKernelArg2p, clSetKernelArg2s, clSetKernelArg4b, clSetKernelArg4d, clSetKernelArg4f, clSetKernelArg4i, clSetKernelArg4l, clSetKernelArg4p, clSetKernelArg4s, clUnloadCompiler, clWaitForEvents, clWaitForEvents, nclBuildProgram, nclCreateBuffer, nclCreateCommandQueue, nclCreateContext, nclCreateContextFromType, nclCreateImage2D, nclCreateImage3D, nclCreateKernel, nclCreateKernelsInProgram, nclCreateProgramWithBinary, nclCreateProgramWithSource, nclCreateSampler, nclEnqueueCopyBuffer, nclEnqueueCopyBufferToImage, nclEnqueueCopyImage, nclEnqueueCopyImageToBuffer, nclEnqueueMapBuffer, nclEnqueueMapImage, nclEnqueueMarker, nclEnqueueNativeKernel, nclEnqueueNDRangeKernel, nclEnqueueReadBuffer, nclEnqueueReadImage, nclEnqueueTask, nclEnqueueUnmapMemObject, nclEnqueueWaitForEvents, nclEnqueueWriteBuffer, nclEnqueueWriteImage, nclGetCommandQueueInfo, nclGetContextInfo, nclGetDeviceIDs, nclGetDeviceInfo, nclGetEventInfo, nclGetEventProfilingInfo, nclGetExtensionFunctionAddress, nclGetImageInfo, nclGetKernelInfo, nclGetKernelWorkGroupInfo, nclGetMemObjectInfo, nclGetPlatformIDs, nclGetPlatformInfo, nclGetProgramBuildInfo, nclGetProgramInfo, nclGetSamplerInfo, nclGetSupportedImageFormats, nclSetKernelArg, nclWaitForEventspublic static final int CL_VERSION_2_0
public static final int CL_INVALID_PIPE_SIZE
public static final int CL_INVALID_DEVICE_QUEUE
public static final int CL_DEVICE_QUEUE_ON_HOST_PROPERTIES
public static final int CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS
public static final int CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE
public static final int CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES
public static final int CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE
public static final int CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE
public static final int CL_DEVICE_MAX_ON_DEVICE_QUEUES
public static final int CL_DEVICE_MAX_ON_DEVICE_EVENTS
public static final int CL_DEVICE_SVM_CAPABILITIES
public static final int CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE
public static final int CL_DEVICE_MAX_PIPE_ARGS
public static final int CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS
public static final int CL_DEVICE_PIPE_MAX_PACKET_SIZE
public static final int CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT
public static final int CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT
public static final int CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT
public static final int CL_QUEUE_ON_DEVICE
public static final int CL_QUEUE_ON_DEVICE_DEFAULT
public static final int CL_DEVICE_SVM_COARSE_GRAIN_BUFFER
public static final int CL_DEVICE_SVM_FINE_GRAIN_BUFFER
public static final int CL_DEVICE_SVM_FINE_GRAIN_SYSTEM
public static final int CL_DEVICE_SVM_ATOMICS
public static final int CL_QUEUE_SIZE
public static final int CL_MEM_SVM_FINE_GRAIN_BUFFER
public static final int CL_MEM_SVM_ATOMICS
public static final int CL_MEM_OBJECT_PIPE
public static final int CL_MEM_USES_SVM_POINTER
public static final int CL_sRGB
public static final int CL_sRGBx
public static final int CL_sRGBA
public static final int CL_sBGRA
public static final int CL_ABGR
public static final int CL_PIPE_PACKET_SIZE
public static final int CL_PIPE_MAX_PACKETS
public static final int CL_SAMPLER_MIP_FILTER_MODE
public static final int CL_SAMPLER_LOD_MIN
public static final int CL_SAMPLER_LOD_MAX
public static final int CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE
public static final int CL_KERNEL_ARG_TYPE_PIPE
public static final int CL_KERNEL_EXEC_INFO_SVM_PTRS
public static final int CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM
public static final int CL_COMMAND_SVM_FREE
public static final int CL_COMMAND_SVM_MEMCPY
public static final int CL_COMMAND_SVM_MEMFILL
public static final int CL_COMMAND_SVM_MAP
public static final int CL_COMMAND_SVM_UNMAP
public static final int CL_PROFILING_COMMAND_COMPLETE
public static long nclCreateCommandQueueWithProperties(long context,
long device,
long properties,
long errcode_ret)
CreateCommandQueueWithPropertiespublic static long clCreateCommandQueueWithProperties(long context,
long device,
@Nullable
java.nio.LongBuffer properties,
@Nullable
java.nio.IntBuffer errcode_ret)
OpenCL objects such as memory, program and kernel objects are created using a context. Operations on these objects are performed using a command-queue. The command-queue can be used to queue a set of operations (referred to as commands) in order. Having multiple command-queues allows applications to queue multiple independent commands without requiring synchronization. Note that this should work as long as these objects are not being shared. Sharing of objects across multiple command-queues will require the application to perform appropriate synchronization.
context - a valid OpenCL contextdevice - a device associated with context. It can either be in the list of devices specified when context is created using CreateContext or have the same
device type as device type specified when context is created using CreateContextFromType.properties - a list of properties for the command-queue and their corresponding values. Each property name is immediately followed by the corresponding desired
value. The list is terminated with 0. If a supported property and its value is not specified in properties, its default value will be used.
properties can be NULL in which case the default values for supported command-queue properties will be used. One of:QUEUE_PROPERTIES | QUEUE_SIZE |
errcode_ret - will return an appropriate error code. If errcode_ret is NULL, no error code is returned.errcode_ret is set to SUCCESS if the command-queue is created successfully. Otherwise, it returns a NULL value
with one of the following error values returned in errcode_ret:
INVALID_CONTEXT if context is not a valid context.INVALID_DEVICE if device is not a valid device or is not associated with context.INVALID_VALUE if values specified in properties are not valid.INVALID_QUEUE_PROPERTIES if values specified in properties are valid but are not supported by the device.OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.public static long nclCreatePipe(long context,
long flags,
int pipe_packet_size,
int pipe_max_packets,
long properties,
long errcode_ret)
CreatePipepublic static long clCreatePipe(long context,
long flags,
int pipe_packet_size,
int pipe_max_packets,
@Nullable
java.nio.IntBuffer properties,
@Nullable
java.nio.IntBuffer errcode_ret)
context - a valid OpenCL context used to create the pipe objectflags - a bit-field that is used to specify allocation and usage information such as the memory arena that should be used to allocate the pipe object and
how it will be used. If value specified for flags is 0, the default is used which is MEM_READ_WRITE.pipe_packet_size - the size in bytes of a pipe packetpipe_max_packets - the pipe capacity by specifying the maximum number of packets the pipe can holdproperties - a list of properties for the pipe and their corresponding values. Each property name is immediately followed by the corresponding desired value. The
list is terminated with 0. In OpenCL 2.0, properties must be NULL.errcode_ret - will return an appropriate error code. If errcode_ret is NULL, no error code is returned.errcode_ret is set to SUCCESS if the pipe object is created successfully. Otherwise, it returns a NULL value with
one of the following error values returned in errcode_ret:
INVALID_CONTEXT if context is not a valid context.INVALID_VALUE if values specified in flags are invalid.INVALID_VALUE if properties is not NULL.INVALID_PIPE_SIZE if pipe_packet_size is 0 or the pipe_packet_size exceeds DEVICE_PIPE_MAX_PACKET_SIZE
value for all devices in context or if pipe_max_packets is 0.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for the pipe object.OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.public static int nclGetPipeInfo(long pipe,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
GetPipeInfoparam_value_size - the size in bytes of memory pointed to by param_value. This size must be ≥ size of return type. If param_value is NULL, it is ignored.public static int clGetPipeInfo(long pipe,
int param_name,
@Nullable
java.nio.ByteBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
pipe - the pipe object being queriedparam_name - the information to queryparam_value - a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.param_value_size_ret - the actual size in bytes of data being queried by param_value. If NULL, it is ignored.SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_VALUE if param_name is not valid, or if size in bytes specified by param_value_size is < size of return type and
param_value is not NULL.INVALID_MEM_OBJECT if pipe is not a valid pipe object.OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.public static int clGetPipeInfo(long pipe,
int param_name,
@Nullable
java.nio.IntBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
pipe - the pipe object being queriedparam_name - the information to queryparam_value - a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.param_value_size_ret - the actual size in bytes of data being queried by param_value. If NULL, it is ignored.SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_VALUE if param_name is not valid, or if size in bytes specified by param_value_size is < size of return type and
param_value is not NULL.INVALID_MEM_OBJECT if pipe is not a valid pipe object.OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.public static long nclSVMAlloc(long context,
long flags,
long size,
int alignment)
SVMAlloc@Nullable
public static java.nio.ByteBuffer clSVMAlloc(long context,
long flags,
long size,
int alignment)
If MEM_SVM_FINE_GRAIN_BUFFER is not specified, the buffer can be created as a coarse grained SVM allocation. Similarly, if
MEM_SVM_ATOMICS is not specified, the buffer can be created without support for the OpenCL 2.0 SVM atomic operations.
Calling SVMAlloc does not itself provide consistency for the shared memory region. When the host can't use the SVM atomic operations, it must
rely on OpenCL's guaranteed memory consistency at synchronization points. To initialize a buffer to be shared with a kernel, the host can create the
buffer and use the resulting virtual memory pointer to initialize the buffer's contents.
For SVM to be used efficiently, the host and any devices sharing a buffer containing virtual memory pointers should have the same endianness. If the
context passed to SVMAlloc has devices with mixed endianness and the OpenCL implementation is unable to implement SVM because of that mixed
endianness, SVMAlloc will fail and return NULL.
Although SVM is generally not supported for image objects, CreateImage may create an image from a buffer (a 1D image from a buffer
or a 2D image from buffer) if the buffer specified in its image description parameter is a SVM buffer. Such images have a linear memory representation
so their memory can be shared using SVM. However, fine grained sharing and atomics are not supported for image reads and writes in a kernel.
If CreateBuffer is called with a pointer returned by SVMAlloc as its host_ptr argument, and
MEM_USE_HOST_PTR is set in its flags argument, CreateBuffer will succeed and return a valid non-zero buffer object as
long as the size argument to CreateBuffer is no larger than the size argument passed in the original SVMAlloc call. The
new buffer object returned has the shared memory as the underlying storage. Locations in the buffer's underlying shared memory can be operated on using,
e.g., atomic operations if the device supports them.
context - a valid OpenCL context used to create the SVM bufferflags - a bit-field that is used to specify allocation and usage information. One of:MEM_READ_WRITE | MEM_WRITE_ONLY | MEM_READ_ONLY | MEM_SVM_FINE_GRAIN_BUFFER | MEM_SVM_ATOMICS |
size - the size in bytes of the SVM buffer to be allocatedalignment - the minimum alignment in bytes that is required for the newly created buffer's memory region. It must be a power of two up to the largest data type
supported by the OpenCL device. For the full profile, the largest data type is long16. For the embedded profile, it is long16 if the
device supports 64-bit integers; otherwise it is int16. If alignment is 0, a default alignment will be used that is equal to the
size of largest data type supported by the OpenCL implementation.NULL shared virtual memory address if the SVM buffer is successfully allocated. Otherwise, like malloc, it returns a NULL pointer
value. SVMAlloc will fail if:
context is not a valid context.flags does not contain MEM_SVM_FINE_GRAIN_BUFFER but does contain MEM_SVM_ATOMICS.flags do not follow rules for supported values.MEM_SVM_FINE_GRAIN_BUFFER or MEM_SVM_ATOMICS is specified in flags and these are not supported by at least one device in context.flags are not valid.size is 0 or > DEVICE_MAX_MEM_ALLOC_SIZE value for any device in context.alignment is not a power of two or the OpenCL implementation cannot support the specified alignment for at least one device in context.public static void nclSVMFree(long context,
long svm_pointer)
SVMFreepublic static void clSVMFree(long context,
java.nio.ByteBuffer svm_pointer)
SVMAlloc.
Note that SVMFree does not wait for previously enqueued commands that may be using svm_pointer to finish before freeing
svm_pointer. It is the responsibility of the application to make sure that enqueued commands that use svm_pointer have finished before
freeing svm_pointer. This can be done by enqueuing a blocking operation such as Finish, WaitForEvents,
EnqueueReadBuffer or by registering a callback with the events associated with enqueued commands and when the last enqueued command
has finished freeing svm_pointer.
The behavior of using svm_pointer after it has been freed is undefined. In addition, if a buffer object is created using
CreateBuffer with svm_pointer, the buffer object must first be released before the svm_pointer is freed.
context - a valid OpenCL context used to create the SVM buffersvm_pointer - must be the value returned by a call to SVMAlloc. If a NULL pointer is passed in svm_pointer, no action occurs.public static int nclEnqueueSVMFree(long command_queue,
int num_svm_pointers,
long svm_pointers,
long pfn_free_func,
long user_data,
int num_events_in_wait_list,
long event_wait_list,
long event)
EnqueueSVMFreenum_svm_pointers - the number of pointers in the svm_pointers arraynum_events_in_wait_list - the number of events in event_wait_listpublic static int clEnqueueSVMFree(long command_queue,
org.lwjgl.PointerBuffer svm_pointers,
@Nullable
CLSVMFreeCallbackI pfn_free_func,
long user_data,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
SVMAlloc or a shared system memory pointer.command_queue - a valid host command-queuesvm_pointers - the shared virtual memory pointers to be freed. Each pointer in svm_pointers that was allocated using SVMAlloc must have been allocated
from the same context from which command_queue was created. The memory associated with svm_pointers can be reused or freed after the
function returns.pfn_free_func - the callback function to be called to free the SVM pointers. If pfn_free_func is NULL, all pointers specified in svm_pointers must be
allocated using SVMAlloc and the OpenCL implementation will free these SVM pointers. pfn_free_func must be a valid callback function if any
SVM pointer to be freed is a shared system memory pointer i.e. not allocated using SVMAlloc. If pfn_free_func is a valid callback function,
the OpenCL implementation will call pfn_free_func to free all the SVM pointers specified in svm_pointers.user_data - will be passed as the user_data argument when pfn_free_func is called. user_data can be NULL.event_wait_list - a list of events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command
does not wait on any event to complete. The events specified in event_wait_list act as synchronization points. The context associated with events in
event_wait_list and command_queue must be the same.event - Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.
event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to
complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the
event_wait_list array.SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.INVALID_VALUE if num_svm_pointers is 0 or if svm_pointers is NULL or if any of the pointers specified in
svm_pointers array is NULL.INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not
NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events.OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.public static int nclEnqueueSVMMemcpy(long command_queue,
int blocking_copy,
long dst_ptr,
long src_ptr,
long size,
int num_events_in_wait_list,
long event_wait_list,
long event)
EnqueueSVMMemcpysize - the size in bytes of data being copiednum_events_in_wait_list - the number of events in event_wait_listpublic static int clEnqueueSVMMemcpy(long command_queue,
boolean blocking_copy,
java.nio.ByteBuffer dst_ptr,
java.nio.ByteBuffer src_ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
memcpy operation.
If dst_ptr and/or src_ptr are allocated using SVMAlloc then they must be allocated from the same context from which
command_queue was created. Otherwise the behavior is undefined.
command_queue - the host command-queue in which the read / write command will be queuedblocking_copy - indicates if the copy operation is blocking or non-blocking.
If blocking_copy is TRUE i.e. the copy command is blocking, EnqueueSVMMemcpy does not return until the buffer data has been copied
into memory pointed to by dst_ptr.
If blocking_copy is FALSE i.e. the copy command is non-blocking, EnqueueSVMMemcpy queues a non-blocking copy command and returns.
The contents of the buffer that dst_ptr point to cannot be used until the copy command has completed. The event argument returns an event
object which can be used to query the execution status of the read command. When the copy command has completed, the contents of the buffer that
dst_ptr points to can be used by the application.
dst_ptr - the pointer to a memory region where data is copied tosrc_ptr - the pointer to a memory region where data is copied fromevent_wait_list - a list of events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command
does not wait on any event to complete. The events specified in event_wait_list act as synchronization points. The context associated with events in
event_wait_list and command_queue must be the same.event - Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.
event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to
complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the
event_wait_list array.SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.INVALID_CONTEXT if the context associated with command_queue and events in event_wait_list are not the same.INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not
NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the copy operation is blocking and the execution status of any of the events in
event_wait_list is a negative integer value.INVALID_VALUE if dst_ptr or src_ptr are NULL.INVALID_VALUE if size is 0.MEM_COPY_OVERLAP if the values specified for dst_ptr, src_ptr and size result in an overlapping copy.OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.public static int nclEnqueueSVMMemFill(long command_queue,
long svm_ptr,
long pattern,
long pattern_size,
long size,
int num_events_in_wait_list,
long event_wait_list,
long event)
EnqueueSVMMemFillpattern_size - the size of the pattern array, in bytessize - the size in bytes of region being filled starting with svm_ptr and must be a multiple of pattern_sizenum_events_in_wait_list - the number of events in event_wait_listpublic static int clEnqueueSVMMemFill(long command_queue,
java.nio.ByteBuffer svm_ptr,
java.nio.ByteBuffer pattern,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
command_queue - the host command-queue in which the fill command will be queuedsvm_ptr - a pointer to a memory region that will be filled with pattern. It must be aligned to pattern_size bytes. If svm_ptr is allocated
using SVMAlloc then it must be allocated from the same context from which command_queue was created. Otherwise the behavior is undefined.pattern - a pointer to the data pattern of size pattern_size in bytes. pattern will be used to fill a region in buffer starting at
svm_ptr and is size bytes in size. The data pattern must be a scalar or vector integer or floating-point data type supported by
OpenCL. For example, if region pointed to by svm_ptr is to be filled with a pattern of float4 values, then pattern will be a pointer to a
cl_float4 value and pattern_size will be sizeof(cl_float4). The maximum value of pattern_size is the size of the
largest integer or floating-point vector data type supported by the OpenCL device. The memory associated with pattern can be reused or freed after
the function returns.event_wait_list - a list of events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command
does not wait on any event to complete. The events specified in event_wait_list act as synchronization points. The context associated with events in
event_wait_list and command_queue must be the same.event - Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.
event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to
complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the
event_wait_list array.SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.INVALID_CONTEXT if the context associated with command_queue and events in event_wait_list are not the same.INVALID_VALUE if svm_ptr is NULL.INVALID_VALUE if svm_ptr is not aligned to pattern_size bytes.INVALID_VALUE if pattern is NULL or if pattern_size is 0 or if pattern_size is not one of
{1, 2, 4, 8, 16, 32, 64, 128}.INVALID_VALUE if size is 0 or is not a multiple of pattern_size.INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not
NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events.OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.public static int nclEnqueueSVMMap(long command_queue,
int blocking_map,
long map_flags,
long svm_ptr,
long size,
int num_events_in_wait_list,
long event_wait_list,
long event)
EnqueueSVMMapsize - the size of the memory region to map, in bytesnum_events_in_wait_list - the number of events in event_wait_listpublic static int clEnqueueSVMMap(long command_queue,
boolean blocking_map,
long map_flags,
java.nio.ByteBuffer svm_ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
command_queue - a valid host command-queueblocking_map - indicates if the map operation is blocking or non-blocking.
If blocking_map is TRUE, EnqueueSVMMap does not return until the application can access the contents of the SVM region specified by
svm_ptr and size on the host.
If blocking_map is FALSE i.e. map operation is non-blocking, the region specified by svm_ptr and size cannot be used until
the map command has completed. The event argument returns an event object which can be used to query the execution status of the map command. When
the map command is completed, the application can access the contents of the region specified by svm_ptr and size.
map_flags - a bit-fieldsvm_ptr - a pointer to a memory region and size in bytes that will be updated by the host. If svm_ptr is allocated using SVMAlloc then it
must be allocated from the same context from which command_queue was created. Otherwise the behavior is undefined.event_wait_list - a list of events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command
does not wait on any event to complete. The events specified in event_wait_list act as synchronization points. The context associated with events in
event_wait_list and command_queue must be the same.event - Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.
event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to
complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the
event_wait_list array.SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.INVALID_CONTEXT if context associated with command_queue and events in event_wait_list are not the same.INVALID_VALUE if svm_ptr is NULL.INVALID_VALUE if size is 0 or if values specified in map_flags are not valid.INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not
NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the map operation is blocking and the execution status of any of the events in
event_wait_list is a negative integer value.OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.public static int nclEnqueueSVMUnmap(long command_queue,
long svm_ptr,
int num_events_in_wait_list,
long event_wait_list,
long event)
EnqueueSVMUnmapnum_events_in_wait_list - the number of events in event_wait_listpublic static int clEnqueueSVMUnmap(long command_queue,
java.nio.ByteBuffer svm_ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
svm_ptr and which was specified in a previous call to
EnqueueSVMMap.command_queue - a valid host command-queuesvm_ptr - a pointer that was specified in a previous call to EnqueueSVMMap. If svm_ptr is allocated using SVMAlloc then it must be allocated from
the same context from which command_queue was created. Otherwise the behavior is undefined.event_wait_list - a list of events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command
does not wait on any event to complete. The events specified in event_wait_list act as synchronization points. The context associated with events in
event_wait_list and command_queue must be the same.event - Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.
event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to
complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the
event_wait_list array.SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.INVALID_CONTEXT if context associated with command_queue and events in event_wait_list are not the same.INVALID_VALUE if svm_ptr is NULL.INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not
NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events.OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.public static int nclSetKernelArgSVMPointer(long kernel,
int arg_index,
long arg_value)
SetKernelArgSVMPointerpublic static int clSetKernelArgSVMPointer(long kernel,
int arg_index,
java.nio.ByteBuffer arg_value)
kernel - a valid kernel objectarg_index - the argument index. Arguments to the kernel are referred by indices that go from 0 for the leftmost argument to n - 1, where
n is the total number of arguments declared by a kernel.arg_value - the SVM pointer that should be used as the argument value for argument specified by arg_index. The SVM pointer specified is the value used
by all API calls that enqueue kernel (EnqueueNDRangeKernel) until the argument value is changed by a call to
SetKernelArgSVMPointer for kernel. The SVM pointer can only be used for arguments that are declared to be a pointer to global or
constant memory. The SVM pointer value must be aligned according to the argument's type. For example, if the argument is declared to be
global float4 *p, the SVM pointer value passed for p must be at a minimum aligned to a float4. The SVM pointer value
specified as the argument value can be the pointer returned by SVMAlloc or can be a pointer + offset into the SVM region.SUCCESS if the function was executed successfully. Otherwise, it returns one of the following errors:
INVALID_KERNEL if kernel is not a valid kernel object.INVALID_ARG_INDEX if arg_index is not a valid argument index.INVALID_ARG_VALUE if arg_value specified is not a valid value.OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.public static int nclSetKernelExecInfo(long kernel,
int param_name,
long param_value_size,
long param_value)
SetKernelExecInfoparam_value_size - the size in bytes of the memory pointed to by param_valuepublic static int clSetKernelExecInfo(long kernel,
int param_name,
java.nio.ByteBuffer param_value)
NOTES
1. Coarse-grain or fine-grain buffer SVM pointers used by a kernel which are not passed as a kernel arguments must be specified using
SetKernelExecInfo with KERNEL_EXEC_INFO_SVM_PTRS. For example, if SVM buffer A contains a pointer to another SVM buffer B, and the
kernel dereferences that pointer, then a pointer to B must either be passed as an argument in the call to that kernel or it must be made available to
the kernel using SetKernelExecInfo. For example, we might pass extra SVM pointers as follows:
clSetKernelExecInfo(kernel, CL_KERNEL_EXEC_INFO_SVM_PTRS, num_ptrs * sizeof(void *), extra_svm_ptr_list);
Here num_ptrs specifies the number of additional SVM pointers while extra_svm_ptr_list specifies a pointer to memory containing those
SVM pointers. When calling SetKernelExecInfo with KERNEL_EXEC_INFO_SVM_PTRS to specify pointers to non-argument SVM buffers as extra
arguments to a kernel, each of these pointers can be the SVM pointer returned by SVMAlloc or can be a pointer + offset into the SVM region. It is
sufficient to provide one pointer for each SVM buffer used.
2. KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM is used to indicate whether SVM pointers used by a kernel will refer to system allocations or not.
KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM = FALSE indicates that the OpenCL implementation may assume that system pointers are not passed as
kernel arguments and are not stored inside SVM allocations passed as kernel arguments.
KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM = TRUE indicates that the OpenCL implementation must assume that system pointers might be passed as
kernel arguments and/or stored inside SVM allocations passed as kernel arguments. In this case, if the device to which the kernel is enqueued does not
support system SVM pointers, EnqueueNDRangeKernel will return a INVALID_OPERATION error. If none of the devices in the context
associated with kernel support fine-grain system SVM allocations, SetKernelExecInfo will return a INVALID_OPERATION error.
If SetKernelExecInfo has not been called with a value for KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM, the default value is used for this
kernel attribute. The default value depends on whether the device on which the kernel is enqueued supports fine-grain system SVM allocations. If so, the
default value used is TRUE (system pointers might be passed); otherwise, the default is FALSE.
kernel - the kernel object being queriedparam_name - the information to be passed to kernel. One of:KERNEL_EXEC_INFO_SVM_PTRS | KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM |
param_value - a pointer to memory where the appropriate values determined by param_name are specifiedSUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_KERNEL if kernel is a not a valid kernel object.INVALID_VALUE if param_name is not valid, if param_value is NULL or if the size specified by param_value_size is not valid.INVALID_OPERATION if param_name = KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM and param_value = TRUE but no devices in
context associated with kernel support fine-grain system SVM allocations.OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.public static int clSetKernelExecInfo(long kernel,
int param_name,
org.lwjgl.PointerBuffer param_value)
NOTES
1. Coarse-grain or fine-grain buffer SVM pointers used by a kernel which are not passed as a kernel arguments must be specified using
SetKernelExecInfo with KERNEL_EXEC_INFO_SVM_PTRS. For example, if SVM buffer A contains a pointer to another SVM buffer B, and the
kernel dereferences that pointer, then a pointer to B must either be passed as an argument in the call to that kernel or it must be made available to
the kernel using SetKernelExecInfo. For example, we might pass extra SVM pointers as follows:
clSetKernelExecInfo(kernel, CL_KERNEL_EXEC_INFO_SVM_PTRS, num_ptrs * sizeof(void *), extra_svm_ptr_list);
Here num_ptrs specifies the number of additional SVM pointers while extra_svm_ptr_list specifies a pointer to memory containing those
SVM pointers. When calling SetKernelExecInfo with KERNEL_EXEC_INFO_SVM_PTRS to specify pointers to non-argument SVM buffers as extra
arguments to a kernel, each of these pointers can be the SVM pointer returned by SVMAlloc or can be a pointer + offset into the SVM region. It is
sufficient to provide one pointer for each SVM buffer used.
2. KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM is used to indicate whether SVM pointers used by a kernel will refer to system allocations or not.
KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM = FALSE indicates that the OpenCL implementation may assume that system pointers are not passed as
kernel arguments and are not stored inside SVM allocations passed as kernel arguments.
KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM = TRUE indicates that the OpenCL implementation must assume that system pointers might be passed as
kernel arguments and/or stored inside SVM allocations passed as kernel arguments. In this case, if the device to which the kernel is enqueued does not
support system SVM pointers, EnqueueNDRangeKernel will return a INVALID_OPERATION error. If none of the devices in the context
associated with kernel support fine-grain system SVM allocations, SetKernelExecInfo will return a INVALID_OPERATION error.
If SetKernelExecInfo has not been called with a value for KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM, the default value is used for this
kernel attribute. The default value depends on whether the device on which the kernel is enqueued supports fine-grain system SVM allocations. If so, the
default value used is TRUE (system pointers might be passed); otherwise, the default is FALSE.
kernel - the kernel object being queriedparam_name - the information to be passed to kernel. One of:KERNEL_EXEC_INFO_SVM_PTRS | KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM |
param_value - a pointer to memory where the appropriate values determined by param_name are specifiedSUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_KERNEL if kernel is a not a valid kernel object.INVALID_VALUE if param_name is not valid, if param_value is NULL or if the size specified by param_value_size is not valid.INVALID_OPERATION if param_name = KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM and param_value = TRUE but no devices in
context associated with kernel support fine-grain system SVM allocations.OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.public static int clSetKernelExecInfo(long kernel,
int param_name,
java.nio.IntBuffer param_value)
NOTES
1. Coarse-grain or fine-grain buffer SVM pointers used by a kernel which are not passed as a kernel arguments must be specified using
SetKernelExecInfo with KERNEL_EXEC_INFO_SVM_PTRS. For example, if SVM buffer A contains a pointer to another SVM buffer B, and the
kernel dereferences that pointer, then a pointer to B must either be passed as an argument in the call to that kernel or it must be made available to
the kernel using SetKernelExecInfo. For example, we might pass extra SVM pointers as follows:
clSetKernelExecInfo(kernel, CL_KERNEL_EXEC_INFO_SVM_PTRS, num_ptrs * sizeof(void *), extra_svm_ptr_list);
Here num_ptrs specifies the number of additional SVM pointers while extra_svm_ptr_list specifies a pointer to memory containing those
SVM pointers. When calling SetKernelExecInfo with KERNEL_EXEC_INFO_SVM_PTRS to specify pointers to non-argument SVM buffers as extra
arguments to a kernel, each of these pointers can be the SVM pointer returned by SVMAlloc or can be a pointer + offset into the SVM region. It is
sufficient to provide one pointer for each SVM buffer used.
2. KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM is used to indicate whether SVM pointers used by a kernel will refer to system allocations or not.
KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM = FALSE indicates that the OpenCL implementation may assume that system pointers are not passed as
kernel arguments and are not stored inside SVM allocations passed as kernel arguments.
KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM = TRUE indicates that the OpenCL implementation must assume that system pointers might be passed as
kernel arguments and/or stored inside SVM allocations passed as kernel arguments. In this case, if the device to which the kernel is enqueued does not
support system SVM pointers, EnqueueNDRangeKernel will return a INVALID_OPERATION error. If none of the devices in the context
associated with kernel support fine-grain system SVM allocations, SetKernelExecInfo will return a INVALID_OPERATION error.
If SetKernelExecInfo has not been called with a value for KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM, the default value is used for this
kernel attribute. The default value depends on whether the device on which the kernel is enqueued supports fine-grain system SVM allocations. If so, the
default value used is TRUE (system pointers might be passed); otherwise, the default is FALSE.
kernel - the kernel object being queriedparam_name - the information to be passed to kernel. One of:KERNEL_EXEC_INFO_SVM_PTRS | KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM |
param_value - a pointer to memory where the appropriate values determined by param_name are specifiedSUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_KERNEL if kernel is a not a valid kernel object.INVALID_VALUE if param_name is not valid, if param_value is NULL or if the size specified by param_value_size is not valid.INVALID_OPERATION if param_name = KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM and param_value = TRUE but no devices in
context associated with kernel support fine-grain system SVM allocations.OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.public static long nclCreateSamplerWithProperties(long context,
long sampler_properties,
long errcode_ret)
CreateSamplerWithPropertiespublic static long clCreateSamplerWithProperties(long context,
@Nullable
java.nio.IntBuffer sampler_properties,
@Nullable
java.nio.IntBuffer errcode_ret)
context - a valid OpenCL contextsampler_properties - a list of sampler property names and their corresponding values. Each sampler property name is immediately followed by the corresponding desired
value. The list is terminated with 0. If a supported property and its value is not specified in sampler_properties, its default
value will be used. sampler_properties can be NULL in which case the default values for supported sampler properties will be used.errcode_ret - will return an appropriate error code. If errcode_ret is NULL, no error code is returned.errcode_ret is set to SUCCESS if the sampler object is created successfully. Otherwise, it returns a NULL value
with one of the following error values returned in errcode_ret:
INVALID_CONTEXT if context is not a valid context.INVALID_VALUE if the property name in sampler_properties is not a supported property name, if the value specified for a supported property
name is not valid, or if the same property name is specified more than once.INVALID_OPERATION if images are not supported by any device associated with context.OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.public static long clCreateCommandQueueWithProperties(long context,
long device,
@Nullable
long[] properties,
@Nullable
int[] errcode_ret)
CreateCommandQueueWithPropertiespublic static long clCreatePipe(long context,
long flags,
int pipe_packet_size,
int pipe_max_packets,
@Nullable
int[] properties,
@Nullable
int[] errcode_ret)
CreatePipepublic static int clGetPipeInfo(long pipe,
int param_name,
@Nullable
int[] param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
GetPipeInfopublic static int clSetKernelExecInfo(long kernel,
int param_name,
int[] param_value)
SetKernelExecInfopublic static long clCreateSamplerWithProperties(long context,
@Nullable
int[] sampler_properties,
@Nullable
int[] errcode_ret)
CreateSamplerWithPropertiesCopyright LWJGL. All Rights Reserved. License terms.