public class CL10
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
CL_A
cl_channel_order
|
static int |
CL_ADDRESS_CLAMP
cl_addressing_mode
|
static int |
CL_ADDRESS_CLAMP_TO_EDGE
cl_addressing_mode
|
static int |
CL_ADDRESS_NONE
cl_addressing_mode
|
static int |
CL_ADDRESS_REPEAT
cl_addressing_mode
|
static int |
CL_ARGB
cl_channel_order
|
static int |
CL_BGRA
cl_channel_order
|
static int |
CL_BUILD_ERROR
cl_build_status
|
static int |
CL_BUILD_IN_PROGRESS
cl_build_status
|
static int |
CL_BUILD_NONE
cl_build_status
|
static int |
CL_BUILD_PROGRAM_FAILURE
Error Codes
|
static int |
CL_BUILD_SUCCESS
cl_build_status
|
static int |
CL_COMMAND_ACQUIRE_GL_OBJECTS
cl_command_type
|
static int |
CL_COMMAND_COPY_BUFFER
cl_command_type
|
static int |
CL_COMMAND_COPY_BUFFER_TO_IMAGE
cl_command_type
|
static int |
CL_COMMAND_COPY_IMAGE
cl_command_type
|
static int |
CL_COMMAND_COPY_IMAGE_TO_BUFFER
cl_command_type
|
static int |
CL_COMMAND_MAP_BUFFER
cl_command_type
|
static int |
CL_COMMAND_MAP_IMAGE
cl_command_type
|
static int |
CL_COMMAND_MARKER
cl_command_type
|
static int |
CL_COMMAND_NATIVE_KERNEL
cl_command_type
|
static int |
CL_COMMAND_NDRANGE_KERNEL
cl_command_type
|
static int |
CL_COMMAND_READ_BUFFER
cl_command_type
|
static int |
CL_COMMAND_READ_IMAGE
cl_command_type
|
static int |
CL_COMMAND_RELEASE_GL_OBJECTS
cl_command_type
|
static int |
CL_COMMAND_TASK
cl_command_type
|
static int |
CL_COMMAND_UNMAP_MEM_OBJECT
cl_command_type
|
static int |
CL_COMMAND_WRITE_BUFFER
cl_command_type
|
static int |
CL_COMMAND_WRITE_IMAGE
cl_command_type
|
static int |
CL_COMPILER_NOT_AVAILABLE
Error Codes
|
static int |
CL_COMPLETE
command execution status
|
static int |
CL_CONTEXT_DEVICES
cl_context_info
|
static int |
CL_CONTEXT_PLATFORM
cl_context_info + cl_context_properties
|
static int |
CL_CONTEXT_PROPERTIES
cl_context_info
|
static int |
CL_CONTEXT_REFERENCE_COUNT
cl_context_info
|
static int |
CL_DEVICE_ADDRESS_BITS
cl_device_info
|
static int |
CL_DEVICE_AVAILABLE
cl_device_info
|
static int |
CL_DEVICE_COMPILER_AVAILABLE
cl_device_info
|
static int |
CL_DEVICE_ENDIAN_LITTLE
cl_device_info
|
static int |
CL_DEVICE_ERROR_CORRECTION_SUPPORT
cl_device_info
|
static int |
CL_DEVICE_EXECUTION_CAPABILITIES
cl_device_info
|
static int |
CL_DEVICE_EXTENSIONS
cl_device_info
|
static int |
CL_DEVICE_GLOBAL_MEM_CACHE_SIZE
cl_device_info
|
static int |
CL_DEVICE_GLOBAL_MEM_CACHE_TYPE
cl_device_info
|
static int |
CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE
cl_device_info
|
static int |
CL_DEVICE_GLOBAL_MEM_SIZE
cl_device_info
|
static int |
CL_DEVICE_IMAGE_SUPPORT
cl_device_info
|
static int |
CL_DEVICE_IMAGE2D_MAX_HEIGHT
cl_device_info
|
static int |
CL_DEVICE_IMAGE2D_MAX_WIDTH
cl_device_info
|
static int |
CL_DEVICE_IMAGE3D_MAX_DEPTH
cl_device_info
|
static int |
CL_DEVICE_IMAGE3D_MAX_HEIGHT
cl_device_info
|
static int |
CL_DEVICE_IMAGE3D_MAX_WIDTH
cl_device_info
|
static int |
CL_DEVICE_LOCAL_MEM_SIZE
cl_device_info
|
static int |
CL_DEVICE_LOCAL_MEM_TYPE
cl_device_info
|
static int |
CL_DEVICE_MAX_CLOCK_FREQUENCY
cl_device_info
|
static int |
CL_DEVICE_MAX_COMPUTE_UNITS
cl_device_info
|
static int |
CL_DEVICE_MAX_CONSTANT_ARGS
cl_device_info
|
static int |
CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE
cl_device_info
|
static int |
CL_DEVICE_MAX_MEM_ALLOC_SIZE
cl_device_info
|
static int |
CL_DEVICE_MAX_PARAMETER_SIZE
cl_device_info
|
static int |
CL_DEVICE_MAX_READ_IMAGE_ARGS
cl_device_info
|
static int |
CL_DEVICE_MAX_SAMPLERS
cl_device_info
|
static int |
CL_DEVICE_MAX_WORK_GROUP_SIZE
cl_device_info
|
static int |
CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS
cl_device_info
|
static int |
CL_DEVICE_MAX_WORK_ITEM_SIZES
cl_device_info
|
static int |
CL_DEVICE_MAX_WRITE_IMAGE_ARGS
cl_device_info
|
static int |
CL_DEVICE_MEM_BASE_ADDR_ALIGN
cl_device_info
|
static int |
CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE
cl_device_info
|
static int |
CL_DEVICE_NAME
cl_device_info
|
static int |
CL_DEVICE_NOT_AVAILABLE
Error Codes
|
static int |
CL_DEVICE_NOT_FOUND
Error Codes
|
static int |
CL_DEVICE_PLATFORM
cl_device_info
|
static int |
CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR
cl_device_info
|
static int |
CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE
cl_device_info
|
static int |
CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT
cl_device_info
|
static int |
CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT
cl_device_info
|
static int |
CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG
cl_device_info
|
static int |
CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT
cl_device_info
|
static int |
CL_DEVICE_PROFILE
cl_device_info
|
static int |
CL_DEVICE_PROFILING_TIMER_RESOLUTION
cl_device_info
|
static int |
CL_DEVICE_QUEUE_PROPERTIES
cl_device_info
|
static int |
CL_DEVICE_SINGLE_FP_CONFIG
cl_device_info
|
static int |
CL_DEVICE_TYPE
cl_device_info
|
static int |
CL_DEVICE_TYPE_ACCELERATOR
cl_device_type - bitfield
|
static int |
CL_DEVICE_TYPE_ALL
cl_device_type - bitfield
|
static int |
CL_DEVICE_TYPE_CPU
cl_device_type - bitfield
|
static int |
CL_DEVICE_TYPE_DEFAULT
cl_device_type - bitfield
|
static int |
CL_DEVICE_TYPE_GPU
cl_device_type - bitfield
|
static int |
CL_DEVICE_VENDOR
cl_device_info
|
static int |
CL_DEVICE_VENDOR_ID
cl_device_info
|
static int |
CL_DEVICE_VERSION
cl_device_info
|
static int |
CL_DRIVER_VERSION
cl_device_info
|
static int |
CL_EVENT_COMMAND_EXECUTION_STATUS
cl_event_info
|
static int |
CL_EVENT_COMMAND_QUEUE
cl_event_info
|
static int |
CL_EVENT_COMMAND_TYPE
cl_event_info
|
static int |
CL_EVENT_REFERENCE_COUNT
cl_event_info
|
static int |
CL_EXEC_KERNEL
cl_device_exec_capabilities - bitfield
|
static int |
CL_EXEC_NATIVE_KERNEL
cl_device_exec_capabilities - bitfield
|
static int |
CL_FALSE
cl_bool
|
static int |
CL_FILTER_LINEAR
cl_filter_mode
|
static int |
CL_FILTER_NEAREST
cl_filter_mode
|
static int |
CL_FLOAT
cl_channel_type
|
static int |
CL_FP_DENORM
cl_device_fp_config - bitfield
|
static int |
CL_FP_FMA
cl_device_fp_config - bitfield
|
static int |
CL_FP_INF_NAN
cl_device_fp_config - bitfield
|
static int |
CL_FP_ROUND_TO_INF
cl_device_fp_config - bitfield
|
static int |
CL_FP_ROUND_TO_NEAREST
cl_device_fp_config - bitfield
|
static int |
CL_FP_ROUND_TO_ZERO
cl_device_fp_config - bitfield
|
static int |
CL_GLOBAL
cl_device_local_mem_type
|
static int |
CL_HALF_FLOAT
cl_channel_type
|
static int |
CL_IMAGE_DEPTH
cl_image_info
|
static int |
CL_IMAGE_ELEMENT_SIZE
cl_image_info
|
static int |
CL_IMAGE_FORMAT
cl_image_info
|
static int |
CL_IMAGE_FORMAT_MISMATCH
Error Codes
|
static int |
CL_IMAGE_FORMAT_NOT_SUPPORTED
Error Codes
|
static int |
CL_IMAGE_HEIGHT
cl_image_info
|
static int |
CL_IMAGE_ROW_PITCH
cl_image_info
|
static int |
CL_IMAGE_SLICE_PITCH
cl_image_info
|
static int |
CL_IMAGE_WIDTH
cl_image_info
|
static int |
CL_INTENSITY
cl_channel_order
|
static int |
CL_INVALID_ARG_INDEX
Error Codes
|
static int |
CL_INVALID_ARG_SIZE
Error Codes
|
static int |
CL_INVALID_ARG_VALUE
Error Codes
|
static int |
CL_INVALID_BINARY
Error Codes
|
static int |
CL_INVALID_BUFFER_SIZE
Error Codes
|
static int |
CL_INVALID_BUILD_OPTIONS
Error Codes
|
static int |
CL_INVALID_COMMAND_QUEUE
Error Codes
|
static int |
CL_INVALID_CONTEXT
Error Codes
|
static int |
CL_INVALID_DEVICE
Error Codes
|
static int |
CL_INVALID_DEVICE_TYPE
Error Codes
|
static int |
CL_INVALID_EVENT
Error Codes
|
static int |
CL_INVALID_EVENT_WAIT_LIST
Error Codes
|
static int |
CL_INVALID_GLOBAL_OFFSET
Error Codes
|
static int |
CL_INVALID_GLOBAL_WORK_SIZE
Error Codes
|
static int |
CL_INVALID_HOST_PTR
Error Codes
|
static int |
CL_INVALID_IMAGE_FORMAT_DESCRIPTOR
Error Codes
|
static int |
CL_INVALID_IMAGE_SIZE
Error Codes
|
static int |
CL_INVALID_KERNEL
Error Codes
|
static int |
CL_INVALID_KERNEL_ARGS
Error Codes
|
static int |
CL_INVALID_KERNEL_DEFINITION
Error Codes
|
static int |
CL_INVALID_KERNEL_NAME
Error Codes
|
static int |
CL_INVALID_MEM_OBJECT
Error Codes
|
static int |
CL_INVALID_OPERATION
Error Codes
|
static int |
CL_INVALID_PLATFORM
Error Codes
|
static int |
CL_INVALID_PROGRAM
Error Codes
|
static int |
CL_INVALID_PROGRAM_EXECUTABLE
Error Codes
|
static int |
CL_INVALID_QUEUE_PROPERTIES
Error Codes
|
static int |
CL_INVALID_SAMPLER
Error Codes
|
static int |
CL_INVALID_VALUE
Error Codes
|
static int |
CL_INVALID_WORK_DIMENSION
Error Codes
|
static int |
CL_INVALID_WORK_GROUP_SIZE
Error Codes
|
static int |
CL_INVALID_WORK_ITEM_SIZE
Error Codes
|
static int |
CL_KERNEL_COMPILE_WORK_GROUP_SIZE
cl_kernel_work_group_info
|
static int |
CL_KERNEL_CONTEXT
cl_kernel_info
|
static int |
CL_KERNEL_FUNCTION_NAME
cl_kernel_info
|
static int |
CL_KERNEL_LOCAL_MEM_SIZE
cl_kernel_work_group_info
|
static int |
CL_KERNEL_NUM_ARGS
cl_kernel_info
|
static int |
CL_KERNEL_PROGRAM
cl_kernel_info
|
static int |
CL_KERNEL_REFERENCE_COUNT
cl_kernel_info
|
static int |
CL_KERNEL_WORK_GROUP_SIZE
cl_kernel_work_group_info
|
static int |
CL_LOCAL
cl_device_local_mem_type
|
static int |
CL_LUMINANCE
cl_channel_order
|
static int |
CL_MAP_FAILURE
Error Codes
|
static int |
CL_MAP_READ
cl_map_flags - bitfield
|
static int |
CL_MAP_WRITE
cl_map_flags - bitfield
|
static int |
CL_MEM_ALLOC_HOST_PTR
cl_mem_flags - bitfield
|
static int |
CL_MEM_CONTEXT
cl_mem_info
|
static int |
CL_MEM_COPY_HOST_PTR
cl_mem_flags - bitfield
|
static int |
CL_MEM_COPY_OVERLAP
Error Codes
|
static int |
CL_MEM_FLAGS
cl_mem_info
|
static int |
CL_MEM_HOST_PTR
cl_mem_info
|
static int |
CL_MEM_MAP_COUNT
cl_mem_info
|
static int |
CL_MEM_OBJECT_ALLOCATION_FAILURE
Error Codes
|
static int |
CL_MEM_OBJECT_BUFFER
cl_mem_object_type
|
static int |
CL_MEM_OBJECT_IMAGE2D
cl_mem_object_type
|
static int |
CL_MEM_OBJECT_IMAGE3D
cl_mem_object_type
|
static int |
CL_MEM_READ_ONLY
cl_mem_flags - bitfield
|
static int |
CL_MEM_READ_WRITE
cl_mem_flags - bitfield
|
static int |
CL_MEM_REFERENCE_COUNT
cl_mem_info
|
static int |
CL_MEM_SIZE
cl_mem_info
|
static int |
CL_MEM_TYPE
cl_mem_info
|
static int |
CL_MEM_USE_HOST_PTR
cl_mem_flags - bitfield
|
static int |
CL_MEM_WRITE_ONLY
cl_mem_flags - bitfield
|
static int |
CL_NONE
cl_device_mem_cache_type
|
static int |
CL_OUT_OF_HOST_MEMORY
Error Codes
|
static int |
CL_OUT_OF_RESOURCES
Error Codes
|
static int |
CL_PLATFORM_EXTENSIONS
cl_platform_info
|
static int |
CL_PLATFORM_NAME
cl_platform_info
|
static int |
CL_PLATFORM_PROFILE
cl_platform_info
|
static int |
CL_PLATFORM_VENDOR
cl_platform_info
|
static int |
CL_PLATFORM_VERSION
cl_platform_info
|
static int |
CL_PROFILING_COMMAND_END
cl_profiling_info
|
static int |
CL_PROFILING_COMMAND_QUEUED
cl_profiling_info
|
static int |
CL_PROFILING_COMMAND_START
cl_profiling_info
|
static int |
CL_PROFILING_COMMAND_SUBMIT
cl_profiling_info
|
static int |
CL_PROFILING_INFO_NOT_AVAILABLE
Error Codes
|
static int |
CL_PROGRAM_BINARIES
cl_program_info
|
static int |
CL_PROGRAM_BINARY_SIZES
cl_program_info
|
static int |
CL_PROGRAM_BUILD_LOG
cl_program_build_info
|
static int |
CL_PROGRAM_BUILD_OPTIONS
cl_program_build_info
|
static int |
CL_PROGRAM_BUILD_STATUS
cl_program_build_info
|
static int |
CL_PROGRAM_CONTEXT
cl_program_info
|
static int |
CL_PROGRAM_DEVICES
cl_program_info
|
static int |
CL_PROGRAM_NUM_DEVICES
cl_program_info
|
static int |
CL_PROGRAM_REFERENCE_COUNT
cl_program_info
|
static int |
CL_PROGRAM_SOURCE
cl_program_info
|
static int |
CL_QUEUE_CONTEXT
cl_command_queue_info
|
static int |
CL_QUEUE_DEVICE
cl_command_queue_info
|
static int |
CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE
cl_command_queue_properties - bitfield
|
static int |
CL_QUEUE_PROFILING_ENABLE
cl_command_queue_properties - bitfield
|
static int |
CL_QUEUE_PROPERTIES
cl_command_queue_info
|
static int |
CL_QUEUE_REFERENCE_COUNT
cl_command_queue_info
|
static int |
CL_QUEUED
command execution status
|
static int |
CL_R
cl_channel_order
|
static int |
CL_RA
cl_channel_order
|
static int |
CL_READ_ONLY_CACHE
cl_device_mem_cache_type
|
static int |
CL_READ_WRITE_CACHE
cl_device_mem_cache_type
|
static int |
CL_RG
cl_channel_order
|
static int |
CL_RGB
cl_channel_order
|
static int |
CL_RGBA
cl_channel_order
|
static int |
CL_RUNNING
command execution status
|
static int |
CL_SAMPLER_ADDRESSING_MODE
cl_sampler_info
|
static int |
CL_SAMPLER_CONTEXT
cl_sampler_info
|
static int |
CL_SAMPLER_FILTER_MODE
cl_sampler_info
|
static int |
CL_SAMPLER_NORMALIZED_COORDS
cl_sampler_info
|
static int |
CL_SAMPLER_REFERENCE_COUNT
cl_sampler_info
|
static int |
CL_SIGNED_INT16
cl_channel_type
|
static int |
CL_SIGNED_INT32
cl_channel_type
|
static int |
CL_SIGNED_INT8
cl_channel_type
|
static int |
CL_SNORM_INT16
cl_channel_type
|
static int |
CL_SNORM_INT8
cl_channel_type
|
static int |
CL_SUBMITTED
command execution status
|
static int |
CL_SUCCESS
Error Codes
|
static int |
CL_TRUE
cl_bool
|
static int |
CL_UNORM_INT_101010
cl_channel_type
|
static int |
CL_UNORM_INT16
cl_channel_type
|
static int |
CL_UNORM_INT8
cl_channel_type
|
static int |
CL_UNORM_SHORT_555
cl_channel_type
|
static int |
CL_UNORM_SHORT_565
cl_channel_type
|
static int |
CL_UNSIGNED_INT16
cl_channel_type
|
static int |
CL_UNSIGNED_INT32
cl_channel_type
|
static int |
CL_UNSIGNED_INT8
cl_channel_type
|
static int |
CL_VERSION_1_0
OpenCL Version
|
| Modifier and Type | Method and Description |
|---|---|
static int |
clBuildProgram(long program,
long device,
java.lang.CharSequence options,
CLProgramCallbackI pfn_notify,
long user_data)
Builds (compiles & links) a program executable from the program source or binary for all the devices or a specific device(s) in the OpenCL context
associated with
program. |
static int |
clBuildProgram(long program,
org.lwjgl.PointerBuffer device_list,
java.nio.ByteBuffer options,
CLProgramCallbackI pfn_notify,
long user_data)
Builds (compiles & links) a program executable from the program source or binary for all the devices or a specific device(s) in the OpenCL context
associated with
program. |
static int |
clBuildProgram(long program,
org.lwjgl.PointerBuffer device_list,
java.lang.CharSequence options,
CLProgramCallbackI pfn_notify,
long user_data)
Builds (compiles & links) a program executable from the program source or binary for all the devices or a specific device(s) in the OpenCL context
associated with
program. |
static long |
clCreateBuffer(long context,
long flags,
java.nio.ByteBuffer host_ptr,
int[] errcode_ret)
Array version of:
CreateBuffer |
static long |
clCreateBuffer(long context,
long flags,
java.nio.ByteBuffer host_ptr,
java.nio.IntBuffer errcode_ret)
Creates a buffer object.
|
static long |
clCreateBuffer(long context,
long flags,
double[] host_ptr,
int[] errcode_ret)
Array version of:
CreateBuffer |
static long |
clCreateBuffer(long context,
long flags,
java.nio.DoubleBuffer host_ptr,
java.nio.IntBuffer errcode_ret)
Creates a buffer object.
|
static long |
clCreateBuffer(long context,
long flags,
float[] host_ptr,
int[] errcode_ret)
Array version of:
CreateBuffer |
static long |
clCreateBuffer(long context,
long flags,
java.nio.FloatBuffer host_ptr,
java.nio.IntBuffer errcode_ret)
Creates a buffer object.
|
static long |
clCreateBuffer(long context,
long flags,
int[] host_ptr,
int[] errcode_ret)
Array version of:
CreateBuffer |
static long |
clCreateBuffer(long context,
long flags,
java.nio.IntBuffer host_ptr,
java.nio.IntBuffer errcode_ret)
Creates a buffer object.
|
static long |
clCreateBuffer(long context,
long flags,
long size,
java.nio.IntBuffer errcode_ret)
Creates a buffer object.
|
static long |
clCreateBuffer(long context,
long flags,
short[] host_ptr,
int[] errcode_ret)
Array version of:
CreateBuffer |
static long |
clCreateBuffer(long context,
long flags,
java.nio.ShortBuffer host_ptr,
java.nio.IntBuffer errcode_ret)
Creates a buffer object.
|
static long |
clCreateCommandQueue(long context,
long device,
long properties,
int[] errcode_ret)
Array version of:
CreateCommandQueue |
static long |
clCreateCommandQueue(long context,
long device,
long properties,
java.nio.IntBuffer errcode_ret)
Creates a command-queue on a specific device.
|
static long |
clCreateContext(org.lwjgl.PointerBuffer properties,
long device,
CLContextCallbackI pfn_notify,
long user_data,
java.nio.IntBuffer errcode_ret)
Creates an OpenCL context.
|
static long |
clCreateContext(org.lwjgl.PointerBuffer properties,
org.lwjgl.PointerBuffer devices,
CLContextCallbackI pfn_notify,
long user_data,
int[] errcode_ret)
Array version of:
CreateContext |
static long |
clCreateContext(org.lwjgl.PointerBuffer properties,
org.lwjgl.PointerBuffer devices,
CLContextCallbackI pfn_notify,
long user_data,
java.nio.IntBuffer errcode_ret)
Creates an OpenCL context.
|
static long |
clCreateContextFromType(org.lwjgl.PointerBuffer properties,
long device_type,
CLContextCallbackI pfn_notify,
long user_data,
int[] errcode_ret)
Array version of:
CreateContextFromType |
static long |
clCreateContextFromType(org.lwjgl.PointerBuffer properties,
long device_type,
CLContextCallbackI pfn_notify,
long user_data,
java.nio.IntBuffer errcode_ret)
Creates a context using devices of the specified type.
|
static long |
clCreateImage2D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_row_pitch,
java.nio.ByteBuffer host_ptr,
int[] errcode_ret)
Array version of:
CreateImage2D |
static long |
clCreateImage2D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_row_pitch,
java.nio.ByteBuffer host_ptr,
java.nio.IntBuffer errcode_ret)
Creates a 2D image object.
|
static long |
clCreateImage2D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_row_pitch,
float[] host_ptr,
int[] errcode_ret)
Array version of:
CreateImage2D |
static long |
clCreateImage2D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_row_pitch,
java.nio.FloatBuffer host_ptr,
java.nio.IntBuffer errcode_ret)
Creates a 2D image object.
|
static long |
clCreateImage2D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_row_pitch,
int[] host_ptr,
int[] errcode_ret)
Array version of:
CreateImage2D |
static long |
clCreateImage2D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_row_pitch,
java.nio.IntBuffer host_ptr,
java.nio.IntBuffer errcode_ret)
Creates a 2D image object.
|
static long |
clCreateImage2D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_row_pitch,
short[] host_ptr,
int[] errcode_ret)
Array version of:
CreateImage2D |
static long |
clCreateImage2D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_row_pitch,
java.nio.ShortBuffer host_ptr,
java.nio.IntBuffer errcode_ret)
Creates a 2D image object.
|
static long |
clCreateImage3D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_depth,
long image_row_pitch,
long image_slice_pitch,
java.nio.ByteBuffer host_ptr,
int[] errcode_ret)
Array version of:
CreateImage3D |
static long |
clCreateImage3D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_depth,
long image_row_pitch,
long image_slice_pitch,
java.nio.ByteBuffer host_ptr,
java.nio.IntBuffer errcode_ret)
Creates a 3D image object.
|
static long |
clCreateImage3D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_depth,
long image_row_pitch,
long image_slice_pitch,
float[] host_ptr,
int[] errcode_ret)
Array version of:
CreateImage3D |
static long |
clCreateImage3D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_depth,
long image_row_pitch,
long image_slice_pitch,
java.nio.FloatBuffer host_ptr,
java.nio.IntBuffer errcode_ret)
Creates a 3D image object.
|
static long |
clCreateImage3D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_depth,
long image_row_pitch,
long image_slice_pitch,
int[] host_ptr,
int[] errcode_ret)
Array version of:
CreateImage3D |
static long |
clCreateImage3D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_depth,
long image_row_pitch,
long image_slice_pitch,
java.nio.IntBuffer host_ptr,
java.nio.IntBuffer errcode_ret)
Creates a 3D image object.
|
static long |
clCreateImage3D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_depth,
long image_row_pitch,
long image_slice_pitch,
short[] host_ptr,
int[] errcode_ret)
Array version of:
CreateImage3D |
static long |
clCreateImage3D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_depth,
long image_row_pitch,
long image_slice_pitch,
java.nio.ShortBuffer host_ptr,
java.nio.IntBuffer errcode_ret)
Creates a 3D image object.
|
static long |
clCreateKernel(long program,
java.nio.ByteBuffer kernel_name,
int[] errcode_ret)
Array version of:
CreateKernel |
static long |
clCreateKernel(long program,
java.nio.ByteBuffer kernel_name,
java.nio.IntBuffer errcode_ret)
Creates a kernel object.
|
static long |
clCreateKernel(long program,
java.lang.CharSequence kernel_name,
int[] errcode_ret)
Array version of:
CreateKernel |
static long |
clCreateKernel(long program,
java.lang.CharSequence kernel_name,
java.nio.IntBuffer errcode_ret)
Creates a kernel object.
|
static int |
clCreateKernelsInProgram(long program,
org.lwjgl.PointerBuffer kernels,
int[] num_kernels_ret)
Array version of:
CreateKernelsInProgram |
static int |
clCreateKernelsInProgram(long program,
org.lwjgl.PointerBuffer kernels,
java.nio.IntBuffer num_kernels_ret)
Creates kernel objects for all kernel functions in
program. |
static long |
clCreateProgramWithBinary(long context,
org.lwjgl.PointerBuffer device_list,
java.nio.ByteBuffer[] binaries,
java.nio.IntBuffer binary_status,
java.nio.IntBuffer errcode_ret)
Creates a program object for a context, and loads the binary bits specified by
binary into the program object. |
static long |
clCreateProgramWithBinary(long context,
org.lwjgl.PointerBuffer device_list,
java.nio.ByteBuffer binary,
java.nio.IntBuffer binary_status,
java.nio.IntBuffer errcode_ret)
Creates a program object for a context, and loads the binary bits specified by
binary into the program object. |
static long |
clCreateProgramWithBinary(long context,
org.lwjgl.PointerBuffer device_list,
org.lwjgl.PointerBuffer lengths,
org.lwjgl.PointerBuffer binaries,
int[] binary_status,
int[] errcode_ret)
Array version of:
CreateProgramWithBinary |
static long |
clCreateProgramWithBinary(long context,
org.lwjgl.PointerBuffer device_list,
org.lwjgl.PointerBuffer lengths,
org.lwjgl.PointerBuffer binaries,
java.nio.IntBuffer binary_status,
java.nio.IntBuffer errcode_ret)
Creates a program object for a context, and loads the binary bits specified by
binary into the program object. |
static long |
clCreateProgramWithSource(long context,
java.lang.CharSequence[] strings,
java.nio.IntBuffer errcode_ret)
Creates a program object for a context, and loads the source code specified by the text strings in the strings array into the program object.
|
static long |
clCreateProgramWithSource(long context,
java.lang.CharSequence string,
java.nio.IntBuffer errcode_ret)
Creates a program object for a context, and loads the source code specified by the text strings in the strings array into the program object.
|
static long |
clCreateProgramWithSource(long context,
org.lwjgl.PointerBuffer strings,
org.lwjgl.PointerBuffer lengths,
int[] errcode_ret)
Array version of:
CreateProgramWithSource |
static long |
clCreateProgramWithSource(long context,
org.lwjgl.PointerBuffer strings,
org.lwjgl.PointerBuffer lengths,
java.nio.IntBuffer errcode_ret)
Creates a program object for a context, and loads the source code specified by the text strings in the strings array into the program object.
|
static long |
clCreateSampler(long context,
boolean normalized_coords,
int addressing_mode,
int filter_mode,
int[] errcode_ret)
Array version of:
CreateSampler |
static long |
clCreateSampler(long context,
boolean normalized_coords,
int addressing_mode,
int filter_mode,
java.nio.IntBuffer errcode_ret)
Creates a sampler object.
|
static int |
clEnqueueBarrier(long command_queue)
Enqueues a barrier operation.
|
static int |
clEnqueueCopyBuffer(long command_queue,
long src_buffer,
long dst_buffer,
long src_offset,
long dst_offset,
long size,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to copy a buffer object identified by
src_buffer to another buffer object identified by dst_buffer. |
static int |
clEnqueueCopyBufferToImage(long command_queue,
long src_buffer,
long dst_image,
long src_offset,
org.lwjgl.PointerBuffer dst_origin,
org.lwjgl.PointerBuffer region,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to copy a buffer object to an image object.
|
static int |
clEnqueueCopyImage(long command_queue,
long src_image,
long dst_image,
org.lwjgl.PointerBuffer src_origin,
org.lwjgl.PointerBuffer dst_origin,
org.lwjgl.PointerBuffer region,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to copy image objects.
|
static int |
clEnqueueCopyImageToBuffer(long command_queue,
long src_image,
long dst_buffer,
org.lwjgl.PointerBuffer src_origin,
org.lwjgl.PointerBuffer region,
long dst_offset,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to copy an image object to a buffer object.
|
static java.nio.ByteBuffer |
clEnqueueMapBuffer(long command_queue,
long buffer,
boolean blocking_map,
long map_flags,
long offset,
long size,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event,
int[] errcode_ret,
java.nio.ByteBuffer old_buffer)
Array version of:
EnqueueMapBuffer |
static java.nio.ByteBuffer |
clEnqueueMapBuffer(long command_queue,
long buffer,
boolean blocking_map,
long map_flags,
long offset,
long size,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event,
java.nio.IntBuffer errcode_ret,
java.nio.ByteBuffer old_buffer)
Enqueues a command to map a region of the buffer object given by buffer into the host address space and returns a pointer to this mapped region.
|
static java.nio.ByteBuffer |
clEnqueueMapImage(long command_queue,
long image,
boolean blocking_map,
long map_flags,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
org.lwjgl.PointerBuffer image_row_pitch,
org.lwjgl.PointerBuffer image_slice_pitch,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event,
int[] errcode_ret,
java.nio.ByteBuffer old_buffer)
Array version of:
EnqueueMapImage |
static java.nio.ByteBuffer |
clEnqueueMapImage(long command_queue,
long image,
boolean blocking_map,
long map_flags,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
org.lwjgl.PointerBuffer image_row_pitch,
org.lwjgl.PointerBuffer image_slice_pitch,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event,
int[] errcode_ret,
long length,
java.nio.ByteBuffer old_buffer)
Array version of:
EnqueueMapImage |
static java.nio.ByteBuffer |
clEnqueueMapImage(long command_queue,
long image,
boolean blocking_map,
long map_flags,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
org.lwjgl.PointerBuffer image_row_pitch,
org.lwjgl.PointerBuffer image_slice_pitch,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event,
java.nio.IntBuffer errcode_ret,
java.nio.ByteBuffer old_buffer)
Enqueues a command to map a region in the image object given by
image into the host address space and returns a pointer to this mapped region. |
static java.nio.ByteBuffer |
clEnqueueMapImage(long command_queue,
long image,
boolean blocking_map,
long map_flags,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
org.lwjgl.PointerBuffer image_row_pitch,
org.lwjgl.PointerBuffer image_slice_pitch,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event,
java.nio.IntBuffer errcode_ret,
long length,
java.nio.ByteBuffer old_buffer)
Enqueues a command to map a region in the image object given by
image into the host address space and returns a pointer to this mapped region. |
static int |
clEnqueueMarker(long command_queue,
org.lwjgl.PointerBuffer event)
Enqueues a marker command to
command_queue. |
static int |
clEnqueueNativeKernel(long command_queue,
CLNativeKernelI user_func,
java.nio.ByteBuffer args,
long memobj,
long memobj_loc,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to execute a native C/C++ function not compiled using the OpenCL compiler.
|
static int |
clEnqueueNativeKernel(long command_queue,
CLNativeKernelI user_func,
java.nio.ByteBuffer args,
org.lwjgl.PointerBuffer mem_list,
org.lwjgl.PointerBuffer args_mem_loc,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to execute a native C/C++ function not compiled using the OpenCL compiler.
|
static int |
clEnqueueNDRangeKernel(long command_queue,
long kernel,
int work_dim,
org.lwjgl.PointerBuffer global_work_offset,
org.lwjgl.PointerBuffer global_work_size,
org.lwjgl.PointerBuffer local_work_size,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to execute a kernel on a device.
|
static int |
clEnqueueReadBuffer(long command_queue,
long buffer,
boolean blocking_read,
long offset,
java.nio.ByteBuffer ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to read from a buffer object to host memory.
|
static int |
clEnqueueReadBuffer(long command_queue,
long buffer,
boolean blocking_read,
long offset,
double[] ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Array version of:
EnqueueReadBuffer |
static int |
clEnqueueReadBuffer(long command_queue,
long buffer,
boolean blocking_read,
long offset,
java.nio.DoubleBuffer ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to read from a buffer object to host memory.
|
static int |
clEnqueueReadBuffer(long command_queue,
long buffer,
boolean blocking_read,
long offset,
float[] ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Array version of:
EnqueueReadBuffer |
static int |
clEnqueueReadBuffer(long command_queue,
long buffer,
boolean blocking_read,
long offset,
java.nio.FloatBuffer ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to read from a buffer object to host memory.
|
static int |
clEnqueueReadBuffer(long command_queue,
long buffer,
boolean blocking_read,
long offset,
int[] ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Array version of:
EnqueueReadBuffer |
static int |
clEnqueueReadBuffer(long command_queue,
long buffer,
boolean blocking_read,
long offset,
java.nio.IntBuffer ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to read from a buffer object to host memory.
|
static int |
clEnqueueReadBuffer(long command_queue,
long buffer,
boolean blocking_read,
long offset,
short[] ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Array version of:
EnqueueReadBuffer |
static int |
clEnqueueReadBuffer(long command_queue,
long buffer,
boolean blocking_read,
long offset,
java.nio.ShortBuffer ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to read from a buffer object to host memory.
|
static int |
clEnqueueReadImage(long command_queue,
long image,
boolean blocking_read,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long row_pitch,
long slice_pitch,
java.nio.ByteBuffer ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to read from an image or image array object to host memory.
|
static int |
clEnqueueReadImage(long command_queue,
long image,
boolean blocking_read,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long row_pitch,
long slice_pitch,
double[] ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Array version of:
EnqueueReadImage |
static int |
clEnqueueReadImage(long command_queue,
long image,
boolean blocking_read,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long row_pitch,
long slice_pitch,
java.nio.DoubleBuffer ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to read from an image or image array object to host memory.
|
static int |
clEnqueueReadImage(long command_queue,
long image,
boolean blocking_read,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long row_pitch,
long slice_pitch,
float[] ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Array version of:
EnqueueReadImage |
static int |
clEnqueueReadImage(long command_queue,
long image,
boolean blocking_read,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long row_pitch,
long slice_pitch,
java.nio.FloatBuffer ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to read from an image or image array object to host memory.
|
static int |
clEnqueueReadImage(long command_queue,
long image,
boolean blocking_read,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long row_pitch,
long slice_pitch,
int[] ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Array version of:
EnqueueReadImage |
static int |
clEnqueueReadImage(long command_queue,
long image,
boolean blocking_read,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long row_pitch,
long slice_pitch,
java.nio.IntBuffer ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to read from an image or image array object to host memory.
|
static int |
clEnqueueReadImage(long command_queue,
long image,
boolean blocking_read,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long row_pitch,
long slice_pitch,
short[] ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Array version of:
EnqueueReadImage |
static int |
clEnqueueReadImage(long command_queue,
long image,
boolean blocking_read,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long row_pitch,
long slice_pitch,
java.nio.ShortBuffer ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to read from an image or image array object to host memory.
|
static int |
clEnqueueTask(long command_queue,
long kernel,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to execute a kernel on a device.
|
static int |
clEnqueueUnmapMemObject(long command_queue,
long memobj,
java.nio.ByteBuffer mapped_ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to unmap a previously mapped region of a memory object.
|
static int |
clEnqueueWaitForEvents(long command_queue,
long event)
Enqueues a wait for a specific event or a list of events to complete before any future commands queued in the command-queue are executed.
|
static int |
clEnqueueWaitForEvents(long command_queue,
org.lwjgl.PointerBuffer event_list)
Enqueues a wait for a specific event or a list of events to complete before any future commands queued in the command-queue are executed.
|
static int |
clEnqueueWriteBuffer(long command_queue,
long buffer,
boolean blocking_write,
long offset,
java.nio.ByteBuffer ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to write to a buffer object from host memory.
|
static int |
clEnqueueWriteBuffer(long command_queue,
long buffer,
boolean blocking_write,
long offset,
double[] ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Array version of:
EnqueueWriteBuffer |
static int |
clEnqueueWriteBuffer(long command_queue,
long buffer,
boolean blocking_write,
long offset,
java.nio.DoubleBuffer ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to write to a buffer object from host memory.
|
static int |
clEnqueueWriteBuffer(long command_queue,
long buffer,
boolean blocking_write,
long offset,
float[] ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Array version of:
EnqueueWriteBuffer |
static int |
clEnqueueWriteBuffer(long command_queue,
long buffer,
boolean blocking_write,
long offset,
java.nio.FloatBuffer ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to write to a buffer object from host memory.
|
static int |
clEnqueueWriteBuffer(long command_queue,
long buffer,
boolean blocking_write,
long offset,
int[] ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Array version of:
EnqueueWriteBuffer |
static int |
clEnqueueWriteBuffer(long command_queue,
long buffer,
boolean blocking_write,
long offset,
java.nio.IntBuffer ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to write to a buffer object from host memory.
|
static int |
clEnqueueWriteBuffer(long command_queue,
long buffer,
boolean blocking_write,
long offset,
short[] ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Array version of:
EnqueueWriteBuffer |
static int |
clEnqueueWriteBuffer(long command_queue,
long buffer,
boolean blocking_write,
long offset,
java.nio.ShortBuffer ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to write to a buffer object from host memory.
|
static int |
clEnqueueWriteImage(long command_queue,
long image,
boolean blocking_write,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long input_row_pitch,
long input_slice_pitch,
java.nio.ByteBuffer ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to write to an image or image array object from host memory.
|
static int |
clEnqueueWriteImage(long command_queue,
long image,
boolean blocking_write,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long input_row_pitch,
long input_slice_pitch,
double[] ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Array version of:
EnqueueWriteImage |
static int |
clEnqueueWriteImage(long command_queue,
long image,
boolean blocking_write,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long input_row_pitch,
long input_slice_pitch,
java.nio.DoubleBuffer ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to write to an image or image array object from host memory.
|
static int |
clEnqueueWriteImage(long command_queue,
long image,
boolean blocking_write,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long input_row_pitch,
long input_slice_pitch,
float[] ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Array version of:
EnqueueWriteImage |
static int |
clEnqueueWriteImage(long command_queue,
long image,
boolean blocking_write,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long input_row_pitch,
long input_slice_pitch,
java.nio.FloatBuffer ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to write to an image or image array object from host memory.
|
static int |
clEnqueueWriteImage(long command_queue,
long image,
boolean blocking_write,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long input_row_pitch,
long input_slice_pitch,
int[] ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Array version of:
EnqueueWriteImage |
static int |
clEnqueueWriteImage(long command_queue,
long image,
boolean blocking_write,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long input_row_pitch,
long input_slice_pitch,
java.nio.IntBuffer ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to write to an image or image array object from host memory.
|
static int |
clEnqueueWriteImage(long command_queue,
long image,
boolean blocking_write,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long input_row_pitch,
long input_slice_pitch,
short[] ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Array version of:
EnqueueWriteImage |
static int |
clEnqueueWriteImage(long command_queue,
long image,
boolean blocking_write,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long input_row_pitch,
long input_slice_pitch,
java.nio.ShortBuffer ptr,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Enqueues a command to write to an image or image array object from host memory.
|
static int |
clFinish(long command_queue)
Blocks until all previously queued OpenCL commands in
command_queue are issued to the associated device and have completed. |
static int |
clFlush(long command_queue)
Issues all previously queued OpenCL commands in
command_queue to the device associated with command_queue. |
static int |
clGetCommandQueueInfo(long command_queue,
int param_name,
java.nio.ByteBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Queries information about a command-queue.
|
static int |
clGetCommandQueueInfo(long command_queue,
int param_name,
int[] param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Array version of:
GetCommandQueueInfo |
static int |
clGetCommandQueueInfo(long command_queue,
int param_name,
java.nio.IntBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Queries information about a command-queue.
|
static int |
clGetCommandQueueInfo(long command_queue,
int param_name,
long[] param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Array version of:
GetCommandQueueInfo |
static int |
clGetCommandQueueInfo(long command_queue,
int param_name,
java.nio.LongBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Queries information about a command-queue.
|
static int |
clGetCommandQueueInfo(long command_queue,
int param_name,
org.lwjgl.PointerBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Queries information about a command-queue.
|
static int |
clGetContextInfo(long context,
int param_name,
java.nio.ByteBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Queries information about a context.
|
static int |
clGetContextInfo(long context,
int param_name,
int[] param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Array version of:
GetContextInfo |
static int |
clGetContextInfo(long context,
int param_name,
java.nio.IntBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Queries information about a context.
|
static int |
clGetContextInfo(long context,
int param_name,
org.lwjgl.PointerBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Queries information about a context.
|
static int |
clGetDeviceIDs(long platform,
long device_type,
org.lwjgl.PointerBuffer devices,
int[] num_devices)
Array version of:
GetDeviceIDs |
static int |
clGetDeviceIDs(long platform,
long device_type,
org.lwjgl.PointerBuffer devices,
java.nio.IntBuffer num_devices)
Obtains the list of devices available on a platform.
|
static int |
clGetDeviceInfo(long device,
int param_name,
java.nio.ByteBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns specific information about an OpenCL device.
|
static int |
clGetDeviceInfo(long device,
int param_name,
int[] param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Array version of:
GetDeviceInfo |
static int |
clGetDeviceInfo(long device,
int param_name,
java.nio.IntBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns specific information about an OpenCL device.
|
static int |
clGetDeviceInfo(long device,
int param_name,
long[] param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Array version of:
GetDeviceInfo |
static int |
clGetDeviceInfo(long device,
int param_name,
java.nio.LongBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns specific information about an OpenCL device.
|
static int |
clGetDeviceInfo(long device,
int param_name,
org.lwjgl.PointerBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns specific information about an OpenCL device.
|
static int |
clGetEventInfo(long event,
int param_name,
java.nio.ByteBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information about an event object.
|
static int |
clGetEventInfo(long event,
int param_name,
int[] param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Array version of:
GetEventInfo |
static int |
clGetEventInfo(long event,
int param_name,
java.nio.IntBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information about an event object.
|
static int |
clGetEventInfo(long event,
int param_name,
org.lwjgl.PointerBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information about an event object.
|
static int |
clGetEventProfilingInfo(long event,
int param_name,
java.nio.ByteBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns profiling information for the command associated with
event. |
static int |
clGetEventProfilingInfo(long event,
int param_name,
long[] param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Array version of:
GetEventProfilingInfo |
static int |
clGetEventProfilingInfo(long event,
int param_name,
java.nio.LongBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns profiling information for the command associated with
event. |
static long |
clGetExtensionFunctionAddress(java.nio.ByteBuffer funcname)
Returns the address of the extension function named by
funcname. |
static long |
clGetExtensionFunctionAddress(java.lang.CharSequence funcname)
Returns the address of the extension function named by
funcname. |
static int |
clGetImageInfo(long image,
int param_name,
java.nio.ByteBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information specific to an image object.
|
static int |
clGetImageInfo(long image,
int param_name,
int[] param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Array version of:
GetImageInfo |
static int |
clGetImageInfo(long image,
int param_name,
java.nio.IntBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information specific to an image object.
|
static int |
clGetImageInfo(long image,
int param_name,
org.lwjgl.PointerBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information specific to an image object.
|
static int |
clGetKernelInfo(long kernel,
int param_name,
java.nio.ByteBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information about a kernel object.
|
static int |
clGetKernelInfo(long kernel,
int param_name,
int[] param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Array version of:
GetKernelInfo |
static int |
clGetKernelInfo(long kernel,
int param_name,
java.nio.IntBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information about a kernel object.
|
static int |
clGetKernelInfo(long kernel,
int param_name,
org.lwjgl.PointerBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information about a kernel object.
|
static int |
clGetKernelWorkGroupInfo(long kernel,
long device,
int param_name,
java.nio.ByteBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information about the kernel object that may be specific to a device.
|
static int |
clGetKernelWorkGroupInfo(long kernel,
long device,
int param_name,
int[] param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Array version of:
GetKernelWorkGroupInfo |
static int |
clGetKernelWorkGroupInfo(long kernel,
long device,
int param_name,
java.nio.IntBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information about the kernel object that may be specific to a device.
|
static int |
clGetKernelWorkGroupInfo(long kernel,
long device,
int param_name,
long[] param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Array version of:
GetKernelWorkGroupInfo |
static int |
clGetKernelWorkGroupInfo(long kernel,
long device,
int param_name,
java.nio.LongBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information about the kernel object that may be specific to a device.
|
static int |
clGetKernelWorkGroupInfo(long kernel,
long device,
int param_name,
org.lwjgl.PointerBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information about the kernel object that may be specific to a device.
|
static int |
clGetMemObjectInfo(long memobj,
int param_name,
java.nio.ByteBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information that is common to all memory objects (buffer and image objects).
|
static int |
clGetMemObjectInfo(long memobj,
int param_name,
int[] param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Array version of:
GetMemObjectInfo |
static int |
clGetMemObjectInfo(long memobj,
int param_name,
java.nio.IntBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information that is common to all memory objects (buffer and image objects).
|
static int |
clGetMemObjectInfo(long memobj,
int param_name,
long[] param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Array version of:
GetMemObjectInfo |
static int |
clGetMemObjectInfo(long memobj,
int param_name,
java.nio.LongBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information that is common to all memory objects (buffer and image objects).
|
static int |
clGetMemObjectInfo(long memobj,
int param_name,
org.lwjgl.PointerBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information that is common to all memory objects (buffer and image objects).
|
static int |
clGetPlatformIDs(org.lwjgl.PointerBuffer platforms,
int[] num_platforms)
Array version of:
GetPlatformIDs |
static int |
clGetPlatformIDs(org.lwjgl.PointerBuffer platforms,
java.nio.IntBuffer num_platforms)
Obtains the list of available platforms.
|
static int |
clGetPlatformInfo(long platform,
int param_name,
java.nio.ByteBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information about the specified OpenCL platform.
|
static int |
clGetPlatformInfo(long platform,
int param_name,
long[] param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Array version of:
GetPlatformInfo |
static int |
clGetPlatformInfo(long platform,
int param_name,
java.nio.LongBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information about the specified OpenCL platform.
|
static int |
clGetProgramBuildInfo(long program,
long device,
int param_name,
java.nio.ByteBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns build information for each device in the program object.
|
static int |
clGetProgramBuildInfo(long program,
long device,
int param_name,
int[] param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Array version of:
GetProgramBuildInfo |
static int |
clGetProgramBuildInfo(long program,
long device,
int param_name,
java.nio.IntBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns build information for each device in the program object.
|
static int |
clGetProgramBuildInfo(long program,
long device,
int param_name,
org.lwjgl.PointerBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns build information for each device in the program object.
|
static int |
clGetProgramInfo(long program,
int param_name,
java.nio.ByteBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information about a program object.
|
static int |
clGetProgramInfo(long program,
int param_name,
int[] param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Array version of:
GetProgramInfo |
static int |
clGetProgramInfo(long program,
int param_name,
java.nio.IntBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information about a program object.
|
static int |
clGetProgramInfo(long program,
int param_name,
org.lwjgl.PointerBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information about a program object.
|
static int |
clGetSamplerInfo(long sampler,
int param_name,
java.nio.ByteBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information about a sampler object.
|
static int |
clGetSamplerInfo(long sampler,
int param_name,
int[] param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Array version of:
GetSamplerInfo |
static int |
clGetSamplerInfo(long sampler,
int param_name,
java.nio.IntBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information about a sampler object.
|
static int |
clGetSamplerInfo(long sampler,
int param_name,
org.lwjgl.PointerBuffer param_value,
org.lwjgl.PointerBuffer param_value_size_ret)
Returns information about a sampler object.
|
static int |
clGetSupportedImageFormats(long context,
long flags,
int image_type,
CLImageFormat.Buffer image_formats,
int[] num_image_formats)
Array version of:
GetSupportedImageFormats |
static int |
clGetSupportedImageFormats(long context,
long flags,
int image_type,
CLImageFormat.Buffer image_formats,
java.nio.IntBuffer num_image_formats)
Can be used to get the list of image formats supported by an OpenCL implementation when the following information about an image memory object is
specified:
Context
Image type – 1D, 2D, or 3D image, 1D image buffer, 1D or 2D image array
Image object allocation information
|
static int |
clReleaseCommandQueue(long command_queue)
Decrements the
command_queue reference count. |
static int |
clReleaseContext(long context)
Decrements the context reference count.
|
static int |
clReleaseEvent(long event)
Decrements the event reference count.
|
static int |
clReleaseKernel(long kernel)
Decrements the
kernel reference count. |
static int |
clReleaseMemObject(long memobj)
Decrements the
memobj reference count. |
static int |
clReleaseProgram(long program)
Decrements the
program reference count. |
static int |
clReleaseSampler(long sampler)
Decrements the sampler reference count.
|
static int |
clRetainCommandQueue(long command_queue)
Increments the
command_queue reference count. |
static int |
clRetainContext(long context)
Increments the context reference count.
|
static int |
clRetainEvent(long event)
Increments the event reference count.
|
static int |
clRetainKernel(long kernel)
Increments the
kernel reference count. |
static int |
clRetainMemObject(long memobj)
Increments the
memobj reference count. |
static int |
clRetainProgram(long program)
Increments the
program reference count. |
static int |
clRetainSampler(long sampler)
Increments the sampler reference count.
|
static int |
clSetKernelArg(long kernel,
int arg_index,
java.nio.ByteBuffer arg_value)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg(long kernel,
int arg_index,
double[] arg_value)
Array version of:
SetKernelArg |
static int |
clSetKernelArg(long kernel,
int arg_index,
java.nio.DoubleBuffer arg_value)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg(long kernel,
int arg_index,
float[] arg_value)
Array version of:
SetKernelArg |
static int |
clSetKernelArg(long kernel,
int arg_index,
java.nio.FloatBuffer arg_value)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg(long kernel,
int arg_index,
int[] arg_value)
Array version of:
SetKernelArg |
static int |
clSetKernelArg(long kernel,
int arg_index,
java.nio.IntBuffer arg_value)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg(long kernel,
int arg_index,
long arg_size)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg(long kernel,
int arg_index,
long[] arg_value)
Array version of:
SetKernelArg |
static int |
clSetKernelArg(long kernel,
int arg_index,
java.nio.LongBuffer arg_value)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg(long kernel,
int arg_index,
org.lwjgl.PointerBuffer arg_value)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg(long kernel,
int arg_index,
short[] arg_value)
Array version of:
SetKernelArg |
static int |
clSetKernelArg(long kernel,
int arg_index,
java.nio.ShortBuffer arg_value)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg1b(long kernel,
int arg_index,
byte arg0)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg1d(long kernel,
int arg_index,
double arg0)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg1f(long kernel,
int arg_index,
float arg0)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg1i(long kernel,
int arg_index,
int arg0)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg1l(long kernel,
int arg_index,
long arg0)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg1p(long kernel,
int arg_index,
long arg0)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg1s(long kernel,
int arg_index,
short arg0)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg2b(long kernel,
int arg_index,
byte arg0,
byte arg1)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg2d(long kernel,
int arg_index,
double arg0,
double arg1)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg2f(long kernel,
int arg_index,
float arg0,
float arg1)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg2i(long kernel,
int arg_index,
int arg0,
int arg1)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg2l(long kernel,
int arg_index,
long arg0,
long arg1)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg2p(long kernel,
int arg_index,
long arg0,
long arg1)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg2s(long kernel,
int arg_index,
short arg0,
short arg1)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg4b(long kernel,
int arg_index,
byte arg0,
byte arg1,
byte arg2,
byte arg3)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg4d(long kernel,
int arg_index,
double arg0,
double arg1,
double arg2,
double arg3)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg4f(long kernel,
int arg_index,
float arg0,
float arg1,
float arg2,
float arg3)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg4i(long kernel,
int arg_index,
int arg0,
int arg1,
int arg2,
int arg3)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg4l(long kernel,
int arg_index,
long arg0,
long arg1,
long arg2,
long arg3)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg4p(long kernel,
int arg_index,
long arg0,
long arg1,
long arg2,
long arg3)
Set the argument value for a specific argument of a kernel.
|
static int |
clSetKernelArg4s(long kernel,
int arg_index,
short arg0,
short arg1,
short arg2,
short arg3)
Set the argument value for a specific argument of a kernel.
|
static int |
clUnloadCompiler()
Allows the implementation to release the resources allocated by the OpenCL compiler.
|
static int |
clWaitForEvents(long event)
Waits on the host thread for commands identified by event objects in
event_list to complete. |
static int |
clWaitForEvents(org.lwjgl.PointerBuffer event_list)
Waits on the host thread for commands identified by event objects in
event_list to complete. |
static int |
nclBuildProgram(long program,
int num_devices,
long device_list,
long options,
long pfn_notify,
long user_data)
Unsafe version of:
BuildProgram |
static long |
nclCreateBuffer(long context,
long flags,
long size,
long host_ptr,
long errcode_ret)
Unsafe version of:
CreateBuffer |
static long |
nclCreateCommandQueue(long context,
long device,
long properties,
long errcode_ret)
Unsafe version of:
CreateCommandQueue |
static long |
nclCreateContext(long properties,
int num_devices,
long devices,
long pfn_notify,
long user_data,
long errcode_ret)
Unsafe version of:
CreateContext |
static long |
nclCreateContextFromType(long properties,
long device_type,
long pfn_notify,
long user_data,
long errcode_ret)
Unsafe version of:
CreateContextFromType |
static long |
nclCreateImage2D(long context,
long flags,
long image_format,
long image_width,
long image_height,
long image_row_pitch,
long host_ptr,
long errcode_ret)
Unsafe version of:
CreateImage2D |
static long |
nclCreateImage3D(long context,
long flags,
long image_format,
long image_width,
long image_height,
long image_depth,
long image_row_pitch,
long image_slice_pitch,
long host_ptr,
long errcode_ret)
Unsafe version of:
CreateImage3D |
static long |
nclCreateKernel(long program,
long kernel_name,
long errcode_ret)
Unsafe version of:
CreateKernel |
static int |
nclCreateKernelsInProgram(long program,
int num_kernels,
long kernels,
long num_kernels_ret)
Unsafe version of:
CreateKernelsInProgram |
static long |
nclCreateProgramWithBinary(long context,
int num_devices,
long device_list,
long lengths,
long binaries,
long binary_status,
long errcode_ret)
Unsafe version of:
CreateProgramWithBinary |
static long |
nclCreateProgramWithSource(long context,
int count,
long strings,
long lengths,
long errcode_ret)
Unsafe version of:
CreateProgramWithSource |
static long |
nclCreateSampler(long context,
int normalized_coords,
int addressing_mode,
int filter_mode,
long errcode_ret)
Unsafe version of:
CreateSampler |
static int |
nclEnqueueCopyBuffer(long command_queue,
long src_buffer,
long dst_buffer,
long src_offset,
long dst_offset,
long size,
int num_events_in_wait_list,
long event_wait_list,
long event)
Unsafe version of:
EnqueueCopyBuffer |
static int |
nclEnqueueCopyBufferToImage(long command_queue,
long src_buffer,
long dst_image,
long src_offset,
long dst_origin,
long region,
int num_events_in_wait_list,
long event_wait_list,
long event)
Unsafe version of:
EnqueueCopyBufferToImage |
static int |
nclEnqueueCopyImage(long command_queue,
long src_image,
long dst_image,
long src_origin,
long dst_origin,
long region,
int num_events_in_wait_list,
long event_wait_list,
long event)
Unsafe version of:
EnqueueCopyImage |
static int |
nclEnqueueCopyImageToBuffer(long command_queue,
long src_image,
long dst_buffer,
long src_origin,
long region,
long dst_offset,
int num_events_in_wait_list,
long event_wait_list,
long event)
Unsafe version of:
EnqueueCopyImageToBuffer |
static long |
nclEnqueueMapBuffer(long command_queue,
long buffer,
int blocking_map,
long map_flags,
long offset,
long size,
int num_events_in_wait_list,
long event_wait_list,
long event,
long errcode_ret)
Unsafe version of:
EnqueueMapBuffer |
static long |
nclEnqueueMapImage(long command_queue,
long image,
int blocking_map,
long map_flags,
long origin,
long region,
long image_row_pitch,
long image_slice_pitch,
int num_events_in_wait_list,
long event_wait_list,
long event,
long errcode_ret)
Unsafe version of:
EnqueueMapImage |
static int |
nclEnqueueMarker(long command_queue,
long event)
Unsafe version of:
EnqueueMarker |
static int |
nclEnqueueNativeKernel(long command_queue,
long user_func,
long args,
long cb_args,
int num_mem_objects,
long mem_list,
long args_mem_loc,
int num_events_in_wait_list,
long event_wait_list,
long event)
Unsafe version of:
EnqueueNativeKernel |
static int |
nclEnqueueNDRangeKernel(long command_queue,
long kernel,
int work_dim,
long global_work_offset,
long global_work_size,
long local_work_size,
int num_events_in_wait_list,
long event_wait_list,
long event)
Unsafe version of:
EnqueueNDRangeKernel |
static int |
nclEnqueueReadBuffer(long command_queue,
long buffer,
int blocking_read,
long offset,
long size,
long ptr,
int num_events_in_wait_list,
long event_wait_list,
long event)
Unsafe version of:
EnqueueReadBuffer |
static int |
nclEnqueueReadImage(long command_queue,
long image,
int blocking_read,
long origin,
long region,
long row_pitch,
long slice_pitch,
long ptr,
int num_events_in_wait_list,
long event_wait_list,
long event)
Unsafe version of:
EnqueueReadImage |
static int |
nclEnqueueTask(long command_queue,
long kernel,
int num_events_in_wait_list,
long event_wait_list,
long event)
Unsafe version of:
EnqueueTask |
static int |
nclEnqueueUnmapMemObject(long command_queue,
long memobj,
long mapped_ptr,
int num_events_in_wait_list,
long event_wait_list,
long event)
Unsafe version of:
EnqueueUnmapMemObject |
static int |
nclEnqueueWaitForEvents(long command_queue,
int num_events,
long event_list)
Unsafe version of:
EnqueueWaitForEvents |
static int |
nclEnqueueWriteBuffer(long command_queue,
long buffer,
int blocking_write,
long offset,
long size,
long ptr,
int num_events_in_wait_list,
long event_wait_list,
long event)
Unsafe version of:
EnqueueWriteBuffer |
static int |
nclEnqueueWriteImage(long command_queue,
long image,
int blocking_write,
long origin,
long region,
long input_row_pitch,
long input_slice_pitch,
long ptr,
int num_events_in_wait_list,
long event_wait_list,
long event)
Unsafe version of:
EnqueueWriteImage |
static int |
nclGetCommandQueueInfo(long command_queue,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
Unsafe version of:
GetCommandQueueInfo |
static int |
nclGetContextInfo(long context,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
Unsafe version of:
GetContextInfo |
static int |
nclGetDeviceIDs(long platform,
long device_type,
int num_entries,
long devices,
long num_devices)
Unsafe version of:
GetDeviceIDs |
static int |
nclGetDeviceInfo(long device,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
Unsafe version of:
GetDeviceInfo |
static int |
nclGetEventInfo(long event,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
Unsafe version of:
GetEventInfo |
static int |
nclGetEventProfilingInfo(long event,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
Unsafe version of:
GetEventProfilingInfo |
static long |
nclGetExtensionFunctionAddress(long funcname)
Unsafe version of:
GetExtensionFunctionAddress |
static int |
nclGetImageInfo(long image,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
Unsafe version of:
GetImageInfo |
static int |
nclGetKernelInfo(long kernel,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
Unsafe version of:
GetKernelInfo |
static int |
nclGetKernelWorkGroupInfo(long kernel,
long device,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
Unsafe version of:
GetKernelWorkGroupInfo |
static int |
nclGetMemObjectInfo(long memobj,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
Unsafe version of:
GetMemObjectInfo |
static int |
nclGetPlatformIDs(int num_entries,
long platforms,
long num_platforms)
Unsafe version of:
GetPlatformIDs |
static int |
nclGetPlatformInfo(long platform,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
Unsafe version of:
GetPlatformInfo |
static int |
nclGetProgramBuildInfo(long program,
long device,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
Unsafe version of:
GetProgramBuildInfo |
static int |
nclGetProgramInfo(long program,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
Unsafe version of:
GetProgramInfo |
static int |
nclGetSamplerInfo(long sampler,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
Unsafe version of:
GetSamplerInfo |
static int |
nclGetSupportedImageFormats(long context,
long flags,
int image_type,
int num_entries,
long image_formats,
long num_image_formats)
Unsafe version of:
GetSupportedImageFormats |
static int |
nclSetKernelArg(long kernel,
int arg_index,
long arg_size,
long arg_value)
Unsafe version of:
SetKernelArg |
static int |
nclWaitForEvents(int num_events,
long event_list)
Unsafe version of:
WaitForEvents |
public static final int CL_SUCCESS
public static final int CL_DEVICE_NOT_FOUND
public static final int CL_DEVICE_NOT_AVAILABLE
public static final int CL_COMPILER_NOT_AVAILABLE
public static final int CL_MEM_OBJECT_ALLOCATION_FAILURE
public static final int CL_OUT_OF_RESOURCES
public static final int CL_OUT_OF_HOST_MEMORY
public static final int CL_PROFILING_INFO_NOT_AVAILABLE
public static final int CL_MEM_COPY_OVERLAP
public static final int CL_IMAGE_FORMAT_MISMATCH
public static final int CL_IMAGE_FORMAT_NOT_SUPPORTED
public static final int CL_BUILD_PROGRAM_FAILURE
public static final int CL_MAP_FAILURE
public static final int CL_INVALID_VALUE
public static final int CL_INVALID_DEVICE_TYPE
public static final int CL_INVALID_PLATFORM
public static final int CL_INVALID_DEVICE
public static final int CL_INVALID_CONTEXT
public static final int CL_INVALID_QUEUE_PROPERTIES
public static final int CL_INVALID_COMMAND_QUEUE
public static final int CL_INVALID_HOST_PTR
public static final int CL_INVALID_MEM_OBJECT
public static final int CL_INVALID_IMAGE_FORMAT_DESCRIPTOR
public static final int CL_INVALID_IMAGE_SIZE
public static final int CL_INVALID_SAMPLER
public static final int CL_INVALID_BINARY
public static final int CL_INVALID_BUILD_OPTIONS
public static final int CL_INVALID_PROGRAM
public static final int CL_INVALID_PROGRAM_EXECUTABLE
public static final int CL_INVALID_KERNEL_NAME
public static final int CL_INVALID_KERNEL_DEFINITION
public static final int CL_INVALID_KERNEL
public static final int CL_INVALID_ARG_INDEX
public static final int CL_INVALID_ARG_VALUE
public static final int CL_INVALID_ARG_SIZE
public static final int CL_INVALID_KERNEL_ARGS
public static final int CL_INVALID_WORK_DIMENSION
public static final int CL_INVALID_WORK_GROUP_SIZE
public static final int CL_INVALID_WORK_ITEM_SIZE
public static final int CL_INVALID_GLOBAL_OFFSET
public static final int CL_INVALID_EVENT_WAIT_LIST
public static final int CL_INVALID_EVENT
public static final int CL_INVALID_OPERATION
public static final int CL_INVALID_BUFFER_SIZE
public static final int CL_INVALID_GLOBAL_WORK_SIZE
public static final int CL_VERSION_1_0
public static final int CL_FALSE
public static final int CL_TRUE
public static final int CL_PLATFORM_PROFILE
public static final int CL_PLATFORM_VERSION
public static final int CL_PLATFORM_NAME
public static final int CL_PLATFORM_VENDOR
public static final int CL_PLATFORM_EXTENSIONS
public static final int CL_DEVICE_TYPE_DEFAULT
public static final int CL_DEVICE_TYPE_CPU
public static final int CL_DEVICE_TYPE_GPU
public static final int CL_DEVICE_TYPE_ACCELERATOR
public static final int CL_DEVICE_TYPE_ALL
public static final int CL_DEVICE_TYPE
public static final int CL_DEVICE_VENDOR_ID
public static final int CL_DEVICE_MAX_COMPUTE_UNITS
public static final int CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS
public static final int CL_DEVICE_MAX_WORK_GROUP_SIZE
public static final int CL_DEVICE_MAX_WORK_ITEM_SIZES
public static final int CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR
public static final int CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT
public static final int CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT
public static final int CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG
public static final int CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT
public static final int CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE
public static final int CL_DEVICE_MAX_CLOCK_FREQUENCY
public static final int CL_DEVICE_ADDRESS_BITS
public static final int CL_DEVICE_MAX_READ_IMAGE_ARGS
public static final int CL_DEVICE_MAX_WRITE_IMAGE_ARGS
public static final int CL_DEVICE_MAX_MEM_ALLOC_SIZE
public static final int CL_DEVICE_IMAGE2D_MAX_WIDTH
public static final int CL_DEVICE_IMAGE2D_MAX_HEIGHT
public static final int CL_DEVICE_IMAGE3D_MAX_WIDTH
public static final int CL_DEVICE_IMAGE3D_MAX_HEIGHT
public static final int CL_DEVICE_IMAGE3D_MAX_DEPTH
public static final int CL_DEVICE_IMAGE_SUPPORT
public static final int CL_DEVICE_MAX_PARAMETER_SIZE
public static final int CL_DEVICE_MAX_SAMPLERS
public static final int CL_DEVICE_MEM_BASE_ADDR_ALIGN
public static final int CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE
public static final int CL_DEVICE_SINGLE_FP_CONFIG
public static final int CL_DEVICE_GLOBAL_MEM_CACHE_TYPE
public static final int CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE
public static final int CL_DEVICE_GLOBAL_MEM_CACHE_SIZE
public static final int CL_DEVICE_GLOBAL_MEM_SIZE
public static final int CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE
public static final int CL_DEVICE_MAX_CONSTANT_ARGS
public static final int CL_DEVICE_LOCAL_MEM_TYPE
public static final int CL_DEVICE_LOCAL_MEM_SIZE
public static final int CL_DEVICE_ERROR_CORRECTION_SUPPORT
public static final int CL_DEVICE_PROFILING_TIMER_RESOLUTION
public static final int CL_DEVICE_ENDIAN_LITTLE
public static final int CL_DEVICE_AVAILABLE
public static final int CL_DEVICE_COMPILER_AVAILABLE
public static final int CL_DEVICE_EXECUTION_CAPABILITIES
public static final int CL_DEVICE_QUEUE_PROPERTIES
public static final int CL_DEVICE_NAME
public static final int CL_DEVICE_VENDOR
public static final int CL_DRIVER_VERSION
public static final int CL_DEVICE_PROFILE
public static final int CL_DEVICE_VERSION
public static final int CL_DEVICE_EXTENSIONS
public static final int CL_DEVICE_PLATFORM
public static final int CL_FP_DENORM
public static final int CL_FP_INF_NAN
public static final int CL_FP_ROUND_TO_NEAREST
public static final int CL_FP_ROUND_TO_ZERO
public static final int CL_FP_ROUND_TO_INF
public static final int CL_FP_FMA
public static final int CL_NONE
public static final int CL_READ_ONLY_CACHE
public static final int CL_READ_WRITE_CACHE
public static final int CL_LOCAL
public static final int CL_GLOBAL
public static final int CL_EXEC_KERNEL
public static final int CL_EXEC_NATIVE_KERNEL
public static final int CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE
public static final int CL_QUEUE_PROFILING_ENABLE
public static final int CL_CONTEXT_REFERENCE_COUNT
public static final int CL_CONTEXT_DEVICES
public static final int CL_CONTEXT_PROPERTIES
public static final int CL_CONTEXT_PLATFORM
public static final int CL_QUEUE_CONTEXT
public static final int CL_QUEUE_DEVICE
public static final int CL_QUEUE_REFERENCE_COUNT
public static final int CL_QUEUE_PROPERTIES
public static final int CL_MEM_READ_WRITE
public static final int CL_MEM_WRITE_ONLY
public static final int CL_MEM_READ_ONLY
public static final int CL_MEM_USE_HOST_PTR
public static final int CL_MEM_ALLOC_HOST_PTR
public static final int CL_MEM_COPY_HOST_PTR
public static final int CL_R
public static final int CL_A
public static final int CL_RG
public static final int CL_RA
public static final int CL_RGB
public static final int CL_RGBA
public static final int CL_BGRA
public static final int CL_ARGB
public static final int CL_INTENSITY
public static final int CL_LUMINANCE
public static final int CL_SNORM_INT8
public static final int CL_SNORM_INT16
public static final int CL_UNORM_INT8
public static final int CL_UNORM_INT16
public static final int CL_UNORM_SHORT_565
public static final int CL_UNORM_SHORT_555
public static final int CL_UNORM_INT_101010
public static final int CL_SIGNED_INT8
public static final int CL_SIGNED_INT16
public static final int CL_SIGNED_INT32
public static final int CL_UNSIGNED_INT8
public static final int CL_UNSIGNED_INT16
public static final int CL_UNSIGNED_INT32
public static final int CL_HALF_FLOAT
public static final int CL_FLOAT
public static final int CL_MEM_OBJECT_BUFFER
public static final int CL_MEM_OBJECT_IMAGE2D
public static final int CL_MEM_OBJECT_IMAGE3D
public static final int CL_MEM_TYPE
public static final int CL_MEM_FLAGS
public static final int CL_MEM_SIZE
public static final int CL_MEM_HOST_PTR
public static final int CL_MEM_MAP_COUNT
public static final int CL_MEM_REFERENCE_COUNT
public static final int CL_MEM_CONTEXT
public static final int CL_IMAGE_FORMAT
public static final int CL_IMAGE_ELEMENT_SIZE
public static final int CL_IMAGE_ROW_PITCH
public static final int CL_IMAGE_SLICE_PITCH
public static final int CL_IMAGE_WIDTH
public static final int CL_IMAGE_HEIGHT
public static final int CL_IMAGE_DEPTH
public static final int CL_ADDRESS_NONE
public static final int CL_ADDRESS_CLAMP_TO_EDGE
public static final int CL_ADDRESS_CLAMP
public static final int CL_ADDRESS_REPEAT
public static final int CL_FILTER_NEAREST
public static final int CL_FILTER_LINEAR
public static final int CL_SAMPLER_REFERENCE_COUNT
public static final int CL_SAMPLER_CONTEXT
public static final int CL_SAMPLER_NORMALIZED_COORDS
public static final int CL_SAMPLER_ADDRESSING_MODE
public static final int CL_SAMPLER_FILTER_MODE
public static final int CL_MAP_READ
public static final int CL_MAP_WRITE
public static final int CL_PROGRAM_REFERENCE_COUNT
public static final int CL_PROGRAM_CONTEXT
public static final int CL_PROGRAM_NUM_DEVICES
public static final int CL_PROGRAM_DEVICES
public static final int CL_PROGRAM_SOURCE
public static final int CL_PROGRAM_BINARY_SIZES
public static final int CL_PROGRAM_BINARIES
public static final int CL_PROGRAM_BUILD_STATUS
public static final int CL_PROGRAM_BUILD_OPTIONS
public static final int CL_PROGRAM_BUILD_LOG
public static final int CL_BUILD_SUCCESS
public static final int CL_BUILD_NONE
public static final int CL_BUILD_ERROR
public static final int CL_BUILD_IN_PROGRESS
public static final int CL_KERNEL_FUNCTION_NAME
public static final int CL_KERNEL_NUM_ARGS
public static final int CL_KERNEL_REFERENCE_COUNT
public static final int CL_KERNEL_CONTEXT
public static final int CL_KERNEL_PROGRAM
public static final int CL_KERNEL_WORK_GROUP_SIZE
public static final int CL_KERNEL_COMPILE_WORK_GROUP_SIZE
public static final int CL_KERNEL_LOCAL_MEM_SIZE
public static final int CL_EVENT_COMMAND_QUEUE
public static final int CL_EVENT_COMMAND_TYPE
public static final int CL_EVENT_REFERENCE_COUNT
public static final int CL_EVENT_COMMAND_EXECUTION_STATUS
public static final int CL_COMMAND_NDRANGE_KERNEL
public static final int CL_COMMAND_TASK
public static final int CL_COMMAND_NATIVE_KERNEL
public static final int CL_COMMAND_READ_BUFFER
public static final int CL_COMMAND_WRITE_BUFFER
public static final int CL_COMMAND_COPY_BUFFER
public static final int CL_COMMAND_READ_IMAGE
public static final int CL_COMMAND_WRITE_IMAGE
public static final int CL_COMMAND_COPY_IMAGE
public static final int CL_COMMAND_COPY_IMAGE_TO_BUFFER
public static final int CL_COMMAND_COPY_BUFFER_TO_IMAGE
public static final int CL_COMMAND_MAP_BUFFER
public static final int CL_COMMAND_MAP_IMAGE
public static final int CL_COMMAND_UNMAP_MEM_OBJECT
public static final int CL_COMMAND_MARKER
public static final int CL_COMMAND_ACQUIRE_GL_OBJECTS
public static final int CL_COMMAND_RELEASE_GL_OBJECTS
public static final int CL_COMPLETE
public static final int CL_RUNNING
public static final int CL_SUBMITTED
public static final int CL_QUEUED
public static final int CL_PROFILING_COMMAND_QUEUED
public static final int CL_PROFILING_COMMAND_SUBMIT
public static final int CL_PROFILING_COMMAND_START
public static final int CL_PROFILING_COMMAND_END
public static int nclGetPlatformIDs(int num_entries,
long platforms,
long num_platforms)
GetPlatformIDsnum_entries - the number of cl_platform_id entries that can be added to platforms. If platforms is not NULL, the num_entries must
be greater than zero.public static int clGetPlatformIDs(@Nullable
org.lwjgl.PointerBuffer platforms,
@Nullable
java.nio.IntBuffer num_platforms)
platforms - returns a list of OpenCL platforms found. The cl_platform_id values returned in platforms can be used to identify a specific OpenCL
platform. If platforms argument is NULL, this argument is ignored. The number of OpenCL platforms returned is the minimum of the value
specified by num_entries or the number of OpenCL platforms available.num_platforms - returns the number of OpenCL platforms available. If num_platforms is NULL, this argument is ignored.SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_VALUE if num_entries is equal to zero and platforms is not NULL or if both num_platforms and
platforms are NULL.OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.public static int nclGetPlatformInfo(long platform,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
GetPlatformInfoparam_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 clGetPlatformInfo(long platform,
int param_name,
@Nullable
java.nio.ByteBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
platform - the platform to queryparam_name - the parameter to query. One of:PLATFORM_PROFILE | PLATFORM_VERSION | PLATFORM_NAME | PLATFORM_VENDOR |
PLATFORM_EXTENSIONS | PLATFORM_HOST_TIMER_RESOLUTION |
param_value - the memory location where appropriate values for a given param_name will be returnedparam_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_PLATFORM if platform is not a valid platform.INVALID_VALUE if param_name is not one of the supported values or if size in bytes specified by param_value_size is <
size of return type and param_value is not a NULL value.OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.public static int clGetPlatformInfo(long platform,
int param_name,
@Nullable
java.nio.LongBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
platform - the platform to queryparam_name - the parameter to query. One of:PLATFORM_PROFILE | PLATFORM_VERSION | PLATFORM_NAME | PLATFORM_VENDOR |
PLATFORM_EXTENSIONS | PLATFORM_HOST_TIMER_RESOLUTION |
param_value - the memory location where appropriate values for a given param_name will be returnedparam_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_PLATFORM if platform is not a valid platform.INVALID_VALUE if param_name is not one of the supported values or if size in bytes specified by param_value_size is <
size of return type and param_value is not a NULL value.OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.public static int nclGetDeviceIDs(long platform,
long device_type,
int num_entries,
long devices,
long num_devices)
GetDeviceIDsnum_entries - the number of cl_device_id entries that can be added to devices. If devices is not NULL, the num_entries must be greater
than zero.public static int clGetDeviceIDs(long platform,
long device_type,
@Nullable
org.lwjgl.PointerBuffer devices,
@Nullable
java.nio.IntBuffer num_devices)
platform - the platform to querydevice_type - a bitfield that identifies the type of OpenCL device. The device_type can be used to query specific OpenCL devices or all OpenCL devices
available. One or more of:DEVICE_TYPE_DEFAULT | DEVICE_TYPE_CPU | DEVICE_TYPE_GPU | DEVICE_TYPE_ACCELERATOR |
DEVICE_TYPE_ALL | DEVICE_TYPE_CUSTOM |
devices - returns a list of OpenCL devices found. The cl_device_id values returned in devices can be used to identify a specific OpenCL
device. If devices argument is NULL, this argument is ignored. The number of OpenCL devices returned is the minimum of the value specified
by num_entries or the number of OpenCL devices whose type matches device_type.num_devices - returns the number of OpenCL devices available that match device_type. If num_devices is NULL, this argument is ignored.SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_PLATFORM if platform is not a valid platform.INVALID_DEVICE_TYPE if device_type is not a valid value.INVALID_VALUE if num_entries is equal to zero and devices is not NULL or if both num_devices and devices are NULL.DEVICE_NOT_FOUND if no OpenCL devices that matched device_type were found.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 nclGetDeviceInfo(long device,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
GetDeviceInfoparam_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 clGetDeviceInfo(long device,
int param_name,
@Nullable
java.nio.ByteBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
device may be a device returned by GetDeviceIDs or a sub-device created by
CreateSubDevices. If device is a sub-device, the specific information for the sub-device will be returned.device - the device to queryparam_name - an enumeration constant tha identifies the device information being queried. One of:param_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_DEVICE if device is not valid.INVALID_VALUE if param_name is not one of the supported values or if size in bytes specified by param_value_size is <
size of return type and param_value is not a NULL value or if param_name is a value that is available as an extension and the
corresponding extension is 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 int clGetDeviceInfo(long device,
int param_name,
@Nullable
java.nio.IntBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
device may be a device returned by GetDeviceIDs or a sub-device created by
CreateSubDevices. If device is a sub-device, the specific information for the sub-device will be returned.device - the device to queryparam_name - an enumeration constant tha identifies the device information being queried. One of:param_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_DEVICE if device is not valid.INVALID_VALUE if param_name is not one of the supported values or if size in bytes specified by param_value_size is <
size of return type and param_value is not a NULL value or if param_name is a value that is available as an extension and the
corresponding extension is 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 int clGetDeviceInfo(long device,
int param_name,
@Nullable
java.nio.LongBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
device may be a device returned by GetDeviceIDs or a sub-device created by
CreateSubDevices. If device is a sub-device, the specific information for the sub-device will be returned.device - the device to queryparam_name - an enumeration constant tha identifies the device information being queried. One of:param_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_DEVICE if device is not valid.INVALID_VALUE if param_name is not one of the supported values or if size in bytes specified by param_value_size is <
size of return type and param_value is not a NULL value or if param_name is a value that is available as an extension and the
corresponding extension is 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 int clGetDeviceInfo(long device,
int param_name,
@Nullable
org.lwjgl.PointerBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
device may be a device returned by GetDeviceIDs or a sub-device created by
CreateSubDevices. If device is a sub-device, the specific information for the sub-device will be returned.device - the device to queryparam_name - an enumeration constant tha identifies the device information being queried. One of:param_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_DEVICE if device is not valid.INVALID_VALUE if param_name is not one of the supported values or if size in bytes specified by param_value_size is <
size of return type and param_value is not a NULL value or if param_name is a value that is available as an extension and the
corresponding extension is 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 nclCreateContext(long properties,
int num_devices,
long devices,
long pfn_notify,
long user_data,
long errcode_ret)
CreateContextnum_devices - the number of devices specified in the devices argumentpublic static long clCreateContext(@Nullable
org.lwjgl.PointerBuffer properties,
org.lwjgl.PointerBuffer devices,
@Nullable
CLContextCallbackI pfn_notify,
long user_data,
@Nullable
java.nio.IntBuffer errcode_ret)
properties - a list of context property names and their corresponding values. Each property name is immediately followed by the corresponding desired value. The
list is terminated with 0. One of:CONTEXT_PLATFORM | CONTEXT_INTEROP_USER_SYNC | GL_CONTEXT_KHR | EGL_DISPLAY_KHR | GLX_DISPLAY_KHR |
WGL_HDC_KHR | CGL_SHAREGROUP_KHR |
devices - a list of unique devices returned by GetDeviceIDs or sub-devices created by CreateSubDevices for a platformpfn_notify - a callback function that can be registered by the application. This callback function will be used by the OpenCL implementation to report
information on errors during context creation as well as errors that occur at runtime in this context. This callback function may be called
asynchronously by the OpenCL implementation. It is the application's responsibility to ensure that the callback function is thread-safe.
If pfn_notify is NULL, no callback function is registered.
user_data - will be passed as the user_data argument when pfn_notify is called. user_data can 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 context is created successfully. Otherwise, it returns a NULL value with the
following error values returned in errcode_ret:
INVALID_PLATFORM if properties is NULL and no platform could be selected or if platform value specified in properties is not a
valid platform.INVALID_PROPERTY if context property name in 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_VALUE if devices is NULL.INVALID_VALUE if num_devices is equal to zero.INVALID_VALUE if pfn_notify is NULL but user_data is not NULL.INVALID_DEVICE if devices contains an invalid device.DEVICE_NOT_AVAILABLE if a device in devices is currently not available even though the device was returned by GetDeviceIDs.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 clCreateContext(@Nullable
org.lwjgl.PointerBuffer properties,
long device,
@Nullable
CLContextCallbackI pfn_notify,
long user_data,
@Nullable
java.nio.IntBuffer errcode_ret)
properties - a list of context property names and their corresponding values. Each property name is immediately followed by the corresponding desired value. The
list is terminated with 0. One of:CONTEXT_PLATFORM | CONTEXT_INTEROP_USER_SYNC | GL_CONTEXT_KHR | EGL_DISPLAY_KHR | GLX_DISPLAY_KHR |
WGL_HDC_KHR | CGL_SHAREGROUP_KHR |
pfn_notify - a callback function that can be registered by the application. This callback function will be used by the OpenCL implementation to report
information on errors during context creation as well as errors that occur at runtime in this context. This callback function may be called
asynchronously by the OpenCL implementation. It is the application's responsibility to ensure that the callback function is thread-safe.
If pfn_notify is NULL, no callback function is registered.
user_data - will be passed as the user_data argument when pfn_notify is called. user_data can 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 context is created successfully. Otherwise, it returns a NULL value with the
following error values returned in errcode_ret:
INVALID_PLATFORM if properties is NULL and no platform could be selected or if platform value specified in properties is not a
valid platform.INVALID_PROPERTY if context property name in 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_VALUE if devices is NULL.INVALID_VALUE if num_devices is equal to zero.INVALID_VALUE if pfn_notify is NULL but user_data is not NULL.INVALID_DEVICE if devices contains an invalid device.DEVICE_NOT_AVAILABLE if a device in devices is currently not available even though the device was returned by GetDeviceIDs.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 nclCreateContextFromType(long properties,
long device_type,
long pfn_notify,
long user_data,
long errcode_ret)
CreateContextFromTypepublic static long clCreateContextFromType(@Nullable
org.lwjgl.PointerBuffer properties,
long device_type,
@Nullable
CLContextCallbackI pfn_notify,
long user_data,
@Nullable
java.nio.IntBuffer errcode_ret)
CreateContext for details.properties - a list of context property names and their corresponding values. Each property name is immediately followed by the corresponding desired value. The
list is terminated with 0.device_type - a bit-field that identifies the type of device. One of:DEVICE_TYPE_DEFAULT | DEVICE_TYPE_CPU | DEVICE_TYPE_GPU | DEVICE_TYPE_ACCELERATOR |
DEVICE_TYPE_ALL | DEVICE_TYPE_CUSTOM |
pfn_notify - a callback function that can be registered by the applicationuser_data - will be passed as the user_data argument when pfn_notify is called. user_data can be NULL.errcode_ret - will return an appropriate error code. If errcode_ret is NULL, no error code is returned.public static int clRetainContext(long context)
CreateContext and CreateContextFromType perform an implicit retain. This is very helpful for 3rd party libraries, which typically get a context passed
to them by the application. However, it is possible that the application may delete the context without informing the library. Allowing functions to
attach to (i.e. retain) and release a context solves the problem of a context being used by a library no longer being valid.
context - the context to retainSUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_CONTEXT if context is not a valid 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 int clReleaseContext(long context)
After the context reference count becomes zero and all the objects attached to context (such as memory objects, command-queues) are released, the context is deleted.
context - the context to releaseSUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_CONTEXT if context is not a valid 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 int nclGetContextInfo(long context,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
GetContextInfoparam_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 clGetContextInfo(long context,
int param_name,
@Nullable
java.nio.ByteBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
context - the OpenCL context being queriedparam_name - an enumeration constant that specifies the information to query. One of:CONTEXT_REFERENCE_COUNT | CONTEXT_DEVICES | CONTEXT_PROPERTIES | CONTEXT_NUM_DEVICES |
param_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_CONTEXT if context is not a valid context.INVALID_VALUE if param_name is not one of the supported values or if size in bytes specified by param_value_size is <
size of return type and param_value is not a NULL 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 clGetContextInfo(long context,
int param_name,
@Nullable
java.nio.IntBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
context - the OpenCL context being queriedparam_name - an enumeration constant that specifies the information to query. One of:CONTEXT_REFERENCE_COUNT | CONTEXT_DEVICES | CONTEXT_PROPERTIES | CONTEXT_NUM_DEVICES |
param_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_CONTEXT if context is not a valid context.INVALID_VALUE if param_name is not one of the supported values or if size in bytes specified by param_value_size is <
size of return type and param_value is not a NULL 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 clGetContextInfo(long context,
int param_name,
@Nullable
org.lwjgl.PointerBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
context - the OpenCL context being queriedparam_name - an enumeration constant that specifies the information to query. One of:CONTEXT_REFERENCE_COUNT | CONTEXT_DEVICES | CONTEXT_PROPERTIES | CONTEXT_NUM_DEVICES |
param_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_CONTEXT if context is not a valid context.INVALID_VALUE if param_name is not one of the supported values or if size in bytes specified by param_value_size is <
size of return type and param_value is not a NULL 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 long nclCreateCommandQueue(long context,
long device,
long properties,
long errcode_ret)
CreateCommandQueuepublic static long clCreateCommandQueue(long context,
long device,
long 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 bit-field of properties for the command-queue. One of:QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | QUEUE_PROFILING_ENABLE | QUEUE_ON_DEVICE |
QUEUE_ON_DEVICE_DEFAULT |
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 int clRetainCommandQueue(long command_queue)
command_queue reference count.
CreateCommandQueue performs an implicit retain. This is very helpful for 3rd party libraries, which typically get a command-queue passed to them by the
application. However, it is possible that the application may delete the command-queue without informing the library. Allowing functions to attach to
(i.e. retain) and release a command-queue solves the problem of a command-queue being used by a library no longer being valid.
command_queue - the command-queue to retainSUCCESS 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.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 clReleaseCommandQueue(long command_queue)
command_queue reference count.
After the command_queue reference count becomes zero and all commands queued to command_queue have finished (eg. kernel executions,
memory object updates etc.), the command-queue is deleted.
clReleaseCommandQueue performs an implicit flush to issue any previously queued OpenCL commands in command_queue.
command_queue - the command-queue to releaseSUCCESS 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.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 nclGetCommandQueueInfo(long command_queue,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
GetCommandQueueInfoparam_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 clGetCommandQueueInfo(long command_queue,
int param_name,
@Nullable
java.nio.ByteBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
command_queue - the command-queue being queriedparam_name - the information to query. One of:QUEUE_CONTEXT | QUEUE_DEVICE | QUEUE_REFERENCE_COUNT | QUEUE_PROPERTIES | QUEUE_SIZE |
QUEUE_DEVICE_DEFAULT |
param_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_COMMAND_QUEUE if command_queue is not a valid command-queue.INVALID_VALUE if param_name is not one of the supported values or if size in bytes specified by param_value_size is <
size of return type and param_value is not a NULL 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 clGetCommandQueueInfo(long command_queue,
int param_name,
@Nullable
java.nio.IntBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
command_queue - the command-queue being queriedparam_name - the information to query. One of:QUEUE_CONTEXT | QUEUE_DEVICE | QUEUE_REFERENCE_COUNT | QUEUE_PROPERTIES | QUEUE_SIZE |
QUEUE_DEVICE_DEFAULT |
param_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_COMMAND_QUEUE if command_queue is not a valid command-queue.INVALID_VALUE if param_name is not one of the supported values or if size in bytes specified by param_value_size is <
size of return type and param_value is not a NULL 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 clGetCommandQueueInfo(long command_queue,
int param_name,
@Nullable
java.nio.LongBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
command_queue - the command-queue being queriedparam_name - the information to query. One of:QUEUE_CONTEXT | QUEUE_DEVICE | QUEUE_REFERENCE_COUNT | QUEUE_PROPERTIES | QUEUE_SIZE |
QUEUE_DEVICE_DEFAULT |
param_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_COMMAND_QUEUE if command_queue is not a valid command-queue.INVALID_VALUE if param_name is not one of the supported values or if size in bytes specified by param_value_size is <
size of return type and param_value is not a NULL 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 clGetCommandQueueInfo(long command_queue,
int param_name,
@Nullable
org.lwjgl.PointerBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
command_queue - the command-queue being queriedparam_name - the information to query. One of:QUEUE_CONTEXT | QUEUE_DEVICE | QUEUE_REFERENCE_COUNT | QUEUE_PROPERTIES | QUEUE_SIZE |
QUEUE_DEVICE_DEFAULT |
param_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_COMMAND_QUEUE if command_queue is not a valid command-queue.INVALID_VALUE if param_name is not one of the supported values or if size in bytes specified by param_value_size is <
size of return type and param_value is not a NULL 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 long nclCreateBuffer(long context,
long flags,
long size,
long host_ptr,
long errcode_ret)
CreateBuffersize - the size in bytes of the buffer memory object to be allocatedpublic static long clCreateBuffer(long context,
long flags,
long size,
@Nullable
java.nio.IntBuffer errcode_ret)
context - a valid OpenCL context used to create the buffer objectflags - a bit-field that is used to specify allocation and usage information such as the memory area that should be used to allocate the buffer object and
how it will be used. If value specified for flags is 0, the default is used which is MEM_READ_WRITE. One of:MEM_READ_WRITE | MEM_WRITE_ONLY | MEM_READ_ONLY | MEM_USE_HOST_PTR | MEM_ALLOC_HOST_PTR |
MEM_COPY_HOST_PTR | MEM_HOST_WRITE_ONLY | MEM_HOST_READ_ONLY | MEM_HOST_NO_ACCESS |
size - the size in bytes of the buffer memory object to be allocatederrcode_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 buffer 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 not valid.INVALID_BUFFER_SIZE if size is 0. Implementations may return INVALID_BUFFER_SIZE if size is greater than
DEVICE_MAX_MEM_ALLOC_SIZE value all devices in context.INVALID_HOST_PTR if host_ptr is NULL and MEM_USE_HOST_PTR or MEM_COPY_HOST_PTR are set in flags or if
host_ptr is not NULL but MEM_COPY_HOST_PTR or MEM_USE_HOST_PTR are not set in flags.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for buffer 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 clCreateBuffer(long context,
long flags,
java.nio.ByteBuffer host_ptr,
@Nullable
java.nio.IntBuffer errcode_ret)
context - a valid OpenCL context used to create the buffer objectflags - a bit-field that is used to specify allocation and usage information such as the memory area that should be used to allocate the buffer object and
how it will be used. If value specified for flags is 0, the default is used which is MEM_READ_WRITE. One of:MEM_READ_WRITE | MEM_WRITE_ONLY | MEM_READ_ONLY | MEM_USE_HOST_PTR | MEM_ALLOC_HOST_PTR |
MEM_COPY_HOST_PTR | MEM_HOST_WRITE_ONLY | MEM_HOST_READ_ONLY | MEM_HOST_NO_ACCESS |
host_ptr - a pointer to the buffer data that may already be allocated by the application. The size of the buffer that host_ptr points to must be
≥ size bytes.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 buffer 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 not valid.INVALID_BUFFER_SIZE if size is 0. Implementations may return INVALID_BUFFER_SIZE if size is greater than
DEVICE_MAX_MEM_ALLOC_SIZE value all devices in context.INVALID_HOST_PTR if host_ptr is NULL and MEM_USE_HOST_PTR or MEM_COPY_HOST_PTR are set in flags or if
host_ptr is not NULL but MEM_COPY_HOST_PTR or MEM_USE_HOST_PTR are not set in flags.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for buffer 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 clCreateBuffer(long context,
long flags,
java.nio.ShortBuffer host_ptr,
@Nullable
java.nio.IntBuffer errcode_ret)
context - a valid OpenCL context used to create the buffer objectflags - a bit-field that is used to specify allocation and usage information such as the memory area that should be used to allocate the buffer object and
how it will be used. If value specified for flags is 0, the default is used which is MEM_READ_WRITE. One of:MEM_READ_WRITE | MEM_WRITE_ONLY | MEM_READ_ONLY | MEM_USE_HOST_PTR | MEM_ALLOC_HOST_PTR |
MEM_COPY_HOST_PTR | MEM_HOST_WRITE_ONLY | MEM_HOST_READ_ONLY | MEM_HOST_NO_ACCESS |
host_ptr - a pointer to the buffer data that may already be allocated by the application. The size of the buffer that host_ptr points to must be
≥ size bytes.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 buffer 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 not valid.INVALID_BUFFER_SIZE if size is 0. Implementations may return INVALID_BUFFER_SIZE if size is greater than
DEVICE_MAX_MEM_ALLOC_SIZE value all devices in context.INVALID_HOST_PTR if host_ptr is NULL and MEM_USE_HOST_PTR or MEM_COPY_HOST_PTR are set in flags or if
host_ptr is not NULL but MEM_COPY_HOST_PTR or MEM_USE_HOST_PTR are not set in flags.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for buffer 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 clCreateBuffer(long context,
long flags,
java.nio.IntBuffer host_ptr,
@Nullable
java.nio.IntBuffer errcode_ret)
context - a valid OpenCL context used to create the buffer objectflags - a bit-field that is used to specify allocation and usage information such as the memory area that should be used to allocate the buffer object and
how it will be used. If value specified for flags is 0, the default is used which is MEM_READ_WRITE. One of:MEM_READ_WRITE | MEM_WRITE_ONLY | MEM_READ_ONLY | MEM_USE_HOST_PTR | MEM_ALLOC_HOST_PTR |
MEM_COPY_HOST_PTR | MEM_HOST_WRITE_ONLY | MEM_HOST_READ_ONLY | MEM_HOST_NO_ACCESS |
host_ptr - a pointer to the buffer data that may already be allocated by the application. The size of the buffer that host_ptr points to must be
≥ size bytes.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 buffer 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 not valid.INVALID_BUFFER_SIZE if size is 0. Implementations may return INVALID_BUFFER_SIZE if size is greater than
DEVICE_MAX_MEM_ALLOC_SIZE value all devices in context.INVALID_HOST_PTR if host_ptr is NULL and MEM_USE_HOST_PTR or MEM_COPY_HOST_PTR are set in flags or if
host_ptr is not NULL but MEM_COPY_HOST_PTR or MEM_USE_HOST_PTR are not set in flags.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for buffer 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 clCreateBuffer(long context,
long flags,
java.nio.FloatBuffer host_ptr,
@Nullable
java.nio.IntBuffer errcode_ret)
context - a valid OpenCL context used to create the buffer objectflags - a bit-field that is used to specify allocation and usage information such as the memory area that should be used to allocate the buffer object and
how it will be used. If value specified for flags is 0, the default is used which is MEM_READ_WRITE. One of:MEM_READ_WRITE | MEM_WRITE_ONLY | MEM_READ_ONLY | MEM_USE_HOST_PTR | MEM_ALLOC_HOST_PTR |
MEM_COPY_HOST_PTR | MEM_HOST_WRITE_ONLY | MEM_HOST_READ_ONLY | MEM_HOST_NO_ACCESS |
host_ptr - a pointer to the buffer data that may already be allocated by the application. The size of the buffer that host_ptr points to must be
≥ size bytes.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 buffer 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 not valid.INVALID_BUFFER_SIZE if size is 0. Implementations may return INVALID_BUFFER_SIZE if size is greater than
DEVICE_MAX_MEM_ALLOC_SIZE value all devices in context.INVALID_HOST_PTR if host_ptr is NULL and MEM_USE_HOST_PTR or MEM_COPY_HOST_PTR are set in flags or if
host_ptr is not NULL but MEM_COPY_HOST_PTR or MEM_USE_HOST_PTR are not set in flags.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for buffer 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 clCreateBuffer(long context,
long flags,
java.nio.DoubleBuffer host_ptr,
@Nullable
java.nio.IntBuffer errcode_ret)
context - a valid OpenCL context used to create the buffer objectflags - a bit-field that is used to specify allocation and usage information such as the memory area that should be used to allocate the buffer object and
how it will be used. If value specified for flags is 0, the default is used which is MEM_READ_WRITE. One of:MEM_READ_WRITE | MEM_WRITE_ONLY | MEM_READ_ONLY | MEM_USE_HOST_PTR | MEM_ALLOC_HOST_PTR |
MEM_COPY_HOST_PTR | MEM_HOST_WRITE_ONLY | MEM_HOST_READ_ONLY | MEM_HOST_NO_ACCESS |
host_ptr - a pointer to the buffer data that may already be allocated by the application. The size of the buffer that host_ptr points to must be
≥ size bytes.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 buffer 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 not valid.INVALID_BUFFER_SIZE if size is 0. Implementations may return INVALID_BUFFER_SIZE if size is greater than
DEVICE_MAX_MEM_ALLOC_SIZE value all devices in context.INVALID_HOST_PTR if host_ptr is NULL and MEM_USE_HOST_PTR or MEM_COPY_HOST_PTR are set in flags or if
host_ptr is not NULL but MEM_COPY_HOST_PTR or MEM_USE_HOST_PTR are not set in flags.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for buffer 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 nclEnqueueReadBuffer(long command_queue,
long buffer,
int blocking_read,
long offset,
long size,
long ptr,
int num_events_in_wait_list,
long event_wait_list,
long event)
EnqueueReadBuffersize - the size in bytes of data being readnum_events_in_wait_list - the number of events in event_wait_listpublic static int clEnqueueReadBuffer(long command_queue,
long buffer,
boolean blocking_read,
long offset,
java.nio.ByteBuffer ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
Calling clEnqueueReadBuffer to read a region of the buffer object with the ptr argument value set to host_ptr + offset, where
host_ptr is a pointer to the memory region specified when the buffer object being read is created with MEM_USE_HOST_PTR, must meet
the following requirements in order to avoid undefined behavior:
command_queue - the command-queue in which the read command will be queued. command_queue and buffer must be created with the same OpenCL context.buffer - a valid buffer objectblocking_read - indicates if the read operation is blocking or non-blocking
If blocking_read is TRUE i.e. the read command is blocking, clEnqueueReadBuffer does not return until the buffer data has been
read and copied into memory pointed to by ptr.
If blocking_read is FALSE i.e. the read command is non-blocking, clEnqueueReadBuffer queues a non-blocking read command and
returns. The contents of the buffer that ptr points to cannot be used until the read 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 read command has completed, the contents of
the buffer that ptr points to can be used by the application.
offset - the offset in bytes in the buffer object to read fromptr - the pointer to buffer in host memory where data is to be read intoevent_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 buffer are not the same or if the context associated
with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if buffer is not a valid buffer object.INVALID_VALUE if the region being read specified by (offset, size) is out of bounds or if ptr is a NULL value or if
size is 0.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.MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is
not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read operation is blocking and the execution status of any of the events in
event_wait_list is a negative integer value.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.INVALID_OPERATION if clEnqueueReadBuffer is called on buffer which has been created with MEM_HOST_WRITE_ONLY or
MEM_HOST_NO_ACCESS.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 clEnqueueReadBuffer(long command_queue,
long buffer,
boolean blocking_read,
long offset,
java.nio.ShortBuffer ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
Calling clEnqueueReadBuffer to read a region of the buffer object with the ptr argument value set to host_ptr + offset, where
host_ptr is a pointer to the memory region specified when the buffer object being read is created with MEM_USE_HOST_PTR, must meet
the following requirements in order to avoid undefined behavior:
command_queue - the command-queue in which the read command will be queued. command_queue and buffer must be created with the same OpenCL context.buffer - a valid buffer objectblocking_read - indicates if the read operation is blocking or non-blocking
If blocking_read is TRUE i.e. the read command is blocking, clEnqueueReadBuffer does not return until the buffer data has been
read and copied into memory pointed to by ptr.
If blocking_read is FALSE i.e. the read command is non-blocking, clEnqueueReadBuffer queues a non-blocking read command and
returns. The contents of the buffer that ptr points to cannot be used until the read 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 read command has completed, the contents of
the buffer that ptr points to can be used by the application.
offset - the offset in bytes in the buffer object to read fromptr - the pointer to buffer in host memory where data is to be read intoevent_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 buffer are not the same or if the context associated
with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if buffer is not a valid buffer object.INVALID_VALUE if the region being read specified by (offset, size) is out of bounds or if ptr is a NULL value or if
size is 0.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.MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is
not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read operation is blocking and the execution status of any of the events in
event_wait_list is a negative integer value.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.INVALID_OPERATION if clEnqueueReadBuffer is called on buffer which has been created with MEM_HOST_WRITE_ONLY or
MEM_HOST_NO_ACCESS.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 clEnqueueReadBuffer(long command_queue,
long buffer,
boolean blocking_read,
long offset,
java.nio.IntBuffer ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
Calling clEnqueueReadBuffer to read a region of the buffer object with the ptr argument value set to host_ptr + offset, where
host_ptr is a pointer to the memory region specified when the buffer object being read is created with MEM_USE_HOST_PTR, must meet
the following requirements in order to avoid undefined behavior:
command_queue - the command-queue in which the read command will be queued. command_queue and buffer must be created with the same OpenCL context.buffer - a valid buffer objectblocking_read - indicates if the read operation is blocking or non-blocking
If blocking_read is TRUE i.e. the read command is blocking, clEnqueueReadBuffer does not return until the buffer data has been
read and copied into memory pointed to by ptr.
If blocking_read is FALSE i.e. the read command is non-blocking, clEnqueueReadBuffer queues a non-blocking read command and
returns. The contents of the buffer that ptr points to cannot be used until the read 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 read command has completed, the contents of
the buffer that ptr points to can be used by the application.
offset - the offset in bytes in the buffer object to read fromptr - the pointer to buffer in host memory where data is to be read intoevent_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 buffer are not the same or if the context associated
with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if buffer is not a valid buffer object.INVALID_VALUE if the region being read specified by (offset, size) is out of bounds or if ptr is a NULL value or if
size is 0.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.MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is
not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read operation is blocking and the execution status of any of the events in
event_wait_list is a negative integer value.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.INVALID_OPERATION if clEnqueueReadBuffer is called on buffer which has been created with MEM_HOST_WRITE_ONLY or
MEM_HOST_NO_ACCESS.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 clEnqueueReadBuffer(long command_queue,
long buffer,
boolean blocking_read,
long offset,
java.nio.FloatBuffer ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
Calling clEnqueueReadBuffer to read a region of the buffer object with the ptr argument value set to host_ptr + offset, where
host_ptr is a pointer to the memory region specified when the buffer object being read is created with MEM_USE_HOST_PTR, must meet
the following requirements in order to avoid undefined behavior:
command_queue - the command-queue in which the read command will be queued. command_queue and buffer must be created with the same OpenCL context.buffer - a valid buffer objectblocking_read - indicates if the read operation is blocking or non-blocking
If blocking_read is TRUE i.e. the read command is blocking, clEnqueueReadBuffer does not return until the buffer data has been
read and copied into memory pointed to by ptr.
If blocking_read is FALSE i.e. the read command is non-blocking, clEnqueueReadBuffer queues a non-blocking read command and
returns. The contents of the buffer that ptr points to cannot be used until the read 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 read command has completed, the contents of
the buffer that ptr points to can be used by the application.
offset - the offset in bytes in the buffer object to read fromptr - the pointer to buffer in host memory where data is to be read intoevent_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 buffer are not the same or if the context associated
with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if buffer is not a valid buffer object.INVALID_VALUE if the region being read specified by (offset, size) is out of bounds or if ptr is a NULL value or if
size is 0.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.MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is
not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read operation is blocking and the execution status of any of the events in
event_wait_list is a negative integer value.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.INVALID_OPERATION if clEnqueueReadBuffer is called on buffer which has been created with MEM_HOST_WRITE_ONLY or
MEM_HOST_NO_ACCESS.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 clEnqueueReadBuffer(long command_queue,
long buffer,
boolean blocking_read,
long offset,
java.nio.DoubleBuffer ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
Calling clEnqueueReadBuffer to read a region of the buffer object with the ptr argument value set to host_ptr + offset, where
host_ptr is a pointer to the memory region specified when the buffer object being read is created with MEM_USE_HOST_PTR, must meet
the following requirements in order to avoid undefined behavior:
command_queue - the command-queue in which the read command will be queued. command_queue and buffer must be created with the same OpenCL context.buffer - a valid buffer objectblocking_read - indicates if the read operation is blocking or non-blocking
If blocking_read is TRUE i.e. the read command is blocking, clEnqueueReadBuffer does not return until the buffer data has been
read and copied into memory pointed to by ptr.
If blocking_read is FALSE i.e. the read command is non-blocking, clEnqueueReadBuffer queues a non-blocking read command and
returns. The contents of the buffer that ptr points to cannot be used until the read 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 read command has completed, the contents of
the buffer that ptr points to can be used by the application.
offset - the offset in bytes in the buffer object to read fromptr - the pointer to buffer in host memory where data is to be read intoevent_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 buffer are not the same or if the context associated
with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if buffer is not a valid buffer object.INVALID_VALUE if the region being read specified by (offset, size) is out of bounds or if ptr is a NULL value or if
size is 0.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.MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is
not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read operation is blocking and the execution status of any of the events in
event_wait_list is a negative integer value.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.INVALID_OPERATION if clEnqueueReadBuffer is called on buffer which has been created with MEM_HOST_WRITE_ONLY or
MEM_HOST_NO_ACCESS.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 nclEnqueueWriteBuffer(long command_queue,
long buffer,
int blocking_write,
long offset,
long size,
long ptr,
int num_events_in_wait_list,
long event_wait_list,
long event)
EnqueueWriteBuffersize - the size in bytes of data being writtennum_events_in_wait_list - the number of events in event_wait_listpublic static int clEnqueueWriteBuffer(long command_queue,
long buffer,
boolean blocking_write,
long offset,
java.nio.ByteBuffer ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
Calling clEnqueueWriteBuffer to update the latest bits in a region of the buffer object with the ptr argument value set to
host_ptr + offset, where host_ptr is a pointer to the memory region specified when the buffer object being written is created with
MEM_USE_HOST_PTR, must meet the following requirements in order to avoid undefined behavior:
(host_ptr + offset, cb) contains the latest bits when the enqueued write command begins execution.command_queue - the command-queue in which the write command will be queued. command_queue and buffer must be created with the same OpenCL context.buffer - a valid buffer objectblocking_write - indicates if the write operation is blocking or non-blocking
If blocking_write is TRUE, the OpenCL implementation copies the data referred to by ptr and enqueues the write operation in the
command-queue. The memory pointed to by ptr can be reused by the application after the clEnqueueWriteBuffer call returns.
If blocking_write is FALSE, the OpenCL implementation will use ptr to perform a nonblocking write. As the write is non-blocking
the implementation can return immediately. The memory pointed to by ptr cannot be reused by the application after the call returns. The
event argument returns an event object which can be used to query the execution status of the write command. When the write command has
completed, the memory pointed to by ptr can then be reused by the application.
offset - the offset in bytes in the buffer object to write toptr - the pointer to buffer in host memory where data is to be written 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 buffer are not the same or if the context associated
with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if buffer is not a valid buffer object.INVALID_VALUE if the region being written specified by (offset, size) is out of bounds or if ptr is a NULL value or if
size is 0.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.MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is
not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the write operation is blocking and the execution status of any of the events in
event_wait_list is a negative integer value.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.INVALID_OPERATION if clEnqueueWriteBuffer is called on buffer which has been created with MEM_HOST_READ_ONLY or
MEM_HOST_NO_ACCESS.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 clEnqueueWriteBuffer(long command_queue,
long buffer,
boolean blocking_write,
long offset,
java.nio.ShortBuffer ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
Calling clEnqueueWriteBuffer to update the latest bits in a region of the buffer object with the ptr argument value set to
host_ptr + offset, where host_ptr is a pointer to the memory region specified when the buffer object being written is created with
MEM_USE_HOST_PTR, must meet the following requirements in order to avoid undefined behavior:
(host_ptr + offset, cb) contains the latest bits when the enqueued write command begins execution.command_queue - the command-queue in which the write command will be queued. command_queue and buffer must be created with the same OpenCL context.buffer - a valid buffer objectblocking_write - indicates if the write operation is blocking or non-blocking
If blocking_write is TRUE, the OpenCL implementation copies the data referred to by ptr and enqueues the write operation in the
command-queue. The memory pointed to by ptr can be reused by the application after the clEnqueueWriteBuffer call returns.
If blocking_write is FALSE, the OpenCL implementation will use ptr to perform a nonblocking write. As the write is non-blocking
the implementation can return immediately. The memory pointed to by ptr cannot be reused by the application after the call returns. The
event argument returns an event object which can be used to query the execution status of the write command. When the write command has
completed, the memory pointed to by ptr can then be reused by the application.
offset - the offset in bytes in the buffer object to write toptr - the pointer to buffer in host memory where data is to be written 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 buffer are not the same or if the context associated
with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if buffer is not a valid buffer object.INVALID_VALUE if the region being written specified by (offset, size) is out of bounds or if ptr is a NULL value or if
size is 0.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.MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is
not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the write operation is blocking and the execution status of any of the events in
event_wait_list is a negative integer value.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.INVALID_OPERATION if clEnqueueWriteBuffer is called on buffer which has been created with MEM_HOST_READ_ONLY or
MEM_HOST_NO_ACCESS.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 clEnqueueWriteBuffer(long command_queue,
long buffer,
boolean blocking_write,
long offset,
java.nio.IntBuffer ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
Calling clEnqueueWriteBuffer to update the latest bits in a region of the buffer object with the ptr argument value set to
host_ptr + offset, where host_ptr is a pointer to the memory region specified when the buffer object being written is created with
MEM_USE_HOST_PTR, must meet the following requirements in order to avoid undefined behavior:
(host_ptr + offset, cb) contains the latest bits when the enqueued write command begins execution.command_queue - the command-queue in which the write command will be queued. command_queue and buffer must be created with the same OpenCL context.buffer - a valid buffer objectblocking_write - indicates if the write operation is blocking or non-blocking
If blocking_write is TRUE, the OpenCL implementation copies the data referred to by ptr and enqueues the write operation in the
command-queue. The memory pointed to by ptr can be reused by the application after the clEnqueueWriteBuffer call returns.
If blocking_write is FALSE, the OpenCL implementation will use ptr to perform a nonblocking write. As the write is non-blocking
the implementation can return immediately. The memory pointed to by ptr cannot be reused by the application after the call returns. The
event argument returns an event object which can be used to query the execution status of the write command. When the write command has
completed, the memory pointed to by ptr can then be reused by the application.
offset - the offset in bytes in the buffer object to write toptr - the pointer to buffer in host memory where data is to be written 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 buffer are not the same or if the context associated
with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if buffer is not a valid buffer object.INVALID_VALUE if the region being written specified by (offset, size) is out of bounds or if ptr is a NULL value or if
size is 0.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.MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is
not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the write operation is blocking and the execution status of any of the events in
event_wait_list is a negative integer value.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.INVALID_OPERATION if clEnqueueWriteBuffer is called on buffer which has been created with MEM_HOST_READ_ONLY or
MEM_HOST_NO_ACCESS.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 clEnqueueWriteBuffer(long command_queue,
long buffer,
boolean blocking_write,
long offset,
java.nio.FloatBuffer ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
Calling clEnqueueWriteBuffer to update the latest bits in a region of the buffer object with the ptr argument value set to
host_ptr + offset, where host_ptr is a pointer to the memory region specified when the buffer object being written is created with
MEM_USE_HOST_PTR, must meet the following requirements in order to avoid undefined behavior:
(host_ptr + offset, cb) contains the latest bits when the enqueued write command begins execution.command_queue - the command-queue in which the write command will be queued. command_queue and buffer must be created with the same OpenCL context.buffer - a valid buffer objectblocking_write - indicates if the write operation is blocking or non-blocking
If blocking_write is TRUE, the OpenCL implementation copies the data referred to by ptr and enqueues the write operation in the
command-queue. The memory pointed to by ptr can be reused by the application after the clEnqueueWriteBuffer call returns.
If blocking_write is FALSE, the OpenCL implementation will use ptr to perform a nonblocking write. As the write is non-blocking
the implementation can return immediately. The memory pointed to by ptr cannot be reused by the application after the call returns. The
event argument returns an event object which can be used to query the execution status of the write command. When the write command has
completed, the memory pointed to by ptr can then be reused by the application.
offset - the offset in bytes in the buffer object to write toptr - the pointer to buffer in host memory where data is to be written 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 buffer are not the same or if the context associated
with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if buffer is not a valid buffer object.INVALID_VALUE if the region being written specified by (offset, size) is out of bounds or if ptr is a NULL value or if
size is 0.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.MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is
not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the write operation is blocking and the execution status of any of the events in
event_wait_list is a negative integer value.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.INVALID_OPERATION if clEnqueueWriteBuffer is called on buffer which has been created with MEM_HOST_READ_ONLY or
MEM_HOST_NO_ACCESS.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 clEnqueueWriteBuffer(long command_queue,
long buffer,
boolean blocking_write,
long offset,
java.nio.DoubleBuffer ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
Calling clEnqueueWriteBuffer to update the latest bits in a region of the buffer object with the ptr argument value set to
host_ptr + offset, where host_ptr is a pointer to the memory region specified when the buffer object being written is created with
MEM_USE_HOST_PTR, must meet the following requirements in order to avoid undefined behavior:
(host_ptr + offset, cb) contains the latest bits when the enqueued write command begins execution.command_queue - the command-queue in which the write command will be queued. command_queue and buffer must be created with the same OpenCL context.buffer - a valid buffer objectblocking_write - indicates if the write operation is blocking or non-blocking
If blocking_write is TRUE, the OpenCL implementation copies the data referred to by ptr and enqueues the write operation in the
command-queue. The memory pointed to by ptr can be reused by the application after the clEnqueueWriteBuffer call returns.
If blocking_write is FALSE, the OpenCL implementation will use ptr to perform a nonblocking write. As the write is non-blocking
the implementation can return immediately. The memory pointed to by ptr cannot be reused by the application after the call returns. The
event argument returns an event object which can be used to query the execution status of the write command. When the write command has
completed, the memory pointed to by ptr can then be reused by the application.
offset - the offset in bytes in the buffer object to write toptr - the pointer to buffer in host memory where data is to be written 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 buffer are not the same or if the context associated
with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if buffer is not a valid buffer object.INVALID_VALUE if the region being written specified by (offset, size) is out of bounds or if ptr is a NULL value or if
size is 0.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.MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is
not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the write operation is blocking and the execution status of any of the events in
event_wait_list is a negative integer value.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.INVALID_OPERATION if clEnqueueWriteBuffer is called on buffer which has been created with MEM_HOST_READ_ONLY or
MEM_HOST_NO_ACCESS.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 nclEnqueueCopyBuffer(long command_queue,
long src_buffer,
long dst_buffer,
long src_offset,
long dst_offset,
long size,
int num_events_in_wait_list,
long event_wait_list,
long event)
EnqueueCopyBuffernum_events_in_wait_list - the number of events in event_wait_listpublic static int clEnqueueCopyBuffer(long command_queue,
long src_buffer,
long dst_buffer,
long src_offset,
long dst_offset,
long size,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
src_buffer to another buffer object identified by dst_buffer.command_queue - the command-queue in which the copy command will be queued. The OpenCL context associated with command_queue, src_buffer and
dst_buffer must be the same.src_buffer - the source bufferdst_buffer - the destination buffersrc_offset - the offset where to begin copying data from src_buffer.dst_offset - the offset where to begin copying data into dst_buffersize - the size in bytes to copyevent_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, src_buffer and dst_buffer are not the same or if
the context associated with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if src_buffer and dst_buffer are not valid buffer objects.INVALID_VALUE if src_offset, dst_offset, size, src_offset + size or dst_offset + size require
accessing elements outside the src_buffer and dst_buffer buffer objects respectively.INVALID_VALUE if size is 0.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.MISALIGNED_SUB_BUFFER_OFFSET if src_buffer is a sub-buffer object and offset specified when the sub-buffer object is created is
not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.MISALIGNED_SUB_BUFFER_OFFSET if dst_buffer is a sub-buffer object and offset specified when the sub-buffer object is created is
not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.MEM_COPY_OVERLAP if src_buffer and dst_buffer are the same buffer or sub-buffer object and the source and destination
regions overlap or if src_buffer and dst_buffer are different sub-buffers of the same associated buffer object and they overlap. The
regions overlap if src_offset ≤ dst_offset ≤ src_offset + size – 1 or if
dst_offset ≤ src_offset ≤ dst_offset + size – 1.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with src_buffer or dst_buffer.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 nclEnqueueMapBuffer(long command_queue,
long buffer,
int blocking_map,
long map_flags,
long offset,
long size,
int num_events_in_wait_list,
long event_wait_list,
long event,
long errcode_ret)
EnqueueMapBuffernum_events_in_wait_list - the number of events in event_wait_list@Nullable
public static java.nio.ByteBuffer clEnqueueMapBuffer(long command_queue,
long buffer,
boolean blocking_map,
long map_flags,
long offset,
long size,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event,
@Nullable
java.nio.IntBuffer errcode_ret,
@Nullable
java.nio.ByteBuffer old_buffer)
The pointer returned maps a region starting at offset and is at least size bytes in size. The result of a memory access outside this
region is undefined.
If the buffer object is created with MEM_USE_HOST_PTR set in mem_flags, the following will be true:
host_ptr specified in CreateBuffer is guaranteed to contain the latest bits in the region being mapped when the
clEnqueueMapBuffer command has completed.clEnqueueMapBuffer will be derived from the host_ptr specified when the buffer object is created.Mapped buffer objects are unmapped using EnqueueUnmapMemObject.
command_queue - a valid command-queuebuffer - a valid buffer object. The OpenCL context associated with command_queue and buffer must be the same.blocking_map - indicates if the map operation is blocking or non-blocking.
If blocking_map is TRUE, clEnqueueMapBuffer does not return until the specified region in buffer is mapped into the host address
space and the application can access the contents of the mapped region using the pointer returned by clEnqueueMapBuffer.
If blocking_map is FALSE i.e. map operation is non-blocking, the pointer to the mapped region returned by clEnqueueMapBuffer
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 mapped region using the pointer
returned by clEnqueueMapBuffer.
map_flags - a bit-field. One of:MAP_READ | MAP_WRITE | MAP_WRITE_INVALIDATE_REGION |
offset - the offset in bytes of the region in the buffer object that is being mappedsize - the size in bytes of the region in the buffer object that is being mappedevent_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.errcode_ret - will return an appropriate error code. If errcode_ret is NULL, no error code is returned.errcode_ret is set to SUCCESS. A NULL pointer is returned otherwise with one of the following error values
returned in errcode_ret:
INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.INVALID_CONTEXT if context associated with command_queue and buffer are not the same or if the context associated with
command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if buffer is not a valid buffer object.INVALID_VALUE if region being mapped given by (offset, size) is out of bounds or 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.MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is
not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.MAP_FAILURE if there is a failure to map the requested region into the host address space. This error cannot occur for buffer objects
created with MEM_USE_HOST_PTR or MEM_ALLOC_HOST_PTR.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.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.INVALID_OPERATION if buffer has been created with MEM_HOST_WRITE_ONLY or MEM_HOST_NO_ACCESS and
MAP_READ is set in map_flags or if buffer has been created with MEM_HOST_READ_ONLY or
MEM_HOST_NO_ACCESS and MAP_WRITE or MAP_WRITE_INVALIDATE_REGION is set in map_flags.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 nclCreateImage2D(long context,
long flags,
long image_format,
long image_width,
long image_height,
long image_row_pitch,
long host_ptr,
long errcode_ret)
CreateImage2Dpublic static long clCreateImage2D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_row_pitch,
@Nullable
java.nio.ByteBuffer host_ptr,
@Nullable
java.nio.IntBuffer errcode_ret)
context - a valid OpenCL context on which the image object is to be createdflags - a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:MEM_READ_WRITE | MEM_WRITE_ONLY | MEM_READ_ONLY | MEM_USE_HOST_PTR | MEM_ALLOC_HOST_PTR |
MEM_COPY_HOST_PTR | MEM_HOST_WRITE_ONLY | MEM_HOST_READ_ONLY | MEM_HOST_NO_ACCESS |
image_format - a pointer to a CLImageFormat structure that describes format properties of the image to be allocatedimage_width - the width of the image in pixelsimage_height - the height of the image in pixelsimage_row_pitch - the scan-line pitch in bytes. This must be 0 if host_ptr is NULL and can be either 0 or ≥ image_width * size of element in
bytes if host_ptr is not NULL. If host_ptr is not NULL and image_row_pitch = 0, image_row_pitch is calculated as
image_width * size of element in bytes. If image_row_pitch is not 0, it must be a multiple of the image element size in bytes.host_ptr - a pointer to the image data that may already be allocated by the application. The size of the buffer that host_ptr points to must be ≥
image_row_pitch * image_height. The size of each element in bytes must be a power of 2. The image data specified by host_ptr is
stored as a linear sequence of adjacent scanlines. Each scanline is stored as a linear sequence of image elements.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 image 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 not valid.INVALID_IMAGE_FORMAT_DESCRIPTOR if values specified in image_format are not valid or if image_format is NULL.INVALID_IMAGE_SIZE if image_width or image_height are 0 or if they exceed values specified in
DEVICE_IMAGE2D_MAX_WIDTH or DEVICE_IMAGE2D_MAX_HEIGHT respectively for all devices in context or if values specified
by image_row_pitch do not follow rules described in the argument description.INVALID_HOST_PTR if host_ptr is NULL and MEM_USE_HOST_PTR or MEM_COPY_HOST_PTR are set in flags or if
host_ptr is not NULL but MEM_COPY_HOST_PTR or MEM_USE_HOST_PTR are not set in flags.IMAGE_FORMAT_NOT_SUPPORTED if the image_format is not supported.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for image object.INVALID_OPERATION if there are no devices in context that support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).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 clCreateImage2D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_row_pitch,
@Nullable
java.nio.ShortBuffer host_ptr,
@Nullable
java.nio.IntBuffer errcode_ret)
context - a valid OpenCL context on which the image object is to be createdflags - a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:MEM_READ_WRITE | MEM_WRITE_ONLY | MEM_READ_ONLY | MEM_USE_HOST_PTR | MEM_ALLOC_HOST_PTR |
MEM_COPY_HOST_PTR | MEM_HOST_WRITE_ONLY | MEM_HOST_READ_ONLY | MEM_HOST_NO_ACCESS |
image_format - a pointer to a CLImageFormat structure that describes format properties of the image to be allocatedimage_width - the width of the image in pixelsimage_height - the height of the image in pixelsimage_row_pitch - the scan-line pitch in bytes. This must be 0 if host_ptr is NULL and can be either 0 or ≥ image_width * size of element in
bytes if host_ptr is not NULL. If host_ptr is not NULL and image_row_pitch = 0, image_row_pitch is calculated as
image_width * size of element in bytes. If image_row_pitch is not 0, it must be a multiple of the image element size in bytes.host_ptr - a pointer to the image data that may already be allocated by the application. The size of the buffer that host_ptr points to must be ≥
image_row_pitch * image_height. The size of each element in bytes must be a power of 2. The image data specified by host_ptr is
stored as a linear sequence of adjacent scanlines. Each scanline is stored as a linear sequence of image elements.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 image 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 not valid.INVALID_IMAGE_FORMAT_DESCRIPTOR if values specified in image_format are not valid or if image_format is NULL.INVALID_IMAGE_SIZE if image_width or image_height are 0 or if they exceed values specified in
DEVICE_IMAGE2D_MAX_WIDTH or DEVICE_IMAGE2D_MAX_HEIGHT respectively for all devices in context or if values specified
by image_row_pitch do not follow rules described in the argument description.INVALID_HOST_PTR if host_ptr is NULL and MEM_USE_HOST_PTR or MEM_COPY_HOST_PTR are set in flags or if
host_ptr is not NULL but MEM_COPY_HOST_PTR or MEM_USE_HOST_PTR are not set in flags.IMAGE_FORMAT_NOT_SUPPORTED if the image_format is not supported.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for image object.INVALID_OPERATION if there are no devices in context that support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).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 clCreateImage2D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_row_pitch,
@Nullable
java.nio.IntBuffer host_ptr,
@Nullable
java.nio.IntBuffer errcode_ret)
context - a valid OpenCL context on which the image object is to be createdflags - a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:MEM_READ_WRITE | MEM_WRITE_ONLY | MEM_READ_ONLY | MEM_USE_HOST_PTR | MEM_ALLOC_HOST_PTR |
MEM_COPY_HOST_PTR | MEM_HOST_WRITE_ONLY | MEM_HOST_READ_ONLY | MEM_HOST_NO_ACCESS |
image_format - a pointer to a CLImageFormat structure that describes format properties of the image to be allocatedimage_width - the width of the image in pixelsimage_height - the height of the image in pixelsimage_row_pitch - the scan-line pitch in bytes. This must be 0 if host_ptr is NULL and can be either 0 or ≥ image_width * size of element in
bytes if host_ptr is not NULL. If host_ptr is not NULL and image_row_pitch = 0, image_row_pitch is calculated as
image_width * size of element in bytes. If image_row_pitch is not 0, it must be a multiple of the image element size in bytes.host_ptr - a pointer to the image data that may already be allocated by the application. The size of the buffer that host_ptr points to must be ≥
image_row_pitch * image_height. The size of each element in bytes must be a power of 2. The image data specified by host_ptr is
stored as a linear sequence of adjacent scanlines. Each scanline is stored as a linear sequence of image elements.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 image 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 not valid.INVALID_IMAGE_FORMAT_DESCRIPTOR if values specified in image_format are not valid or if image_format is NULL.INVALID_IMAGE_SIZE if image_width or image_height are 0 or if they exceed values specified in
DEVICE_IMAGE2D_MAX_WIDTH or DEVICE_IMAGE2D_MAX_HEIGHT respectively for all devices in context or if values specified
by image_row_pitch do not follow rules described in the argument description.INVALID_HOST_PTR if host_ptr is NULL and MEM_USE_HOST_PTR or MEM_COPY_HOST_PTR are set in flags or if
host_ptr is not NULL but MEM_COPY_HOST_PTR or MEM_USE_HOST_PTR are not set in flags.IMAGE_FORMAT_NOT_SUPPORTED if the image_format is not supported.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for image object.INVALID_OPERATION if there are no devices in context that support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).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 clCreateImage2D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_row_pitch,
@Nullable
java.nio.FloatBuffer host_ptr,
@Nullable
java.nio.IntBuffer errcode_ret)
context - a valid OpenCL context on which the image object is to be createdflags - a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:MEM_READ_WRITE | MEM_WRITE_ONLY | MEM_READ_ONLY | MEM_USE_HOST_PTR | MEM_ALLOC_HOST_PTR |
MEM_COPY_HOST_PTR | MEM_HOST_WRITE_ONLY | MEM_HOST_READ_ONLY | MEM_HOST_NO_ACCESS |
image_format - a pointer to a CLImageFormat structure that describes format properties of the image to be allocatedimage_width - the width of the image in pixelsimage_height - the height of the image in pixelsimage_row_pitch - the scan-line pitch in bytes. This must be 0 if host_ptr is NULL and can be either 0 or ≥ image_width * size of element in
bytes if host_ptr is not NULL. If host_ptr is not NULL and image_row_pitch = 0, image_row_pitch is calculated as
image_width * size of element in bytes. If image_row_pitch is not 0, it must be a multiple of the image element size in bytes.host_ptr - a pointer to the image data that may already be allocated by the application. The size of the buffer that host_ptr points to must be ≥
image_row_pitch * image_height. The size of each element in bytes must be a power of 2. The image data specified by host_ptr is
stored as a linear sequence of adjacent scanlines. Each scanline is stored as a linear sequence of image elements.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 image 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 not valid.INVALID_IMAGE_FORMAT_DESCRIPTOR if values specified in image_format are not valid or if image_format is NULL.INVALID_IMAGE_SIZE if image_width or image_height are 0 or if they exceed values specified in
DEVICE_IMAGE2D_MAX_WIDTH or DEVICE_IMAGE2D_MAX_HEIGHT respectively for all devices in context or if values specified
by image_row_pitch do not follow rules described in the argument description.INVALID_HOST_PTR if host_ptr is NULL and MEM_USE_HOST_PTR or MEM_COPY_HOST_PTR are set in flags or if
host_ptr is not NULL but MEM_COPY_HOST_PTR or MEM_USE_HOST_PTR are not set in flags.IMAGE_FORMAT_NOT_SUPPORTED if the image_format is not supported.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for image object.INVALID_OPERATION if there are no devices in context that support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).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 nclCreateImage3D(long context,
long flags,
long image_format,
long image_width,
long image_height,
long image_depth,
long image_row_pitch,
long image_slice_pitch,
long host_ptr,
long errcode_ret)
CreateImage3Dpublic static long clCreateImage3D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_depth,
long image_row_pitch,
long image_slice_pitch,
@Nullable
java.nio.ByteBuffer host_ptr,
@Nullable
java.nio.IntBuffer errcode_ret)
context - a valid OpenCL context on which the image object is to be createdflags - a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:MEM_READ_WRITE | MEM_WRITE_ONLY | MEM_READ_ONLY | MEM_USE_HOST_PTR | MEM_ALLOC_HOST_PTR |
MEM_COPY_HOST_PTR | MEM_HOST_WRITE_ONLY | MEM_HOST_READ_ONLY | MEM_HOST_NO_ACCESS |
image_format - a pointer to a CLImageFormat structure that describes format properties of the image to be allocatedimage_width - the width of the image in pixelsimage_height - the height of the image in pixelsimage_depth - the depth of the image in pixels. This must be a value > 1.image_row_pitch - the scan-line pitch in bytes. This must be 0 if host_ptr is NULL and can be either 0 or ≥ image_width * size of element in
bytes if host_ptr is not NULL. If host_ptr is not NULL and image_row_pitch = 0, image_row_pitch is calculated as
image_width * size of element in bytes. If image_row_pitch is not 0, it must be a multiple of the image element size in bytes.image_slice_pitch - the size in bytes of each 2D slice in the 3D image. This must be 0 if host_ptr is NULL and can be either 0 or ≥
image_row_pitch * image_height if host_ptr is not NULL. If host_ptr is not NULL and image_slice_pitch = 0,
image_slice_pitch is calculated as image_row_pitch * image_height. If image_slice_pitch is not 0, it must be a multiple of
the image_row_pitch.host_ptr - a pointer to the image data that may already be allocated by the application. The size of the buffer that host_ptr points to must be ≥
image_slice_pitch * image_depth. The size of each element in bytes must be a power of 2. The image data specified by host_ptr is
stored as a linear sequence of adjacent 2D slices. Each 2D slice is a linear sequence of adjacent scanlines. Each scanline is a linear sequence of
image elements.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 image 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 not valid.INVALID_IMAGE_FORMAT_DESCRIPTOR if values specified in image_format are not valid or if image_format is NULL.INVALID_IMAGE_SIZE if image_width, image_height are 0 or if image_depth ≤ 1 or if they exceed values
specified in DEVICE_IMAGE3D_MAX_WIDTH, DEVICE_IMAGE3D_MAX_HEIGHT or DEVICE_IMAGE3D_MAX_DEPTH respectively for
all devices in context or if values specified by image_row_pitch and image_slice_pitch do not follow rules described in the
argument descriptions.INVALID_HOST_PTR if host_ptr is NULL and MEM_USE_HOST_PTR or MEM_COPY_HOST_PTR are set in flags or if
host_ptr is not NULL but MEM_COPY_HOST_PTR or MEM_USE_HOST_PTR are not set in flags.IMAGE_FORMAT_NOT_SUPPORTED if the image_format is not supported.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for image object.INVALID_OPERATION if there are no devices in context that support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).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 clCreateImage3D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_depth,
long image_row_pitch,
long image_slice_pitch,
@Nullable
java.nio.ShortBuffer host_ptr,
@Nullable
java.nio.IntBuffer errcode_ret)
context - a valid OpenCL context on which the image object is to be createdflags - a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:MEM_READ_WRITE | MEM_WRITE_ONLY | MEM_READ_ONLY | MEM_USE_HOST_PTR | MEM_ALLOC_HOST_PTR |
MEM_COPY_HOST_PTR | MEM_HOST_WRITE_ONLY | MEM_HOST_READ_ONLY | MEM_HOST_NO_ACCESS |
image_format - a pointer to a CLImageFormat structure that describes format properties of the image to be allocatedimage_width - the width of the image in pixelsimage_height - the height of the image in pixelsimage_depth - the depth of the image in pixels. This must be a value > 1.image_row_pitch - the scan-line pitch in bytes. This must be 0 if host_ptr is NULL and can be either 0 or ≥ image_width * size of element in
bytes if host_ptr is not NULL. If host_ptr is not NULL and image_row_pitch = 0, image_row_pitch is calculated as
image_width * size of element in bytes. If image_row_pitch is not 0, it must be a multiple of the image element size in bytes.image_slice_pitch - the size in bytes of each 2D slice in the 3D image. This must be 0 if host_ptr is NULL and can be either 0 or ≥
image_row_pitch * image_height if host_ptr is not NULL. If host_ptr is not NULL and image_slice_pitch = 0,
image_slice_pitch is calculated as image_row_pitch * image_height. If image_slice_pitch is not 0, it must be a multiple of
the image_row_pitch.host_ptr - a pointer to the image data that may already be allocated by the application. The size of the buffer that host_ptr points to must be ≥
image_slice_pitch * image_depth. The size of each element in bytes must be a power of 2. The image data specified by host_ptr is
stored as a linear sequence of adjacent 2D slices. Each 2D slice is a linear sequence of adjacent scanlines. Each scanline is a linear sequence of
image elements.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 image 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 not valid.INVALID_IMAGE_FORMAT_DESCRIPTOR if values specified in image_format are not valid or if image_format is NULL.INVALID_IMAGE_SIZE if image_width, image_height are 0 or if image_depth ≤ 1 or if they exceed values
specified in DEVICE_IMAGE3D_MAX_WIDTH, DEVICE_IMAGE3D_MAX_HEIGHT or DEVICE_IMAGE3D_MAX_DEPTH respectively for
all devices in context or if values specified by image_row_pitch and image_slice_pitch do not follow rules described in the
argument descriptions.INVALID_HOST_PTR if host_ptr is NULL and MEM_USE_HOST_PTR or MEM_COPY_HOST_PTR are set in flags or if
host_ptr is not NULL but MEM_COPY_HOST_PTR or MEM_USE_HOST_PTR are not set in flags.IMAGE_FORMAT_NOT_SUPPORTED if the image_format is not supported.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for image object.INVALID_OPERATION if there are no devices in context that support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).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 clCreateImage3D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_depth,
long image_row_pitch,
long image_slice_pitch,
@Nullable
java.nio.IntBuffer host_ptr,
@Nullable
java.nio.IntBuffer errcode_ret)
context - a valid OpenCL context on which the image object is to be createdflags - a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:MEM_READ_WRITE | MEM_WRITE_ONLY | MEM_READ_ONLY | MEM_USE_HOST_PTR | MEM_ALLOC_HOST_PTR |
MEM_COPY_HOST_PTR | MEM_HOST_WRITE_ONLY | MEM_HOST_READ_ONLY | MEM_HOST_NO_ACCESS |
image_format - a pointer to a CLImageFormat structure that describes format properties of the image to be allocatedimage_width - the width of the image in pixelsimage_height - the height of the image in pixelsimage_depth - the depth of the image in pixels. This must be a value > 1.image_row_pitch - the scan-line pitch in bytes. This must be 0 if host_ptr is NULL and can be either 0 or ≥ image_width * size of element in
bytes if host_ptr is not NULL. If host_ptr is not NULL and image_row_pitch = 0, image_row_pitch is calculated as
image_width * size of element in bytes. If image_row_pitch is not 0, it must be a multiple of the image element size in bytes.image_slice_pitch - the size in bytes of each 2D slice in the 3D image. This must be 0 if host_ptr is NULL and can be either 0 or ≥
image_row_pitch * image_height if host_ptr is not NULL. If host_ptr is not NULL and image_slice_pitch = 0,
image_slice_pitch is calculated as image_row_pitch * image_height. If image_slice_pitch is not 0, it must be a multiple of
the image_row_pitch.host_ptr - a pointer to the image data that may already be allocated by the application. The size of the buffer that host_ptr points to must be ≥
image_slice_pitch * image_depth. The size of each element in bytes must be a power of 2. The image data specified by host_ptr is
stored as a linear sequence of adjacent 2D slices. Each 2D slice is a linear sequence of adjacent scanlines. Each scanline is a linear sequence of
image elements.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 image 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 not valid.INVALID_IMAGE_FORMAT_DESCRIPTOR if values specified in image_format are not valid or if image_format is NULL.INVALID_IMAGE_SIZE if image_width, image_height are 0 or if image_depth ≤ 1 or if they exceed values
specified in DEVICE_IMAGE3D_MAX_WIDTH, DEVICE_IMAGE3D_MAX_HEIGHT or DEVICE_IMAGE3D_MAX_DEPTH respectively for
all devices in context or if values specified by image_row_pitch and image_slice_pitch do not follow rules described in the
argument descriptions.INVALID_HOST_PTR if host_ptr is NULL and MEM_USE_HOST_PTR or MEM_COPY_HOST_PTR are set in flags or if
host_ptr is not NULL but MEM_COPY_HOST_PTR or MEM_USE_HOST_PTR are not set in flags.IMAGE_FORMAT_NOT_SUPPORTED if the image_format is not supported.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for image object.INVALID_OPERATION if there are no devices in context that support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).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 clCreateImage3D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_depth,
long image_row_pitch,
long image_slice_pitch,
@Nullable
java.nio.FloatBuffer host_ptr,
@Nullable
java.nio.IntBuffer errcode_ret)
context - a valid OpenCL context on which the image object is to be createdflags - a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:MEM_READ_WRITE | MEM_WRITE_ONLY | MEM_READ_ONLY | MEM_USE_HOST_PTR | MEM_ALLOC_HOST_PTR |
MEM_COPY_HOST_PTR | MEM_HOST_WRITE_ONLY | MEM_HOST_READ_ONLY | MEM_HOST_NO_ACCESS |
image_format - a pointer to a CLImageFormat structure that describes format properties of the image to be allocatedimage_width - the width of the image in pixelsimage_height - the height of the image in pixelsimage_depth - the depth of the image in pixels. This must be a value > 1.image_row_pitch - the scan-line pitch in bytes. This must be 0 if host_ptr is NULL and can be either 0 or ≥ image_width * size of element in
bytes if host_ptr is not NULL. If host_ptr is not NULL and image_row_pitch = 0, image_row_pitch is calculated as
image_width * size of element in bytes. If image_row_pitch is not 0, it must be a multiple of the image element size in bytes.image_slice_pitch - the size in bytes of each 2D slice in the 3D image. This must be 0 if host_ptr is NULL and can be either 0 or ≥
image_row_pitch * image_height if host_ptr is not NULL. If host_ptr is not NULL and image_slice_pitch = 0,
image_slice_pitch is calculated as image_row_pitch * image_height. If image_slice_pitch is not 0, it must be a multiple of
the image_row_pitch.host_ptr - a pointer to the image data that may already be allocated by the application. The size of the buffer that host_ptr points to must be ≥
image_slice_pitch * image_depth. The size of each element in bytes must be a power of 2. The image data specified by host_ptr is
stored as a linear sequence of adjacent 2D slices. Each 2D slice is a linear sequence of adjacent scanlines. Each scanline is a linear sequence of
image elements.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 image 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 not valid.INVALID_IMAGE_FORMAT_DESCRIPTOR if values specified in image_format are not valid or if image_format is NULL.INVALID_IMAGE_SIZE if image_width, image_height are 0 or if image_depth ≤ 1 or if they exceed values
specified in DEVICE_IMAGE3D_MAX_WIDTH, DEVICE_IMAGE3D_MAX_HEIGHT or DEVICE_IMAGE3D_MAX_DEPTH respectively for
all devices in context or if values specified by image_row_pitch and image_slice_pitch do not follow rules described in the
argument descriptions.INVALID_HOST_PTR if host_ptr is NULL and MEM_USE_HOST_PTR or MEM_COPY_HOST_PTR are set in flags or if
host_ptr is not NULL but MEM_COPY_HOST_PTR or MEM_USE_HOST_PTR are not set in flags.IMAGE_FORMAT_NOT_SUPPORTED if the image_format is not supported.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for image object.INVALID_OPERATION if there are no devices in context that support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).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 nclGetSupportedImageFormats(long context,
long flags,
int image_type,
int num_entries,
long image_formats,
long num_image_formats)
GetSupportedImageFormatsnum_entries - the number of entries that can be returned in the memory location given by image_formatspublic static int clGetSupportedImageFormats(long context,
long flags,
int image_type,
@Nullable
CLImageFormat.Buffer image_formats,
@Nullable
java.nio.IntBuffer num_image_formats)
clGetSupportedImageFormats returns a union of image formats supported by all devices in the context.
context - a valid OpenCL context on which the image object(s) will be createdflags - a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:MEM_READ_WRITE | MEM_WRITE_ONLY | MEM_READ_ONLY | MEM_USE_HOST_PTR | MEM_ALLOC_HOST_PTR |
MEM_COPY_HOST_PTR | MEM_HOST_WRITE_ONLY | MEM_HOST_READ_ONLY | MEM_HOST_NO_ACCESS |
image_type - the image type. One of:MEM_OBJECT_IMAGE1D | MEM_OBJECT_IMAGE1D_BUFFER | MEM_OBJECT_BUFFER | MEM_OBJECT_IMAGE2D |
MEM_OBJECT_IMAGE3D | MEM_OBJECT_IMAGE1D_ARRAY | MEM_OBJECT_IMAGE2D_ARRAY | MEM_OBJECT_PIPE |
image_formats - a pointer to a memory location where the list of supported image formats are returned. Each entry describes a CLImageFormat structure
supported by the OpenCL implementation. If image_formats is NULL, it is ignored.num_image_formats - the actual number of supported image formats for a specific context and values specified by flags. If num_image_formats is NULL, it
is ignored.SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_CONTEXT if context is not a valid context.INVALID_VALUE if flags or image_type are not valid, or if num_entries is 0 and image_formats is not NULL.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 nclEnqueueReadImage(long command_queue,
long image,
int blocking_read,
long origin,
long region,
long row_pitch,
long slice_pitch,
long ptr,
int num_events_in_wait_list,
long event_wait_list,
long event)
EnqueueReadImagenum_events_in_wait_list - the number of events in event_wait_listpublic static int clEnqueueReadImage(long command_queue,
long image,
boolean blocking_read,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long row_pitch,
long slice_pitch,
java.nio.ByteBuffer ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
Calling clEnqueueReadImage to read a region of the image with the ptr argument value set to
host_ptr + (origin[2] * image slice pitch + origin[1] * image row pitch + origin[0] * bytes per pixel), where host_ptr is a pointer
to the memory region specified when the image being read is created with MEM_USE_HOST_PTR, must meet the following requirements in order to
avoid undefined behavior:
command_queue - the command-queue in which the read command will be queued. command_queue and image must be created with the same OpenCL context.image - a valid image or image array objectblocking_read - indicates if the read operation is blocking or non-blocking.
If blocking_read is TRUE i.e. the read command is blocking, clEnqueueReadImage does not return until the buffer data has
been read and copied into memory pointed to by ptr.
If blocking_read is FALSE i.e. the read command is non-blocking, clEnqueueReadImage queues a non-blocking read command
and returns. The contents of the buffer that ptr points to cannot be used until the read 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 read command has completed, the contents of
the buffer that ptr points to can be used by the application.
origin - defines the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the
(x) offset and the image index in the 1D image array. If image is a 2D image object, origin[2] must be 0. If image
is a 1D image or 1D image buffer object, origin[1] and origin[2] must be 0. If image is a 1D image array object,
origin[2] must be 0. If image is a 1D image array object, origin[1] describes the image index in the 1D image array. If
image is a 2D image array object, origin[2] describes the image index in the 2D image array.region - defines the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and
the number of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If
image is a 2D image object, region[2] must be 1. If image is a 1D image or 1D image buffer object, region[1] and
region[2] must be 1. If image is a 1D image array object, region[2] must be 1. The values in region cannot be 0.row_pitch - the length of each row in bytes. This value must be greater than or equal to the element size in bytes * width. If row_pitch is set
to 0, the appropriate row pitch is calculated based on the size of each element in bytes multiplied by width.slice_pitch - the size in bytes of the 2D slice of the 3D region of a 3D image or each image of a 1D or 2D image array being read. This must be 0 if image
is a 1D or 2D image. This value must be greater than or equal to row_pitch * height. If slice_pitch is set to 0, the appropriate
slice pitch is calculated based on the row_pitch * height.ptr - the pointer to a buffer in host memory where image data is to be read toevent_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 image are not the same or if the context associated
with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if image is not a valid image object.INVALID_VALUE if the region being read specified by origin and region is out of bounds or if ptr is a
NULL value.INVALID_VALUE if values in origin and region do not follow rules described in the argument description for
origin and region.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.INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for image are not
supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and data type) for image are not supported by device associated
with queue.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with image.INVALID_OPERATION if the device associated with command_queue does not support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).INVALID_OPERATION if clEnqueueReadImage is called on image which has been created with MEM_HOST_WRITE_ONLY or
MEM_HOST_NO_ACCESS.INVALID_OPERATION if clEnqueueWriteImage is called on image which has been created with MEM_HOST_READ_ONLY or
MEM_HOST_NO_ACCESS.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read 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 clEnqueueReadImage(long command_queue,
long image,
boolean blocking_read,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long row_pitch,
long slice_pitch,
java.nio.ShortBuffer ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
Calling clEnqueueReadImage to read a region of the image with the ptr argument value set to
host_ptr + (origin[2] * image slice pitch + origin[1] * image row pitch + origin[0] * bytes per pixel), where host_ptr is a pointer
to the memory region specified when the image being read is created with MEM_USE_HOST_PTR, must meet the following requirements in order to
avoid undefined behavior:
command_queue - the command-queue in which the read command will be queued. command_queue and image must be created with the same OpenCL context.image - a valid image or image array objectblocking_read - indicates if the read operation is blocking or non-blocking.
If blocking_read is TRUE i.e. the read command is blocking, clEnqueueReadImage does not return until the buffer data has
been read and copied into memory pointed to by ptr.
If blocking_read is FALSE i.e. the read command is non-blocking, clEnqueueReadImage queues a non-blocking read command
and returns. The contents of the buffer that ptr points to cannot be used until the read 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 read command has completed, the contents of
the buffer that ptr points to can be used by the application.
origin - defines the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the
(x) offset and the image index in the 1D image array. If image is a 2D image object, origin[2] must be 0. If image
is a 1D image or 1D image buffer object, origin[1] and origin[2] must be 0. If image is a 1D image array object,
origin[2] must be 0. If image is a 1D image array object, origin[1] describes the image index in the 1D image array. If
image is a 2D image array object, origin[2] describes the image index in the 2D image array.region - defines the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and
the number of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If
image is a 2D image object, region[2] must be 1. If image is a 1D image or 1D image buffer object, region[1] and
region[2] must be 1. If image is a 1D image array object, region[2] must be 1. The values in region cannot be 0.row_pitch - the length of each row in bytes. This value must be greater than or equal to the element size in bytes * width. If row_pitch is set
to 0, the appropriate row pitch is calculated based on the size of each element in bytes multiplied by width.slice_pitch - the size in bytes of the 2D slice of the 3D region of a 3D image or each image of a 1D or 2D image array being read. This must be 0 if image
is a 1D or 2D image. This value must be greater than or equal to row_pitch * height. If slice_pitch is set to 0, the appropriate
slice pitch is calculated based on the row_pitch * height.ptr - the pointer to a buffer in host memory where image data is to be read toevent_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 image are not the same or if the context associated
with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if image is not a valid image object.INVALID_VALUE if the region being read specified by origin and region is out of bounds or if ptr is a
NULL value.INVALID_VALUE if values in origin and region do not follow rules described in the argument description for
origin and region.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.INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for image are not
supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and data type) for image are not supported by device associated
with queue.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with image.INVALID_OPERATION if the device associated with command_queue does not support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).INVALID_OPERATION if clEnqueueReadImage is called on image which has been created with MEM_HOST_WRITE_ONLY or
MEM_HOST_NO_ACCESS.INVALID_OPERATION if clEnqueueWriteImage is called on image which has been created with MEM_HOST_READ_ONLY or
MEM_HOST_NO_ACCESS.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read 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 clEnqueueReadImage(long command_queue,
long image,
boolean blocking_read,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long row_pitch,
long slice_pitch,
java.nio.IntBuffer ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
Calling clEnqueueReadImage to read a region of the image with the ptr argument value set to
host_ptr + (origin[2] * image slice pitch + origin[1] * image row pitch + origin[0] * bytes per pixel), where host_ptr is a pointer
to the memory region specified when the image being read is created with MEM_USE_HOST_PTR, must meet the following requirements in order to
avoid undefined behavior:
command_queue - the command-queue in which the read command will be queued. command_queue and image must be created with the same OpenCL context.image - a valid image or image array objectblocking_read - indicates if the read operation is blocking or non-blocking.
If blocking_read is TRUE i.e. the read command is blocking, clEnqueueReadImage does not return until the buffer data has
been read and copied into memory pointed to by ptr.
If blocking_read is FALSE i.e. the read command is non-blocking, clEnqueueReadImage queues a non-blocking read command
and returns. The contents of the buffer that ptr points to cannot be used until the read 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 read command has completed, the contents of
the buffer that ptr points to can be used by the application.
origin - defines the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the
(x) offset and the image index in the 1D image array. If image is a 2D image object, origin[2] must be 0. If image
is a 1D image or 1D image buffer object, origin[1] and origin[2] must be 0. If image is a 1D image array object,
origin[2] must be 0. If image is a 1D image array object, origin[1] describes the image index in the 1D image array. If
image is a 2D image array object, origin[2] describes the image index in the 2D image array.region - defines the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and
the number of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If
image is a 2D image object, region[2] must be 1. If image is a 1D image or 1D image buffer object, region[1] and
region[2] must be 1. If image is a 1D image array object, region[2] must be 1. The values in region cannot be 0.row_pitch - the length of each row in bytes. This value must be greater than or equal to the element size in bytes * width. If row_pitch is set
to 0, the appropriate row pitch is calculated based on the size of each element in bytes multiplied by width.slice_pitch - the size in bytes of the 2D slice of the 3D region of a 3D image or each image of a 1D or 2D image array being read. This must be 0 if image
is a 1D or 2D image. This value must be greater than or equal to row_pitch * height. If slice_pitch is set to 0, the appropriate
slice pitch is calculated based on the row_pitch * height.ptr - the pointer to a buffer in host memory where image data is to be read toevent_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 image are not the same or if the context associated
with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if image is not a valid image object.INVALID_VALUE if the region being read specified by origin and region is out of bounds or if ptr is a
NULL value.INVALID_VALUE if values in origin and region do not follow rules described in the argument description for
origin and region.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.INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for image are not
supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and data type) for image are not supported by device associated
with queue.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with image.INVALID_OPERATION if the device associated with command_queue does not support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).INVALID_OPERATION if clEnqueueReadImage is called on image which has been created with MEM_HOST_WRITE_ONLY or
MEM_HOST_NO_ACCESS.INVALID_OPERATION if clEnqueueWriteImage is called on image which has been created with MEM_HOST_READ_ONLY or
MEM_HOST_NO_ACCESS.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read 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 clEnqueueReadImage(long command_queue,
long image,
boolean blocking_read,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long row_pitch,
long slice_pitch,
java.nio.FloatBuffer ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
Calling clEnqueueReadImage to read a region of the image with the ptr argument value set to
host_ptr + (origin[2] * image slice pitch + origin[1] * image row pitch + origin[0] * bytes per pixel), where host_ptr is a pointer
to the memory region specified when the image being read is created with MEM_USE_HOST_PTR, must meet the following requirements in order to
avoid undefined behavior:
command_queue - the command-queue in which the read command will be queued. command_queue and image must be created with the same OpenCL context.image - a valid image or image array objectblocking_read - indicates if the read operation is blocking or non-blocking.
If blocking_read is TRUE i.e. the read command is blocking, clEnqueueReadImage does not return until the buffer data has
been read and copied into memory pointed to by ptr.
If blocking_read is FALSE i.e. the read command is non-blocking, clEnqueueReadImage queues a non-blocking read command
and returns. The contents of the buffer that ptr points to cannot be used until the read 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 read command has completed, the contents of
the buffer that ptr points to can be used by the application.
origin - defines the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the
(x) offset and the image index in the 1D image array. If image is a 2D image object, origin[2] must be 0. If image
is a 1D image or 1D image buffer object, origin[1] and origin[2] must be 0. If image is a 1D image array object,
origin[2] must be 0. If image is a 1D image array object, origin[1] describes the image index in the 1D image array. If
image is a 2D image array object, origin[2] describes the image index in the 2D image array.region - defines the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and
the number of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If
image is a 2D image object, region[2] must be 1. If image is a 1D image or 1D image buffer object, region[1] and
region[2] must be 1. If image is a 1D image array object, region[2] must be 1. The values in region cannot be 0.row_pitch - the length of each row in bytes. This value must be greater than or equal to the element size in bytes * width. If row_pitch is set
to 0, the appropriate row pitch is calculated based on the size of each element in bytes multiplied by width.slice_pitch - the size in bytes of the 2D slice of the 3D region of a 3D image or each image of a 1D or 2D image array being read. This must be 0 if image
is a 1D or 2D image. This value must be greater than or equal to row_pitch * height. If slice_pitch is set to 0, the appropriate
slice pitch is calculated based on the row_pitch * height.ptr - the pointer to a buffer in host memory where image data is to be read toevent_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 image are not the same or if the context associated
with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if image is not a valid image object.INVALID_VALUE if the region being read specified by origin and region is out of bounds or if ptr is a
NULL value.INVALID_VALUE if values in origin and region do not follow rules described in the argument description for
origin and region.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.INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for image are not
supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and data type) for image are not supported by device associated
with queue.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with image.INVALID_OPERATION if the device associated with command_queue does not support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).INVALID_OPERATION if clEnqueueReadImage is called on image which has been created with MEM_HOST_WRITE_ONLY or
MEM_HOST_NO_ACCESS.INVALID_OPERATION if clEnqueueWriteImage is called on image which has been created with MEM_HOST_READ_ONLY or
MEM_HOST_NO_ACCESS.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read 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 clEnqueueReadImage(long command_queue,
long image,
boolean blocking_read,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long row_pitch,
long slice_pitch,
java.nio.DoubleBuffer ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
Calling clEnqueueReadImage to read a region of the image with the ptr argument value set to
host_ptr + (origin[2] * image slice pitch + origin[1] * image row pitch + origin[0] * bytes per pixel), where host_ptr is a pointer
to the memory region specified when the image being read is created with MEM_USE_HOST_PTR, must meet the following requirements in order to
avoid undefined behavior:
command_queue - the command-queue in which the read command will be queued. command_queue and image must be created with the same OpenCL context.image - a valid image or image array objectblocking_read - indicates if the read operation is blocking or non-blocking.
If blocking_read is TRUE i.e. the read command is blocking, clEnqueueReadImage does not return until the buffer data has
been read and copied into memory pointed to by ptr.
If blocking_read is FALSE i.e. the read command is non-blocking, clEnqueueReadImage queues a non-blocking read command
and returns. The contents of the buffer that ptr points to cannot be used until the read 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 read command has completed, the contents of
the buffer that ptr points to can be used by the application.
origin - defines the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the
(x) offset and the image index in the 1D image array. If image is a 2D image object, origin[2] must be 0. If image
is a 1D image or 1D image buffer object, origin[1] and origin[2] must be 0. If image is a 1D image array object,
origin[2] must be 0. If image is a 1D image array object, origin[1] describes the image index in the 1D image array. If
image is a 2D image array object, origin[2] describes the image index in the 2D image array.region - defines the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and
the number of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If
image is a 2D image object, region[2] must be 1. If image is a 1D image or 1D image buffer object, region[1] and
region[2] must be 1. If image is a 1D image array object, region[2] must be 1. The values in region cannot be 0.row_pitch - the length of each row in bytes. This value must be greater than or equal to the element size in bytes * width. If row_pitch is set
to 0, the appropriate row pitch is calculated based on the size of each element in bytes multiplied by width.slice_pitch - the size in bytes of the 2D slice of the 3D region of a 3D image or each image of a 1D or 2D image array being read. This must be 0 if image
is a 1D or 2D image. This value must be greater than or equal to row_pitch * height. If slice_pitch is set to 0, the appropriate
slice pitch is calculated based on the row_pitch * height.ptr - the pointer to a buffer in host memory where image data is to be read toevent_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 image are not the same or if the context associated
with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if image is not a valid image object.INVALID_VALUE if the region being read specified by origin and region is out of bounds or if ptr is a
NULL value.INVALID_VALUE if values in origin and region do not follow rules described in the argument description for
origin and region.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.INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for image are not
supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and data type) for image are not supported by device associated
with queue.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with image.INVALID_OPERATION if the device associated with command_queue does not support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).INVALID_OPERATION if clEnqueueReadImage is called on image which has been created with MEM_HOST_WRITE_ONLY or
MEM_HOST_NO_ACCESS.INVALID_OPERATION if clEnqueueWriteImage is called on image which has been created with MEM_HOST_READ_ONLY or
MEM_HOST_NO_ACCESS.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read 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 nclEnqueueWriteImage(long command_queue,
long image,
int blocking_write,
long origin,
long region,
long input_row_pitch,
long input_slice_pitch,
long ptr,
int num_events_in_wait_list,
long event_wait_list,
long event)
EnqueueWriteImagenum_events_in_wait_list - the number of events in event_wait_listpublic static int clEnqueueWriteImage(long command_queue,
long image,
boolean blocking_write,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long input_row_pitch,
long input_slice_pitch,
java.nio.ByteBuffer ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
Calling clEnqueueWriteImage to update the latest bits in a region of the image with the ptr argument value set to
host_ptr + (origin[2] * image slice pitch + origin[1] * image row pitch + origin[0] * bytes per pixel), where host_ptr is a pointer
to the memory region specified when the image being written is created with MEM_USE_HOST_PTR, must meet the following requirements in order
to avoid undefined behavior:
command_queue - the command-queue in which the write command will be queued. command_queue and image must be created with the same OpenCL context.image - a valid image or image array objectblocking_write - indicates if the read operation is blocking or non-blocking.
If blocking_write is TRUE, the OpenCL implementation copies the data referred to by ptr and enqueues the write command in the
command-queue. The memory pointed to by ptr can be reused by the application after the clEnqueueWriteImage call returns.
If blocking_write is FALSE, the OpenCL implementation will use ptr to perform a non-blocking write. As the write is non-blocking
the implementation can return immediately. The memory pointed to by ptr cannot be reused by the application after the call returns. The
event argument returns an event object which can be used to query the execution status of the write command. When the write command has
completed, the memory pointed to by ptr can then be reused by the application.
origin - defines the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the
(x) offset and the image index in the 1D image array. If image is a 2D image object, origin[2] must be 0. If image
is a 1D image or 1D image buffer object, origin[1] and origin[2] must be 0. If image is a 1D image array object,
origin[2] must be 0. If image is a 1D image array object, origin[1] describes the image index in the 1D image array. If
image is a 2D image array object, origin[2] describes the image index in the 2D image array.region - defines the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and
the number of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If
image is a 2D image object, region[2] must be 1. If image is a 1D image or 1D image buffer object, region[1] and
region[2] must be 1. If image is a 1D image array object, region[2] must be 1. The values in region cannot be 0.input_row_pitch - the length of each row in bytes. This value must be greater than or equal to the element size in bytes * width. If input_row_pitch is set
to 0, the appropriate row pitch is calculated based on the size of each element in bytes multiplied by width.input_slice_pitch - the size in bytes of the 2D slice of the 3D region of a 3D image or each image of a 1D or 2D image array being written. This must be 0 if image
is a 1D or 2D image. This value must be greater than or equal to input_row_pitch * height. If input_slice_pitch is set to 0, the appropriate
slice pitch is calculated based on the input_row_pitch * height.ptr - the pointer to a buffer in host memory where image data is to be written 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 image are not the same or if the context associated
with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if image is not a valid image object.INVALID_VALUE if the region being written specified by origin and region is out of bounds or if ptr is a
NULL value.INVALID_VALUE if values in origin and region do not follow rules described in the argument description for
origin and region.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.INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for image are not
supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and data type) for image are not supported by device associated
with queue.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with image.INVALID_OPERATION if the device associated with command_queue does not support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).INVALID_OPERATION if clEnqueueReadImage is called on image which has been created with MEM_HOST_WRITE_ONLY or
MEM_HOST_NO_ACCESS.INVALID_OPERATION if clEnqueueWriteImage is called on image which has been created with MEM_HOST_READ_ONLY or
MEM_HOST_NO_ACCESS.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the write 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 clEnqueueWriteImage(long command_queue,
long image,
boolean blocking_write,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long input_row_pitch,
long input_slice_pitch,
java.nio.ShortBuffer ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
Calling clEnqueueWriteImage to update the latest bits in a region of the image with the ptr argument value set to
host_ptr + (origin[2] * image slice pitch + origin[1] * image row pitch + origin[0] * bytes per pixel), where host_ptr is a pointer
to the memory region specified when the image being written is created with MEM_USE_HOST_PTR, must meet the following requirements in order
to avoid undefined behavior:
command_queue - the command-queue in which the write command will be queued. command_queue and image must be created with the same OpenCL context.image - a valid image or image array objectblocking_write - indicates if the read operation is blocking or non-blocking.
If blocking_write is TRUE, the OpenCL implementation copies the data referred to by ptr and enqueues the write command in the
command-queue. The memory pointed to by ptr can be reused by the application after the clEnqueueWriteImage call returns.
If blocking_write is FALSE, the OpenCL implementation will use ptr to perform a non-blocking write. As the write is non-blocking
the implementation can return immediately. The memory pointed to by ptr cannot be reused by the application after the call returns. The
event argument returns an event object which can be used to query the execution status of the write command. When the write command has
completed, the memory pointed to by ptr can then be reused by the application.
origin - defines the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the
(x) offset and the image index in the 1D image array. If image is a 2D image object, origin[2] must be 0. If image
is a 1D image or 1D image buffer object, origin[1] and origin[2] must be 0. If image is a 1D image array object,
origin[2] must be 0. If image is a 1D image array object, origin[1] describes the image index in the 1D image array. If
image is a 2D image array object, origin[2] describes the image index in the 2D image array.region - defines the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and
the number of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If
image is a 2D image object, region[2] must be 1. If image is a 1D image or 1D image buffer object, region[1] and
region[2] must be 1. If image is a 1D image array object, region[2] must be 1. The values in region cannot be 0.input_row_pitch - the length of each row in bytes. This value must be greater than or equal to the element size in bytes * width. If input_row_pitch is set
to 0, the appropriate row pitch is calculated based on the size of each element in bytes multiplied by width.input_slice_pitch - the size in bytes of the 2D slice of the 3D region of a 3D image or each image of a 1D or 2D image array being written. This must be 0 if image
is a 1D or 2D image. This value must be greater than or equal to input_row_pitch * height. If input_slice_pitch is set to 0, the appropriate
slice pitch is calculated based on the input_row_pitch * height.ptr - the pointer to a buffer in host memory where image data is to be written 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 image are not the same or if the context associated
with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if image is not a valid image object.INVALID_VALUE if the region being written specified by origin and region is out of bounds or if ptr is a
NULL value.INVALID_VALUE if values in origin and region do not follow rules described in the argument description for
origin and region.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.INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for image are not
supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and data type) for image are not supported by device associated
with queue.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with image.INVALID_OPERATION if the device associated with command_queue does not support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).INVALID_OPERATION if clEnqueueReadImage is called on image which has been created with MEM_HOST_WRITE_ONLY or
MEM_HOST_NO_ACCESS.INVALID_OPERATION if clEnqueueWriteImage is called on image which has been created with MEM_HOST_READ_ONLY or
MEM_HOST_NO_ACCESS.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the write 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 clEnqueueWriteImage(long command_queue,
long image,
boolean blocking_write,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long input_row_pitch,
long input_slice_pitch,
java.nio.IntBuffer ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
Calling clEnqueueWriteImage to update the latest bits in a region of the image with the ptr argument value set to
host_ptr + (origin[2] * image slice pitch + origin[1] * image row pitch + origin[0] * bytes per pixel), where host_ptr is a pointer
to the memory region specified when the image being written is created with MEM_USE_HOST_PTR, must meet the following requirements in order
to avoid undefined behavior:
command_queue - the command-queue in which the write command will be queued. command_queue and image must be created with the same OpenCL context.image - a valid image or image array objectblocking_write - indicates if the read operation is blocking or non-blocking.
If blocking_write is TRUE, the OpenCL implementation copies the data referred to by ptr and enqueues the write command in the
command-queue. The memory pointed to by ptr can be reused by the application after the clEnqueueWriteImage call returns.
If blocking_write is FALSE, the OpenCL implementation will use ptr to perform a non-blocking write. As the write is non-blocking
the implementation can return immediately. The memory pointed to by ptr cannot be reused by the application after the call returns. The
event argument returns an event object which can be used to query the execution status of the write command. When the write command has
completed, the memory pointed to by ptr can then be reused by the application.
origin - defines the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the
(x) offset and the image index in the 1D image array. If image is a 2D image object, origin[2] must be 0. If image
is a 1D image or 1D image buffer object, origin[1] and origin[2] must be 0. If image is a 1D image array object,
origin[2] must be 0. If image is a 1D image array object, origin[1] describes the image index in the 1D image array. If
image is a 2D image array object, origin[2] describes the image index in the 2D image array.region - defines the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and
the number of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If
image is a 2D image object, region[2] must be 1. If image is a 1D image or 1D image buffer object, region[1] and
region[2] must be 1. If image is a 1D image array object, region[2] must be 1. The values in region cannot be 0.input_row_pitch - the length of each row in bytes. This value must be greater than or equal to the element size in bytes * width. If input_row_pitch is set
to 0, the appropriate row pitch is calculated based on the size of each element in bytes multiplied by width.input_slice_pitch - the size in bytes of the 2D slice of the 3D region of a 3D image or each image of a 1D or 2D image array being written. This must be 0 if image
is a 1D or 2D image. This value must be greater than or equal to input_row_pitch * height. If input_slice_pitch is set to 0, the appropriate
slice pitch is calculated based on the input_row_pitch * height.ptr - the pointer to a buffer in host memory where image data is to be written 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 image are not the same or if the context associated
with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if image is not a valid image object.INVALID_VALUE if the region being written specified by origin and region is out of bounds or if ptr is a
NULL value.INVALID_VALUE if values in origin and region do not follow rules described in the argument description for
origin and region.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.INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for image are not
supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and data type) for image are not supported by device associated
with queue.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with image.INVALID_OPERATION if the device associated with command_queue does not support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).INVALID_OPERATION if clEnqueueReadImage is called on image which has been created with MEM_HOST_WRITE_ONLY or
MEM_HOST_NO_ACCESS.INVALID_OPERATION if clEnqueueWriteImage is called on image which has been created with MEM_HOST_READ_ONLY or
MEM_HOST_NO_ACCESS.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the write 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 clEnqueueWriteImage(long command_queue,
long image,
boolean blocking_write,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long input_row_pitch,
long input_slice_pitch,
java.nio.FloatBuffer ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
Calling clEnqueueWriteImage to update the latest bits in a region of the image with the ptr argument value set to
host_ptr + (origin[2] * image slice pitch + origin[1] * image row pitch + origin[0] * bytes per pixel), where host_ptr is a pointer
to the memory region specified when the image being written is created with MEM_USE_HOST_PTR, must meet the following requirements in order
to avoid undefined behavior:
command_queue - the command-queue in which the write command will be queued. command_queue and image must be created with the same OpenCL context.image - a valid image or image array objectblocking_write - indicates if the read operation is blocking or non-blocking.
If blocking_write is TRUE, the OpenCL implementation copies the data referred to by ptr and enqueues the write command in the
command-queue. The memory pointed to by ptr can be reused by the application after the clEnqueueWriteImage call returns.
If blocking_write is FALSE, the OpenCL implementation will use ptr to perform a non-blocking write. As the write is non-blocking
the implementation can return immediately. The memory pointed to by ptr cannot be reused by the application after the call returns. The
event argument returns an event object which can be used to query the execution status of the write command. When the write command has
completed, the memory pointed to by ptr can then be reused by the application.
origin - defines the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the
(x) offset and the image index in the 1D image array. If image is a 2D image object, origin[2] must be 0. If image
is a 1D image or 1D image buffer object, origin[1] and origin[2] must be 0. If image is a 1D image array object,
origin[2] must be 0. If image is a 1D image array object, origin[1] describes the image index in the 1D image array. If
image is a 2D image array object, origin[2] describes the image index in the 2D image array.region - defines the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and
the number of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If
image is a 2D image object, region[2] must be 1. If image is a 1D image or 1D image buffer object, region[1] and
region[2] must be 1. If image is a 1D image array object, region[2] must be 1. The values in region cannot be 0.input_row_pitch - the length of each row in bytes. This value must be greater than or equal to the element size in bytes * width. If input_row_pitch is set
to 0, the appropriate row pitch is calculated based on the size of each element in bytes multiplied by width.input_slice_pitch - the size in bytes of the 2D slice of the 3D region of a 3D image or each image of a 1D or 2D image array being written. This must be 0 if image
is a 1D or 2D image. This value must be greater than or equal to input_row_pitch * height. If input_slice_pitch is set to 0, the appropriate
slice pitch is calculated based on the input_row_pitch * height.ptr - the pointer to a buffer in host memory where image data is to be written 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 image are not the same or if the context associated
with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if image is not a valid image object.INVALID_VALUE if the region being written specified by origin and region is out of bounds or if ptr is a
NULL value.INVALID_VALUE if values in origin and region do not follow rules described in the argument description for
origin and region.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.INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for image are not
supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and data type) for image are not supported by device associated
with queue.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with image.INVALID_OPERATION if the device associated with command_queue does not support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).INVALID_OPERATION if clEnqueueReadImage is called on image which has been created with MEM_HOST_WRITE_ONLY or
MEM_HOST_NO_ACCESS.INVALID_OPERATION if clEnqueueWriteImage is called on image which has been created with MEM_HOST_READ_ONLY or
MEM_HOST_NO_ACCESS.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the write 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 clEnqueueWriteImage(long command_queue,
long image,
boolean blocking_write,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long input_row_pitch,
long input_slice_pitch,
java.nio.DoubleBuffer ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
Calling clEnqueueWriteImage to update the latest bits in a region of the image with the ptr argument value set to
host_ptr + (origin[2] * image slice pitch + origin[1] * image row pitch + origin[0] * bytes per pixel), where host_ptr is a pointer
to the memory region specified when the image being written is created with MEM_USE_HOST_PTR, must meet the following requirements in order
to avoid undefined behavior:
command_queue - the command-queue in which the write command will be queued. command_queue and image must be created with the same OpenCL context.image - a valid image or image array objectblocking_write - indicates if the read operation is blocking or non-blocking.
If blocking_write is TRUE, the OpenCL implementation copies the data referred to by ptr and enqueues the write command in the
command-queue. The memory pointed to by ptr can be reused by the application after the clEnqueueWriteImage call returns.
If blocking_write is FALSE, the OpenCL implementation will use ptr to perform a non-blocking write. As the write is non-blocking
the implementation can return immediately. The memory pointed to by ptr cannot be reused by the application after the call returns. The
event argument returns an event object which can be used to query the execution status of the write command. When the write command has
completed, the memory pointed to by ptr can then be reused by the application.
origin - defines the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the
(x) offset and the image index in the 1D image array. If image is a 2D image object, origin[2] must be 0. If image
is a 1D image or 1D image buffer object, origin[1] and origin[2] must be 0. If image is a 1D image array object,
origin[2] must be 0. If image is a 1D image array object, origin[1] describes the image index in the 1D image array. If
image is a 2D image array object, origin[2] describes the image index in the 2D image array.region - defines the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and
the number of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If
image is a 2D image object, region[2] must be 1. If image is a 1D image or 1D image buffer object, region[1] and
region[2] must be 1. If image is a 1D image array object, region[2] must be 1. The values in region cannot be 0.input_row_pitch - the length of each row in bytes. This value must be greater than or equal to the element size in bytes * width. If input_row_pitch is set
to 0, the appropriate row pitch is calculated based on the size of each element in bytes multiplied by width.input_slice_pitch - the size in bytes of the 2D slice of the 3D region of a 3D image or each image of a 1D or 2D image array being written. This must be 0 if image
is a 1D or 2D image. This value must be greater than or equal to input_row_pitch * height. If input_slice_pitch is set to 0, the appropriate
slice pitch is calculated based on the input_row_pitch * height.ptr - the pointer to a buffer in host memory where image data is to be written 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 image are not the same or if the context associated
with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if image is not a valid image object.INVALID_VALUE if the region being written specified by origin and region is out of bounds or if ptr is a
NULL value.INVALID_VALUE if values in origin and region do not follow rules described in the argument description for
origin and region.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.INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for image are not
supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and data type) for image are not supported by device associated
with queue.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with image.INVALID_OPERATION if the device associated with command_queue does not support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).INVALID_OPERATION if clEnqueueReadImage is called on image which has been created with MEM_HOST_WRITE_ONLY or
MEM_HOST_NO_ACCESS.INVALID_OPERATION if clEnqueueWriteImage is called on image which has been created with MEM_HOST_READ_ONLY or
MEM_HOST_NO_ACCESS.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the write 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 nclEnqueueCopyImage(long command_queue,
long src_image,
long dst_image,
long src_origin,
long dst_origin,
long region,
int num_events_in_wait_list,
long event_wait_list,
long event)
EnqueueCopyImagenum_events_in_wait_list - the number of events in event_wait_listpublic static int clEnqueueCopyImage(long command_queue,
long src_image,
long dst_image,
org.lwjgl.PointerBuffer src_origin,
org.lwjgl.PointerBuffer dst_origin,
org.lwjgl.PointerBuffer region,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
src_image and dst_image can be 1D, 2D, 3D image or a 1D, 2D image array objects allowing us to
perform the following actions:
command_queue - the command-queue in which the copy command will be queued. The OpenCL context associated with command_queue, src_image and
dst_image must be the same.src_origin - the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the
(x) offset and the image index in the 1D image array. If src_image is a 2D image object, src_origin[2] must be 0. If
src_image is a 1D image object, src_origin[1] and src_origin[2] must be 0. If src_image is a 1D image array object,
src_origin[2] must be 0. If src_image is a 1D image array object, src_origin[1] describes the image index in the 1D image
array. If src_image is a 2D image array object, src_origin[2] describes the image index in the 2D image array.dst_origin - the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the
(x) offset and the image index in the 1D image array. If dst_image is a 2D image object, dst_origin[2] must be 0. If
dst_image is a 1D image or 1D image buffer object, dst_origin[1] and dst_origin[2] must be 0. If dst_image is a 1D
image array object, dst_origin[2] must be 0. If dst_image is a 1D image array object, dst_origin[1] describes the image
index in the 1D image array. If dst_image is a 2D image array object, dst_origin[2] describes the image index in the 2D image array.region - the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and the number
of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If
src_image or dst_image is a 2D image object, region[2] must be 1. If src_image or dst_image is a 1D image or
1D image buffer object, region[1] and region[2] must be 1. If src_image or dst_image is a 1D image array object,
region[2] must be 1. The values in region cannot be 0.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, src_image and dst_image are not the same or if the
context associated with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if src_image and dst_image are not valid image objects.IMAGE_FORMAT_MISMATCH if src_image and dst_image do not use the same image format.INVALID_VALUE if the 2D or 3D rectangular region specified by src_origin and src_origin + region refers to a region
outside src_image, or if the 2D or 3D rectangular region specified by dst_origin and dst_origin + region refers to a region
outside dst_image.INVALID_VALUE if values in src_origin, dst_origin and region do not follow rules described in the argument
description for src_origin, dst_origin and region.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.INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for src_image or
dst_image are not supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and data type) for src_image or dst_image are not
supported by device associated with queue.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with src_image or dst_image.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.INVALID_OPERATION if the device associated with command_queue does not support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).MEM_COPY_OVERLAP if src_image and dst_image are the same image object and the source and destination regions overlap.public static int nclEnqueueCopyImageToBuffer(long command_queue,
long src_image,
long dst_buffer,
long src_origin,
long region,
long dst_offset,
int num_events_in_wait_list,
long event_wait_list,
long event)
EnqueueCopyImageToBuffernum_events_in_wait_list - the number of events in event_wait_listpublic static int clEnqueueCopyImageToBuffer(long command_queue,
long src_image,
long dst_buffer,
org.lwjgl.PointerBuffer src_origin,
org.lwjgl.PointerBuffer region,
long dst_offset,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
command_queue - a valid command-queue. The OpenCL context associated with command_queue, src_image and dst_buffer must be the same.src_image - a valid image objectdst_buffer - a valid buffer objectsrc_origin - the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the
(x) offset and the image index in the 1D image array. If src_image is a 2D image object, src_origin[2] must be 0. If
src_image is a 1D image object, src_origin[1] and src_origin[2] must be 0. If src_image is a 1D image array object,
src_origin[2] must be 0. If src_image is a 1D image array object, src_origin[1] describes the image index in the 1D image
array. If src_image is a 2D image array object, src_origin[2] describes the image index in the 2D image array.region - the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and the number
of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If
src_image is a 2D image object, region[2] must be 1. If src_image is a 1D image or 1D image buffer object, region[1]
and region[2] must be 1. If src_image is a 1D image array object, region[2] must be 1. The values in region cannot
be 0.dst_offset - the offset where to begin copying data into dst_buffer. The size in bytes of the region to be copied referred to as dst_cb is
computed as width * height * depth * bytes/image element if src_image is a 3D image object, is computed as
width * height * bytes/image element if src_image is a 2D image, is computed as
width * height * arraysize * bytes/image element if src_image is a 2D image array object, is computed as
width * bytes/image element if src_image is a 1D image or 1D image buffer object and is computed as
width * arraysize * bytes/image element if src_image is a 1D image array object.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, src_image and dst_buffer are not the same or if
the context associated with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if src_image is not a valid image object or dst_buffer is not a valid buffer object or if
src_image is a 1D image buffer object created from dst_buffer.INVALID_VALUE if the 1D, 2D or 3D rectangular region specified by src_origin and src_origin + region refers to a region
outside src_image, or if the region specified by dst_offset and dst_offset + dst_cb to a region outside dst_buffer.INVALID_VALUE if values in src_origin and region do not follow rules described in the argument description for
src_origin and region.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.MISALIGNED_SUB_BUFFER_OFFSET if dst_buffer is a sub-buffer object and offset specified when the sub-buffer object is created is
not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for src_image are not
supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and data type) for src_image are not supported by device
associated with queue.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with src_image or dst_buffer.INVALID_OPERATION if the device associated with command_queue does not support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).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 nclEnqueueCopyBufferToImage(long command_queue,
long src_buffer,
long dst_image,
long src_offset,
long dst_origin,
long region,
int num_events_in_wait_list,
long event_wait_list,
long event)
EnqueueCopyBufferToImagenum_events_in_wait_list - the number of events in event_wait_listpublic static int clEnqueueCopyBufferToImage(long command_queue,
long src_buffer,
long dst_image,
long src_offset,
org.lwjgl.PointerBuffer dst_origin,
org.lwjgl.PointerBuffer region,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
command_queue - a valid command-queue. The OpenCL context associated with command_queue, src_buffer and dst_image must be the same.src_buffer - a valid buffer objectdst_image - a valid image objectsrc_offset - the offset where to begin copying data from src_bufferdst_origin - the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the
(x) offset and the image index in the 1D image array. If dst_image is a 2D image object, dst_origin[2] must be 0. If
dst_image is a 1D image or 1D image buffer object, dst_origin[1] and dst_origin[2] must be 0. If dst_image is a 1D
image array object, dst_origin[2] must be 0. If dst_image is a 1D image array object, dst_origin[1] describes the image
index in the 1D image array. If dst_image is a 2D image array object, dst_origin[2] describes the image index in the 2D image array.region - the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and the number
of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If
dst_image is a 2D image object, region[2] must be 1. If dst_image is a 1D image or
1D image buffer object, region[1] and region[2] must be 1. If dst_image is a 1D image array object,
region[2] must be 1. The values in region cannot be 0.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, src_buffer and dst_image are not the same or if
the context associated with command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if src_buffer is not a valid buffer object or dst_image is not a valid image object or if
dst_image is a 1D image buffer object created from src_buffer.INVALID_VALUE if the 1D, 2D or 3D rectangular region specified by dst_origin and dst_origin + region refer to a region
outside dst_image, or if the region specified by src_offset and src_offset + src_cb refer to a region outside
src_buffer.INVALID_VALUE if values in dst_origin and region do not follow rules described in the argument description for
dst_origin and region.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.MISALIGNED_SUB_BUFFER_OFFSET if src_buffer is a sub-buffer object and offset specified when the sub-buffer object is created is
not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for dst_image are not
supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and data type) for dst_image are not supported by device
associated with queue.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with src_buffer or dst_image.INVALID_OPERATION if the device associated with command_queue does not support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).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 nclEnqueueMapImage(long command_queue,
long image,
int blocking_map,
long map_flags,
long origin,
long region,
long image_row_pitch,
long image_slice_pitch,
int num_events_in_wait_list,
long event_wait_list,
long event,
long errcode_ret)
EnqueueMapImagenum_events_in_wait_list - the number of events in event_wait_list@Nullable
public static java.nio.ByteBuffer clEnqueueMapImage(long command_queue,
long image,
boolean blocking_map,
long map_flags,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
org.lwjgl.PointerBuffer image_row_pitch,
@Nullable
org.lwjgl.PointerBuffer image_slice_pitch,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event,
@Nullable
java.nio.IntBuffer errcode_ret,
@Nullable
java.nio.ByteBuffer old_buffer)
image into the host address space and returns a pointer to this mapped region.
The pointer returned maps a 1D, 2D or 3D region starting at origin and is at least region[0] pixels in size for a 1D image, 1D image
buffer or 1D image array, (image_row_pitch * region[1]) pixels in size for a 2D image or 2D image array, and
(image_slice_pitch * region[2]) pixels in size for a 3D image. The result of a memory access outside this region is undefined.
If the image object is created with MEM_USE_HOST_PTR set in mem_flags, the following will be true:
host_ptr specified in CreateImage is guaranteed to contain the latest bits in the region being mapped when the
clEnqueueMapImage command has completed.clEnqueueMapImage will be derived from the host_ptr specified when the image object is created.Mapped image objects are unmapped using EnqueueUnmapMemObject.
command_queue - a valid command-queueimage - a valid image object. The OpenCL context associated with command_queue and image must be the same.blocking_map - indicates if the map operation is blocking or non-blocking.
If blocking_map is TRUE, clEnqueueMapImage does not return until the specified region in image is mapped into the host address
space and the application can access the contents of the mapped region using the pointer returned by clEnqueueMapImage.
If blocking_map is FALSE i.e. map operation is non-blocking, the pointer to the mapped region returned by clEnqueueMapImage
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 mapped region using the pointer
returned by clEnqueueMapImage.
map_flags - a bit-field. One of:MAP_READ | MAP_WRITE | MAP_WRITE_INVALIDATE_REGION |
origin - the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the
(x) offset and the image index in the 1D image array. If image is a 2D image object, origin[2] must be 0. If image
is a 1D image or 1D image buffer object, origin[1] and origin[2] must be 0. If image is a 1D image array object,
origin[2] must be 0. If image is a 1D image array object, origin[1] describes the image index in the 1D image array. If
image is a 2D image array object, origin[2] describes the image index in the 2D image array.region - the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and the number
of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If image is
a 2D image object, region[2] must be 1. If image is a 1D image or 1D image buffer object, region[1] and region[2]
must be 1. If image is a 1D image array object, region[2] must be 1. The values in region cannot be 0.image_row_pitch - the scan-line pitch in bytes for the mapped region. This must be a non-NULL value.image_slice_pitch - returns the size in bytes of each 2D slice of a 3D image or the size of each 1D or 2D image in a 1D or 2D image array for the mapped region. For a
1D and 2D image, zero is returned if this argument is not NULL. For a 3D image, 1D and 2D image array, image_slice_pitch must be a non-NULL
value.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.errcode_ret - will return an appropriate error code. If errcode_ret is NULL, no error code is returned.errcode_ret is set to SUCCESS. A NULL pointer is returned otherwise with one of the following error values
returned in errcode_ret:
INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.INVALID_CONTEXT if context associated with command_queue and image are not the same or if context associated with
command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if image is not a valid image object.INVALID_VALUE if region being mapped given by (origin, origin+region) is out of bounds or if values specified in
map_flags are not valid.INVALID_VALUE if values in origin and region do not follow rules described in the argument description for origin
and region.INVALID_VALUE if image_row_pitch is NULL.INVALID_VALUE if image is a 3D image, 1D or 2D image array object and image_slice_pitch 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.INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for image are not
supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and data type) for image are not supported by device associated
with queue.MAP_FAILURE if there is a failure to map the requested region into the host address space. This error cannot occur for image objects
created with MEM_USE_HOST_PTR or MEM_ALLOC_HOST_PTR.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.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with image.INVALID_OPERATION if the device associated with command_queue does not support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).INVALID_OPERATION if image has been created with MEM_HOST_WRITE_ONLY or MEM_HOST_NO_ACCESS and
MAP_READ is set in map_flags or if image has been created with MEM_HOST_READ_ONLY or
MEM_HOST_NO_ACCESS and MAP_WRITE or MAP_WRITE_INVALIDATE_REGION is set in map_flags.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.@Nullable
public static java.nio.ByteBuffer clEnqueueMapImage(long command_queue,
long image,
boolean blocking_map,
long map_flags,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
org.lwjgl.PointerBuffer image_row_pitch,
@Nullable
org.lwjgl.PointerBuffer image_slice_pitch,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event,
@Nullable
java.nio.IntBuffer errcode_ret,
long length,
@Nullable
java.nio.ByteBuffer old_buffer)
image into the host address space and returns a pointer to this mapped region.
The pointer returned maps a 1D, 2D or 3D region starting at origin and is at least region[0] pixels in size for a 1D image, 1D image
buffer or 1D image array, (image_row_pitch * region[1]) pixels in size for a 2D image or 2D image array, and
(image_slice_pitch * region[2]) pixels in size for a 3D image. The result of a memory access outside this region is undefined.
If the image object is created with MEM_USE_HOST_PTR set in mem_flags, the following will be true:
host_ptr specified in CreateImage is guaranteed to contain the latest bits in the region being mapped when the
clEnqueueMapImage command has completed.clEnqueueMapImage will be derived from the host_ptr specified when the image object is created.Mapped image objects are unmapped using EnqueueUnmapMemObject.
command_queue - a valid command-queueimage - a valid image object. The OpenCL context associated with command_queue and image must be the same.blocking_map - indicates if the map operation is blocking or non-blocking.
If blocking_map is TRUE, clEnqueueMapImage does not return until the specified region in image is mapped into the host address
space and the application can access the contents of the mapped region using the pointer returned by clEnqueueMapImage.
If blocking_map is FALSE i.e. map operation is non-blocking, the pointer to the mapped region returned by clEnqueueMapImage
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 mapped region using the pointer
returned by clEnqueueMapImage.
map_flags - a bit-field. One of:MAP_READ | MAP_WRITE | MAP_WRITE_INVALIDATE_REGION |
origin - the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the
(x) offset and the image index in the 1D image array. If image is a 2D image object, origin[2] must be 0. If image
is a 1D image or 1D image buffer object, origin[1] and origin[2] must be 0. If image is a 1D image array object,
origin[2] must be 0. If image is a 1D image array object, origin[1] describes the image index in the 1D image array. If
image is a 2D image array object, origin[2] describes the image index in the 2D image array.region - the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and the number
of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If image is
a 2D image object, region[2] must be 1. If image is a 1D image or 1D image buffer object, region[1] and region[2]
must be 1. If image is a 1D image array object, region[2] must be 1. The values in region cannot be 0.image_row_pitch - the scan-line pitch in bytes for the mapped region. This must be a non-NULL value.image_slice_pitch - returns the size in bytes of each 2D slice of a 3D image or the size of each 1D or 2D image in a 1D or 2D image array for the mapped region. For a
1D and 2D image, zero is returned if this argument is not NULL. For a 3D image, 1D and 2D image array, image_slice_pitch must be a non-NULL
value.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.errcode_ret - will return an appropriate error code. If errcode_ret is NULL, no error code is returned.errcode_ret is set to SUCCESS. A NULL pointer is returned otherwise with one of the following error values
returned in errcode_ret:
INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.INVALID_CONTEXT if context associated with command_queue and image are not the same or if context associated with
command_queue and events in event_wait_list are not the same.INVALID_MEM_OBJECT if image is not a valid image object.INVALID_VALUE if region being mapped given by (origin, origin+region) is out of bounds or if values specified in
map_flags are not valid.INVALID_VALUE if values in origin and region do not follow rules described in the argument description for origin
and region.INVALID_VALUE if image_row_pitch is NULL.INVALID_VALUE if image is a 3D image, 1D or 2D image array object and image_slice_pitch 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.INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for image are not
supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and data type) for image are not supported by device associated
with queue.MAP_FAILURE if there is a failure to map the requested region into the host address space. This error cannot occur for image objects
created with MEM_USE_HOST_PTR or MEM_ALLOC_HOST_PTR.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.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with image.INVALID_OPERATION if the device associated with command_queue does not support images (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).INVALID_OPERATION if image has been created with MEM_HOST_WRITE_ONLY or MEM_HOST_NO_ACCESS and
MAP_READ is set in map_flags or if image has been created with MEM_HOST_READ_ONLY or
MEM_HOST_NO_ACCESS and MAP_WRITE or MAP_WRITE_INVALIDATE_REGION is set in map_flags.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 nclGetImageInfo(long image,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
GetImageInfoparam_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 clGetImageInfo(long image,
int param_name,
@Nullable
java.nio.ByteBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
image - the image object being queriedparam_name - the information to query. One of:IMAGE_FORMAT | IMAGE_ELEMENT_SIZE | IMAGE_ROW_PITCH | IMAGE_SLICE_PITCH | IMAGE_WIDTH |
IMAGE_HEIGHT | IMAGE_DEPTH | IMAGE_ARRAY_SIZE | IMAGE_BUFFER | IMAGE_NUM_MIP_LEVELS |
IMAGE_NUM_SAMPLES |
param_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 image is a not a valid image 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 clGetImageInfo(long image,
int param_name,
@Nullable
java.nio.IntBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
image - the image object being queriedparam_name - the information to query. One of:IMAGE_FORMAT | IMAGE_ELEMENT_SIZE | IMAGE_ROW_PITCH | IMAGE_SLICE_PITCH | IMAGE_WIDTH |
IMAGE_HEIGHT | IMAGE_DEPTH | IMAGE_ARRAY_SIZE | IMAGE_BUFFER | IMAGE_NUM_MIP_LEVELS |
IMAGE_NUM_SAMPLES |
param_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 image is a not a valid image 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 clGetImageInfo(long image,
int param_name,
@Nullable
org.lwjgl.PointerBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
image - the image object being queriedparam_name - the information to query. One of:IMAGE_FORMAT | IMAGE_ELEMENT_SIZE | IMAGE_ROW_PITCH | IMAGE_SLICE_PITCH | IMAGE_WIDTH |
IMAGE_HEIGHT | IMAGE_DEPTH | IMAGE_ARRAY_SIZE | IMAGE_BUFFER | IMAGE_NUM_MIP_LEVELS |
IMAGE_NUM_SAMPLES |
param_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 image is a not a valid image 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 clRetainMemObject(long memobj)
memobj reference count.
CreateBuffer, CreateSubBuffer and CreateImage perform an implicit retain.
memobj - the memory object to retainSUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_MEM_OBJECT if memobj is not a valid memory object (buffer or image 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 clReleaseMemObject(long memobj)
memobj reference count.
After the memobj reference count becomes zero and commands queued for execution on a command-queue(s) that use memobj have finished, the
memory object is deleted. If memobj is a buffer object, memobj cannot be deleted until all sub-buffer objects associated with
memobj are deleted.
memobj - the memory object to releaseSUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_MEM_OBJECT if memobj is not a valid memory 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 nclEnqueueUnmapMemObject(long command_queue,
long memobj,
long mapped_ptr,
int num_events_in_wait_list,
long event_wait_list,
long event)
EnqueueUnmapMemObjectnum_events_in_wait_list - the number of events in event_wait_listpublic static int clEnqueueUnmapMemObject(long command_queue,
long memobj,
java.nio.ByteBuffer mapped_ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
EnqueueMapBuffer or EnqueueMapImage are considered to be complete.
EnqueueMapBuffer, and EnqueueMapImage increments the mapped count of the memory object. The initial mapped count value of the memory object is zero.
Multiple calls to EnqueueMapBuffer, or EnqueueMapImage on the same memory object will increment this mapped count by appropriate number of calls.
clEnqueueUnmapMemObject decrements the mapped count of the memory object. EnqueueMapBuffer, and EnqueueMapImage act as synchronization points
for a region of the buffer object being mapped.
command_queue - a valid command-queuememobj - a valid memory object. The OpenCL context associated with command_queue and memobj must be the same.mapped_ptr - the host address returned by a previous call to EnqueueMapBuffer, or EnqueueMapImage for memobjevent_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_MEM_OBJECT if memobj is not a valid memory object.INVALID_VALUE if mapped_ptr is not a valid pointer returned by EnqueueMapBuffer, or EnqueueMapImage for memobj.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.INVALID_CONTEXT if context associated with command_queue and memobj are not the same or if the context associated with
command_queue and events in event_wait_list are not the same.public static int nclGetMemObjectInfo(long memobj,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
GetMemObjectInfoparam_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 clGetMemObjectInfo(long memobj,
int param_name,
@Nullable
java.nio.ByteBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
memobj - the memory object being queriedparam_name - the information to query. One of:MEM_TYPE | MEM_FLAGS | MEM_SIZE | MEM_HOST_PTR | MEM_MAP_COUNT | MEM_REFERENCE_COUNT |
MEM_CONTEXT | MEM_ASSOCIATED_MEMOBJECT | MEM_OFFSET | MEM_USES_SVM_POINTER |
param_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 memobj is a not a valid memory 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 clGetMemObjectInfo(long memobj,
int param_name,
@Nullable
java.nio.IntBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
memobj - the memory object being queriedparam_name - the information to query. One of:MEM_TYPE | MEM_FLAGS | MEM_SIZE | MEM_HOST_PTR | MEM_MAP_COUNT | MEM_REFERENCE_COUNT |
MEM_CONTEXT | MEM_ASSOCIATED_MEMOBJECT | MEM_OFFSET | MEM_USES_SVM_POINTER |
param_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 memobj is a not a valid memory 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 clGetMemObjectInfo(long memobj,
int param_name,
@Nullable
java.nio.LongBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
memobj - the memory object being queriedparam_name - the information to query. One of:MEM_TYPE | MEM_FLAGS | MEM_SIZE | MEM_HOST_PTR | MEM_MAP_COUNT | MEM_REFERENCE_COUNT |
MEM_CONTEXT | MEM_ASSOCIATED_MEMOBJECT | MEM_OFFSET | MEM_USES_SVM_POINTER |
param_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 memobj is a not a valid memory 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 clGetMemObjectInfo(long memobj,
int param_name,
@Nullable
org.lwjgl.PointerBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
memobj - the memory object being queriedparam_name - the information to query. One of:MEM_TYPE | MEM_FLAGS | MEM_SIZE | MEM_HOST_PTR | MEM_MAP_COUNT | MEM_REFERENCE_COUNT |
MEM_CONTEXT | MEM_ASSOCIATED_MEMOBJECT | MEM_OFFSET | MEM_USES_SVM_POINTER |
param_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 memobj is a not a valid memory 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 nclCreateSampler(long context,
int normalized_coords,
int addressing_mode,
int filter_mode,
long errcode_ret)
CreateSamplerpublic static long clCreateSampler(long context,
boolean normalized_coords,
int addressing_mode,
int filter_mode,
@Nullable
java.nio.IntBuffer errcode_ret)
A sampler object describes how to sample an image when the image is read in the kernel. The built-in functions to read from an image in a kernel take a sampler as an argument. The sampler arguments to the image read function can be sampler objects created using OpenCL functions and passed as argument values to the kernel or can be samplers declared inside a kernel.
context - a valid OpenCL contextnormalized_coords - determines if the image coordinates specified are normalized or notaddressing_mode - specifies how out-of-range image coordinates are handled when reading from an image. One of:ADDRESS_NONE | ADDRESS_CLAMP_TO_EDGE | ADDRESS_CLAMP | ADDRESS_REPEAT |
ADDRESS_MIRRORED_REPEAT |
filter_mode - the type of filter that must be applied when reading an image. One of:FILTER_NEAREST | FILTER_LINEAR |
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 addressing_mode, filter_mode or normalized_coords or combination of these argument values are
not valid.INVALID_OPERATION if images are not supported by any device associated with context (i.e. DEVICE_IMAGE_SUPPORT is
FALSE).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 clRetainSampler(long sampler)
CreateSampler performs an implicit retain.sampler - the sample object to retainSUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_SAMPLER if sampler is not a valid sampler 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 clReleaseSampler(long sampler)
sampler - the sample object to releaseSUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_SAMPLER if sampler is not a valid sampler 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 nclGetSamplerInfo(long sampler,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
GetSamplerInfoparam_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 clGetSamplerInfo(long sampler,
int param_name,
@Nullable
java.nio.ByteBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
sampler - the sampler being queriedparam_name - the information to query. One of:SAMPLER_REFERENCE_COUNT | SAMPLER_CONTEXT | SAMPLER_NORMALIZED_COORDS | SAMPLER_ADDRESSING_MODE |
SAMPLER_FILTER_MODE | SAMPLER_MIP_FILTER_MODE | SAMPLER_LOD_MIN | SAMPLER_LOD_MAX |
param_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_SAMPLER if sampler is a not a valid sampler 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 clGetSamplerInfo(long sampler,
int param_name,
@Nullable
java.nio.IntBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
sampler - the sampler being queriedparam_name - the information to query. One of:SAMPLER_REFERENCE_COUNT | SAMPLER_CONTEXT | SAMPLER_NORMALIZED_COORDS | SAMPLER_ADDRESSING_MODE |
SAMPLER_FILTER_MODE | SAMPLER_MIP_FILTER_MODE | SAMPLER_LOD_MIN | SAMPLER_LOD_MAX |
param_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_SAMPLER if sampler is a not a valid sampler 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 clGetSamplerInfo(long sampler,
int param_name,
@Nullable
org.lwjgl.PointerBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
sampler - the sampler being queriedparam_name - the information to query. One of:SAMPLER_REFERENCE_COUNT | SAMPLER_CONTEXT | SAMPLER_NORMALIZED_COORDS | SAMPLER_ADDRESSING_MODE |
SAMPLER_FILTER_MODE | SAMPLER_MIP_FILTER_MODE | SAMPLER_LOD_MIN | SAMPLER_LOD_MAX |
param_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_SAMPLER if sampler is a not a valid sampler 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 nclCreateProgramWithSource(long context,
int count,
long strings,
long lengths,
long errcode_ret)
CreateProgramWithSourcecount - the number of elements in the strings and lengths arrayspublic static long clCreateProgramWithSource(long context,
org.lwjgl.PointerBuffer strings,
@Nullable
org.lwjgl.PointerBuffer lengths,
@Nullable
java.nio.IntBuffer errcode_ret)
context. The source code specified by strings is either an OpenCL C
program source, header or implementation-defined source for custom devices that support an online compiler.context - a valid OpenCL contextstrings - an array of count pointers to optionally null-terminated character strings that make up the source codelengths - an array with the number of chars in each string (the string length). If an element in lengths is zero, its accompanying string is
null-terminated. If lengths is NULL, all strings in the strings argument are considered null-terminated. Any length value passed in
that is greater than zero excludes the null terminator in its count.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 program 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 count is zero or if strings or any entry in strings is NULL.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 clCreateProgramWithSource(long context,
java.lang.CharSequence[] strings,
@Nullable
java.nio.IntBuffer errcode_ret)
context. The source code specified by strings is either an OpenCL C
program source, header or implementation-defined source for custom devices that support an online compiler.context - a valid OpenCL contextstrings - an array of count pointers to optionally null-terminated character strings that make up the source codeerrcode_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 program 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 count is zero or if strings or any entry in strings is NULL.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 clCreateProgramWithSource(long context,
java.lang.CharSequence string,
@Nullable
java.nio.IntBuffer errcode_ret)
context. The source code specified by strings is either an OpenCL C
program source, header or implementation-defined source for custom devices that support an online compiler.context - a valid OpenCL contexterrcode_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 program 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 count is zero or if strings or any entry in strings is NULL.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 nclCreateProgramWithBinary(long context,
int num_devices,
long device_list,
long lengths,
long binaries,
long binary_status,
long errcode_ret)
CreateProgramWithBinarynum_devices - the number of devices listed in device_listpublic static long clCreateProgramWithBinary(long context,
org.lwjgl.PointerBuffer device_list,
org.lwjgl.PointerBuffer lengths,
org.lwjgl.PointerBuffer binaries,
@Nullable
java.nio.IntBuffer binary_status,
@Nullable
java.nio.IntBuffer errcode_ret)
binary into the program object.
The program binaries specified by binaries contain the bits that describe one of the following:
context,context, orcontext.The program binary can consist of either or both:
OpenCL allows applications to create a program object using the program source or binary and build appropriate program executables. This can be very useful as it allows applications to load program source and then compile and link to generate a program executable online on its first instance for appropriate OpenCL devices in the system. These executables can now be queried and cached by the application. Future instances of the application launching will no longer need to compile and link the program executables. The cached executables can be read and loaded by the application, which can help significantly reduce the application initialization time.
context - a valid OpenCL contextdevice_list - a pointer to a list of devices that are in context. device_list must be a non-NULL value. The binaries are loaded for devices specified in
this list.lengths - an array of the size in bytes of the program binaries to be loaded for devices specified by device_list.binaries - an array of pointers to program binaries to be loaded for devices specified by device_list. For each device given by device_list[i],
the pointer to the program binary for that device is given by binaries[i] and the length of this corresponding binary is given by
lengths[i]. lengths[i] cannot be zero and binaries[i] cannot be a NULL pointer.binary_status - returns whether the program binary for each device specified in device_list was loaded successfully or not. It is an array of num_devices
entries and returns SUCCESS in binary_status[i] if binary was successfully loaded for device specified by device_list[i];
otherwise returns INVALID_VALUE if lengths[i] is zero or if binaries[i] is a NULL value or INVALID_BINARY in
binary_status[i] if program binary is not a valid binary for the specified device. If binary_status is NULL, it is ignored.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 program 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 device_list is NULL or num_devices is zero.INVALID_DEVICE if OpenCL devices listed in device_list are not in the list of devices associated with context.INVALID_VALUE if lengths or binaries are NULL or if any entry in lengths[i] is zero or binaries[i] is NULL.INVALID_BINARY if an invalid program binary was encountered for any device. binary_status will return specific status for each 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 clCreateProgramWithBinary(long context,
org.lwjgl.PointerBuffer device_list,
java.nio.ByteBuffer[] binaries,
@Nullable
java.nio.IntBuffer binary_status,
@Nullable
java.nio.IntBuffer errcode_ret)
binary into the program object.
The program binaries specified by binaries contain the bits that describe one of the following:
context,context, orcontext.The program binary can consist of either or both:
OpenCL allows applications to create a program object using the program source or binary and build appropriate program executables. This can be very useful as it allows applications to load program source and then compile and link to generate a program executable online on its first instance for appropriate OpenCL devices in the system. These executables can now be queried and cached by the application. Future instances of the application launching will no longer need to compile and link the program executables. The cached executables can be read and loaded by the application, which can help significantly reduce the application initialization time.
context - a valid OpenCL contextdevice_list - a pointer to a list of devices that are in context. device_list must be a non-NULL value. The binaries are loaded for devices specified in
this list.binaries - an array of pointers to program binaries to be loaded for devices specified by device_list. For each device given by device_list[i],
the pointer to the program binary for that device is given by binaries[i] and the length of this corresponding binary is given by
lengths[i]. lengths[i] cannot be zero and binaries[i] cannot be a NULL pointer.binary_status - returns whether the program binary for each device specified in device_list was loaded successfully or not. It is an array of num_devices
entries and returns SUCCESS in binary_status[i] if binary was successfully loaded for device specified by device_list[i];
otherwise returns INVALID_VALUE if lengths[i] is zero or if binaries[i] is a NULL value or INVALID_BINARY in
binary_status[i] if program binary is not a valid binary for the specified device. If binary_status is NULL, it is ignored.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 program 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 device_list is NULL or num_devices is zero.INVALID_DEVICE if OpenCL devices listed in device_list are not in the list of devices associated with context.INVALID_VALUE if lengths or binaries are NULL or if any entry in lengths[i] is zero or binaries[i] is NULL.INVALID_BINARY if an invalid program binary was encountered for any device. binary_status will return specific status for each 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 clCreateProgramWithBinary(long context,
org.lwjgl.PointerBuffer device_list,
java.nio.ByteBuffer binary,
@Nullable
java.nio.IntBuffer binary_status,
@Nullable
java.nio.IntBuffer errcode_ret)
binary into the program object.
The program binaries specified by binaries contain the bits that describe one of the following:
context,context, orcontext.The program binary can consist of either or both:
OpenCL allows applications to create a program object using the program source or binary and build appropriate program executables. This can be very useful as it allows applications to load program source and then compile and link to generate a program executable online on its first instance for appropriate OpenCL devices in the system. These executables can now be queried and cached by the application. Future instances of the application launching will no longer need to compile and link the program executables. The cached executables can be read and loaded by the application, which can help significantly reduce the application initialization time.
context - a valid OpenCL contextdevice_list - a pointer to a list of devices that are in context. device_list must be a non-NULL value. The binaries are loaded for devices specified in
this list.binary_status - returns whether the program binary for each device specified in device_list was loaded successfully or not. It is an array of num_devices
entries and returns SUCCESS in binary_status[i] if binary was successfully loaded for device specified by device_list[i];
otherwise returns INVALID_VALUE if lengths[i] is zero or if binaries[i] is a NULL value or INVALID_BINARY in
binary_status[i] if program binary is not a valid binary for the specified device. If binary_status is NULL, it is ignored.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 program 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 device_list is NULL or num_devices is zero.INVALID_DEVICE if OpenCL devices listed in device_list are not in the list of devices associated with context.INVALID_VALUE if lengths or binaries are NULL or if any entry in lengths[i] is zero or binaries[i] is NULL.INVALID_BINARY if an invalid program binary was encountered for any device. binary_status will return specific status for each 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 int clRetainProgram(long program)
program reference count. clCreateProgram does an implicit retain.program - the program object to retainSUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_PROGRAM if program is not a valid program 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 clReleaseProgram(long program)
program reference count. The program object is deleted after all kernel objects associated with program have been deleted and the
program reference count becomes zero.program - the program object to releaseSUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_PROGRAM if program is not a valid program 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 nclBuildProgram(long program,
int num_devices,
long device_list,
long options,
long pfn_notify,
long user_data)
BuildProgramnum_devices - the number of devices listed in device_listpublic static int clBuildProgram(long program,
@Nullable
org.lwjgl.PointerBuffer device_list,
java.nio.ByteBuffer options,
@Nullable
CLProgramCallbackI pfn_notify,
long user_data)
program. OpenCL allows program executables to be built using the source or the binary. clBuildProgram must be called for
program created using either CreateProgramWithSource or CreateProgramWithBinary to build the program executable for one or more devices
associated with program. If program is created with CreateProgramWithBinary, then the program binary must be an executable binary (not
a compiled binary or library).
The executable binary can be queried using GetProgramInfo and can be specified to CreateProgramWithBinary to create a new program object.
program - the program objectdevice_list - a pointer to a list of devices associated with program. If device_list is a NULL value, the program executable is built for all
devices associated with program for which a source or binary has been loaded. If device_list is a non-NULL value, the program
executable is built for devices specified in this list for which a source or binary has been loaded.options - a pointer to a null-terminated string of characters that describes the build options to be used for building the program executablepfn_notify - a function pointer to a notification routine. The notification routine is a callback function that an application can register and which will be
called when the program executable has been built (successfully or unsuccessfully). If pfn_notify is not NULL, clBuildProgram does
not need to wait for the build to complete and can return immediately once the build operation can begin. The build operation can begin if the
context, program whose sources are being compiled and linked, list of devices and build options specified are all valid and appropriate host and
device resources needed to perform the build are available. If pfn_notify is NULL, clBuildProgram does not return until the build
has completed. This callback function may be called asynchronously by the OpenCL implementation. It is the application's responsibility to ensure
that the callback function is thread-safe.user_data - will be passed as an argument when pfn_notify is called. user_data can be NULL.SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_PROGRAM if program is not a valid program object.INVALID_VALUE if device_list is NULL and num_devices is > 0, or if device_list is not NULL and num_devices is 0.INVALID_VALUE if pfn_notify is NULL but user_data is not NULL.INVALID_DEVICE if OpenCL devices listed in device_list are not in the list of devices associated with program.INVALID_BINARY if program is created with CreateProgramWithBinary and devices listed in device_list do not have a valid
program binary loaded.INVALID_BUILD_OPTIONS if the build options specified by options are invalid.INVALID_OPERATION if the build of a program executable for any of the devices listed in device_list by a previous call to
clBuildProgram for program has not completed.COMPILER_NOT_AVAILABLE if program is created with CreateProgramWithSource and a compiler is not available i.e.
DEVICE_COMPILER_AVAILABLE is set to FALSE.BUILD_PROGRAM_FAILURE if there is a failure to build the program executable. This error will be returned if clBuildProgram does
not return until the build has completed.INVALID_OPERATION if there are kernel objects attached to program.INVALID_OPERATION if program was not created with CreateProgramWithSource or CreateProgramWithBinary.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 clBuildProgram(long program,
@Nullable
org.lwjgl.PointerBuffer device_list,
java.lang.CharSequence options,
@Nullable
CLProgramCallbackI pfn_notify,
long user_data)
program. OpenCL allows program executables to be built using the source or the binary. clBuildProgram must be called for
program created using either CreateProgramWithSource or CreateProgramWithBinary to build the program executable for one or more devices
associated with program. If program is created with CreateProgramWithBinary, then the program binary must be an executable binary (not
a compiled binary or library).
The executable binary can be queried using GetProgramInfo and can be specified to CreateProgramWithBinary to create a new program object.
program - the program objectdevice_list - a pointer to a list of devices associated with program. If device_list is a NULL value, the program executable is built for all
devices associated with program for which a source or binary has been loaded. If device_list is a non-NULL value, the program
executable is built for devices specified in this list for which a source or binary has been loaded.options - a pointer to a null-terminated string of characters that describes the build options to be used for building the program executablepfn_notify - a function pointer to a notification routine. The notification routine is a callback function that an application can register and which will be
called when the program executable has been built (successfully or unsuccessfully). If pfn_notify is not NULL, clBuildProgram does
not need to wait for the build to complete and can return immediately once the build operation can begin. The build operation can begin if the
context, program whose sources are being compiled and linked, list of devices and build options specified are all valid and appropriate host and
device resources needed to perform the build are available. If pfn_notify is NULL, clBuildProgram does not return until the build
has completed. This callback function may be called asynchronously by the OpenCL implementation. It is the application's responsibility to ensure
that the callback function is thread-safe.user_data - will be passed as an argument when pfn_notify is called. user_data can be NULL.SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_PROGRAM if program is not a valid program object.INVALID_VALUE if device_list is NULL and num_devices is > 0, or if device_list is not NULL and num_devices is 0.INVALID_VALUE if pfn_notify is NULL but user_data is not NULL.INVALID_DEVICE if OpenCL devices listed in device_list are not in the list of devices associated with program.INVALID_BINARY if program is created with CreateProgramWithBinary and devices listed in device_list do not have a valid
program binary loaded.INVALID_BUILD_OPTIONS if the build options specified by options are invalid.INVALID_OPERATION if the build of a program executable for any of the devices listed in device_list by a previous call to
clBuildProgram for program has not completed.COMPILER_NOT_AVAILABLE if program is created with CreateProgramWithSource and a compiler is not available i.e.
DEVICE_COMPILER_AVAILABLE is set to FALSE.BUILD_PROGRAM_FAILURE if there is a failure to build the program executable. This error will be returned if clBuildProgram does
not return until the build has completed.INVALID_OPERATION if there are kernel objects attached to program.INVALID_OPERATION if program was not created with CreateProgramWithSource or CreateProgramWithBinary.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 clBuildProgram(long program,
long device,
java.lang.CharSequence options,
@Nullable
CLProgramCallbackI pfn_notify,
long user_data)
program. OpenCL allows program executables to be built using the source or the binary. clBuildProgram must be called for
program created using either CreateProgramWithSource or CreateProgramWithBinary to build the program executable for one or more devices
associated with program. If program is created with CreateProgramWithBinary, then the program binary must be an executable binary (not
a compiled binary or library).
The executable binary can be queried using GetProgramInfo and can be specified to CreateProgramWithBinary to create a new program object.
program - the program objectoptions - a pointer to a null-terminated string of characters that describes the build options to be used for building the program executablepfn_notify - a function pointer to a notification routine. The notification routine is a callback function that an application can register and which will be
called when the program executable has been built (successfully or unsuccessfully). If pfn_notify is not NULL, clBuildProgram does
not need to wait for the build to complete and can return immediately once the build operation can begin. The build operation can begin if the
context, program whose sources are being compiled and linked, list of devices and build options specified are all valid and appropriate host and
device resources needed to perform the build are available. If pfn_notify is NULL, clBuildProgram does not return until the build
has completed. This callback function may be called asynchronously by the OpenCL implementation. It is the application's responsibility to ensure
that the callback function is thread-safe.user_data - will be passed as an argument when pfn_notify is called. user_data can be NULL.SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_PROGRAM if program is not a valid program object.INVALID_VALUE if device_list is NULL and num_devices is > 0, or if device_list is not NULL and num_devices is 0.INVALID_VALUE if pfn_notify is NULL but user_data is not NULL.INVALID_DEVICE if OpenCL devices listed in device_list are not in the list of devices associated with program.INVALID_BINARY if program is created with CreateProgramWithBinary and devices listed in device_list do not have a valid
program binary loaded.INVALID_BUILD_OPTIONS if the build options specified by options are invalid.INVALID_OPERATION if the build of a program executable for any of the devices listed in device_list by a previous call to
clBuildProgram for program has not completed.COMPILER_NOT_AVAILABLE if program is created with CreateProgramWithSource and a compiler is not available i.e.
DEVICE_COMPILER_AVAILABLE is set to FALSE.BUILD_PROGRAM_FAILURE if there is a failure to build the program executable. This error will be returned if clBuildProgram does
not return until the build has completed.INVALID_OPERATION if there are kernel objects attached to program.INVALID_OPERATION if program was not created with CreateProgramWithSource or CreateProgramWithBinary.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 clUnloadCompiler()
Calls to BuildProgram after UnloadCompiler will reload the compiler, if necessary, to build the appropriate program executable.
SUCCESSpublic static int nclGetProgramInfo(long program,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
GetProgramInfoparam_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 clGetProgramInfo(long program,
int param_name,
@Nullable
java.nio.ByteBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
program - the program object being queriedparam_name - the information to query. One of:PROGRAM_REFERENCE_COUNT | PROGRAM_CONTEXT | PROGRAM_NUM_DEVICES | PROGRAM_DEVICES |
PROGRAM_SOURCE | PROGRAM_BINARY_SIZES | PROGRAM_BINARIES | PROGRAM_NUM_KERNELS |
PROGRAM_KERNEL_NAMES | PROGRAM_IL |
param_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_PROGRAM if program is a not a valid program object.INVALID_PROGRAM_EXECUTABLE if param_name is PROGRAM_NUM_KERNELS or PROGRAM_KERNEL_NAMES and a
successful program executable has not been built for at least one device in the list of devices associated with program.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 clGetProgramInfo(long program,
int param_name,
@Nullable
java.nio.IntBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
program - the program object being queriedparam_name - the information to query. One of:PROGRAM_REFERENCE_COUNT | PROGRAM_CONTEXT | PROGRAM_NUM_DEVICES | PROGRAM_DEVICES |
PROGRAM_SOURCE | PROGRAM_BINARY_SIZES | PROGRAM_BINARIES | PROGRAM_NUM_KERNELS |
PROGRAM_KERNEL_NAMES | PROGRAM_IL |
param_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_PROGRAM if program is a not a valid program object.INVALID_PROGRAM_EXECUTABLE if param_name is PROGRAM_NUM_KERNELS or PROGRAM_KERNEL_NAMES and a
successful program executable has not been built for at least one device in the list of devices associated with program.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 clGetProgramInfo(long program,
int param_name,
@Nullable
org.lwjgl.PointerBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
program - the program object being queriedparam_name - the information to query. One of:PROGRAM_REFERENCE_COUNT | PROGRAM_CONTEXT | PROGRAM_NUM_DEVICES | PROGRAM_DEVICES |
PROGRAM_SOURCE | PROGRAM_BINARY_SIZES | PROGRAM_BINARIES | PROGRAM_NUM_KERNELS |
PROGRAM_KERNEL_NAMES | PROGRAM_IL |
param_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_PROGRAM if program is a not a valid program object.INVALID_PROGRAM_EXECUTABLE if param_name is PROGRAM_NUM_KERNELS or PROGRAM_KERNEL_NAMES and a
successful program executable has not been built for at least one device in the list of devices associated with program.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 nclGetProgramBuildInfo(long program,
long device,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
GetProgramBuildInfoparam_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 clGetProgramBuildInfo(long program,
long device,
int param_name,
@Nullable
java.nio.ByteBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
program - the program object being querieddevice - the device for which build information is being queried. device must be a valid device associated with program.param_name - the information to query. One of:PROGRAM_BUILD_STATUS | PROGRAM_BUILD_OPTIONS | PROGRAM_BUILD_LOG |
PROGRAM_BINARY_TYPE | PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE |
param_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_DEVICE if device is not in the list of devices associated with program.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_PROGRAM if program is a not a valid program 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 clGetProgramBuildInfo(long program,
long device,
int param_name,
@Nullable
java.nio.IntBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
program - the program object being querieddevice - the device for which build information is being queried. device must be a valid device associated with program.param_name - the information to query. One of:PROGRAM_BUILD_STATUS | PROGRAM_BUILD_OPTIONS | PROGRAM_BUILD_LOG |
PROGRAM_BINARY_TYPE | PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE |
param_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_DEVICE if device is not in the list of devices associated with program.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_PROGRAM if program is a not a valid program 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 clGetProgramBuildInfo(long program,
long device,
int param_name,
@Nullable
org.lwjgl.PointerBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
program - the program object being querieddevice - the device for which build information is being queried. device must be a valid device associated with program.param_name - the information to query. One of:PROGRAM_BUILD_STATUS | PROGRAM_BUILD_OPTIONS | PROGRAM_BUILD_LOG |
PROGRAM_BINARY_TYPE | PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE |
param_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_DEVICE if device is not in the list of devices associated with program.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_PROGRAM if program is a not a valid program 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 nclCreateKernel(long program,
long kernel_name,
long errcode_ret)
CreateKernelpublic static long clCreateKernel(long program,
java.nio.ByteBuffer kernel_name,
@Nullable
java.nio.IntBuffer errcode_ret)
A kernel is a function declared in a program. A kernel is identified by the __kernel qualifier applied to any function in a program. A kernel
object encapsulates the specific __kernel function declared in a program and the argument values to be used when executing this __kernel
function.
Kernel objects can only be created once you have a program object with a valid program source or binary loaded into the program object and the program
executable has been successfully built for one or more devices associated with program. No changes to the program executable are allowed while there are
kernel objects associated with a program object. This means that calls to BuildProgram and CompileProgram return
INVALID_OPERATION if there are kernel objects attached to a program object. The OpenCL context associated with program will be the context
associated with kernel. The list of devices associated with program are the devices associated with kernel. Devices associated with a program object for
which a valid program executable has been built can be used to execute kernels declared in the program object.
program - a program object with a successfully built executablekernel_name - a function name in the program declared with the __kernel qualifiererrcode_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 kernel object is created successfully. Otherwise, it returns a NULL value
with one of the following error values returned in errcode_ret:
INVALID_PROGRAM if program is not a valid program object.INVALID_PROGRAM_EXECUTABLE if there is no successfully built executable for program.INVALID_KERNEL_NAME if kernel_name is not found in program.INVALID_KERNEL_DEFINITION if the function definition for __kernel function given by kernel_name such as the number of
arguments, the argument types are not the same for all devices for which the program executable has been built.INVALID_VALUE if kernel_name is NULL.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 clCreateKernel(long program,
java.lang.CharSequence kernel_name,
@Nullable
java.nio.IntBuffer errcode_ret)
A kernel is a function declared in a program. A kernel is identified by the __kernel qualifier applied to any function in a program. A kernel
object encapsulates the specific __kernel function declared in a program and the argument values to be used when executing this __kernel
function.
Kernel objects can only be created once you have a program object with a valid program source or binary loaded into the program object and the program
executable has been successfully built for one or more devices associated with program. No changes to the program executable are allowed while there are
kernel objects associated with a program object. This means that calls to BuildProgram and CompileProgram return
INVALID_OPERATION if there are kernel objects attached to a program object. The OpenCL context associated with program will be the context
associated with kernel. The list of devices associated with program are the devices associated with kernel. Devices associated with a program object for
which a valid program executable has been built can be used to execute kernels declared in the program object.
program - a program object with a successfully built executablekernel_name - a function name in the program declared with the __kernel qualifiererrcode_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 kernel object is created successfully. Otherwise, it returns a NULL value
with one of the following error values returned in errcode_ret:
INVALID_PROGRAM if program is not a valid program object.INVALID_PROGRAM_EXECUTABLE if there is no successfully built executable for program.INVALID_KERNEL_NAME if kernel_name is not found in program.INVALID_KERNEL_DEFINITION if the function definition for __kernel function given by kernel_name such as the number of
arguments, the argument types are not the same for all devices for which the program executable has been built.INVALID_VALUE if kernel_name is NULL.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 nclCreateKernelsInProgram(long program,
int num_kernels,
long kernels,
long num_kernels_ret)
CreateKernelsInProgramnum_kernels - the size of memory pointed to by kernels specified as the number of cl_kernel entriespublic static int clCreateKernelsInProgram(long program,
@Nullable
org.lwjgl.PointerBuffer kernels,
@Nullable
java.nio.IntBuffer num_kernels_ret)
program. Kernel objects are not created for any __kernel functions in program
that do not have the same function definition across all devices for which a program executable has been successfully built.
See CreateKernel for more details.
program - a program object with a successfully built executablekernels - the buffer where the kernel objects for kernels in program will be returned. If kernels is NULL, it is ignored. If kernels
is not NULL, num_kernels must be greater than or equal to the number of kernels in program.num_kernels_ret - the number of kernels in program. If num_kernels_ret is NULL, it is ignored.SUCCESS if the kernel objects were successfully allocated. Otherwise, it returns one of the following errors:
INVALID_PROGRAM if program is not a valid program object.INVALID_PROGRAM_EXECUTABLE if there is no successfully built executable for any device in program.INVALID_VALUE if kernels is not NULL and num_kernels is less than the number of kernels in program.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 clRetainKernel(long kernel)
kernel reference count. CreateKernel or CreateKernelsInProgram do an implicit retain.kernel - the kernel to retainSUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_KERNEL if kernel is not a valid kernel 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 clReleaseKernel(long kernel)
kernel reference count.
The kernel object is deleted once the number of instances that are retained to kernel become zero and the kernel object is no longer needed by
any enqueued commands that use kernel.
kernel - the kernel to releaseSUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_KERNEL if kernel is not a valid kernel 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 nclSetKernelArg(long kernel,
int arg_index,
long arg_size,
long arg_value)
SetKernelArgarg_size - the size of the argument value. If the argument is a memory object, the size is the size of the buffer or image object type. For arguments declared
with the __local qualifier, the size specified will be the size in bytes of the buffer that must be allocated for the __local
argument. If the argument is of type sampler_t, the arg_size value must be equal to sizeof(cl_sampler). For all other
arguments, the size will be the size of argument type.public static int clSetKernelArg(long kernel,
int arg_index,
long arg_size)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
arg_size - the size of the argument value. If the argument is a memory object, the size is the size of the buffer or image object type. For arguments declared
with the __local qualifier, the size specified will be the size in bytes of the buffer that must be allocated for the __local
argument. If the argument is of type sampler_t, the arg_size value must be equal to sizeof(cl_sampler). For all other
arguments, the size will be the size of argument type.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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg(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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
arg_value - a pointer to data that should be used as the argument value for argument specified by arg_index. The argument data pointed to by
arg_value is copied and the arg_value pointer can therefore be reused by the application after clSetKernelArg returns. The
argument value specified is the value used by all API calls that enqueue kernel (EnqueueNDRangeKernel and EnqueueTask) until
the argument value is changed by a call to clSetKernelArg for kernel.
If the argument is a memory object (buffer, image or image array), the arg_value entry will be a pointer to the appropriate buffer, image or
image array object. The memory object must be created with the context associated with the kernel object. If the argument is a buffer object, the
arg_value pointer can be NULL or point to a NULL value in which case a NULL value will be used as the value for the argument declared as
a pointer to __global or __constant memory in the kernel. If the argument is declared with the __local qualifier, the
arg_value entry must be NULL. If the argument is of type sampler_t, the arg_value entry must be a pointer to the sampler
object.
If the argument is declared to be a pointer of a built-in scalar or vector type, or a user defined structure type in the global or constant address
space, the memory object specified as argument value must be a buffer object (or NULL). If the argument is declared with the __constant
qualifier, the size in bytes of the memory object cannot exceed DEVICE_MAX_CONSTANT_BUFFER_SIZE and the number of arguments declared as
pointers to __constant memory cannot exceed DEVICE_MAX_CONSTANT_ARGS.
The memory object specified as argument value must be a 2D image object if the argument is declared to be of type image2d_t. The memory
object specified as argument value must be a 3D image object if argument is declared to be of type image3d_t. The memory object specified as
argument value must be a 1D image object if the argument is declared to be of type image1d_t. The memory object specified as argument value
must be a 1D image buffer object if the argument is declared to be of type image1d_buffer_t. The memory object specified as argument value
must be a 1D image array object if argument is declared to be of type image1d_array_t. The memory object specified as argument value must be
a 2D image array object if argument is declared to be of type image2d_array_t.
For all other kernel arguments, the arg_value entry must be a pointer to the actual data to be used as argument value.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg(long kernel,
int arg_index,
java.nio.ShortBuffer 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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
arg_value - a pointer to data that should be used as the argument value for argument specified by arg_index. The argument data pointed to by
arg_value is copied and the arg_value pointer can therefore be reused by the application after clSetKernelArg returns. The
argument value specified is the value used by all API calls that enqueue kernel (EnqueueNDRangeKernel and EnqueueTask) until
the argument value is changed by a call to clSetKernelArg for kernel.
If the argument is a memory object (buffer, image or image array), the arg_value entry will be a pointer to the appropriate buffer, image or
image array object. The memory object must be created with the context associated with the kernel object. If the argument is a buffer object, the
arg_value pointer can be NULL or point to a NULL value in which case a NULL value will be used as the value for the argument declared as
a pointer to __global or __constant memory in the kernel. If the argument is declared with the __local qualifier, the
arg_value entry must be NULL. If the argument is of type sampler_t, the arg_value entry must be a pointer to the sampler
object.
If the argument is declared to be a pointer of a built-in scalar or vector type, or a user defined structure type in the global or constant address
space, the memory object specified as argument value must be a buffer object (or NULL). If the argument is declared with the __constant
qualifier, the size in bytes of the memory object cannot exceed DEVICE_MAX_CONSTANT_BUFFER_SIZE and the number of arguments declared as
pointers to __constant memory cannot exceed DEVICE_MAX_CONSTANT_ARGS.
The memory object specified as argument value must be a 2D image object if the argument is declared to be of type image2d_t. The memory
object specified as argument value must be a 3D image object if argument is declared to be of type image3d_t. The memory object specified as
argument value must be a 1D image object if the argument is declared to be of type image1d_t. The memory object specified as argument value
must be a 1D image buffer object if the argument is declared to be of type image1d_buffer_t. The memory object specified as argument value
must be a 1D image array object if argument is declared to be of type image1d_array_t. The memory object specified as argument value must be
a 2D image array object if argument is declared to be of type image2d_array_t.
For all other kernel arguments, the arg_value entry must be a pointer to the actual data to be used as argument value.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg(long kernel,
int arg_index,
java.nio.IntBuffer 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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
arg_value - a pointer to data that should be used as the argument value for argument specified by arg_index. The argument data pointed to by
arg_value is copied and the arg_value pointer can therefore be reused by the application after clSetKernelArg returns. The
argument value specified is the value used by all API calls that enqueue kernel (EnqueueNDRangeKernel and EnqueueTask) until
the argument value is changed by a call to clSetKernelArg for kernel.
If the argument is a memory object (buffer, image or image array), the arg_value entry will be a pointer to the appropriate buffer, image or
image array object. The memory object must be created with the context associated with the kernel object. If the argument is a buffer object, the
arg_value pointer can be NULL or point to a NULL value in which case a NULL value will be used as the value for the argument declared as
a pointer to __global or __constant memory in the kernel. If the argument is declared with the __local qualifier, the
arg_value entry must be NULL. If the argument is of type sampler_t, the arg_value entry must be a pointer to the sampler
object.
If the argument is declared to be a pointer of a built-in scalar or vector type, or a user defined structure type in the global or constant address
space, the memory object specified as argument value must be a buffer object (or NULL). If the argument is declared with the __constant
qualifier, the size in bytes of the memory object cannot exceed DEVICE_MAX_CONSTANT_BUFFER_SIZE and the number of arguments declared as
pointers to __constant memory cannot exceed DEVICE_MAX_CONSTANT_ARGS.
The memory object specified as argument value must be a 2D image object if the argument is declared to be of type image2d_t. The memory
object specified as argument value must be a 3D image object if argument is declared to be of type image3d_t. The memory object specified as
argument value must be a 1D image object if the argument is declared to be of type image1d_t. The memory object specified as argument value
must be a 1D image buffer object if the argument is declared to be of type image1d_buffer_t. The memory object specified as argument value
must be a 1D image array object if argument is declared to be of type image1d_array_t. The memory object specified as argument value must be
a 2D image array object if argument is declared to be of type image2d_array_t.
For all other kernel arguments, the arg_value entry must be a pointer to the actual data to be used as argument value.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg(long kernel,
int arg_index,
java.nio.LongBuffer 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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
arg_value - a pointer to data that should be used as the argument value for argument specified by arg_index. The argument data pointed to by
arg_value is copied and the arg_value pointer can therefore be reused by the application after clSetKernelArg returns. The
argument value specified is the value used by all API calls that enqueue kernel (EnqueueNDRangeKernel and EnqueueTask) until
the argument value is changed by a call to clSetKernelArg for kernel.
If the argument is a memory object (buffer, image or image array), the arg_value entry will be a pointer to the appropriate buffer, image or
image array object. The memory object must be created with the context associated with the kernel object. If the argument is a buffer object, the
arg_value pointer can be NULL or point to a NULL value in which case a NULL value will be used as the value for the argument declared as
a pointer to __global or __constant memory in the kernel. If the argument is declared with the __local qualifier, the
arg_value entry must be NULL. If the argument is of type sampler_t, the arg_value entry must be a pointer to the sampler
object.
If the argument is declared to be a pointer of a built-in scalar or vector type, or a user defined structure type in the global or constant address
space, the memory object specified as argument value must be a buffer object (or NULL). If the argument is declared with the __constant
qualifier, the size in bytes of the memory object cannot exceed DEVICE_MAX_CONSTANT_BUFFER_SIZE and the number of arguments declared as
pointers to __constant memory cannot exceed DEVICE_MAX_CONSTANT_ARGS.
The memory object specified as argument value must be a 2D image object if the argument is declared to be of type image2d_t. The memory
object specified as argument value must be a 3D image object if argument is declared to be of type image3d_t. The memory object specified as
argument value must be a 1D image object if the argument is declared to be of type image1d_t. The memory object specified as argument value
must be a 1D image buffer object if the argument is declared to be of type image1d_buffer_t. The memory object specified as argument value
must be a 1D image array object if argument is declared to be of type image1d_array_t. The memory object specified as argument value must be
a 2D image array object if argument is declared to be of type image2d_array_t.
For all other kernel arguments, the arg_value entry must be a pointer to the actual data to be used as argument value.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg(long kernel,
int arg_index,
java.nio.FloatBuffer 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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
arg_value - a pointer to data that should be used as the argument value for argument specified by arg_index. The argument data pointed to by
arg_value is copied and the arg_value pointer can therefore be reused by the application after clSetKernelArg returns. The
argument value specified is the value used by all API calls that enqueue kernel (EnqueueNDRangeKernel and EnqueueTask) until
the argument value is changed by a call to clSetKernelArg for kernel.
If the argument is a memory object (buffer, image or image array), the arg_value entry will be a pointer to the appropriate buffer, image or
image array object. The memory object must be created with the context associated with the kernel object. If the argument is a buffer object, the
arg_value pointer can be NULL or point to a NULL value in which case a NULL value will be used as the value for the argument declared as
a pointer to __global or __constant memory in the kernel. If the argument is declared with the __local qualifier, the
arg_value entry must be NULL. If the argument is of type sampler_t, the arg_value entry must be a pointer to the sampler
object.
If the argument is declared to be a pointer of a built-in scalar or vector type, or a user defined structure type in the global or constant address
space, the memory object specified as argument value must be a buffer object (or NULL). If the argument is declared with the __constant
qualifier, the size in bytes of the memory object cannot exceed DEVICE_MAX_CONSTANT_BUFFER_SIZE and the number of arguments declared as
pointers to __constant memory cannot exceed DEVICE_MAX_CONSTANT_ARGS.
The memory object specified as argument value must be a 2D image object if the argument is declared to be of type image2d_t. The memory
object specified as argument value must be a 3D image object if argument is declared to be of type image3d_t. The memory object specified as
argument value must be a 1D image object if the argument is declared to be of type image1d_t. The memory object specified as argument value
must be a 1D image buffer object if the argument is declared to be of type image1d_buffer_t. The memory object specified as argument value
must be a 1D image array object if argument is declared to be of type image1d_array_t. The memory object specified as argument value must be
a 2D image array object if argument is declared to be of type image2d_array_t.
For all other kernel arguments, the arg_value entry must be a pointer to the actual data to be used as argument value.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg(long kernel,
int arg_index,
java.nio.DoubleBuffer 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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
arg_value - a pointer to data that should be used as the argument value for argument specified by arg_index. The argument data pointed to by
arg_value is copied and the arg_value pointer can therefore be reused by the application after clSetKernelArg returns. The
argument value specified is the value used by all API calls that enqueue kernel (EnqueueNDRangeKernel and EnqueueTask) until
the argument value is changed by a call to clSetKernelArg for kernel.
If the argument is a memory object (buffer, image or image array), the arg_value entry will be a pointer to the appropriate buffer, image or
image array object. The memory object must be created with the context associated with the kernel object. If the argument is a buffer object, the
arg_value pointer can be NULL or point to a NULL value in which case a NULL value will be used as the value for the argument declared as
a pointer to __global or __constant memory in the kernel. If the argument is declared with the __local qualifier, the
arg_value entry must be NULL. If the argument is of type sampler_t, the arg_value entry must be a pointer to the sampler
object.
If the argument is declared to be a pointer of a built-in scalar or vector type, or a user defined structure type in the global or constant address
space, the memory object specified as argument value must be a buffer object (or NULL). If the argument is declared with the __constant
qualifier, the size in bytes of the memory object cannot exceed DEVICE_MAX_CONSTANT_BUFFER_SIZE and the number of arguments declared as
pointers to __constant memory cannot exceed DEVICE_MAX_CONSTANT_ARGS.
The memory object specified as argument value must be a 2D image object if the argument is declared to be of type image2d_t. The memory
object specified as argument value must be a 3D image object if argument is declared to be of type image3d_t. The memory object specified as
argument value must be a 1D image object if the argument is declared to be of type image1d_t. The memory object specified as argument value
must be a 1D image buffer object if the argument is declared to be of type image1d_buffer_t. The memory object specified as argument value
must be a 1D image array object if argument is declared to be of type image1d_array_t. The memory object specified as argument value must be
a 2D image array object if argument is declared to be of type image2d_array_t.
For all other kernel arguments, the arg_value entry must be a pointer to the actual data to be used as argument value.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg(long kernel,
int arg_index,
org.lwjgl.PointerBuffer 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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
arg_value - a pointer to data that should be used as the argument value for argument specified by arg_index. The argument data pointed to by
arg_value is copied and the arg_value pointer can therefore be reused by the application after clSetKernelArg returns. The
argument value specified is the value used by all API calls that enqueue kernel (EnqueueNDRangeKernel and EnqueueTask) until
the argument value is changed by a call to clSetKernelArg for kernel.
If the argument is a memory object (buffer, image or image array), the arg_value entry will be a pointer to the appropriate buffer, image or
image array object. The memory object must be created with the context associated with the kernel object. If the argument is a buffer object, the
arg_value pointer can be NULL or point to a NULL value in which case a NULL value will be used as the value for the argument declared as
a pointer to __global or __constant memory in the kernel. If the argument is declared with the __local qualifier, the
arg_value entry must be NULL. If the argument is of type sampler_t, the arg_value entry must be a pointer to the sampler
object.
If the argument is declared to be a pointer of a built-in scalar or vector type, or a user defined structure type in the global or constant address
space, the memory object specified as argument value must be a buffer object (or NULL). If the argument is declared with the __constant
qualifier, the size in bytes of the memory object cannot exceed DEVICE_MAX_CONSTANT_BUFFER_SIZE and the number of arguments declared as
pointers to __constant memory cannot exceed DEVICE_MAX_CONSTANT_ARGS.
The memory object specified as argument value must be a 2D image object if the argument is declared to be of type image2d_t. The memory
object specified as argument value must be a 3D image object if argument is declared to be of type image3d_t. The memory object specified as
argument value must be a 1D image object if the argument is declared to be of type image1d_t. The memory object specified as argument value
must be a 1D image buffer object if the argument is declared to be of type image1d_buffer_t. The memory object specified as argument value
must be a 1D image array object if argument is declared to be of type image1d_array_t. The memory object specified as argument value must be
a 2D image array object if argument is declared to be of type image2d_array_t.
For all other kernel arguments, the arg_value entry must be a pointer to the actual data to be used as argument value.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg1b(long kernel,
int arg_index,
byte arg0)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg2b(long kernel,
int arg_index,
byte arg0,
byte arg1)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg4b(long kernel,
int arg_index,
byte arg0,
byte arg1,
byte arg2,
byte arg3)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg1s(long kernel,
int arg_index,
short arg0)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg2s(long kernel,
int arg_index,
short arg0,
short arg1)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg4s(long kernel,
int arg_index,
short arg0,
short arg1,
short arg2,
short arg3)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg1i(long kernel,
int arg_index,
int arg0)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg2i(long kernel,
int arg_index,
int arg0,
int arg1)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg4i(long kernel,
int arg_index,
int arg0,
int arg1,
int arg2,
int arg3)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg1l(long kernel,
int arg_index,
long arg0)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg2l(long kernel,
int arg_index,
long arg0,
long arg1)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg4l(long kernel,
int arg_index,
long arg0,
long arg1,
long arg2,
long arg3)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg1f(long kernel,
int arg_index,
float arg0)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg2f(long kernel,
int arg_index,
float arg0,
float arg1)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg4f(long kernel,
int arg_index,
float arg0,
float arg1,
float arg2,
float arg3)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg1d(long kernel,
int arg_index,
double arg0)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg2d(long kernel,
int arg_index,
double arg0,
double arg1)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg4d(long kernel,
int arg_index,
double arg0,
double arg1,
double arg2,
double arg3)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg1p(long kernel,
int arg_index,
long arg0)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg2p(long kernel,
int arg_index,
long arg0,
long arg1)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 clSetKernelArg4p(long kernel,
int arg_index,
long arg0,
long arg1,
long arg2,
long arg3)
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.
For example, consider the following kernel:
kernel void image_filter (
int n, int m,
__constant float *filter_weights,
__read_only image2d_t src_image,
__write_only image2d_t dst_image
) {
…
}
Argument index values for image_filter will be 0 for n, 1 for m, 2 for filter_weights, 3 for src_image and 4 for
dst_image.
NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values
by clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.
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.INVALID_MEM_OBJECT for an argument declared to be a memory object when the specified arg_value is not a valid memory object.INVALID_SAMPLER for an argument declared to be of type sampler_t when the specified arg_value is not a valid sampler object.INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the
argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the
__local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDED if the size in bytes of the memory object (if the argument was declared with constant qualifier) or arg_size
(if the argument was declared with local qualifier) exceed the maximum size restriction that was set with the optional language attribute. The
optional attribute can be cl::max_size defined in OpenCL 2.2 C++ Kernel Language specification or SpvDecorationMaxByteOffset
defined in SPIR-V 1.2 Specification.INVALID_ARG_VALUE if the argument is an image declared with the read_only qualifier and arg_value refers to an image
object created with cl_mem_flags of MEM_WRITE_ONLY or if the image argument is declared with the write_only qualifier
and arg_value refers to an image object created with cl_mem_flags of MEM_READ_ONLY.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 nclGetKernelInfo(long kernel,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
GetKernelInfoparam_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 clGetKernelInfo(long kernel,
int param_name,
@Nullable
java.nio.ByteBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
kernel - the kernel object being queriedparam_name - the information to query. One of:KERNEL_FUNCTION_NAME | KERNEL_NUM_ARGS | KERNEL_REFERENCE_COUNT | KERNEL_CONTEXT |
KERNEL_PROGRAM | KERNEL_ATTRIBUTES |
param_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_KERNEL if kernel is a not a valid kernel 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 clGetKernelInfo(long kernel,
int param_name,
@Nullable
java.nio.IntBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
kernel - the kernel object being queriedparam_name - the information to query. One of:KERNEL_FUNCTION_NAME | KERNEL_NUM_ARGS | KERNEL_REFERENCE_COUNT | KERNEL_CONTEXT |
KERNEL_PROGRAM | KERNEL_ATTRIBUTES |
param_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_KERNEL if kernel is a not a valid kernel 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 clGetKernelInfo(long kernel,
int param_name,
@Nullable
org.lwjgl.PointerBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
kernel - the kernel object being queriedparam_name - the information to query. One of:KERNEL_FUNCTION_NAME | KERNEL_NUM_ARGS | KERNEL_REFERENCE_COUNT | KERNEL_CONTEXT |
KERNEL_PROGRAM | KERNEL_ATTRIBUTES |
param_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_KERNEL if kernel is a not a valid kernel 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 nclGetKernelWorkGroupInfo(long kernel,
long device,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
GetKernelWorkGroupInfoparam_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 clGetKernelWorkGroupInfo(long kernel,
long device,
int param_name,
@Nullable
java.nio.ByteBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
kernel - the kernel object being querieddevice - identifies a specific device in the list of devices associated with kernel. The list of devices is the list of devices in the OpenCL context
that is associated with kernel. If the list of devices associated with kernel is a single device, device can be a NULL value.param_name - the information to query. One of:KERNEL_WORK_GROUP_SIZE | KERNEL_COMPILE_WORK_GROUP_SIZE |
KERNEL_LOCAL_MEM_SIZE | KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE |
KERNEL_PRIVATE_MEM_SIZE | KERNEL_GLOBAL_WORK_SIZE |
param_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_DEVICE if device is not in the list of devices associated with kernel or if device is NULL but there is
more than one device associated with kernel.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_VALUE if param_name is KERNEL_GLOBAL_WORK_SIZE and device is not a custom device or kernel is
not a built-in kernel.INVALID_KERNEL if kernel is a not a valid kernel 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 clGetKernelWorkGroupInfo(long kernel,
long device,
int param_name,
@Nullable
java.nio.IntBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
kernel - the kernel object being querieddevice - identifies a specific device in the list of devices associated with kernel. The list of devices is the list of devices in the OpenCL context
that is associated with kernel. If the list of devices associated with kernel is a single device, device can be a NULL value.param_name - the information to query. One of:KERNEL_WORK_GROUP_SIZE | KERNEL_COMPILE_WORK_GROUP_SIZE |
KERNEL_LOCAL_MEM_SIZE | KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE |
KERNEL_PRIVATE_MEM_SIZE | KERNEL_GLOBAL_WORK_SIZE |
param_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_DEVICE if device is not in the list of devices associated with kernel or if device is NULL but there is
more than one device associated with kernel.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_VALUE if param_name is KERNEL_GLOBAL_WORK_SIZE and device is not a custom device or kernel is
not a built-in kernel.INVALID_KERNEL if kernel is a not a valid kernel 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 clGetKernelWorkGroupInfo(long kernel,
long device,
int param_name,
@Nullable
java.nio.LongBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
kernel - the kernel object being querieddevice - identifies a specific device in the list of devices associated with kernel. The list of devices is the list of devices in the OpenCL context
that is associated with kernel. If the list of devices associated with kernel is a single device, device can be a NULL value.param_name - the information to query. One of:KERNEL_WORK_GROUP_SIZE | KERNEL_COMPILE_WORK_GROUP_SIZE |
KERNEL_LOCAL_MEM_SIZE | KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE |
KERNEL_PRIVATE_MEM_SIZE | KERNEL_GLOBAL_WORK_SIZE |
param_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_DEVICE if device is not in the list of devices associated with kernel or if device is NULL but there is
more than one device associated with kernel.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_VALUE if param_name is KERNEL_GLOBAL_WORK_SIZE and device is not a custom device or kernel is
not a built-in kernel.INVALID_KERNEL if kernel is a not a valid kernel 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 clGetKernelWorkGroupInfo(long kernel,
long device,
int param_name,
@Nullable
org.lwjgl.PointerBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
kernel - the kernel object being querieddevice - identifies a specific device in the list of devices associated with kernel. The list of devices is the list of devices in the OpenCL context
that is associated with kernel. If the list of devices associated with kernel is a single device, device can be a NULL value.param_name - the information to query. One of:KERNEL_WORK_GROUP_SIZE | KERNEL_COMPILE_WORK_GROUP_SIZE |
KERNEL_LOCAL_MEM_SIZE | KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE |
KERNEL_PRIVATE_MEM_SIZE | KERNEL_GLOBAL_WORK_SIZE |
param_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_DEVICE if device is not in the list of devices associated with kernel or if device is NULL but there is
more than one device associated with kernel.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_VALUE if param_name is KERNEL_GLOBAL_WORK_SIZE and device is not a custom device or kernel is
not a built-in kernel.INVALID_KERNEL if kernel is a not a valid kernel 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 nclEnqueueNDRangeKernel(long command_queue,
long kernel,
int work_dim,
long global_work_offset,
long global_work_size,
long local_work_size,
int num_events_in_wait_list,
long event_wait_list,
long event)
EnqueueNDRangeKernelnum_events_in_wait_list - the number of events in event_wait_listpublic static int clEnqueueNDRangeKernel(long command_queue,
long kernel,
int work_dim,
@Nullable
org.lwjgl.PointerBuffer global_work_offset,
@Nullable
org.lwjgl.PointerBuffer global_work_size,
@Nullable
org.lwjgl.PointerBuffer local_work_size,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
command_queue - a valid command-queue. The kernel will be queued for execution on the device associated with command_queue.kernel - a valid kernel object. The OpenCL context associated with kernel and command_queue must be the same.work_dim - the number of dimensions used to specify the global work-items and work-items in the work-group. work_dim must be greater than zero and less
than or equal to DEVICE_MAX_WORK_ITEM_DIMENSIONS.global_work_offset - can be used to specify an array of work_dim unsigned values that describe the offset used to calculate the global ID of a work-item. If
global_work_offset is NULL, the global IDs start at offset (0, 0, … 0).global_work_size - points to an array of work_dim unsigned values that describe the number of global work-items in work_dim dimensions that will
execute the kernel function. The total number of global work-items is computed as global_work_size[0] * … * global_work_size[work_dim – 1].local_work_size - points to an array of work_dim unsigned values that describe the number of work-items that make up a work-group (also referred to as the
size of the work-group) that will execute the kernel specified by kernel. The total number of work-items in a work-group is computed as
local_work_size[0] * … * local_work_size[work_dim – 1]. The total number of work-items in the work-group must be less than or equal to
the DEVICE_MAX_WORK_GROUP_SIZE value and the number of work-items specified in local_work_size[0], … local_work_size[work_dim – 1]
must be less than or equal to the corresponding values specified by DEVICE_MAX_WORK_ITEM_SIZES[0], …
DEVICE_MAX_WORK_ITEM_SIZES[work_dim – 1]. The explicitly specified local_work_size will be used to determine how to
break the global work-items specified by global_work_size into appropriate work-group instances. If local_work_size is specified, the
values specified in global_work_size[0], … global_work_size[work_dim - 1] must be evenly divisible by the corresponding values
specified in local_work_size[0], … local_work_size[work_dim – 1].
The work-group size to be used for kernel can also be specified in the program source using the
__attribute__((reqd_work_group_size(X, Y, Z))) qualifier. In this case the size of work group specified by local_work_size must
match the value specified by the reqd_work_group_size attribute qualifier.
local_work_size can also be a NULL value in which case the OpenCL implementation will determine how to be break the global work-items into
appropriate work-group instances.
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 kernel execution was successfully queued. Otherwise, it returns one of the following errors:
INVALID_PROGRAM_EXECUTABLE if there is no successfully built program executable available for device associated with command_queue.INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.INVALID_KERNEL if kernel is not a valid kernel object.INVALID_CONTEXT if context associated with command_queue and kernel are not the same or if the context associated with
command_queue and events in event_wait_list are not the same.INVALID_KERNEL_ARGS if the kernel argument values have not been specified.INVALID_WORK_DIMENSION if work_dim is not a valid value (i.e. a value between 1 and 3).INVALID_GLOBAL_WORK_SIZE if global_work_size is NULL, or if any of the values specified in
global_work_size[0], … global_work_size[work_dim – 1] are 0 or exceed the range given by the sizeof(size_t) for the device
on which the kernel execution will be enqueued.INVALID_GLOBAL_OFFSET if the value specified in global_work_size + the corresponding values in global_work_offset for
any dimensions is greater than the sizeof(size_t) for the device on which the kernel execution will be enqueued.INVALID_WORK_GROUP_SIZE if local_work_size is specified and number of work-items specified by global_work_size is not
evenly divisible by size of work-group given by local_work_size or does not match the work-group size specified for kernel using the
__attribute__((reqd_work_group_size(X, Y, Z))) qualifier in program source.INVALID_WORK_GROUP_SIZE if local_work_size is specified and the total number of work-items in the work-group computed as
local_work_size[0] * … * local_work_size[work_dim – 1] is greater than the value specified by DEVICE_MAX_WORK_GROUP_SIZEINVALID_WORK_GROUP_SIZE if local_work_size is NULL and the __attribute__((reqd_work_group_size(X, Y, Z))) qualifier is used to
declare the work-group size for kernel in the program source.INVALID_WORK_ITEM_SIZE if the number of work-items specified in any of local_work_size[0], … local_work_size[work_dim – 1]
is greater than the corresponding values specified by DEVICE_MAX_WORK_ITEM_SIZES[0], … DEVICE_MAX_WORK_ITEM_SIZES[work_dim – 1].MISALIGNED_SUB_BUFFER_OFFSET if a sub-buffer object is specified as the value for an argument that is a buffer object and the offset
specified when the sub-buffer object is created is not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.INVALID_IMAGE_SIZE if an image object is specified as an argument value and the image dimensions (image width, height, specified or
compute row and/or slice pitch) are not supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTED if an image object is specified as an argument value and the image format (image channel order and data type)
is not supported by device associated with queue.OUT_OF_RESOURCES if there is a failure to queue the execution instance of kernel on the command-queue because of insufficient resources
needed to execute the kernel. For example, the explicitly specified local_work_size causes a failure to execute the kernel because of
insufficient resources such as registers or local memory. Another example would be the number of read-only image args used in kernel exceed the
DEVICE_MAX_READ_IMAGE_ARGS value for device or the number of write-only image args used in kernel exceed the
DEVICE_MAX_WRITE_IMAGE_ARGS value for device or the number of samplers used in kernel exceed DEVICE_MAX_SAMPLERS for device.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with image or buffer objects specified
as arguments to kernel.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 nclEnqueueTask(long command_queue,
long kernel,
int num_events_in_wait_list,
long event_wait_list,
long event)
EnqueueTasknum_events_in_wait_list - the number of events in event_wait_listpublic static int clEnqueueTask(long command_queue,
long kernel,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
clEnqueueTask is equivalent to calling EnqueueNDRangeKernel with work_dim = 1, global_work_offset = NULL,
global_work_size[0] set to 1 and local_work_size[0] set to 1.
command_queue - a valid command-queue. The kernel will be queued for execution on the device associated with command_queue.kernel - a valid kernel object. The OpenCL context associated with kernel and command_queue must be the same.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 kernel execution was successfully queued. Otherwise, see EnqueueNDRangeKernel.public static int nclEnqueueNativeKernel(long command_queue,
long user_func,
long args,
long cb_args,
int num_mem_objects,
long mem_list,
long args_mem_loc,
int num_events_in_wait_list,
long event_wait_list,
long event)
EnqueueNativeKernelcb_args - the size in bytes of the args list that args points to.
The data pointed to by args and cb_args bytes in size will be copied and a pointer to this copied region will be passed to
user_func. The copy needs to be done because the memory objects (cl_mem values) that args may contain need to be modified and replaced by
appropriate pointers to global memory. When clEnqueueNativeKernel returns, the memory region pointed to by args can be reused by the
application.
num_mem_objects - the number of buffer objects that are passed in argsnum_events_in_wait_list - the number of events in event_wait_listpublic static int clEnqueueNativeKernel(long command_queue,
CLNativeKernelI user_func,
@Nullable
java.nio.ByteBuffer args,
@Nullable
org.lwjgl.PointerBuffer mem_list,
@Nullable
org.lwjgl.PointerBuffer args_mem_loc,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
command_queue - a valid command-queue. A native user function can only be executed on a command-queue created on a device that has EXEC_NATIVE_KERNEL
capability set in DEVICE_EXECUTION_CAPABILITIES.user_func - a pointer to a host-callable user functionargs - a pointer to the args list that user_func should be called withmem_list - a list of valid buffer objects, if num_mem_objects > 0. The buffer object values specified in mem_list are memory object handles
(cl_mem values) returned by CreateBuffer or NULL.args_mem_loc - a pointer to appropriate locations that args points to where memory object handles (cl_mem values) are stored. Before the user function is
executed, the memory object handles are replaced by pointers to global memory.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 user function execution instance was successfully queued. 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 user_func is NULL.INVALID_VALUE if args is a NULL value and cb_args > 0, or if args is a NULL value and
num_mem_objects > 0.INVALID_VALUE if args is not NULL and cb_args is 0.INVALID_VALUE if num_mem_objects > 0 and mem_list or args_mem_loc are NULL.INVALID_VALUE if num_mem_objects = 0 and mem_list or args_mem_loc are not NULL.INVALID_OPERATION if the device associated with command_queue cannot execute the native kernel.INVALID_MEM_OBJECT if one or more memory objects specified in mem_list are not valid or are not buffer objects.OUT_OF_RESOURCES if there is a failure to queue the execution instance of kernel on the command-queue because of insufficient resources
needed to execute the kernel.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer objects specified as
arguments to kernel.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 clEnqueueNativeKernel(long command_queue,
CLNativeKernelI user_func,
@Nullable
java.nio.ByteBuffer args,
long memobj,
long memobj_loc,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
command_queue - a valid command-queue. A native user function can only be executed on a command-queue created on a device that has EXEC_NATIVE_KERNEL
capability set in DEVICE_EXECUTION_CAPABILITIES.user_func - a pointer to a host-callable user functionargs - a pointer to the args list that user_func should be called withevent_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 user function execution instance was successfully queued. 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 user_func is NULL.INVALID_VALUE if args is a NULL value and cb_args > 0, or if args is a NULL value and
num_mem_objects > 0.INVALID_VALUE if args is not NULL and cb_args is 0.INVALID_VALUE if num_mem_objects > 0 and mem_list or args_mem_loc are NULL.INVALID_VALUE if num_mem_objects = 0 and mem_list or args_mem_loc are not NULL.INVALID_OPERATION if the device associated with command_queue cannot execute the native kernel.INVALID_MEM_OBJECT if one or more memory objects specified in mem_list are not valid or are not buffer objects.OUT_OF_RESOURCES if there is a failure to queue the execution instance of kernel on the command-queue because of insufficient resources
needed to execute the kernel.MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer objects specified as
arguments to kernel.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 nclWaitForEvents(int num_events,
long event_list)
WaitForEventsnum_events - the number of events in event_listpublic static int clWaitForEvents(org.lwjgl.PointerBuffer event_list)
event_list to complete. A command is considered complete if its execution
status is COMPLETE or a negative value. The events specified in event_list act as synchronization points.event_list - the list of eventsSUCCESS if the execution status of all events in event_list is COMPLETE. Otherwise, it returns one of the following errors:
INVALID_VALUE if num_events is zero or event_list is NULL.INVALID_CONTEXT if events specified in event_list do not belong to the same context.INVALID_EVENT if event objects specified in event_list are not valid event objects.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the execution status of any of the events in event_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 clWaitForEvents(long event)
event_list to complete. A command is considered complete if its execution
status is COMPLETE or a negative value. The events specified in event_list act as synchronization points.SUCCESS if the execution status of all events in event_list is COMPLETE. Otherwise, it returns one of the following errors:
INVALID_VALUE if num_events is zero or event_list is NULL.INVALID_CONTEXT if events specified in event_list do not belong to the same context.INVALID_EVENT if event objects specified in event_list are not valid event objects.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the execution status of any of the events in event_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 nclGetEventInfo(long event,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
GetEventInfoparam_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 clGetEventInfo(long event,
int param_name,
@Nullable
java.nio.ByteBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
Using clGetEventInfo to determine if a command identified by event has finished execution (i.e. EVENT_COMMAND_EXECUTION_STATUS
returns COMPLETE) is not a synchronization point. There are no guarantees that the memory objects being modified by command associated with
event will be visible to other enqueued commands.
event - the event object being queriedparam_name - the information to query. One of:EVENT_COMMAND_QUEUE | EVENT_COMMAND_TYPE | EVENT_REFERENCE_COUNT | EVENT_COMMAND_EXECUTION_STATUS |
EVENT_CONTEXT |
param_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_VALUE if information to query given in param_name cannot be queried for event.INVALID_EVENT if event is a not a valid event 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 clGetEventInfo(long event,
int param_name,
@Nullable
java.nio.IntBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
Using clGetEventInfo to determine if a command identified by event has finished execution (i.e. EVENT_COMMAND_EXECUTION_STATUS
returns COMPLETE) is not a synchronization point. There are no guarantees that the memory objects being modified by command associated with
event will be visible to other enqueued commands.
event - the event object being queriedparam_name - the information to query. One of:EVENT_COMMAND_QUEUE | EVENT_COMMAND_TYPE | EVENT_REFERENCE_COUNT | EVENT_COMMAND_EXECUTION_STATUS |
EVENT_CONTEXT |
param_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_VALUE if information to query given in param_name cannot be queried for event.INVALID_EVENT if event is a not a valid event 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 clGetEventInfo(long event,
int param_name,
@Nullable
org.lwjgl.PointerBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
Using clGetEventInfo to determine if a command identified by event has finished execution (i.e. EVENT_COMMAND_EXECUTION_STATUS
returns COMPLETE) is not a synchronization point. There are no guarantees that the memory objects being modified by command associated with
event will be visible to other enqueued commands.
event - the event object being queriedparam_name - the information to query. One of:EVENT_COMMAND_QUEUE | EVENT_COMMAND_TYPE | EVENT_REFERENCE_COUNT | EVENT_COMMAND_EXECUTION_STATUS |
EVENT_CONTEXT |
param_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_VALUE if information to query given in param_name cannot be queried for event.INVALID_EVENT if event is a not a valid event 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 clRetainEvent(long event)
event - the event to retainSUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_EVENT if event is not a valid event 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 clReleaseEvent(long event)
The event object is deleted once the reference count becomes zero, the specific command identified by this event has completed (or terminated) and there are no commands in the command-queues of a context that require a wait for this event to complete.
NOTE: Developers should be careful when releasing their last reference count on events created by CreateUserEvent that
have not yet been set to status of COMPLETE or an error. If the user event was used in the event_wait_list argument passed to a
clEnqueue*** API or another application host thread is waiting for it in WaitForEvents, those commands and host threads will continue to wait for the
event status to reach COMPLETE or error, even after the user has released the object. Since in this scenario the developer has released his
last reference count to the user event, it would be in principle no longer valid for him to change the status of the event to unblock all the other
machinery. As a result the waiting tasks will wait forever, and associated events, cl_mem objects, command queues and contexts are likely to leak.
In-order command-queues caught up in this deadlock may cease to do any work.
event - the event to releaseSUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_EVENT if event is not a valid event 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 nclEnqueueMarker(long command_queue,
long event)
EnqueueMarkerpublic static int clEnqueueMarker(long command_queue,
@Nullable
org.lwjgl.PointerBuffer event)
command_queue. The marker command is not completed until all commands enqueued before it have completed. The marker
command returns an event which can be waited on, i.e. this event can be waited on to insure that all commands, which have been queued before the marker
command, have been completed.command_queue - the command-queue to insert the marker toevent - 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 successfully executed. Otherwise, it returns one of the following errors:
INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.INVALID_VALUE if event is a NULL 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 clEnqueueBarrier(long command_queue)
clEnqueueBarrier command ensures that all queued commands in command_queue have finished execution
before the next batch of commands can begin execution. The clEnqueueBarrier command is a synchronization point.command_queue - the command-queue to insert the barrier toSUCCESS if the function is successfully executed. Otherwise, it returns one of the following errors:
INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.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 nclEnqueueWaitForEvents(long command_queue,
int num_events,
long event_list)
EnqueueWaitForEventsnum_events - the number of events in event_listpublic static int clEnqueueWaitForEvents(long command_queue,
org.lwjgl.PointerBuffer event_list)
command_queue - the command-queueevent_list - the list of eventsSUCCESS if the function was successfully executed. 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_list are not the same.INVALID_VALUE if num_events is zero or event_list is NULL.INVALID_EVENT if event objects specified in event_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 clEnqueueWaitForEvents(long command_queue,
long event)
command_queue - the command-queueSUCCESS if the function was successfully executed. 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_list are not the same.INVALID_VALUE if num_events is zero or event_list is NULL.INVALID_EVENT if event objects specified in event_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 nclGetEventProfilingInfo(long event,
int param_name,
long param_value_size,
long param_value,
long param_value_size_ret)
GetEventProfilingInfoparam_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 clGetEventProfilingInfo(long event,
int param_name,
@Nullable
java.nio.ByteBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
event.event - the event objectparam_name - the profiling data to query. One of:PROFILING_COMMAND_QUEUED | PROFILING_COMMAND_SUBMIT | PROFILING_COMMAND_START |
PROFILING_COMMAND_END | PROFILING_COMMAND_COMPLETE |
param_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 and the profiling information has been recorded. Otherwise, it returns one of the following errors:
PROFILING_INFO_NOT_AVAILABLE if the QUEUE_PROFILING_ENABLE flag is not set for the command-queue, if the execution status of
the command identified by event is not COMPLETE or if event is a user event object.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_EVENT if event is a not a valid event 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 clGetEventProfilingInfo(long event,
int param_name,
@Nullable
java.nio.LongBuffer param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
event.event - the event objectparam_name - the profiling data to query. One of:PROFILING_COMMAND_QUEUED | PROFILING_COMMAND_SUBMIT | PROFILING_COMMAND_START |
PROFILING_COMMAND_END | PROFILING_COMMAND_COMPLETE |
param_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 and the profiling information has been recorded. Otherwise, it returns one of the following errors:
PROFILING_INFO_NOT_AVAILABLE if the QUEUE_PROFILING_ENABLE flag is not set for the command-queue, if the execution status of
the command identified by event is not COMPLETE or if event is a user event object.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_EVENT if event is a not a valid event 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 clFlush(long command_queue)
command_queue to the device associated with command_queue. clFlush only
guarantees that all queued commands to command_queue will eventually be submitted to the appropriate device. There is no guarantee that they
will be complete after clFlush returns.
Any blocking commands queued in a command-queue and ReleaseCommandQueue perform an implicit flush of the command-queue. These blocking commands are
EnqueueReadBuffer, EnqueueReadBufferRect, EnqueueReadImage, with blocking_read set to TRUE; EnqueueWriteBuffer,
EnqueueWriteBufferRect, EnqueueWriteImage with blocking_write set to TRUE; EnqueueMapBuffer, EnqueueMapImage with
blocking_map set to TRUE; or WaitForEvents.
To use event objects that refer to commands enqueued in a command-queue as event objects to wait on by commands enqueued in a different command-queue,
the application must call a clFlush or any blocking commands that perform an implicit flush of the command-queue where the commands that refer
to these event objects are enqueued.
command_queue - the command-queueSUCCESS if the function call was executed successfully. Otherwise, it returns one of the following errors:
INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.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 clFinish(long command_queue)
command_queue are issued to the associated device and have completed. clFinish
does not return until all previously queued commands in command_queue have been processed and completed. clFinish is also a
synchronization point.command_queue - the command-queuepublic static long nclGetExtensionFunctionAddress(long funcname)
GetExtensionFunctionAddresspublic static long clGetExtensionFunctionAddress(java.nio.ByteBuffer funcname)
funcname. The pointer returned should be cast to a function pointer type matching the
extension function's definition defined in the appropriate extension specification and header file. A return value of NULL indicates that the specified
function does not exist for the implementation. A non-NULL return value for clGetExtensionFunctionAddress does not guarantee that an extension
function is actually supported. The application must also make a corresponding query using clGetPlatformInfo(platform, CL_PLATFORM_EXTENSIONS, … )
or clGetDeviceInfo(device, CL_DEVICE_EXTENSIONS, … ) to determine if an extension is supported by the OpenCL implementation.
clGetExtensionFunctionAddress may not be queried for core (non-extension) functions in OpenCL. For functions that are queryable with
clGetExtensionFunctionAddress, implementations may choose to also export those functions statically from the object libraries implementing those
functions. However, portable applications cannot rely on this behavior.
funcname - the extension function namepublic static long clGetExtensionFunctionAddress(java.lang.CharSequence funcname)
funcname. The pointer returned should be cast to a function pointer type matching the
extension function's definition defined in the appropriate extension specification and header file. A return value of NULL indicates that the specified
function does not exist for the implementation. A non-NULL return value for clGetExtensionFunctionAddress does not guarantee that an extension
function is actually supported. The application must also make a corresponding query using clGetPlatformInfo(platform, CL_PLATFORM_EXTENSIONS, … )
or clGetDeviceInfo(device, CL_DEVICE_EXTENSIONS, … ) to determine if an extension is supported by the OpenCL implementation.
clGetExtensionFunctionAddress may not be queried for core (non-extension) functions in OpenCL. For functions that are queryable with
clGetExtensionFunctionAddress, implementations may choose to also export those functions statically from the object libraries implementing those
functions. However, portable applications cannot rely on this behavior.
funcname - the extension function namepublic static int clGetPlatformIDs(@Nullable
org.lwjgl.PointerBuffer platforms,
@Nullable
int[] num_platforms)
GetPlatformIDspublic static int clGetPlatformInfo(long platform,
int param_name,
@Nullable
long[] param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
GetPlatformInfopublic static int clGetDeviceIDs(long platform,
long device_type,
@Nullable
org.lwjgl.PointerBuffer devices,
@Nullable
int[] num_devices)
GetDeviceIDspublic static int clGetDeviceInfo(long device,
int param_name,
@Nullable
int[] param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
GetDeviceInfopublic static int clGetDeviceInfo(long device,
int param_name,
@Nullable
long[] param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
GetDeviceInfopublic static long clCreateContext(@Nullable
org.lwjgl.PointerBuffer properties,
org.lwjgl.PointerBuffer devices,
@Nullable
CLContextCallbackI pfn_notify,
long user_data,
@Nullable
int[] errcode_ret)
CreateContextpublic static long clCreateContextFromType(@Nullable
org.lwjgl.PointerBuffer properties,
long device_type,
@Nullable
CLContextCallbackI pfn_notify,
long user_data,
@Nullable
int[] errcode_ret)
CreateContextFromTypepublic static int clGetContextInfo(long context,
int param_name,
@Nullable
int[] param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
GetContextInfopublic static long clCreateCommandQueue(long context,
long device,
long properties,
@Nullable
int[] errcode_ret)
CreateCommandQueuepublic static int clGetCommandQueueInfo(long command_queue,
int param_name,
@Nullable
int[] param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
GetCommandQueueInfopublic static int clGetCommandQueueInfo(long command_queue,
int param_name,
@Nullable
long[] param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
GetCommandQueueInfopublic static long clCreateBuffer(long context,
long flags,
java.nio.ByteBuffer host_ptr,
@Nullable
int[] errcode_ret)
CreateBufferpublic static long clCreateBuffer(long context,
long flags,
short[] host_ptr,
@Nullable
int[] errcode_ret)
CreateBufferpublic static long clCreateBuffer(long context,
long flags,
int[] host_ptr,
@Nullable
int[] errcode_ret)
CreateBufferpublic static long clCreateBuffer(long context,
long flags,
float[] host_ptr,
@Nullable
int[] errcode_ret)
CreateBufferpublic static long clCreateBuffer(long context,
long flags,
double[] host_ptr,
@Nullable
int[] errcode_ret)
CreateBufferpublic static int clEnqueueReadBuffer(long command_queue,
long buffer,
boolean blocking_read,
long offset,
short[] ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
EnqueueReadBufferpublic static int clEnqueueReadBuffer(long command_queue,
long buffer,
boolean blocking_read,
long offset,
int[] ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
EnqueueReadBufferpublic static int clEnqueueReadBuffer(long command_queue,
long buffer,
boolean blocking_read,
long offset,
float[] ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
EnqueueReadBufferpublic static int clEnqueueReadBuffer(long command_queue,
long buffer,
boolean blocking_read,
long offset,
double[] ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
EnqueueReadBufferpublic static int clEnqueueWriteBuffer(long command_queue,
long buffer,
boolean blocking_write,
long offset,
short[] ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
EnqueueWriteBufferpublic static int clEnqueueWriteBuffer(long command_queue,
long buffer,
boolean blocking_write,
long offset,
int[] ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
EnqueueWriteBufferpublic static int clEnqueueWriteBuffer(long command_queue,
long buffer,
boolean blocking_write,
long offset,
float[] ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
EnqueueWriteBufferpublic static int clEnqueueWriteBuffer(long command_queue,
long buffer,
boolean blocking_write,
long offset,
double[] ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
EnqueueWriteBuffer@Nullable
public static java.nio.ByteBuffer clEnqueueMapBuffer(long command_queue,
long buffer,
boolean blocking_map,
long map_flags,
long offset,
long size,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event,
@Nullable
int[] errcode_ret,
@Nullable
java.nio.ByteBuffer old_buffer)
EnqueueMapBufferpublic static long clCreateImage2D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_row_pitch,
@Nullable
java.nio.ByteBuffer host_ptr,
@Nullable
int[] errcode_ret)
CreateImage2Dpublic static long clCreateImage2D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_row_pitch,
@Nullable
short[] host_ptr,
@Nullable
int[] errcode_ret)
CreateImage2Dpublic static long clCreateImage2D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_row_pitch,
@Nullable
int[] host_ptr,
@Nullable
int[] errcode_ret)
CreateImage2Dpublic static long clCreateImage2D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_row_pitch,
@Nullable
float[] host_ptr,
@Nullable
int[] errcode_ret)
CreateImage2Dpublic static long clCreateImage3D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_depth,
long image_row_pitch,
long image_slice_pitch,
@Nullable
java.nio.ByteBuffer host_ptr,
@Nullable
int[] errcode_ret)
CreateImage3Dpublic static long clCreateImage3D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_depth,
long image_row_pitch,
long image_slice_pitch,
@Nullable
short[] host_ptr,
@Nullable
int[] errcode_ret)
CreateImage3Dpublic static long clCreateImage3D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_depth,
long image_row_pitch,
long image_slice_pitch,
@Nullable
int[] host_ptr,
@Nullable
int[] errcode_ret)
CreateImage3Dpublic static long clCreateImage3D(long context,
long flags,
CLImageFormat image_format,
long image_width,
long image_height,
long image_depth,
long image_row_pitch,
long image_slice_pitch,
@Nullable
float[] host_ptr,
@Nullable
int[] errcode_ret)
CreateImage3Dpublic static int clGetSupportedImageFormats(long context,
long flags,
int image_type,
@Nullable
CLImageFormat.Buffer image_formats,
@Nullable
int[] num_image_formats)
GetSupportedImageFormatspublic static int clEnqueueReadImage(long command_queue,
long image,
boolean blocking_read,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long row_pitch,
long slice_pitch,
short[] ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
EnqueueReadImagepublic static int clEnqueueReadImage(long command_queue,
long image,
boolean blocking_read,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long row_pitch,
long slice_pitch,
int[] ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
EnqueueReadImagepublic static int clEnqueueReadImage(long command_queue,
long image,
boolean blocking_read,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long row_pitch,
long slice_pitch,
float[] ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
EnqueueReadImagepublic static int clEnqueueReadImage(long command_queue,
long image,
boolean blocking_read,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long row_pitch,
long slice_pitch,
double[] ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
EnqueueReadImagepublic static int clEnqueueWriteImage(long command_queue,
long image,
boolean blocking_write,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long input_row_pitch,
long input_slice_pitch,
short[] ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
EnqueueWriteImagepublic static int clEnqueueWriteImage(long command_queue,
long image,
boolean blocking_write,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long input_row_pitch,
long input_slice_pitch,
int[] ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
EnqueueWriteImagepublic static int clEnqueueWriteImage(long command_queue,
long image,
boolean blocking_write,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long input_row_pitch,
long input_slice_pitch,
float[] ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
EnqueueWriteImagepublic static int clEnqueueWriteImage(long command_queue,
long image,
boolean blocking_write,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
long input_row_pitch,
long input_slice_pitch,
double[] ptr,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
EnqueueWriteImage@Nullable
public static java.nio.ByteBuffer clEnqueueMapImage(long command_queue,
long image,
boolean blocking_map,
long map_flags,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
org.lwjgl.PointerBuffer image_row_pitch,
@Nullable
org.lwjgl.PointerBuffer image_slice_pitch,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event,
@Nullable
int[] errcode_ret,
@Nullable
java.nio.ByteBuffer old_buffer)
EnqueueMapImage@Nullable
public static java.nio.ByteBuffer clEnqueueMapImage(long command_queue,
long image,
boolean blocking_map,
long map_flags,
org.lwjgl.PointerBuffer origin,
org.lwjgl.PointerBuffer region,
org.lwjgl.PointerBuffer image_row_pitch,
@Nullable
org.lwjgl.PointerBuffer image_slice_pitch,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event,
@Nullable
int[] errcode_ret,
long length,
@Nullable
java.nio.ByteBuffer old_buffer)
EnqueueMapImagepublic static int clGetImageInfo(long image,
int param_name,
@Nullable
int[] param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
GetImageInfopublic static int clGetMemObjectInfo(long memobj,
int param_name,
@Nullable
int[] param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
GetMemObjectInfopublic static int clGetMemObjectInfo(long memobj,
int param_name,
@Nullable
long[] param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
GetMemObjectInfopublic static long clCreateSampler(long context,
boolean normalized_coords,
int addressing_mode,
int filter_mode,
@Nullable
int[] errcode_ret)
CreateSamplerpublic static int clGetSamplerInfo(long sampler,
int param_name,
@Nullable
int[] param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
GetSamplerInfopublic static long clCreateProgramWithSource(long context,
org.lwjgl.PointerBuffer strings,
@Nullable
org.lwjgl.PointerBuffer lengths,
@Nullable
int[] errcode_ret)
CreateProgramWithSourcepublic static long clCreateProgramWithBinary(long context,
org.lwjgl.PointerBuffer device_list,
org.lwjgl.PointerBuffer lengths,
org.lwjgl.PointerBuffer binaries,
@Nullable
int[] binary_status,
@Nullable
int[] errcode_ret)
CreateProgramWithBinarypublic static int clGetProgramInfo(long program,
int param_name,
@Nullable
int[] param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
GetProgramInfopublic static int clGetProgramBuildInfo(long program,
long device,
int param_name,
@Nullable
int[] param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
GetProgramBuildInfopublic static long clCreateKernel(long program,
java.nio.ByteBuffer kernel_name,
@Nullable
int[] errcode_ret)
CreateKernelpublic static long clCreateKernel(long program,
java.lang.CharSequence kernel_name,
@Nullable
int[] errcode_ret)
CreateKernelpublic static int clCreateKernelsInProgram(long program,
@Nullable
org.lwjgl.PointerBuffer kernels,
@Nullable
int[] num_kernels_ret)
CreateKernelsInProgrampublic static int clSetKernelArg(long kernel,
int arg_index,
short[] arg_value)
SetKernelArgpublic static int clSetKernelArg(long kernel,
int arg_index,
int[] arg_value)
SetKernelArgpublic static int clSetKernelArg(long kernel,
int arg_index,
long[] arg_value)
SetKernelArgpublic static int clSetKernelArg(long kernel,
int arg_index,
float[] arg_value)
SetKernelArgpublic static int clSetKernelArg(long kernel,
int arg_index,
double[] arg_value)
SetKernelArgpublic static int clGetKernelInfo(long kernel,
int param_name,
@Nullable
int[] param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
GetKernelInfopublic static int clGetKernelWorkGroupInfo(long kernel,
long device,
int param_name,
@Nullable
int[] param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
GetKernelWorkGroupInfopublic static int clGetKernelWorkGroupInfo(long kernel,
long device,
int param_name,
@Nullable
long[] param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
GetKernelWorkGroupInfopublic static int clGetEventInfo(long event,
int param_name,
@Nullable
int[] param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
GetEventInfopublic static int clGetEventProfilingInfo(long event,
int param_name,
@Nullable
long[] param_value,
@Nullable
org.lwjgl.PointerBuffer param_value_size_ret)
GetEventProfilingInfoCopyright LWJGL. All Rights Reserved. License terms.