Class CL20
- Direct Known Subclasses:
CL21
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
cl_channel_orderstatic final int
cl_command_typestatic final int
cl_command_typestatic final int
cl_command_typestatic final int
cl_command_typestatic final int
cl_command_typestatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
cl_device_svm_capabilitiesstatic final int
static final int
cl_device_svm_capabilitiesstatic final int
cl_device_svm_capabilitiesstatic final int
cl_device_svm_capabilitiesstatic final int
Error Codesstatic final int
Error Codesstatic final int
cl_kernel_arg_type_qualifierstatic final int
static final int
static final int
This flag is only used byGetSupportedImageFormats
to query image formats that may be both read from and written to by the same kernel instance.static final int
cl_mem_object_typestatic final int
SVM memory flag accepted bySVMAlloc
.static final int
SVM memory flag accepted bySVMAlloc
.static final int
static final int
static final int
static final int
static final int
static final int
cl_command_queue_propertiesstatic final int
cl_command_queue_propertiesstatic final int
static final int
cl_sampler_infostatic final int
cl_sampler_infostatic final int
cl_sampler_infostatic final int
cl_channel_orderstatic final int
cl_channel_orderstatic final int
cl_channel_orderstatic final int
cl_channel_orderstatic final int
OpenCL Version.Fields inherited from class org.lwjgl.opencl.CL12
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_2
Fields inherited from class org.lwjgl.opencl.CL11
CL_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_1
Fields inherited from class org.lwjgl.opencl.CL10
CL_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
-
Method Summary
Modifier and TypeMethodDescriptionstatic long
clCreateCommandQueueWithProperties
(long context, long device, long[] properties, int[] errcode_ret) Array version of:CreateCommandQueueWithProperties
static long
clCreateCommandQueueWithProperties
(long context, long device, LongBuffer properties, 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, PointerBuffer properties, int[] errcode_ret) Array version of:CreatePipe
static long
clCreatePipe
(long context, long flags, int pipe_packet_size, int pipe_max_packets, PointerBuffer properties, IntBuffer errcode_ret) Creates a pipe object.static long
clCreateSamplerWithProperties
(long context, long[] sampler_properties, int[] errcode_ret) Array version of:CreateSamplerWithProperties
static long
clCreateSamplerWithProperties
(long context, LongBuffer sampler_properties, IntBuffer errcode_ret) Creates a sampler object.static int
clEnqueueSVMFree
(long command_queue, PointerBuffer svm_pointers, CLSVMFreeCallbackI pfn_free_func, long user_data, PointerBuffer event_wait_list, PointerBuffer event) Enqueues a command to free the shared virtual memory buffer allocated usingSVMAlloc
or a shared system memory pointer.static int
clEnqueueSVMMap
(long command_queue, boolean blocking_map, long map_flags, ByteBuffer svm_ptr, PointerBuffer event_wait_list, 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, ByteBuffer dst_ptr, ByteBuffer src_ptr, PointerBuffer event_wait_list, PointerBuffer event) Enqueues a command to do amemcpy
operation.static int
clEnqueueSVMMemFill
(long command_queue, ByteBuffer svm_ptr, ByteBuffer pattern, PointerBuffer event_wait_list, 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, ByteBuffer svm_ptr, PointerBuffer event_wait_list, PointerBuffer event) Enqueues a command to indicate that the host has completed updating the region given bysvm_ptr
and which was specified in a previous call toEnqueueSVMMap
.static int
clGetPipeInfo
(long pipe, int param_name, int[] param_value, PointerBuffer param_value_size_ret) Array version of:GetPipeInfo
static int
clGetPipeInfo
(long pipe, int param_name, ByteBuffer param_value, PointerBuffer param_value_size_ret) Queries information specific to a pipe object.static int
clGetPipeInfo
(long pipe, int param_name, IntBuffer param_value, PointerBuffer param_value_size_ret) Queries information specific to a pipe object.static int
clSetKernelArgSVMPointer
(long kernel, int arg_index, 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, int[] param_value) Array version of:SetKernelExecInfo
static int
clSetKernelExecInfo
(long kernel, int param_name, 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, 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, PointerBuffer param_value) Can be used to pass additional information other than argument values to a kernel.static 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, ByteBuffer svm_pointer) Frees a shared virtual memory buffer allocated usingSVMAlloc
.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
Methods inherited from class org.lwjgl.opencl.CL12
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, clLinkProgram, clLinkProgram, clReleaseDevice, clRetainDevice, clUnloadPlatformCompiler, nclCompileProgram, nclCreateImage, nclCreateProgramWithBuiltInKernels, nclCreateSubDevices, nclEnqueueBarrierWithWaitList, nclEnqueueFillBuffer, nclEnqueueFillImage, nclEnqueueMarkerWithWaitList, nclEnqueueMigrateMemObjects, nclGetExtensionFunctionAddressForPlatform, nclGetKernelArgInfo, nclLinkProgram
Methods inherited from class org.lwjgl.opencl.CL11
clCreateSubBuffer, 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, nclSetMemObjectDestructorCallback
Methods inherited from class org.lwjgl.opencl.CL10
clBuildProgram, 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, nclWaitForEvents
-
Field Details
-
CL_VERSION_2_0
public static final int CL_VERSION_2_0OpenCL Version.- See Also:
-
CL_INVALID_PIPE_SIZE
public static final int CL_INVALID_PIPE_SIZEError Codes- See Also:
-
CL_INVALID_DEVICE_QUEUE
public static final int CL_INVALID_DEVICE_QUEUEError Codes- See Also:
-
CL_DEVICE_QUEUE_ON_HOST_PROPERTIES
public static final int CL_DEVICE_QUEUE_ON_HOST_PROPERTIESAccepted as theparam_name
parameter ofGetDeviceInfo
, returns acl_command_queue_properties
value.Describes the on host command-queue properties supported by the device. This is a bitfield that describes one or more of the following values:
The mandated minimum capability is:
CL_QUEUE_PROFILING_ENABLE
.- See Also:
-
CL_DEVICE_IMAGE_PITCH_ALIGNMENT
public static final int CL_DEVICE_IMAGE_PITCH_ALIGNMENTAccepted as theparam_name
parameter ofGetDeviceInfo
, returns acl_uint
value.The row pitch alignment size in pixels for images created from a buffer. The value returned must be a power of 2. If the device does not support images, this value should be 0.
- See Also:
-
CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT
public static final int CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENTAccepted as theparam_name
parameter ofGetDeviceInfo
, returns acl_uint
value.This query should be used when an image is created from a buffer which was created using
MEM_USE_HOST_PTR
. The value returned must be a power of 2.This query specifies the minimum alignment in pixels of the
host_ptr
specified toCreateBuffer
. If the device does not support images, this value should be 0.- See Also:
-
CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS
public static final int CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGSAccepted as theparam_name
parameter ofGetDeviceInfo
, returns acl_uint
value.Max number of image objects arguments of a kernel declared with the
write_only
orread_write
qualifier.Support for read-write image arguments is required for an OpenCL 2.0, 2.1, or 2.2 device if
DEVICE_IMAGE_SUPPORT
isTRUE
.The minimum value is 64 if the device supports read-write images arguments, and must be 0 for devices that do not support read-write images.
- See Also:
-
CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE
public static final int CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZEAccepted as theparam_name
parameter ofGetDeviceInfo
, returns asize_t
value.The maximum number of bytes of storage that may be allocated for any single variable in program scope or inside a function in an OpenCL kernel language declared in the global address space.
Support for program scope global variables is required for an OpenCL 2.0, 2.1, or 2.2 device. The minimum value is 64 KB if the device supports program scope global variables, and must be 0 for devices that do not support program scope global variables.
- See Also:
-
CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES
public static final int CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIESAccepted as theparam_name
parameter ofGetDeviceInfo
, returns acl_command_queue_properties
value.Describes the on device command-queue properties supported by the device. This is a bitfield that describes one or more of the following values:
Support for on-device queues is required for an OpenCL 2.0, 2.1, or 2.2 device. When on-device queues are supported, the mandated minimum capability is:
CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | CL_QUEUE_PROFILING_ENABLE.
Must be 0 for devices that do not support on-device queues.
- See Also:
-
CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE
public static final int CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZEAccepted as theparam_name
parameter ofGetDeviceInfo
, returns acl_uint
value.The preferred size of the device queue, in bytes. Applications should use this size for the device queue to ensure good performance.
The minimum value is 16 KB for devices supporting on-device queues, and must be 0 for devices that do not support on-device queues.
- See Also:
-
CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE
public static final int CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZEAccepted as theparam_name
parameter ofGetDeviceInfo
, returns acl_uint
value.The maximum size of the device queue in bytes.
The minimum value is 256 KB for the full profile and 64 KB for the embedded profile for devices supporting on-device queues, and must be 0 for devices that do not support on-device queues.
- See Also:
-
CL_DEVICE_MAX_ON_DEVICE_QUEUES
public static final int CL_DEVICE_MAX_ON_DEVICE_QUEUESAccepted as theparam_name
parameter ofGetDeviceInfo
, returns acl_uint
value.The maximum number of device queues that can be created for this device in a single context.
The minimum value is 1 for devices supporting on-device queues, and must be 0 for devices that do not support on-device queues.
- See Also:
-
CL_DEVICE_MAX_ON_DEVICE_EVENTS
public static final int CL_DEVICE_MAX_ON_DEVICE_EVENTSAccepted as theparam_name
parameter ofGetDeviceInfo
, returns acl_uint
value.The maximum number of events in use by a device queue. These refer to events returned by the
enqueue_
built-in functions to a device queue or user events returned by thecreate_user_event
built-in function that have not been released.The minimum value is 1024 for devices supporting on-device queues, and must be 0 for devices that do not support on-device queues.
- See Also:
-
CL_DEVICE_SVM_CAPABILITIES
public static final int CL_DEVICE_SVM_CAPABILITIESAccepted as theparam_name
parameter ofGetDeviceInfo
, returns acl_device_svm_capabilities
value.Describes the various shared virtual memory (SVM) memory allocation types the device supports. This is a bit-field that describes a combination of the following values:
DEVICE_SVM_COARSE_GRAIN_BUFFER
- Support for coarse-grain buffer sharing usingSVMAlloc
. Memory consistency is guaranteed at synchronization points and the host must use calls toEnqueueMapBuffer
andEnqueueUnmapMemObject
.DEVICE_SVM_FINE_GRAIN_BUFFER
- Support for fine-grain buffer sharing usingclSVMAlloc
. Memory consistency is guaranteed at synchronization points without need forclEnqueueMapBuffer
andclEnqueueUnmapMemObject
.DEVICE_SVM_FINE_GRAIN_SYSTEM
- Support for sharing the host’s entire virtual memory including memory allocated using malloc. Memory consistency is guaranteed at synchronization points.DEVICE_SVM_ATOMICS
- Support for the OpenCL 2.0 atomic operations that provide memory consistency across the host and all OpenCL devices supporting fine-grain SVM allocations.
The mandated minimum capability for an OpenCL 2.0, 2.1, or 2.2 device is
CL_DEVICE_SVM_COARSE_GRAIN_BUFFER
.For other device versions there is no mandated minimum capability.
- See Also:
-
CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE
public static final int CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZEAccepted as theparam_name
parameter ofGetDeviceInfo
, returns asize_t
value.Maximum preferred total size, in bytes, of all program variables in the global address space. This is a performance hint. An implementation may place such variables in storage with optimized device access. This query returns the capacity of such storage. The minimum value is 0.
- See Also:
-
CL_DEVICE_MAX_PIPE_ARGS
public static final int CL_DEVICE_MAX_PIPE_ARGSAccepted as theparam_name
parameter ofGetDeviceInfo
, returns acl_uint
value.The maximum number of pipe objects that can be passed as arguments to a kernel. The minimum value is 16 for devices supporting pipes, and must be 0 for devices that do not support pipes.
- See Also:
-
CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS
public static final int CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONSAccepted as theparam_name
parameter ofGetDeviceInfo
, returns acl_uint
value.The maximum number of reservations that can be active for a pipe per work-item in a kernel. A work-group reservation is counted as one reservation per work-item. The minimum value is 1 for devices supporting pipes, and must be 0 for devices that do not support pipes.
- See Also:
-
CL_DEVICE_PIPE_MAX_PACKET_SIZE
public static final int CL_DEVICE_PIPE_MAX_PACKET_SIZEAccepted as theparam_name
parameter ofGetDeviceInfo
, returns acl_uint
value.The maximum size of pipe packet in bytes.
Support for pipes is required for an OpenCL 2.0, 2.1, or 2.2 device. The minimum value is 1024 bytes if the device supports pipes, and must be 0 for devices that do not support pipes.
- See Also:
-
CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT
public static final int CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENTAccepted as theparam_name
parameter ofGetDeviceInfo
, returns acl_uint
value.Returns the value representing the preferred alignment in bytes for OpenCL 2.0 fine-grained SVM atomic types. This query can return 0 which indicates that the preferred alignment is aligned to the natural size of the type.
- See Also:
-
CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT
public static final int CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENTAccepted as theparam_name
parameter ofGetDeviceInfo
, returns acl_uint
value.Returns the value representing the preferred alignment in bytes for OpenCL 2.0 atomic types to global memory. This query can return 0 which indicates that the preferred alignment is aligned to the natural size of the type.
- See Also:
-
CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT
public static final int CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENTAccepted as theparam_name
parameter ofGetDeviceInfo
, returns acl_uint
value.Returns the value representing the preferred alignment in bytes for OpenCL 2.0 atomic types to local memory. This query can return 0 which indicates that the preferred alignment is aligned to the natural size of the type.
- See Also:
-
CL_QUEUE_ON_DEVICE
public static final int CL_QUEUE_ON_DEVICEcl_command_queue_properties- See Also:
-
CL_QUEUE_ON_DEVICE_DEFAULT
public static final int CL_QUEUE_ON_DEVICE_DEFAULTcl_command_queue_properties- See Also:
-
CL_DEVICE_SVM_COARSE_GRAIN_BUFFER
public static final int CL_DEVICE_SVM_COARSE_GRAIN_BUFFERcl_device_svm_capabilities- See Also:
-
CL_DEVICE_SVM_FINE_GRAIN_BUFFER
public static final int CL_DEVICE_SVM_FINE_GRAIN_BUFFERcl_device_svm_capabilities- See Also:
-
CL_DEVICE_SVM_FINE_GRAIN_SYSTEM
public static final int CL_DEVICE_SVM_FINE_GRAIN_SYSTEMcl_device_svm_capabilities- See Also:
-
CL_DEVICE_SVM_ATOMICS
public static final int CL_DEVICE_SVM_ATOMICScl_device_svm_capabilities- See Also:
-
CL_QUEUE_SIZE
public static final int CL_QUEUE_SIZEAcceptedcl_uint
value for theproperties
parameter toCreateCommandQueueWithProperties
.Specifies the size of the device queue in bytes.
This can only be specified if
QUEUE_ON_DEVICE
is set inQUEUE_PROPERTIES
. This must be a value ≤DEVICE_QUEUE_ON_DEVICE_MAX_SIZE
.For best performance, this should be ≤
DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE
.If
CL_QUEUE_SIZE
is not specified, the device queue is created withCL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE
as the size of the queue.- See Also:
-
CL_MEM_SVM_FINE_GRAIN_BUFFER
public static final int CL_MEM_SVM_FINE_GRAIN_BUFFERSVM memory flag accepted bySVMAlloc
.This specifies that the application wants the OpenCL implementation to do a fine-grained allocation.
- See Also:
-
CL_MEM_SVM_ATOMICS
public static final int CL_MEM_SVM_ATOMICSSVM memory flag accepted bySVMAlloc
.This flag is valid only if
MEM_SVM_FINE_GRAIN_BUFFER
is specified in flags. It is used to indicate that SVM atomic operations can control visibility of memory accesses in this SVM buffer.- See Also:
-
CL_MEM_KERNEL_READ_AND_WRITE
public static final int CL_MEM_KERNEL_READ_AND_WRITEThis flag is only used byGetSupportedImageFormats
to query image formats that may be both read from and written to by the same kernel instance. To create a memory object that may be read from and written to useMEM_READ_WRITE
.- See Also:
-
CL_MEM_OBJECT_PIPE
public static final int CL_MEM_OBJECT_PIPEcl_mem_object_type- See Also:
-
CL_MEM_USES_SVM_POINTER
public static final int CL_MEM_USES_SVM_POINTERAccepted as theparam_name
parameter ofGetMemObjectInfo
, returns acl_bool
value.Return
TRUE
ifmemobj
is a buffer object that was created withMEM_USE_HOST_PTR
or is a sub-buffer object of a buffer object that was created withCL_MEM_USE_HOST_PTR
and thehost_ptr
specified when the buffer object was created is a SVM pointer; otherwise returnsFALSE
.- See Also:
-
CL_sRGB
public static final int CL_sRGBcl_channel_order- See Also:
-
CL_sRGBx
public static final int CL_sRGBxcl_channel_order- See Also:
-
CL_sRGBA
public static final int CL_sRGBAcl_channel_order- See Also:
-
CL_sBGRA
public static final int CL_sBGRAcl_channel_order- See Also:
-
CL_ABGR
public static final int CL_ABGRcl_channel_order- See Also:
-
CL_PIPE_PACKET_SIZE
public static final int CL_PIPE_PACKET_SIZEAccepted as theparam_name
parameter ofGetPipeInfo
, returns acl_uint
value.Return pipe packet size specified when
pipe
is created withCreatePipe
.- See Also:
-
CL_PIPE_MAX_PACKETS
public static final int CL_PIPE_MAX_PACKETSAccepted as theparam_name
parameter ofGetPipeInfo
, returns acl_uint
value.Return max. number of packets specified when
pipe
is created withCreatePipe
.- See Also:
-
CL_SAMPLER_MIP_FILTER_MODE
public static final int CL_SAMPLER_MIP_FILTER_MODEcl_sampler_info- See Also:
-
CL_SAMPLER_LOD_MIN
public static final int CL_SAMPLER_LOD_MINcl_sampler_info- See Also:
-
CL_SAMPLER_LOD_MAX
public static final int CL_SAMPLER_LOD_MAXcl_sampler_info- See Also:
-
CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE
public static final int CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZEAccepted as theparam_name
parameter ofGetProgramBuildInfo
, returns asize_t
value.The total amount of storage, in bytes, used by program variables in the global address space.
- See Also:
-
CL_KERNEL_ARG_TYPE_PIPE
public static final int CL_KERNEL_ARG_TYPE_PIPEcl_kernel_arg_type_qualifier- See Also:
-
CL_KERNEL_EXEC_INFO_SVM_PTRS
public static final int CL_KERNEL_EXEC_INFO_SVM_PTRSAccepted as theparam_name
parameter ofSetKernelExecInfo
, returns avoid*[]
value.SVM pointers must reference locations contained entirely within buffers that are passed to kernel as arguments, or that are passed through the execution information.
Non-argument SVM buffers must be specified by passing pointers to those buffers via
clSetKernelExecInfo
for coarse-grain and fine-grain buffer SVM allocations but not for finegrain system SVM allocations.- See Also:
-
CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM
public static final int CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEMAccepted as theparam_name
parameter ofSetKernelExecInfo
, returns acl_bool
value.This flag indicates whether the kernel uses pointers that are fine grain system SVM allocations. These fine grain system SVM pointers may be passed as arguments or defined in SVM buffers that are passed as arguments to kernel.
- See Also:
-
CL_COMMAND_SVM_FREE
public static final int CL_COMMAND_SVM_FREEcl_command_type- See Also:
-
CL_COMMAND_SVM_MEMCPY
public static final int CL_COMMAND_SVM_MEMCPYcl_command_type- See Also:
-
CL_COMMAND_SVM_MEMFILL
public static final int CL_COMMAND_SVM_MEMFILLcl_command_type- See Also:
-
CL_COMMAND_SVM_MAP
public static final int CL_COMMAND_SVM_MAPcl_command_type- See Also:
-
CL_COMMAND_SVM_UNMAP
public static final int CL_COMMAND_SVM_UNMAPcl_command_type- See Also:
-
CL_PROFILING_COMMAND_COMPLETE
public static final int CL_PROFILING_COMMAND_COMPLETEAccepted as theparam_name
parameter ofGetEventProfilingInfo
, returns acl_ulong
value.A 64-bit value that describes the current device time counter in nanoseconds when the command identified by event and any child commands enqueued by this command on the device have finished execution.
- See Also:
-
-
Method Details
-
nclCreateCommandQueueWithProperties
public static long nclCreateCommandQueueWithProperties(long context, long device, long properties, long errcode_ret) Unsafe version of:CreateCommandQueueWithProperties
-
clCreateCommandQueueWithProperties
public static long clCreateCommandQueueWithProperties(long context, long device, @Nullable LongBuffer properties, @Nullable IntBuffer errcode_ret) Creates a host or device command-queue on a specific device.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.
- Parameters:
context
- a valid OpenCL contextdevice
- a device associated with context. It can either be in the list of devices specified when context is created usingCreateContext
or have the same device type as device type specified when context is created usingCreateContextFromType
.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 with0
. If a supported property and its value is not specified in properties, its default value will be used.properties
can beNULL
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. Iferrcode_ret
isNULL
, no error code is returned.- Returns:
- a valid non-zero command-queue and
errcode_ret
is set toSUCCESS
if the command-queue is created successfully. Otherwise, it returns aNULL
value with one of the following error values returned inerrcode_ret
:INVALID_CONTEXT
ifcontext
is not a valid context.INVALID_DEVICE
ifdevice
is not a valid device or is not associated withcontext
.INVALID_VALUE
if values specified inproperties
are not valid.INVALID_QUEUE_PROPERTIES
if values specified inproperties
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.
- See Also:
-
nclCreatePipe
public static long nclCreatePipe(long context, long flags, int pipe_packet_size, int pipe_max_packets, long properties, long errcode_ret) Unsafe version of:CreatePipe
-
clCreatePipe
public static long clCreatePipe(long context, long flags, int pipe_packet_size, int pipe_max_packets, @Nullable PointerBuffer properties, @Nullable IntBuffer errcode_ret) Creates a pipe object.- Parameters:
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 isMEM_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 with0
. In OpenCL 2.0,properties
must beNULL
.errcode_ret
- will return an appropriate error code. Iferrcode_ret
isNULL
, no error code is returned.- Returns:
- a valid non-zero pipe object and
errcode_ret
is set toSUCCESS
if the pipe object is created successfully. Otherwise, it returns aNULL
value with one of the following error values returned inerrcode_ret
:INVALID_CONTEXT
ifcontext
is not a valid context.INVALID_VALUE
if values specified inflags
are invalid.INVALID_VALUE
ifproperties
is notNULL
.INVALID_PIPE_SIZE
ifpipe_packet_size
is0
or thepipe_packet_size
exceedsDEVICE_PIPE_MAX_PACKET_SIZE
value for all devices incontext
or ifpipe_max_packets
is0
.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.
- See Also:
-
nclGetPipeInfo
public static int nclGetPipeInfo(long pipe, int param_name, long param_value_size, long param_value, long param_value_size_ret) Unsafe version of:GetPipeInfo
- Parameters:
param_value_size
- the size in bytes of memory pointed to byparam_value
. This size must be ≥ size of return type. Ifparam_value
isNULL
, it is ignored.
-
clGetPipeInfo
public static int clGetPipeInfo(long pipe, int param_name, @Nullable ByteBuffer param_value, @Nullable PointerBuffer param_value_size_ret) Queries information specific to a pipe object.- Parameters:
pipe
- the pipe object being queriedparam_name
- the information to queryparam_value
- a pointer to memory where the appropriate result being queried is returned. Ifparam_value
isNULL
, it is ignored.param_value_size_ret
- the actual size in bytes of data being queried byparam_value
. IfNULL
, it is ignored.- Returns:
SUCCESS
if the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_VALUE
ifparam_name
is not valid, or if size in bytes specified byparam_value_size
is < size of return type andparam_value
is notNULL
.INVALID_MEM_OBJECT
ifpipe
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.
- See Also:
-
clGetPipeInfo
public static int clGetPipeInfo(long pipe, int param_name, @Nullable IntBuffer param_value, @Nullable PointerBuffer param_value_size_ret) Queries information specific to a pipe object.- Parameters:
pipe
- the pipe object being queriedparam_name
- the information to queryparam_value
- a pointer to memory where the appropriate result being queried is returned. Ifparam_value
isNULL
, it is ignored.param_value_size_ret
- the actual size in bytes of data being queried byparam_value
. IfNULL
, it is ignored.- Returns:
SUCCESS
if the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_VALUE
ifparam_name
is not valid, or if size in bytes specified byparam_value_size
is < size of return type andparam_value
is notNULL
.INVALID_MEM_OBJECT
ifpipe
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.
- See Also:
-
nclSVMAlloc
public static long nclSVMAlloc(long context, long flags, long size, int alignment) Unsafe version of:SVMAlloc
-
clSVMAlloc
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.If
MEM_SVM_FINE_GRAIN_BUFFER
is not specified, the buffer can be created as a coarse grained SVM allocation. Similarly, ifMEM_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 returnNULL
.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 bySVMAlloc
as itshost_ptr
argument, andMEM_USE_HOST_PTR
is set in itsflags
argument,CreateBuffer
will succeed and return a valid non-zero buffer object as long as thesize
argument toCreateBuffer
is no larger than thesize
argument passed in the originalSVMAlloc
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.- Parameters:
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 islong16
. For the embedded profile, it islong16
if the device supports 64-bit integers; otherwise it isint16
. If alignment is0
, a default alignment will be used that is equal to the size of largest data type supported by the OpenCL implementation.- Returns:
- a valid non-
NULL
shared virtual memory address if the SVM buffer is successfully allocated. Otherwise, likemalloc
, it returns aNULL
pointer value.SVMAlloc
will fail if:context
is not a valid context.flags
does not containMEM_SVM_FINE_GRAIN_BUFFER
but does containMEM_SVM_ATOMICS
.- Values specified in
flags
do not follow rules for supported values. MEM_SVM_FINE_GRAIN_BUFFER
orMEM_SVM_ATOMICS
is specified in flags and these are not supported by at least one device in context.- The values specified in
flags
are not valid. size
is0
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.- There was a failure to allocate resources.
- See Also:
-
nclSVMFree
public static void nclSVMFree(long context, long svm_pointer) Unsafe version of:SVMFree
-
clSVMFree
Frees a shared virtual memory buffer allocated usingSVMAlloc
.Note that
SVMFree
does not wait for previously enqueued commands that may be usingsvm_pointer
to finish before freeingsvm_pointer
. It is the responsibility of the application to make sure that enqueued commands that usesvm_pointer
have finished before freeingsvm_pointer
. This can be done by enqueuing a blocking operation such asFinish
,WaitForEvents
,EnqueueReadBuffer
or by registering a callback with the events associated with enqueued commands and when the last enqueued command has finished freeingsvm_pointer
.The behavior of using
svm_pointer
after it has been freed is undefined. In addition, if a buffer object is created usingCreateBuffer
withsvm_pointer
, the buffer object must first be released before thesvm_pointer
is freed.- Parameters:
context
- a valid OpenCL context used to create the SVM buffersvm_pointer
- must be the value returned by a call toSVMAlloc
. If aNULL
pointer is passed insvm_pointer
, no action occurs.- See Also:
-
nclEnqueueSVMFree
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) Unsafe version of:EnqueueSVMFree
- Parameters:
num_svm_pointers
- the number of pointers in thesvm_pointers
arraynum_events_in_wait_list
- the number of events inevent_wait_list
-
clEnqueueSVMFree
public static int clEnqueueSVMFree(long command_queue, PointerBuffer svm_pointers, @Nullable CLSVMFreeCallbackI pfn_free_func, long user_data, @Nullable PointerBuffer event_wait_list, @Nullable PointerBuffer event) Enqueues a command to free the shared virtual memory buffer allocated usingSVMAlloc
or a shared system memory pointer.- Parameters:
command_queue
- a valid host command-queuesvm_pointers
- the shared virtual memory pointers to be freed. Each pointer insvm_pointers
that was allocated usingSVMAlloc
must have been allocated from the same context from whichcommand_queue
was created. The memory associated withsvm_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 isNULL
, all pointers specified insvm_pointers
must be allocated usingSVMAlloc
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 usingSVMAlloc
. Ifpfn_free_func
is a valid callback function, the OpenCL implementation will callpfn_free_func
to free all the SVM pointers specified insvm_pointers
.user_data
- will be passed as theuser_data
argument whenpfn_free_func
is called.user_data
can beNULL
.event_wait_list
- a list of events that need to complete before this particular command can be executed. Ifevent_wait_list
isNULL
, then this particular command does not wait on any event to complete. The events specified inevent_wait_list
act as synchronization points. The context associated with events inevent_wait_list
andcommand_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 beNULL
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 theevent_wait_list
and theevent
arguments are notNULL
, the event argument should not refer to an element of theevent_wait_list
array.- Returns:
SUCCESS
if the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUE
ifcommand_queue
is not a valid command-queue.INVALID_VALUE
ifnum_svm_pointers
is0
or ifsvm_pointers
isNULL
or if any of the pointers specified insvm_pointers
array isNULL
.INVALID_EVENT_WAIT_LIST
ifevent_wait_list
isNULL
andnum_events_in_wait_list
> 0, orevent_wait_list
is notNULL
andnum_events_in_wait_list
is 0, or if event objects inevent_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.
- See Also:
-
nclEnqueueSVMMemcpy
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) Unsafe version of:EnqueueSVMMemcpy
- Parameters:
size
- the size in bytes of data being copiednum_events_in_wait_list
- the number of events inevent_wait_list
-
clEnqueueSVMMemcpy
public static int clEnqueueSVMMemcpy(long command_queue, boolean blocking_copy, ByteBuffer dst_ptr, ByteBuffer src_ptr, @Nullable PointerBuffer event_wait_list, @Nullable PointerBuffer event) Enqueues a command to do amemcpy
operation.If
dst_ptr
and/orsrc_ptr
are allocated usingSVMAlloc
then they must be allocated from the same context from whichcommand_queue
was created. Otherwise the behavior is undefined.- Parameters:
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
isTRUE
i.e. the copy command is blocking,EnqueueSVMMemcpy
does not return until the buffer data has been copied into memory pointed to bydst_ptr
.If
blocking_copy
isFALSE
i.e. the copy command is non-blocking,EnqueueSVMMemcpy
queues a non-blocking copy command and returns. The contents of the buffer thatdst_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 thatdst_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. Ifevent_wait_list
isNULL
, then this particular command does not wait on any event to complete. The events specified inevent_wait_list
act as synchronization points. The context associated with events inevent_wait_list
andcommand_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 beNULL
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 theevent_wait_list
and theevent
arguments are notNULL
, the event argument should not refer to an element of theevent_wait_list
array.- Returns:
SUCCESS
if the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUE
ifcommand_queue
is not a valid command-queue.INVALID_CONTEXT
if the context associated withcommand_queue
and events inevent_wait_list
are not the same.INVALID_EVENT_WAIT_LIST
ifevent_wait_list
isNULL
andnum_events_in_wait_list
> 0, orevent_wait_list
is notNULL
andnum_events_in_wait_list
is 0, or if event objects inevent_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 inevent_wait_list
is a negative integer value.INVALID_VALUE
ifdst_ptr
orsrc_ptr
areNULL
.INVALID_VALUE
ifsize
is0
.MEM_COPY_OVERLAP
if the values specified fordst_ptr
,src_ptr
andsize
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.
- See Also:
-
nclEnqueueSVMMemFill
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) Unsafe version of:EnqueueSVMMemFill
- Parameters:
pattern_size
- the size of thepattern
array, in bytessize
- the size in bytes of region being filled starting withsvm_ptr
and must be a multiple ofpattern_size
num_events_in_wait_list
- the number of events inevent_wait_list
-
clEnqueueSVMMemFill
public static int clEnqueueSVMMemFill(long command_queue, ByteBuffer svm_ptr, ByteBuffer pattern, @Nullable PointerBuffer event_wait_list, @Nullable PointerBuffer event) Enqueues a command to fill a region in memory with a pattern of a given pattern size.- Parameters:
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 topattern_size
bytes. Ifsvm_ptr
is allocated usingSVMAlloc
then it must be allocated from the same context from whichcommand_queue
was created. Otherwise the behavior is undefined.pattern
- a pointer to the data pattern of sizepattern_size
in bytes.pattern
will be used to fill a region in buffer starting atsvm_ptr
and issize
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 bysvm_ptr
is to be filled with a pattern of float4 values, then pattern will be a pointer to acl_float4
value andpattern_size
will besizeof(cl_float4)
. The maximum value ofpattern_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. Ifevent_wait_list
isNULL
, then this particular command does not wait on any event to complete. The events specified inevent_wait_list
act as synchronization points. The context associated with events inevent_wait_list
andcommand_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 beNULL
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 theevent_wait_list
and theevent
arguments are notNULL
, the event argument should not refer to an element of theevent_wait_list
array.- Returns:
SUCCESS
if the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUE
ifcommand_queue
is not a valid command-queue.INVALID_CONTEXT
if the context associated withcommand_queue
and events inevent_wait_list
are not the same.INVALID_VALUE
ifsvm_ptr
isNULL
.INVALID_VALUE
ifsvm_ptr
is not aligned topattern_size
bytes.INVALID_VALUE
ifpattern
isNULL
or ifpattern_size
is0
or ifpattern_size
is not one of{1, 2, 4, 8, 16, 32, 64, 128}
.INVALID_VALUE
ifsize
is0
or is not a multiple ofpattern_size
.INVALID_EVENT_WAIT_LIST
ifevent_wait_list
isNULL
andnum_events_in_wait_list
> 0, orevent_wait_list
is notNULL
andnum_events_in_wait_list
is 0, or if event objects inevent_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.
- See Also:
-
nclEnqueueSVMMap
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) Unsafe version of:EnqueueSVMMap
- Parameters:
size
- the size of the memory region to map, in bytesnum_events_in_wait_list
- the number of events inevent_wait_list
-
clEnqueueSVMMap
public static int clEnqueueSVMMap(long command_queue, boolean blocking_map, long map_flags, ByteBuffer svm_ptr, @Nullable PointerBuffer event_wait_list, @Nullable PointerBuffer event) Enqueues a command that will allow the host to update a region of a SVM buffer. Note that since we are enqueuing a command with a SVM buffer, the region is already mapped in the host address space.- Parameters:
command_queue
- a valid host command-queueblocking_map
- indicates if the map operation is blocking or non-blocking.If
blocking_map
isTRUE
,EnqueueSVMMap
does not return until the application can access the contents of the SVM region specified bysvm_ptr
andsize
on the host.If
blocking_map
isFALSE
i.e. map operation is non-blocking, the region specified bysvm_ptr
andsize
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 bysvm_ptr
andsize
.map_flags
- a bit-fieldsvm_ptr
- a pointer to a memory region andsize
in bytes that will be updated by the host. Ifsvm_ptr
is allocated usingSVMAlloc
then it must be allocated from the same context from whichcommand_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. Ifevent_wait_list
isNULL
, then this particular command does not wait on any event to complete. The events specified inevent_wait_list
act as synchronization points. The context associated with events inevent_wait_list
andcommand_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 beNULL
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 theevent_wait_list
and theevent
arguments are notNULL
, the event argument should not refer to an element of theevent_wait_list
array.- Returns:
SUCCESS
if the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUE
ifcommand_queue
is not a valid command-queue.INVALID_CONTEXT
if context associated withcommand_queue
and events inevent_wait_list
are not the same.INVALID_VALUE
ifsvm_ptr
isNULL
.INVALID_VALUE
ifsize
is0
or if values specified inmap_flags
are not valid.INVALID_EVENT_WAIT_LIST
ifevent_wait_list
isNULL
andnum_events_in_wait_list
> 0, orevent_wait_list
is notNULL
andnum_events_in_wait_list
is 0, or if event objects inevent_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 inevent_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.
- See Also:
-
nclEnqueueSVMUnmap
public 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
- Parameters:
num_events_in_wait_list
- the number of events inevent_wait_list
-
clEnqueueSVMUnmap
public static int clEnqueueSVMUnmap(long command_queue, ByteBuffer svm_ptr, @Nullable PointerBuffer event_wait_list, @Nullable PointerBuffer event) Enqueues a command to indicate that the host has completed updating the region given bysvm_ptr
and which was specified in a previous call toEnqueueSVMMap
.- Parameters:
command_queue
- a valid host command-queuesvm_ptr
- a pointer that was specified in a previous call toEnqueueSVMMap
. Ifsvm_ptr
is allocated usingSVMAlloc
then it must be allocated from the same context from whichcommand_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. Ifevent_wait_list
isNULL
, then this particular command does not wait on any event to complete. The events specified inevent_wait_list
act as synchronization points. The context associated with events inevent_wait_list
andcommand_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 beNULL
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 theevent_wait_list
and theevent
arguments are notNULL
, the event argument should not refer to an element of theevent_wait_list
array.- Returns:
SUCCESS
if the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUE
ifcommand_queue
is not a valid command-queue.INVALID_CONTEXT
if context associated withcommand_queue
and events inevent_wait_list
are not the same.INVALID_VALUE
ifsvm_ptr
isNULL
.INVALID_EVENT_WAIT_LIST
ifevent_wait_list
isNULL
andnum_events_in_wait_list
> 0, orevent_wait_list
is notNULL
andnum_events_in_wait_list
is 0, or if event objects inevent_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.
- See Also:
-
nclSetKernelArgSVMPointer
public static int nclSetKernelArgSVMPointer(long kernel, int arg_index, long arg_value) Unsafe version of:SetKernelArgSVMPointer
-
clSetKernelArgSVMPointer
Set a SVM pointer as the argument value for a specific argument of a kernel.- Parameters:
kernel
- a valid kernel objectarg_index
- the argument index. Arguments to the kernel are referred by indices that go from0
for the leftmost argument ton - 1
, wheren
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 byarg_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 toSetKernelArgSVMPointer
forkernel
. 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 beglobal float4 *p
, the SVM pointer value passed forp
must be at a minimum aligned to afloat4
. The SVM pointer value specified as the argument value can be the pointer returned bySVMAlloc
or can be a pointer + offset into the SVM region.- Returns:
SUCCESS
if the function was executed successfully. Otherwise, it returns one of the following errors:INVALID_KERNEL
ifkernel
is not a valid kernel object.INVALID_ARG_INDEX
ifarg_index
is not a valid argument index.INVALID_ARG_VALUE
ifarg_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.
- See Also:
-
nclSetKernelExecInfo
public static int nclSetKernelExecInfo(long kernel, int param_name, long param_value_size, long param_value) Unsafe version of:SetKernelExecInfo
- Parameters:
param_value_size
- the size in bytes of the memory pointed to byparam_value
-
clSetKernelExecInfo
Can be used to pass additional information other than argument values to a kernel.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
withKERNEL_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 usingSetKernelExecInfo
. 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 whileextra_svm_ptr_list
specifies a pointer to memory containing those SVM pointers. When callingSetKernelExecInfo
withKERNEL_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 bySVMAlloc
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 aINVALID_OPERATION
error. If none of the devices in the context associated with kernel support fine-grain system SVM allocations,SetKernelExecInfo
will return aINVALID_OPERATION
error.If
SetKernelExecInfo
has not been called with a value forKERNEL_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 isTRUE
(system pointers might be passed); otherwise, the default isFALSE
.- Parameters:
kernel
- the kernel object being queriedparam_name
- the information to be passed tokernel
. 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 byparam_name
are specified- Returns:
SUCCESS
if the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_KERNEL
ifkernel
is a not a valid kernel object.INVALID_VALUE
ifparam_name
is not valid, ifparam_value
isNULL
or if the size specified byparam_value_size
is not valid.INVALID_OPERATION
ifparam_name
=KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM
andparam_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.
- See Also:
-
clSetKernelExecInfo
Can be used to pass additional information other than argument values to a kernel.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
withKERNEL_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 usingSetKernelExecInfo
. 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 whileextra_svm_ptr_list
specifies a pointer to memory containing those SVM pointers. When callingSetKernelExecInfo
withKERNEL_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 bySVMAlloc
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 aINVALID_OPERATION
error. If none of the devices in the context associated with kernel support fine-grain system SVM allocations,SetKernelExecInfo
will return aINVALID_OPERATION
error.If
SetKernelExecInfo
has not been called with a value forKERNEL_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 isTRUE
(system pointers might be passed); otherwise, the default isFALSE
.- Parameters:
kernel
- the kernel object being queriedparam_name
- the information to be passed tokernel
. 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 byparam_name
are specified- Returns:
SUCCESS
if the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_KERNEL
ifkernel
is a not a valid kernel object.INVALID_VALUE
ifparam_name
is not valid, ifparam_value
isNULL
or if the size specified byparam_value_size
is not valid.INVALID_OPERATION
ifparam_name
=KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM
andparam_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.
- See Also:
-
clSetKernelExecInfo
Can be used to pass additional information other than argument values to a kernel.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
withKERNEL_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 usingSetKernelExecInfo
. 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 whileextra_svm_ptr_list
specifies a pointer to memory containing those SVM pointers. When callingSetKernelExecInfo
withKERNEL_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 bySVMAlloc
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 aINVALID_OPERATION
error. If none of the devices in the context associated with kernel support fine-grain system SVM allocations,SetKernelExecInfo
will return aINVALID_OPERATION
error.If
SetKernelExecInfo
has not been called with a value forKERNEL_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 isTRUE
(system pointers might be passed); otherwise, the default isFALSE
.- Parameters:
kernel
- the kernel object being queriedparam_name
- the information to be passed tokernel
. 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 byparam_name
are specified- Returns:
SUCCESS
if the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_KERNEL
ifkernel
is a not a valid kernel object.INVALID_VALUE
ifparam_name
is not valid, ifparam_value
isNULL
or if the size specified byparam_value_size
is not valid.INVALID_OPERATION
ifparam_name
=KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM
andparam_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.
- See Also:
-
nclCreateSamplerWithProperties
public static long nclCreateSamplerWithProperties(long context, long sampler_properties, long errcode_ret) Unsafe version of:CreateSamplerWithProperties
-
clCreateSamplerWithProperties
public static long clCreateSamplerWithProperties(long context, @Nullable LongBuffer sampler_properties, @Nullable IntBuffer errcode_ret) Creates a sampler object.- Parameters:
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 with0
. If a supported property and its value is not specified insampler_properties
, its default value will be used.sampler_properties
can beNULL
in which case the default values for supported sampler properties will be used.errcode_ret
- will return an appropriate error code. Iferrcode_ret
isNULL
, no error code is returned.- Returns:
- a valid non-zero sampler object and
errcode_ret
is set toSUCCESS
if the sampler object is created successfully. Otherwise, it returns aNULL
value with one of the following error values returned inerrcode_ret
:INVALID_CONTEXT
ifcontext
is not a valid context.INVALID_VALUE
if the property name insampler_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.
- See Also:
-
clCreateCommandQueueWithProperties
public static long clCreateCommandQueueWithProperties(long context, long device, @Nullable long[] properties, @Nullable int[] errcode_ret) Array version of:CreateCommandQueueWithProperties
- See Also:
-
clCreatePipe
public static long clCreatePipe(long context, long flags, int pipe_packet_size, int pipe_max_packets, @Nullable PointerBuffer properties, @Nullable int[] errcode_ret) Array version of:CreatePipe
- See Also:
-
clGetPipeInfo
public static int clGetPipeInfo(long pipe, int param_name, @Nullable int[] param_value, @Nullable PointerBuffer param_value_size_ret) Array version of:GetPipeInfo
- See Also:
-
clSetKernelExecInfo
public static int clSetKernelExecInfo(long kernel, int param_name, int[] param_value) Array version of:SetKernelExecInfo
- See Also:
-
clCreateSamplerWithProperties
public static long clCreateSamplerWithProperties(long context, @Nullable long[] sampler_properties, @Nullable int[] errcode_ret) Array version of:CreateSamplerWithProperties
- See Also:
-