Top Description Fields Constructors Methods
org.lwjgl.opencl

public Class CL10

extends Object
Class Inheritance
Known Direct Subclasses
org.lwjgl.opencl.CL11
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

The core OpenCL 1.0 functionality.

Field Summary

Modifier and TypeField and Description
public static final int
CL_A

cl_channel_order

public static final int
CL_ADDRESS_CLAMP

cl_addressing_mode

public static final int
CL_ADDRESS_CLAMP_TO_EDGE

cl_addressing_mode

public static final int
CL_ADDRESS_NONE

cl_addressing_mode

public static final int
CL_ADDRESS_REPEAT

cl_addressing_mode

public static final int
CL_ARGB

cl_channel_order

public static final int
CL_BGRA

cl_channel_order

public static final int
CL_BUILD_ERROR

cl_build_status

public static final int
CL_BUILD_IN_PROGRESS

cl_build_status

public static final int
CL_BUILD_NONE

cl_build_status

public static final int
public static final int
CL_BUILD_SUCCESS

cl_build_status

public static final int
public static final int
CL_COMMAND_COPY_BUFFER

cl_command_type

public static final int
public static final int
CL_COMMAND_COPY_IMAGE

cl_command_type

public static final int
public static final int
CL_COMMAND_MAP_BUFFER

cl_command_type

public static final int
CL_COMMAND_MAP_IMAGE

cl_command_type

public static final int
CL_COMMAND_MARKER

cl_command_type

public static final int
CL_COMMAND_NATIVE_KERNEL

cl_command_type

public static final int
public static final int
CL_COMMAND_READ_BUFFER

cl_command_type

public static final int
CL_COMMAND_READ_IMAGE

cl_command_type

public static final int
public static final int
CL_COMMAND_TASK

cl_command_type

public static final int
public static final int
CL_COMMAND_WRITE_BUFFER

cl_command_type

public static final int
CL_COMMAND_WRITE_IMAGE

cl_command_type

public static final int
public static final int
CL_COMPLETE

command execution status

public static final int
CL_CONTEXT_DEVICES

cl_context_info

public static final int
CL_CONTEXT_PLATFORM

cl_context_info + cl_context_properties

public static final int
CL_CONTEXT_PROPERTIES

cl_context_info

public static final int
public static final int
CL_DEVICE_ADDRESS_BITS

cl_device_info

public static final int
CL_DEVICE_AVAILABLE

cl_device_info

public static final int
public static final int
public static final int
public static final int
public static final int
CL_DEVICE_EXTENSIONS

cl_device_info

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
CL_DEVICE_MAX_SAMPLERS

cl_device_info

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
CL_DEVICE_NAME

cl_device_info

public static final int
public static final int
public static final int
CL_DEVICE_PLATFORM

cl_device_info

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
CL_DEVICE_PROFILE

cl_device_info

public static final int
public static final int
public static final int
public static final int
CL_DEVICE_TYPE

cl_device_info

public static final int
CL_DEVICE_TYPE_ACCELERATOR

cl_device_type - bitfield

public static final int
CL_DEVICE_TYPE_ALL

cl_device_type - bitfield

public static final int
CL_DEVICE_TYPE_CPU

cl_device_type - bitfield

public static final int
CL_DEVICE_TYPE_DEFAULT

cl_device_type - bitfield

public static final int
CL_DEVICE_TYPE_GPU

cl_device_type - bitfield

public static final int
CL_DEVICE_VENDOR

cl_device_info

public static final int
CL_DEVICE_VENDOR_ID

cl_device_info

public static final int
CL_DEVICE_VERSION

cl_device_info

public static final int
CL_DRIVER_VERSION

cl_device_info

public static final int
public static final int
public static final int
CL_EVENT_COMMAND_TYPE

cl_event_info

public static final int
public static final int
CL_EXEC_KERNEL

cl_device_exec_capabilities - bitfield

public static final int
CL_EXEC_NATIVE_KERNEL

cl_device_exec_capabilities - bitfield

public static final int
CL_FALSE

cl_bool

public static final int
CL_FILTER_LINEAR

cl_filter_mode

public static final int
CL_FILTER_NEAREST

cl_filter_mode

public static final int
CL_FLOAT

cl_channel_type

public static final int
CL_FP_DENORM

cl_device_fp_config - bitfield

public static final int
CL_FP_FMA

cl_device_fp_config - bitfield

public static final int
CL_FP_INF_NAN

cl_device_fp_config - bitfield

public static final int
CL_FP_ROUND_TO_INF

cl_device_fp_config - bitfield

public static final int
CL_FP_ROUND_TO_NEAREST

cl_device_fp_config - bitfield

public static final int
CL_FP_ROUND_TO_ZERO

cl_device_fp_config - bitfield

public static final int
CL_GLOBAL

cl_device_local_mem_type

public static final int
CL_HALF_FLOAT

cl_channel_type

public static final int
CL_IMAGE_DEPTH

cl_image_info

public static final int
CL_IMAGE_ELEMENT_SIZE

cl_image_info

public static final int
CL_IMAGE_FORMAT

cl_image_info

public static final int
public static final int
public static final int
CL_IMAGE_HEIGHT

cl_image_info

public static final int
CL_IMAGE_ROW_PITCH

cl_image_info

public static final int
CL_IMAGE_SLICE_PITCH

cl_image_info

public static final int
CL_IMAGE_WIDTH

cl_image_info

public static final int
CL_INTENSITY

cl_channel_order

public static final int
public static final int
public static final int
public static final int
CL_INVALID_BINARY

Error Codes

public static final int
public static final int
public static final int
public static final int
CL_INVALID_CONTEXT

Error Codes

public static final int
CL_INVALID_DEVICE

Error Codes

public static final int
public static final int
CL_INVALID_EVENT

Error Codes

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
CL_INVALID_KERNEL

Error Codes

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
CL_INVALID_PROGRAM

Error Codes

public static final int
public static final int
public static final int
CL_INVALID_SAMPLER

Error Codes

public static final int
CL_INVALID_VALUE

Error Codes

public static final int
public static final int
public static final int
public static final int
CL_KERNEL_COMPILE_WORK_GROUP_SIZE

cl_kernel_work_group_info

public static final int
CL_KERNEL_CONTEXT

cl_kernel_info

public static final int
public static final int
CL_KERNEL_LOCAL_MEM_SIZE

cl_kernel_work_group_info

public static final int
CL_KERNEL_NUM_ARGS

cl_kernel_info

public static final int
CL_KERNEL_PROGRAM

cl_kernel_info

public static final int
public static final int
CL_KERNEL_WORK_GROUP_SIZE

cl_kernel_work_group_info

public static final int
CL_LOCAL

cl_device_local_mem_type

public static final int
CL_LUMINANCE

cl_channel_order

public static final int
CL_MAP_FAILURE

Error Codes

public static final int
CL_MAP_READ

cl_map_flags - bitfield

public static final int
CL_MAP_WRITE

cl_map_flags - bitfield

public static final int
CL_MEM_ALLOC_HOST_PTR

cl_mem_flags - bitfield

public static final int
CL_MEM_CONTEXT

cl_mem_info

public static final int
CL_MEM_COPY_HOST_PTR

cl_mem_flags - bitfield

public static final int
public static final int
CL_MEM_FLAGS

cl_mem_info

public static final int
CL_MEM_HOST_PTR

cl_mem_info

public static final int
CL_MEM_MAP_COUNT

cl_mem_info

public static final int
public static final int
CL_MEM_OBJECT_BUFFER

cl_mem_object_type

public static final int
CL_MEM_OBJECT_IMAGE2D

cl_mem_object_type

public static final int
CL_MEM_OBJECT_IMAGE3D

cl_mem_object_type

public static final int
CL_MEM_READ_ONLY

cl_mem_flags - bitfield

public static final int
CL_MEM_READ_WRITE

cl_mem_flags - bitfield

public static final int
public static final int
CL_MEM_SIZE

cl_mem_info

public static final int
CL_MEM_TYPE

cl_mem_info

public static final int
CL_MEM_USE_HOST_PTR

cl_mem_flags - bitfield

public static final int
CL_MEM_WRITE_ONLY

cl_mem_flags - bitfield

public static final int
CL_NONE

cl_device_mem_cache_type

public static final int
public static final int
public static final int
CL_PLATFORM_EXTENSIONS

cl_platform_info

public static final int
CL_PLATFORM_NAME

cl_platform_info

public static final int
CL_PLATFORM_PROFILE

cl_platform_info

public static final int
CL_PLATFORM_VENDOR

cl_platform_info

public static final int
CL_PLATFORM_VERSION

cl_platform_info

public static final int
CL_PROFILING_COMMAND_END

cl_profiling_info

public static final int
CL_PROFILING_COMMAND_QUEUED

cl_profiling_info

public static final int
CL_PROFILING_COMMAND_START

cl_profiling_info

public static final int
CL_PROFILING_COMMAND_SUBMIT

cl_profiling_info

public static final int
public static final int
CL_PROGRAM_BINARIES

cl_program_info

public static final int
CL_PROGRAM_BINARY_SIZES

cl_program_info

public static final int
CL_PROGRAM_BUILD_LOG

cl_program_build_info

public static final int
CL_PROGRAM_BUILD_OPTIONS

cl_program_build_info

public static final int
CL_PROGRAM_BUILD_STATUS

cl_program_build_info

public static final int
CL_PROGRAM_CONTEXT

cl_program_info

public static final int
CL_PROGRAM_DEVICES

cl_program_info

public static final int
CL_PROGRAM_NUM_DEVICES

cl_program_info

public static final int
public static final int
CL_PROGRAM_SOURCE

cl_program_info

public static final int
CL_QUEUE_CONTEXT

cl_command_queue_info

public static final int
CL_QUEUE_DEVICE

cl_command_queue_info

public static final int
CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE

cl_command_queue_properties - bitfield

public static final int
CL_QUEUE_PROFILING_ENABLE

cl_command_queue_properties - bitfield

public static final int
CL_QUEUE_PROPERTIES

cl_command_queue_info

public static final int
CL_QUEUE_REFERENCE_COUNT

cl_command_queue_info

public static final int
CL_QUEUED

command execution status

public static final int
CL_R

cl_channel_order

public static final int
CL_RA

cl_channel_order

public static final int
CL_READ_ONLY_CACHE

cl_device_mem_cache_type

public static final int
CL_READ_WRITE_CACHE

cl_device_mem_cache_type

public static final int
CL_RG

cl_channel_order

public static final int
CL_RGB

cl_channel_order

public static final int
CL_RGBA

cl_channel_order

public static final int
CL_RUNNING

command execution status

public static final int
public static final int
CL_SAMPLER_CONTEXT

cl_sampler_info

public static final int
CL_SAMPLER_FILTER_MODE

cl_sampler_info

public static final int
public static final int
public static final int
CL_SIGNED_INT16

cl_channel_type

public static final int
CL_SIGNED_INT32

cl_channel_type

public static final int
CL_SIGNED_INT8

cl_channel_type

public static final int
CL_SNORM_INT16

cl_channel_type

public static final int
CL_SNORM_INT8

cl_channel_type

public static final int
CL_SUBMITTED

command execution status

public static final int
CL_SUCCESS

Error Codes

public static final int
CL_TRUE

cl_bool

public static final int
CL_UNORM_INT16

cl_channel_type

public static final int
CL_UNORM_INT8

cl_channel_type

public static final int
CL_UNORM_INT_101010

cl_channel_type

public static final int
CL_UNORM_SHORT_555

cl_channel_type

public static final int
CL_UNORM_SHORT_565

cl_channel_type

public static final int
CL_UNSIGNED_INT16

cl_channel_type

public static final int
CL_UNSIGNED_INT32

cl_channel_type

public static final int
CL_UNSIGNED_INT8

cl_channel_type

public static final int
CL_VERSION_1_0

OpenCL Version

Constructor Summary

AccessConstructor and Description
protected
CL10()

Method Summary

Modifier and TypeMethod and Description
public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clBuildProgram
(long
the program object
program
,
PointerBuffer
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.
device_list
,
ByteBuffer
a pointer to a null-terminated string of characters that describes the build options to be used for building the program executable
options
,
CLProgramCallbackI
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.
pfn_notify
,
long
will be passed as an argument when pfn_notify is called. user_data can be NULL.
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.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clBuildProgram
(long
the program object
program
,
PointerBuffer
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.
device_list
,
CharSequence
a pointer to a null-terminated string of characters that describes the build options to be used for building the program executable
options
,
CLProgramCallbackI
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.
pfn_notify
,
long
will be passed as an argument when pfn_notify is called. user_data can be NULL.
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.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clBuildProgram
(long
the program object
program
,
long device, CharSequence
a pointer to a null-terminated string of characters that describes the build options to be used for building the program executable
options
,
CLProgramCallbackI
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.
pfn_notify
,
long
will be passed as an argument when pfn_notify is called. user_data can be NULL.
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.

public static long

Returns:

a valid non-zero buffer object and 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:
clCreateBuffer
(long
a valid OpenCL context used to create the buffer object
context
,
long
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_WRITEMEM_WRITE_ONLYMEM_READ_ONLYMEM_USE_HOST_PTRMEM_ALLOC_HOST_PTR
MEM_COPY_HOST_PTRMEM_HOST_WRITE_ONLYMEM_HOST_READ_ONLYMEM_HOST_NO_ACCESS
flags
,
long
the size in bytes of the buffer memory object to be allocated
size
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a buffer object.

public static long

Returns:

a valid non-zero buffer object and 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:
clCreateBuffer
(long
a valid OpenCL context used to create the buffer object
context
,
long
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_WRITEMEM_WRITE_ONLYMEM_READ_ONLYMEM_USE_HOST_PTRMEM_ALLOC_HOST_PTR
MEM_COPY_HOST_PTRMEM_HOST_WRITE_ONLYMEM_HOST_READ_ONLYMEM_HOST_NO_ACCESS
flags
,
ByteBuffer
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.
host_ptr
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a buffer object.

public static long

Returns:

a valid non-zero buffer object and 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:
clCreateBuffer
(long
a valid OpenCL context used to create the buffer object
context
,
long
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_WRITEMEM_WRITE_ONLYMEM_READ_ONLYMEM_USE_HOST_PTRMEM_ALLOC_HOST_PTR
MEM_COPY_HOST_PTRMEM_HOST_WRITE_ONLYMEM_HOST_READ_ONLYMEM_HOST_NO_ACCESS
flags
,
ShortBuffer
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.
host_ptr
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a buffer object.

public static long

Returns:

a valid non-zero buffer object and 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:
clCreateBuffer
(long
a valid OpenCL context used to create the buffer object
context
,
long
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_WRITEMEM_WRITE_ONLYMEM_READ_ONLYMEM_USE_HOST_PTRMEM_ALLOC_HOST_PTR
MEM_COPY_HOST_PTRMEM_HOST_WRITE_ONLYMEM_HOST_READ_ONLYMEM_HOST_NO_ACCESS
flags
,
IntBuffer
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.
host_ptr
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a buffer object.

public static long

Returns:

a valid non-zero buffer object and 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:
clCreateBuffer
(long
a valid OpenCL context used to create the buffer object
context
,
long
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_WRITEMEM_WRITE_ONLYMEM_READ_ONLYMEM_USE_HOST_PTRMEM_ALLOC_HOST_PTR
MEM_COPY_HOST_PTRMEM_HOST_WRITE_ONLYMEM_HOST_READ_ONLYMEM_HOST_NO_ACCESS
flags
,
FloatBuffer
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.
host_ptr
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a buffer object.

public static long

Returns:

a valid non-zero buffer object and 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:
clCreateBuffer
(long
a valid OpenCL context used to create the buffer object
context
,
long
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_WRITEMEM_WRITE_ONLYMEM_READ_ONLYMEM_USE_HOST_PTRMEM_ALLOC_HOST_PTR
MEM_COPY_HOST_PTRMEM_HOST_WRITE_ONLYMEM_HOST_READ_ONLYMEM_HOST_NO_ACCESS
flags
,
DoubleBuffer
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.
host_ptr
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a buffer object.

public static long
clCreateBuffer(long context, long flags, ByteBuffer host_ptr, int[] errcode_ret)

Array version of: CreateBuffer

public static long
clCreateBuffer(long context, long flags, short[] host_ptr, int[] errcode_ret)

Array version of: CreateBuffer

public static long
clCreateBuffer(long context, long flags, int[] host_ptr, int[] errcode_ret)

Array version of: CreateBuffer

public static long
clCreateBuffer(long context, long flags, float[] host_ptr, int[] errcode_ret)

Array version of: CreateBuffer

public static long
clCreateBuffer(long context, long flags, double[] host_ptr, int[] errcode_ret)

Array version of: CreateBuffer

public static long

Returns:

a valid non-zero command-queue and 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.
clCreateCommandQueue
(long
a valid OpenCL context
context
,
long
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.
device
,
long properties, IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a command-queue on a specific device.

public static long
clCreateCommandQueue(long context, long device, long properties, int[] errcode_ret)

Array version of: CreateCommandQueue

public static long

Returns:

a valid non-zero context and 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.
clCreateContext
(PointerBuffer
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_PLATFORMCONTEXT_INTEROP_USER_SYNCGL_CONTEXT_KHREGL_DISPLAY_KHRGLX_DISPLAY_KHR
WGL_HDC_KHRCGL_SHAREGROUP_KHR
properties
,
PointerBuffer
a list of unique devices returned by GetDeviceIDs or sub-devices created by CreateSubDevices for a platform
devices
,
CLContextCallbackI
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.

pfn_notify
,
long
will be passed as the user_data argument when pfn_notify is called. user_data can be NULL.
user_data
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates an OpenCL context.

public static long

Returns:

a valid non-zero context and 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.
clCreateContext
(PointerBuffer
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_PLATFORMCONTEXT_INTEROP_USER_SYNCGL_CONTEXT_KHREGL_DISPLAY_KHRGLX_DISPLAY_KHR
WGL_HDC_KHRCGL_SHAREGROUP_KHR
properties
,
long device, CLContextCallbackI
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.

pfn_notify
,
long
will be passed as the user_data argument when pfn_notify is called. user_data can be NULL.
user_data
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates an OpenCL context.

public static long
clCreateContext(PointerBuffer properties, PointerBuffer devices, CLContextCallbackI pfn_notify, long user_data, int[] errcode_ret)

Array version of: CreateContext

public static long
clCreateContextFromType(PointerBuffer
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.
properties
,
long device_type, CLContextCallbackI
a callback function that can be registered by the application
pfn_notify
,
long
will be passed as the user_data argument when pfn_notify is called. user_data can be NULL.
user_data
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a context using devices of the specified type.

public static long
clCreateContextFromType(PointerBuffer properties, long device_type, CLContextCallbackI pfn_notify, long user_data, int[] errcode_ret)

Array version of: CreateContextFromType

public static long

Returns:

a valid non-zero image object and 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:
clCreateImage2D
(long
a valid OpenCL context on which the image object is to be created
context
,
long
a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:
MEM_READ_WRITEMEM_WRITE_ONLYMEM_READ_ONLYMEM_USE_HOST_PTRMEM_ALLOC_HOST_PTR
MEM_COPY_HOST_PTRMEM_HOST_WRITE_ONLYMEM_HOST_READ_ONLYMEM_HOST_NO_ACCESS
flags
,
CLImageFormat
a pointer to a CLImageFormat structure that describes format properties of the image to be allocated
image_format
,
long
the width of the image in pixels
image_width
,
long
the height of the image in pixels
image_height
,
long
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_row_pitch
,
ByteBuffer
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.
host_ptr
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a 2D image object.

public static long

Returns:

a valid non-zero image object and 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:
clCreateImage2D
(long
a valid OpenCL context on which the image object is to be created
context
,
long
a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:
MEM_READ_WRITEMEM_WRITE_ONLYMEM_READ_ONLYMEM_USE_HOST_PTRMEM_ALLOC_HOST_PTR
MEM_COPY_HOST_PTRMEM_HOST_WRITE_ONLYMEM_HOST_READ_ONLYMEM_HOST_NO_ACCESS
flags
,
CLImageFormat
a pointer to a CLImageFormat structure that describes format properties of the image to be allocated
image_format
,
long
the width of the image in pixels
image_width
,
long
the height of the image in pixels
image_height
,
long
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_row_pitch
,
ShortBuffer
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.
host_ptr
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a 2D image object.

public static long

Returns:

a valid non-zero image object and 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:
clCreateImage2D
(long
a valid OpenCL context on which the image object is to be created
context
,
long
a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:
MEM_READ_WRITEMEM_WRITE_ONLYMEM_READ_ONLYMEM_USE_HOST_PTRMEM_ALLOC_HOST_PTR
MEM_COPY_HOST_PTRMEM_HOST_WRITE_ONLYMEM_HOST_READ_ONLYMEM_HOST_NO_ACCESS
flags
,
CLImageFormat
a pointer to a CLImageFormat structure that describes format properties of the image to be allocated
image_format
,
long
the width of the image in pixels
image_width
,
long
the height of the image in pixels
image_height
,
long
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_row_pitch
,
IntBuffer
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.
host_ptr
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a 2D image object.

public static long

Returns:

a valid non-zero image object and 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:
clCreateImage2D
(long
a valid OpenCL context on which the image object is to be created
context
,
long
a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:
MEM_READ_WRITEMEM_WRITE_ONLYMEM_READ_ONLYMEM_USE_HOST_PTRMEM_ALLOC_HOST_PTR
MEM_COPY_HOST_PTRMEM_HOST_WRITE_ONLYMEM_HOST_READ_ONLYMEM_HOST_NO_ACCESS
flags
,
CLImageFormat
a pointer to a CLImageFormat structure that describes format properties of the image to be allocated
image_format
,
long
the width of the image in pixels
image_width
,
long
the height of the image in pixels
image_height
,
long
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_row_pitch
,
FloatBuffer
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.
host_ptr
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a 2D image object.

public static long
clCreateImage2D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_row_pitch, ByteBuffer host_ptr, int[] errcode_ret)

Array version of: CreateImage2D

public 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

public 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

public 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

public static long

Returns:

a valid non-zero image object and 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:
clCreateImage3D
(long
a valid OpenCL context on which the image object is to be created
context
,
long
a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:
MEM_READ_WRITEMEM_WRITE_ONLYMEM_READ_ONLYMEM_USE_HOST_PTRMEM_ALLOC_HOST_PTR
MEM_COPY_HOST_PTRMEM_HOST_WRITE_ONLYMEM_HOST_READ_ONLYMEM_HOST_NO_ACCESS
flags
,
CLImageFormat
a pointer to a CLImageFormat structure that describes format properties of the image to be allocated
image_format
,
long
the width of the image in pixels
image_width
,
long
the height of the image in pixels
image_height
,
long
the depth of the image in pixels. This must be a value > 1.
image_depth
,
long
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_row_pitch
,
long
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.
image_slice_pitch
,
ByteBuffer
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.
host_ptr
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a 3D image object.

public static long

Returns:

a valid non-zero image object and 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:
clCreateImage3D
(long
a valid OpenCL context on which the image object is to be created
context
,
long
a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:
MEM_READ_WRITEMEM_WRITE_ONLYMEM_READ_ONLYMEM_USE_HOST_PTRMEM_ALLOC_HOST_PTR
MEM_COPY_HOST_PTRMEM_HOST_WRITE_ONLYMEM_HOST_READ_ONLYMEM_HOST_NO_ACCESS
flags
,
CLImageFormat
a pointer to a CLImageFormat structure that describes format properties of the image to be allocated
image_format
,
long
the width of the image in pixels
image_width
,
long
the height of the image in pixels
image_height
,
long
the depth of the image in pixels. This must be a value > 1.
image_depth
,
long
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_row_pitch
,
long
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.
image_slice_pitch
,
ShortBuffer
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.
host_ptr
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a 3D image object.

public static long

Returns:

a valid non-zero image object and 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:
clCreateImage3D
(long
a valid OpenCL context on which the image object is to be created
context
,
long
a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:
MEM_READ_WRITEMEM_WRITE_ONLYMEM_READ_ONLYMEM_USE_HOST_PTRMEM_ALLOC_HOST_PTR
MEM_COPY_HOST_PTRMEM_HOST_WRITE_ONLYMEM_HOST_READ_ONLYMEM_HOST_NO_ACCESS
flags
,
CLImageFormat
a pointer to a CLImageFormat structure that describes format properties of the image to be allocated
image_format
,
long
the width of the image in pixels
image_width
,
long
the height of the image in pixels
image_height
,
long
the depth of the image in pixels. This must be a value > 1.
image_depth
,
long
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_row_pitch
,
long
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.
image_slice_pitch
,
IntBuffer
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.
host_ptr
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a 3D image object.

public static long

Returns:

a valid non-zero image object and 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:
clCreateImage3D
(long
a valid OpenCL context on which the image object is to be created
context
,
long
a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:
MEM_READ_WRITEMEM_WRITE_ONLYMEM_READ_ONLYMEM_USE_HOST_PTRMEM_ALLOC_HOST_PTR
MEM_COPY_HOST_PTRMEM_HOST_WRITE_ONLYMEM_HOST_READ_ONLYMEM_HOST_NO_ACCESS
flags
,
CLImageFormat
a pointer to a CLImageFormat structure that describes format properties of the image to be allocated
image_format
,
long
the width of the image in pixels
image_width
,
long
the height of the image in pixels
image_height
,
long
the depth of the image in pixels. This must be a value > 1.
image_depth
,
long
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_row_pitch
,
long
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.
image_slice_pitch
,
FloatBuffer
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.
host_ptr
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a 3D image object.

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, ByteBuffer host_ptr, int[] errcode_ret)

Array version of: CreateImage3D

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, short[] host_ptr, int[] errcode_ret)

Array version of: CreateImage3D

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, int[] host_ptr, int[] errcode_ret)

Array version of: CreateImage3D

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, float[] host_ptr, int[] errcode_ret)

Array version of: CreateImage3D

public static long

Returns:

a valid non-zero kernel object and 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.
clCreateKernel
(long
a program object with a successfully built executable
program
,
ByteBuffer
a function name in the program declared with the __kernel qualifier
kernel_name
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a kernel object.

public static long

Returns:

a valid non-zero kernel object and 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.
clCreateKernel
(long
a program object with a successfully built executable
program
,
CharSequence
a function name in the program declared with the __kernel qualifier
kernel_name
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a kernel object.

public static long
clCreateKernel(long program, ByteBuffer kernel_name, int[] errcode_ret)

Array version of: CreateKernel

public static long
clCreateKernel(long program, CharSequence kernel_name, int[] errcode_ret)

Array version of: CreateKernel

public static int

Returns:

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.
clCreateKernelsInProgram
(long
a program object with a successfully built executable
program
,
PointerBuffer
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.
kernels
,
IntBuffer
the number of kernels in program. If num_kernels_ret is NULL, it is ignored.
num_kernels_ret
)

Creates kernel objects for all kernel functions in program.

public static int
clCreateKernelsInProgram(long program, PointerBuffer kernels, int[] num_kernels_ret)

Array version of: CreateKernelsInProgram

public static long

Returns:

a valid non-zero program object and 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.
clCreateProgramWithBinary
(long
a valid OpenCL context
context
,
PointerBuffer
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.
device_list
,
PointerBuffer
an array of the size in bytes of the program binaries to be loaded for devices specified by device_list.
lengths
,
PointerBuffer
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.
binaries
,
IntBuffer
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.
binary_status
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a program object for a context, and loads the binary bits specified by binary into the program object.

public static long

Returns:

a valid non-zero program object and 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.
clCreateProgramWithBinary
(long
a valid OpenCL context
context
,
PointerBuffer
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.
device_list
,
ByteBuffer[]
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.
binaries
,
IntBuffer
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.
binary_status
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a program object for a context, and loads the binary bits specified by binary into the program object.

public static long

Returns:

a valid non-zero program object and 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.
clCreateProgramWithBinary
(long
a valid OpenCL context
context
,
PointerBuffer
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.
device_list
,
ByteBuffer binary, IntBuffer
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.
binary_status
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a program object for a context, and loads the binary bits specified by binary into the program object.

public static long
clCreateProgramWithBinary(long context, PointerBuffer device_list, PointerBuffer lengths, PointerBuffer binaries, int[] binary_status, int[] errcode_ret)

Array version of: CreateProgramWithBinary

public static long

Returns:

a valid non-zero program object and 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.
clCreateProgramWithSource
(long
a valid OpenCL context
context
,
PointerBuffer
an array of count pointers to optionally null-terminated character strings that make up the source code
strings
,
PointerBuffer
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.
lengths
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
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.

public static long

Returns:

a valid non-zero program object and 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.
clCreateProgramWithSource
(long
a valid OpenCL context
context
,
CharSequence[]
an array of count pointers to optionally null-terminated character strings that make up the source code
strings
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
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.

public static long

Returns:

a valid non-zero program object and 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.
clCreateProgramWithSource
(long
a valid OpenCL context
context
,
CharSequence string, IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
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.

public static long
clCreateProgramWithSource(long context, PointerBuffer strings, PointerBuffer lengths, int[] errcode_ret)

Array version of: CreateProgramWithSource

public static long

Returns:

a valid non-zero sampler object and 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.
clCreateSampler
(long
a valid OpenCL context
context
,
boolean
determines if the image coordinates specified are normalized or not
normalized_coords
,
int
specifies how out-of-range image coordinates are handled when reading from an image. One of:
ADDRESS_NONEADDRESS_CLAMP_TO_EDGEADDRESS_CLAMPADDRESS_REPEAT
ADDRESS_MIRRORED_REPEAT
addressing_mode
,
int
the type of filter that must be applied when reading an image. One of:
FILTER_NEARESTFILTER_LINEAR
filter_mode
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a sampler object.

public static long
clCreateSampler(long context, boolean normalized_coords, int addressing_mode, int filter_mode, int[] errcode_ret)

Array version of: CreateSampler

public static int

Returns:

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.
  • 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.
clEnqueueBarrier
(long
the command-queue to insert the barrier to
command_queue
)

Enqueues a barrier operation.

public static int

Returns:

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.
clEnqueueCopyBuffer
(long
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.
command_queue
,
long
the source buffer
src_buffer
,
long
the destination buffer
dst_buffer
,
long
the offset where to begin copying data from src_buffer.
src_offset
,
long
the offset where to begin copying data into dst_buffer
dst_offset
,
long
the size in bytes to copy
size
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to copy a buffer object identified by src_buffer to another buffer object identified by dst_buffer.

public static int

Returns:

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.
clEnqueueCopyBufferToImage
(long
a valid command-queue. The OpenCL context associated with command_queue, src_buffer and dst_image must be the same.
command_queue
,
long
a valid buffer object
src_buffer
,
long
a valid image object
dst_image
,
long
the offset where to begin copying data from src_buffer
src_offset
,
PointerBuffer
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.
dst_origin
,
PointerBuffer
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.
region
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to copy a buffer object to an image object.

public static int

Returns:

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.
clEnqueueCopyImage
(long
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.
command_queue
,
long src_image, long dst_image, PointerBuffer
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.
src_origin
,
PointerBuffer
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.
dst_origin
,
PointerBuffer
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.
region
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to copy image objects.

public static int

Returns:

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.
clEnqueueCopyImageToBuffer
(long
a valid command-queue. The OpenCL context associated with command_queue, src_image and dst_buffer must be the same.
command_queue
,
long
a valid image object
src_image
,
long
a valid buffer object
dst_buffer
,
PointerBuffer
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.
src_origin
,
PointerBuffer
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.
region
,
long
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.
dst_offset
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to copy an image object to a buffer object.

public static ByteBuffer

Returns:

a pointer to the mapped region. The errcode_ret is set to SUCCESS. A NULL pointer is returned otherwise with one of the following error values returned in errcode_ret:
clEnqueueMapBuffer
(long
a valid command-queue
command_queue
,
long
a valid buffer object. The OpenCL context associated with command_queue and buffer must be the same.
buffer
,
boolean
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.

blocking_map
,
long map_flags, long
the offset in bytes of the region in the buffer object that is being mapped
offset
,
long
the size in bytes of the region in the buffer object that is being mapped
size
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
,
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.

public static ByteBuffer
clEnqueueMapBuffer(long command_queue, long buffer, boolean blocking_map, long map_flags, long offset, long size, PointerBuffer event_wait_list, PointerBuffer event, int[] errcode_ret, ByteBuffer old_buffer)

Array version of: EnqueueMapBuffer

public static ByteBuffer

Returns:

a pointer to the mapped region. The errcode_ret is set to SUCCESS. A NULL pointer is returned otherwise with one of the following error values returned in errcode_ret:
clEnqueueMapImage
(long
a valid command-queue
command_queue
,
long
a valid image object. The OpenCL context associated with command_queue and image must be the same.
image
,
boolean
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.

blocking_map
,
long map_flags, PointerBuffer
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.
origin
,
PointerBuffer
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.
region
,
PointerBuffer
the scan-line pitch in bytes for the mapped region. This must be a non-NULL value.
image_row_pitch
,
PointerBuffer
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.
image_slice_pitch
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
,
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.

public static ByteBuffer

Returns:

a pointer to the mapped region. The errcode_ret is set to SUCCESS. A NULL pointer is returned otherwise with one of the following error values returned in errcode_ret:
clEnqueueMapImage
(long
a valid command-queue
command_queue
,
long
a valid image object. The OpenCL context associated with command_queue and image must be the same.
image
,
boolean
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.

blocking_map
,
long map_flags, PointerBuffer
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.
origin
,
PointerBuffer
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.
region
,
PointerBuffer
the scan-line pitch in bytes for the mapped region. This must be a non-NULL value.
image_row_pitch
,
PointerBuffer
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.
image_slice_pitch
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
,
long length, 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.

public static ByteBuffer
clEnqueueMapImage(long command_queue, long image, boolean blocking_map, long map_flags, PointerBuffer origin, PointerBuffer region, PointerBuffer image_row_pitch, PointerBuffer image_slice_pitch, PointerBuffer event_wait_list, PointerBuffer event, int[] errcode_ret, ByteBuffer old_buffer)

Array version of: EnqueueMapImage

public static ByteBuffer
clEnqueueMapImage(long command_queue, long image, boolean blocking_map, long map_flags, PointerBuffer origin, PointerBuffer region, PointerBuffer image_row_pitch, PointerBuffer image_slice_pitch, PointerBuffer event_wait_list, PointerBuffer event, int[] errcode_ret, long length, ByteBuffer old_buffer)

Array version of: EnqueueMapImage

public static int

Returns:

SUCCESS if the function is successfully executed. Otherwise, it returns one of the following errors:
clEnqueueMarker
(long
the command-queue to insert the marker to
command_queue
,
PointerBuffer
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.
event
)

Enqueues a marker command to command_queue.

public static int

Returns:

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.
clEnqueueNativeKernel
(long
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.
command_queue
,
CLNativeKernelI
a pointer to a host-callable user function
user_func
,
ByteBuffer
a pointer to the args list that user_func should be called with
args
,
PointerBuffer
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.
mem_list
,
PointerBuffer
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.
args_mem_loc
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to execute a native C/C++ function not compiled using the OpenCL compiler.

public static int

Returns:

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.
clEnqueueNativeKernel
(long
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.
command_queue
,
CLNativeKernelI
a pointer to a host-callable user function
user_func
,
ByteBuffer
a pointer to the args list that user_func should be called with
args
,
long memobj, long memobj_loc, PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to execute a native C/C++ function not compiled using the OpenCL compiler.

public static int

Returns:

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_SIZE
  • INVALID_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.
clEnqueueNDRangeKernel
(long
a valid command-queue. The kernel will be queued for execution on the device associated with command_queue.
command_queue
,
long
a valid kernel object. The OpenCL context associated with kernel and command_queue must be the same.
kernel
,
int
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.
work_dim
,
PointerBuffer
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_offset
,
PointerBuffer
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].
global_work_size
,
PointerBuffer
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.

local_work_size
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to execute a kernel on a device.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clEnqueueReadBuffer
(long
the command-queue in which the read command will be queued. command_queue and buffer must be created with the same OpenCL context.
command_queue
,
long
a valid buffer object
buffer
,
boolean
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.

blocking_read
,
long
the offset in bytes in the buffer object to read from
offset
,
ByteBuffer
the pointer to buffer in host memory where data is to be read into
ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to read from a buffer object to host memory.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clEnqueueReadBuffer
(long
the command-queue in which the read command will be queued. command_queue and buffer must be created with the same OpenCL context.
command_queue
,
long
a valid buffer object
buffer
,
boolean
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.

blocking_read
,
long
the offset in bytes in the buffer object to read from
offset
,
ShortBuffer
the pointer to buffer in host memory where data is to be read into
ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to read from a buffer object to host memory.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clEnqueueReadBuffer
(long
the command-queue in which the read command will be queued. command_queue and buffer must be created with the same OpenCL context.
command_queue
,
long
a valid buffer object
buffer
,
boolean
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.

blocking_read
,
long
the offset in bytes in the buffer object to read from
offset
,
IntBuffer
the pointer to buffer in host memory where data is to be read into
ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to read from a buffer object to host memory.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clEnqueueReadBuffer
(long
the command-queue in which the read command will be queued. command_queue and buffer must be created with the same OpenCL context.
command_queue
,
long
a valid buffer object
buffer
,
boolean
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.

blocking_read
,
long
the offset in bytes in the buffer object to read from
offset
,
FloatBuffer
the pointer to buffer in host memory where data is to be read into
ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to read from a buffer object to host memory.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clEnqueueReadBuffer
(long
the command-queue in which the read command will be queued. command_queue and buffer must be created with the same OpenCL context.
command_queue
,
long
a valid buffer object
buffer
,
boolean
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.

blocking_read
,
long
the offset in bytes in the buffer object to read from
offset
,
DoubleBuffer
the pointer to buffer in host memory where data is to be read into
ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to read from a buffer object to host memory.

public static int
clEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, short[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueReadBuffer

public static int
clEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, int[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueReadBuffer

public static int
clEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, float[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueReadBuffer

public static int
clEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, double[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueReadBuffer

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clEnqueueReadImage
(long
the command-queue in which the read command will be queued. command_queue and image must be created with the same OpenCL context.
command_queue
,
long
a valid image or image array object
image
,
boolean
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.

blocking_read
,
PointerBuffer
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.
origin
,
PointerBuffer
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.
region
,
long
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.
row_pitch
,
long
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.
slice_pitch
,
ByteBuffer
the pointer to a buffer in host memory where image data is to be read to
ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to read from an image or image array object to host memory.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clEnqueueReadImage
(long
the command-queue in which the read command will be queued. command_queue and image must be created with the same OpenCL context.
command_queue
,
long
a valid image or image array object
image
,
boolean
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.

blocking_read
,
PointerBuffer
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.
origin
,
PointerBuffer
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.
region
,
long
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.
row_pitch
,
long
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.
slice_pitch
,
ShortBuffer
the pointer to a buffer in host memory where image data is to be read to
ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to read from an image or image array object to host memory.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clEnqueueReadImage
(long
the command-queue in which the read command will be queued. command_queue and image must be created with the same OpenCL context.
command_queue
,
long
a valid image or image array object
image
,
boolean
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.

blocking_read
,
PointerBuffer
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.
origin
,
PointerBuffer
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.
region
,
long
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.
row_pitch
,
long
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.
slice_pitch
,
IntBuffer
the pointer to a buffer in host memory where image data is to be read to
ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to read from an image or image array object to host memory.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clEnqueueReadImage
(long
the command-queue in which the read command will be queued. command_queue and image must be created with the same OpenCL context.
command_queue
,
long
a valid image or image array object
image
,
boolean
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.

blocking_read
,
PointerBuffer
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.
origin
,
PointerBuffer
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.
region
,
long
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.
row_pitch
,
long
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.
slice_pitch
,
FloatBuffer
the pointer to a buffer in host memory where image data is to be read to
ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to read from an image or image array object to host memory.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clEnqueueReadImage
(long
the command-queue in which the read command will be queued. command_queue and image must be created with the same OpenCL context.
command_queue
,
long
a valid image or image array object
image
,
boolean
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.

blocking_read
,
PointerBuffer
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.
origin
,
PointerBuffer
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.
region
,
long
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.
row_pitch
,
long
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.
slice_pitch
,
DoubleBuffer
the pointer to a buffer in host memory where image data is to be read to
ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to read from an image or image array object to host memory.

public static int
clEnqueueReadImage(long command_queue, long image, boolean blocking_read, PointerBuffer origin, PointerBuffer region, long row_pitch, long slice_pitch, short[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueReadImage

public static int
clEnqueueReadImage(long command_queue, long image, boolean blocking_read, PointerBuffer origin, PointerBuffer region, long row_pitch, long slice_pitch, int[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueReadImage

public static int
clEnqueueReadImage(long command_queue, long image, boolean blocking_read, PointerBuffer origin, PointerBuffer region, long row_pitch, long slice_pitch, float[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueReadImage

public static int
clEnqueueReadImage(long command_queue, long image, boolean blocking_read, PointerBuffer origin, PointerBuffer region, long row_pitch, long slice_pitch, double[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueReadImage

public static int

Returns:

SUCCESS if the kernel execution was successfully queued. Otherwise, see EnqueueNDRangeKernel.
clEnqueueTask
(long
a valid command-queue. The kernel will be queued for execution on the device associated with command_queue.
command_queue
,
long
a valid kernel object. The OpenCL context associated with kernel and command_queue must be the same.
kernel
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to execute a kernel on a device.

public static int

Returns:

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.
clEnqueueUnmapMemObject
(long
a valid command-queue
command_queue
,
long
a valid memory object. The OpenCL context associated with command_queue and memobj must be the same.
memobj
,
ByteBuffer
the host address returned by a previous call to EnqueueMapBuffer, or EnqueueMapImage for memobj
mapped_ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to unmap a previously mapped region of a memory object.

public static int

Returns:

SUCCESS 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.
clEnqueueWaitForEvents
(long
the command-queue
command_queue
,
PointerBuffer
the list of events
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.

public static int

Returns:

SUCCESS 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.
clEnqueueWaitForEvents
(long
the command-queue
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.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clEnqueueWriteBuffer
(long
the command-queue in which the write command will be queued. command_queue and buffer must be created with the same OpenCL context.
command_queue
,
long
a valid buffer object
buffer
,
boolean
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.

blocking_write
,
long
the offset in bytes in the buffer object to write to
offset
,
ByteBuffer
the pointer to buffer in host memory where data is to be written from
ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to write to a buffer object from host memory.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clEnqueueWriteBuffer
(long
the command-queue in which the write command will be queued. command_queue and buffer must be created with the same OpenCL context.
command_queue
,
long
a valid buffer object
buffer
,
boolean
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.

blocking_write
,
long
the offset in bytes in the buffer object to write to
offset
,
ShortBuffer
the pointer to buffer in host memory where data is to be written from
ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to write to a buffer object from host memory.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clEnqueueWriteBuffer
(long
the command-queue in which the write command will be queued. command_queue and buffer must be created with the same OpenCL context.
command_queue
,
long
a valid buffer object
buffer
,
boolean
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.

blocking_write
,
long
the offset in bytes in the buffer object to write to
offset
,
IntBuffer
the pointer to buffer in host memory where data is to be written from
ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to write to a buffer object from host memory.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clEnqueueWriteBuffer
(long
the command-queue in which the write command will be queued. command_queue and buffer must be created with the same OpenCL context.
command_queue
,
long
a valid buffer object
buffer
,
boolean
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.

blocking_write
,
long
the offset in bytes in the buffer object to write to
offset
,
FloatBuffer
the pointer to buffer in host memory where data is to be written from
ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to write to a buffer object from host memory.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clEnqueueWriteBuffer
(long
the command-queue in which the write command will be queued. command_queue and buffer must be created with the same OpenCL context.
command_queue
,
long
a valid buffer object
buffer
,
boolean
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.

blocking_write
,
long
the offset in bytes in the buffer object to write to
offset
,
DoubleBuffer
the pointer to buffer in host memory where data is to be written from
ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to write to a buffer object from host memory.

public static int
clEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, short[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueWriteBuffer

public static int
clEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, int[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueWriteBuffer

public static int
clEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, float[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueWriteBuffer

public static int
clEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, double[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueWriteBuffer

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clEnqueueWriteImage
(long
the command-queue in which the write command will be queued. command_queue and image must be created with the same OpenCL context.
command_queue
,
long
a valid image or image array object
image
,
boolean
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.

blocking_write
,
PointerBuffer
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.
origin
,
PointerBuffer
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.
region
,
long
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_row_pitch
,
long
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.
input_slice_pitch
,
ByteBuffer
the pointer to a buffer in host memory where image data is to be written from
ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to write to an image or image array object from host memory.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clEnqueueWriteImage
(long
the command-queue in which the write command will be queued. command_queue and image must be created with the same OpenCL context.
command_queue
,
long
a valid image or image array object
image
,
boolean
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.

blocking_write
,
PointerBuffer
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.
origin
,
PointerBuffer
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.
region
,
long
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_row_pitch
,
long
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.
input_slice_pitch
,
ShortBuffer
the pointer to a buffer in host memory where image data is to be written from
ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to write to an image or image array object from host memory.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clEnqueueWriteImage
(long
the command-queue in which the write command will be queued. command_queue and image must be created with the same OpenCL context.
command_queue
,
long
a valid image or image array object
image
,
boolean
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.

blocking_write
,
PointerBuffer
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.
origin
,
PointerBuffer
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.
region
,
long
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_row_pitch
,
long
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.
input_slice_pitch
,
IntBuffer
the pointer to a buffer in host memory where image data is to be written from
ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to write to an image or image array object from host memory.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clEnqueueWriteImage
(long
the command-queue in which the write command will be queued. command_queue and image must be created with the same OpenCL context.
command_queue
,
long
a valid image or image array object
image
,
boolean
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.

blocking_write
,
PointerBuffer
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.
origin
,
PointerBuffer
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.
region
,
long
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_row_pitch
,
long
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.
input_slice_pitch
,
FloatBuffer
the pointer to a buffer in host memory where image data is to be written from
ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to write to an image or image array object from host memory.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clEnqueueWriteImage
(long
the command-queue in which the write command will be queued. command_queue and image must be created with the same OpenCL context.
command_queue
,
long
a valid image or image array object
image
,
boolean
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.

blocking_write
,
PointerBuffer
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.
origin
,
PointerBuffer
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.
region
,
long
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_row_pitch
,
long
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.
input_slice_pitch
,
DoubleBuffer
the pointer to a buffer in host memory where image data is to be written from
ptr
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Enqueues a command to write to an image or image array object from host memory.

public static int
clEnqueueWriteImage(long command_queue, long image, boolean blocking_write, PointerBuffer origin, PointerBuffer region, long input_row_pitch, long input_slice_pitch, short[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueWriteImage

public static int
clEnqueueWriteImage(long command_queue, long image, boolean blocking_write, PointerBuffer origin, PointerBuffer region, long input_row_pitch, long input_slice_pitch, int[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueWriteImage

public static int
clEnqueueWriteImage(long command_queue, long image, boolean blocking_write, PointerBuffer origin, PointerBuffer region, long input_row_pitch, long input_slice_pitch, float[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueWriteImage

public static int
clEnqueueWriteImage(long command_queue, long image, boolean blocking_write, PointerBuffer origin, PointerBuffer region, long input_row_pitch, long input_slice_pitch, double[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueWriteImage

public static int
clFinish(long
the command-queue
command_queue
)

Blocks until all previously queued OpenCL commands in command_queue are issued to the associated device and have completed.

public static int

Returns:

SUCCESS 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.
clFlush
(long
the command-queue
command_queue
)

Issues all previously queued OpenCL commands in command_queue to the device associated with command_queue.

public static int

Returns:

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.
clGetCommandQueueInfo
(long
the command-queue being queried
command_queue
,
int param_name, ByteBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Queries information about a command-queue.

public static int

Returns:

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.
clGetCommandQueueInfo
(long
the command-queue being queried
command_queue
,
int param_name, IntBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Queries information about a command-queue.

public static int

Returns:

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.
clGetCommandQueueInfo
(long
the command-queue being queried
command_queue
,
int param_name, LongBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Queries information about a command-queue.

public static int

Returns:

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.
clGetCommandQueueInfo
(long
the command-queue being queried
command_queue
,
int param_name, PointerBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Queries information about a command-queue.

public static int
clGetCommandQueueInfo(long command_queue, int param_name, int[] param_value, PointerBuffer param_value_size_ret)

Array version of: GetCommandQueueInfo

public static int
clGetCommandQueueInfo(long command_queue, int param_name, long[] param_value, PointerBuffer param_value_size_ret)

Array version of: GetCommandQueueInfo

public static int

Returns:

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.
clGetContextInfo
(long
the OpenCL context being queried
context
,
int
an enumeration constant that specifies the information to query. One of:
CONTEXT_REFERENCE_COUNTCONTEXT_DEVICESCONTEXT_PROPERTIESCONTEXT_NUM_DEVICES
param_name
,
ByteBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Queries information about a context.

public static int

Returns:

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.
clGetContextInfo
(long
the OpenCL context being queried
context
,
int
an enumeration constant that specifies the information to query. One of:
CONTEXT_REFERENCE_COUNTCONTEXT_DEVICESCONTEXT_PROPERTIESCONTEXT_NUM_DEVICES
param_name
,
IntBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Queries information about a context.

public static int

Returns:

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.
clGetContextInfo
(long
the OpenCL context being queried
context
,
int
an enumeration constant that specifies the information to query. One of:
CONTEXT_REFERENCE_COUNTCONTEXT_DEVICESCONTEXT_PROPERTIESCONTEXT_NUM_DEVICES
param_name
,
PointerBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Queries information about a context.

public static int
clGetContextInfo(long context, int param_name, int[] param_value, PointerBuffer param_value_size_ret)

Array version of: GetContextInfo

public static int

Returns:

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.
clGetDeviceIDs
(long
the platform to query
platform
,
long
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_DEFAULTDEVICE_TYPE_CPUDEVICE_TYPE_GPUDEVICE_TYPE_ACCELERATOR
DEVICE_TYPE_ALLDEVICE_TYPE_CUSTOM
device_type
,
PointerBuffer
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.
devices
,
IntBuffer
returns the number of OpenCL devices available that match device_type. If num_devices is NULL, this argument is ignored.
num_devices
)

Obtains the list of devices available on a platform.

public static int
clGetDeviceIDs(long platform, long device_type, PointerBuffer devices, int[] num_devices)

Array version of: GetDeviceIDs

public static int

Returns:

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.
clGetDeviceInfo
(long
the device to query
device
,
int
an enumeration constant tha identifies the device information being queried. One of:
DEVICE_TYPEDEVICE_VENDOR_ID
DEVICE_MAX_COMPUTE_UNITSDEVICE_MAX_WORK_ITEM_DIMENSIONS
DEVICE_MAX_WORK_GROUP_SIZEDEVICE_MAX_WORK_ITEM_SIZES
DEVICE_PREFERRED_VECTOR_WIDTH_CHARDEVICE_PREFERRED_VECTOR_WIDTH_SHORT
DEVICE_PREFERRED_VECTOR_WIDTH_INTDEVICE_PREFERRED_VECTOR_WIDTH_LONG
DEVICE_PREFERRED_VECTOR_WIDTH_FLOATDEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE
DEVICE_MAX_CLOCK_FREQUENCYDEVICE_ADDRESS_BITS
DEVICE_MAX_READ_IMAGE_ARGSDEVICE_MAX_WRITE_IMAGE_ARGS
DEVICE_MAX_MEM_ALLOC_SIZEDEVICE_IMAGE2D_MAX_WIDTH
DEVICE_IMAGE2D_MAX_HEIGHTDEVICE_IMAGE3D_MAX_WIDTH
DEVICE_IMAGE3D_MAX_HEIGHTDEVICE_IMAGE3D_MAX_DEPTH
DEVICE_IMAGE_SUPPORTDEVICE_MAX_PARAMETER_SIZE
DEVICE_MAX_SAMPLERSDEVICE_MEM_BASE_ADDR_ALIGN
DEVICE_MIN_DATA_TYPE_ALIGN_SIZEDEVICE_SINGLE_FP_CONFIG
DEVICE_GLOBAL_MEM_CACHE_TYPEDEVICE_GLOBAL_MEM_CACHELINE_SIZE
DEVICE_GLOBAL_MEM_CACHE_SIZEDEVICE_GLOBAL_MEM_SIZE
DEVICE_MAX_CONSTANT_BUFFER_SIZEDEVICE_MAX_CONSTANT_ARGS
DEVICE_LOCAL_MEM_TYPEDEVICE_LOCAL_MEM_SIZE
DEVICE_ERROR_CORRECTION_SUPPORTDEVICE_PROFILING_TIMER_RESOLUTION
DEVICE_ENDIAN_LITTLEDEVICE_AVAILABLE
DEVICE_COMPILER_AVAILABLEDEVICE_EXECUTION_CAPABILITIES
DEVICE_QUEUE_PROPERTIESDEVICE_NAME
DEVICE_VENDORDRIVER_VERSION
DEVICE_PROFILEDEVICE_VERSION
DEVICE_EXTENSIONSDEVICE_PLATFORM
DEVICE_PREFERRED_VECTOR_WIDTH_HALFDEVICE_HOST_UNIFIED_MEMORY
DEVICE_NATIVE_VECTOR_WIDTH_CHARDEVICE_NATIVE_VECTOR_WIDTH_SHORT
DEVICE_NATIVE_VECTOR_WIDTH_INTDEVICE_NATIVE_VECTOR_WIDTH_LONG
DEVICE_NATIVE_VECTOR_WIDTH_FLOATDEVICE_NATIVE_VECTOR_WIDTH_DOUBLE
DEVICE_NATIVE_VECTOR_WIDTH_HALFDEVICE_OPENCL_C_VERSION
DEVICE_DOUBLE_FP_CONFIGDEVICE_LINKER_AVAILABLE
DEVICE_BUILT_IN_KERNELSDEVICE_IMAGE_MAX_BUFFER_SIZE
DEVICE_IMAGE_MAX_ARRAY_SIZEDEVICE_PARENT_DEVICE
DEVICE_PARTITION_MAX_SUB_DEVICESDEVICE_PARTITION_PROPERTIES
DEVICE_PARTITION_AFFINITY_DOMAINDEVICE_PARTITION_TYPE
DEVICE_REFERENCE_COUNTDEVICE_PREFERRED_INTEROP_USER_SYNC
DEVICE_PRINTF_BUFFER_SIZEDEVICE_QUEUE_ON_HOST_PROPERTIES
DEVICE_MAX_READ_WRITE_IMAGE_ARGSDEVICE_MAX_GLOBAL_VARIABLE_SIZE
DEVICE_QUEUE_ON_DEVICE_PROPERTIESDEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE
DEVICE_QUEUE_ON_DEVICE_MAX_SIZEDEVICE_MAX_ON_DEVICE_QUEUES
DEVICE_MAX_ON_DEVICE_EVENTSDEVICE_SVM_CAPABILITIES
DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZEDEVICE_MAX_PIPE_ARGS
DEVICE_PIPE_MAX_ACTIVE_RESERVATIONSDEVICE_PIPE_MAX_PACKET_SIZE
DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENTDEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT
DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENTDEVICE_IL_VERSION
DEVICE_MAX_NUM_SUB_GROUPSDEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS
param_name
,
ByteBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns specific information about an OpenCL device.

public static int

Returns:

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.
clGetDeviceInfo
(long
the device to query
device
,
int
an enumeration constant tha identifies the device information being queried. One of:
DEVICE_TYPEDEVICE_VENDOR_ID
DEVICE_MAX_COMPUTE_UNITSDEVICE_MAX_WORK_ITEM_DIMENSIONS
DEVICE_MAX_WORK_GROUP_SIZEDEVICE_MAX_WORK_ITEM_SIZES
DEVICE_PREFERRED_VECTOR_WIDTH_CHARDEVICE_PREFERRED_VECTOR_WIDTH_SHORT
DEVICE_PREFERRED_VECTOR_WIDTH_INTDEVICE_PREFERRED_VECTOR_WIDTH_LONG
DEVICE_PREFERRED_VECTOR_WIDTH_FLOATDEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE
DEVICE_MAX_CLOCK_FREQUENCYDEVICE_ADDRESS_BITS
DEVICE_MAX_READ_IMAGE_ARGSDEVICE_MAX_WRITE_IMAGE_ARGS
DEVICE_MAX_MEM_ALLOC_SIZEDEVICE_IMAGE2D_MAX_WIDTH
DEVICE_IMAGE2D_MAX_HEIGHTDEVICE_IMAGE3D_MAX_WIDTH
DEVICE_IMAGE3D_MAX_HEIGHTDEVICE_IMAGE3D_MAX_DEPTH
DEVICE_IMAGE_SUPPORTDEVICE_MAX_PARAMETER_SIZE
DEVICE_MAX_SAMPLERSDEVICE_MEM_BASE_ADDR_ALIGN
DEVICE_MIN_DATA_TYPE_ALIGN_SIZEDEVICE_SINGLE_FP_CONFIG
DEVICE_GLOBAL_MEM_CACHE_TYPEDEVICE_GLOBAL_MEM_CACHELINE_SIZE
DEVICE_GLOBAL_MEM_CACHE_SIZEDEVICE_GLOBAL_MEM_SIZE
DEVICE_MAX_CONSTANT_BUFFER_SIZEDEVICE_MAX_CONSTANT_ARGS
DEVICE_LOCAL_MEM_TYPEDEVICE_LOCAL_MEM_SIZE
DEVICE_ERROR_CORRECTION_SUPPORTDEVICE_PROFILING_TIMER_RESOLUTION
DEVICE_ENDIAN_LITTLEDEVICE_AVAILABLE
DEVICE_COMPILER_AVAILABLEDEVICE_EXECUTION_CAPABILITIES
DEVICE_QUEUE_PROPERTIESDEVICE_NAME
DEVICE_VENDORDRIVER_VERSION
DEVICE_PROFILEDEVICE_VERSION
DEVICE_EXTENSIONSDEVICE_PLATFORM
DEVICE_PREFERRED_VECTOR_WIDTH_HALFDEVICE_HOST_UNIFIED_MEMORY
DEVICE_NATIVE_VECTOR_WIDTH_CHARDEVICE_NATIVE_VECTOR_WIDTH_SHORT
DEVICE_NATIVE_VECTOR_WIDTH_INTDEVICE_NATIVE_VECTOR_WIDTH_LONG
DEVICE_NATIVE_VECTOR_WIDTH_FLOATDEVICE_NATIVE_VECTOR_WIDTH_DOUBLE
DEVICE_NATIVE_VECTOR_WIDTH_HALFDEVICE_OPENCL_C_VERSION
DEVICE_DOUBLE_FP_CONFIGDEVICE_LINKER_AVAILABLE
DEVICE_BUILT_IN_KERNELSDEVICE_IMAGE_MAX_BUFFER_SIZE
DEVICE_IMAGE_MAX_ARRAY_SIZEDEVICE_PARENT_DEVICE
DEVICE_PARTITION_MAX_SUB_DEVICESDEVICE_PARTITION_PROPERTIES
DEVICE_PARTITION_AFFINITY_DOMAINDEVICE_PARTITION_TYPE
DEVICE_REFERENCE_COUNTDEVICE_PREFERRED_INTEROP_USER_SYNC
DEVICE_PRINTF_BUFFER_SIZEDEVICE_QUEUE_ON_HOST_PROPERTIES
DEVICE_MAX_READ_WRITE_IMAGE_ARGSDEVICE_MAX_GLOBAL_VARIABLE_SIZE
DEVICE_QUEUE_ON_DEVICE_PROPERTIESDEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE
DEVICE_QUEUE_ON_DEVICE_MAX_SIZEDEVICE_MAX_ON_DEVICE_QUEUES
DEVICE_MAX_ON_DEVICE_EVENTSDEVICE_SVM_CAPABILITIES
DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZEDEVICE_MAX_PIPE_ARGS
DEVICE_PIPE_MAX_ACTIVE_RESERVATIONSDEVICE_PIPE_MAX_PACKET_SIZE
DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENTDEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT
DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENTDEVICE_IL_VERSION
DEVICE_MAX_NUM_SUB_GROUPSDEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS
param_name
,
IntBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns specific information about an OpenCL device.

public static int

Returns:

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.
clGetDeviceInfo
(long
the device to query
device
,
int
an enumeration constant tha identifies the device information being queried. One of:
DEVICE_TYPEDEVICE_VENDOR_ID
DEVICE_MAX_COMPUTE_UNITSDEVICE_MAX_WORK_ITEM_DIMENSIONS
DEVICE_MAX_WORK_GROUP_SIZEDEVICE_MAX_WORK_ITEM_SIZES
DEVICE_PREFERRED_VECTOR_WIDTH_CHARDEVICE_PREFERRED_VECTOR_WIDTH_SHORT
DEVICE_PREFERRED_VECTOR_WIDTH_INTDEVICE_PREFERRED_VECTOR_WIDTH_LONG
DEVICE_PREFERRED_VECTOR_WIDTH_FLOATDEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE
DEVICE_MAX_CLOCK_FREQUENCYDEVICE_ADDRESS_BITS
DEVICE_MAX_READ_IMAGE_ARGSDEVICE_MAX_WRITE_IMAGE_ARGS
DEVICE_MAX_MEM_ALLOC_SIZEDEVICE_IMAGE2D_MAX_WIDTH
DEVICE_IMAGE2D_MAX_HEIGHTDEVICE_IMAGE3D_MAX_WIDTH
DEVICE_IMAGE3D_MAX_HEIGHTDEVICE_IMAGE3D_MAX_DEPTH
DEVICE_IMAGE_SUPPORTDEVICE_MAX_PARAMETER_SIZE
DEVICE_MAX_SAMPLERSDEVICE_MEM_BASE_ADDR_ALIGN
DEVICE_MIN_DATA_TYPE_ALIGN_SIZEDEVICE_SINGLE_FP_CONFIG
DEVICE_GLOBAL_MEM_CACHE_TYPEDEVICE_GLOBAL_MEM_CACHELINE_SIZE
DEVICE_GLOBAL_MEM_CACHE_SIZEDEVICE_GLOBAL_MEM_SIZE
DEVICE_MAX_CONSTANT_BUFFER_SIZEDEVICE_MAX_CONSTANT_ARGS
DEVICE_LOCAL_MEM_TYPEDEVICE_LOCAL_MEM_SIZE
DEVICE_ERROR_CORRECTION_SUPPORTDEVICE_PROFILING_TIMER_RESOLUTION
DEVICE_ENDIAN_LITTLEDEVICE_AVAILABLE
DEVICE_COMPILER_AVAILABLEDEVICE_EXECUTION_CAPABILITIES
DEVICE_QUEUE_PROPERTIESDEVICE_NAME
DEVICE_VENDORDRIVER_VERSION
DEVICE_PROFILEDEVICE_VERSION
DEVICE_EXTENSIONSDEVICE_PLATFORM
DEVICE_PREFERRED_VECTOR_WIDTH_HALFDEVICE_HOST_UNIFIED_MEMORY
DEVICE_NATIVE_VECTOR_WIDTH_CHARDEVICE_NATIVE_VECTOR_WIDTH_SHORT
DEVICE_NATIVE_VECTOR_WIDTH_INTDEVICE_NATIVE_VECTOR_WIDTH_LONG
DEVICE_NATIVE_VECTOR_WIDTH_FLOATDEVICE_NATIVE_VECTOR_WIDTH_DOUBLE
DEVICE_NATIVE_VECTOR_WIDTH_HALFDEVICE_OPENCL_C_VERSION
DEVICE_DOUBLE_FP_CONFIGDEVICE_LINKER_AVAILABLE
DEVICE_BUILT_IN_KERNELSDEVICE_IMAGE_MAX_BUFFER_SIZE
DEVICE_IMAGE_MAX_ARRAY_SIZEDEVICE_PARENT_DEVICE
DEVICE_PARTITION_MAX_SUB_DEVICESDEVICE_PARTITION_PROPERTIES
DEVICE_PARTITION_AFFINITY_DOMAINDEVICE_PARTITION_TYPE
DEVICE_REFERENCE_COUNTDEVICE_PREFERRED_INTEROP_USER_SYNC
DEVICE_PRINTF_BUFFER_SIZEDEVICE_QUEUE_ON_HOST_PROPERTIES
DEVICE_MAX_READ_WRITE_IMAGE_ARGSDEVICE_MAX_GLOBAL_VARIABLE_SIZE
DEVICE_QUEUE_ON_DEVICE_PROPERTIESDEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE
DEVICE_QUEUE_ON_DEVICE_MAX_SIZEDEVICE_MAX_ON_DEVICE_QUEUES
DEVICE_MAX_ON_DEVICE_EVENTSDEVICE_SVM_CAPABILITIES
DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZEDEVICE_MAX_PIPE_ARGS
DEVICE_PIPE_MAX_ACTIVE_RESERVATIONSDEVICE_PIPE_MAX_PACKET_SIZE
DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENTDEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT
DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENTDEVICE_IL_VERSION
DEVICE_MAX_NUM_SUB_GROUPSDEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS
param_name
,
LongBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns specific information about an OpenCL device.

public static int

Returns:

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.
clGetDeviceInfo
(long
the device to query
device
,
int
an enumeration constant tha identifies the device information being queried. One of:
DEVICE_TYPEDEVICE_VENDOR_ID
DEVICE_MAX_COMPUTE_UNITSDEVICE_MAX_WORK_ITEM_DIMENSIONS
DEVICE_MAX_WORK_GROUP_SIZEDEVICE_MAX_WORK_ITEM_SIZES
DEVICE_PREFERRED_VECTOR_WIDTH_CHARDEVICE_PREFERRED_VECTOR_WIDTH_SHORT
DEVICE_PREFERRED_VECTOR_WIDTH_INTDEVICE_PREFERRED_VECTOR_WIDTH_LONG
DEVICE_PREFERRED_VECTOR_WIDTH_FLOATDEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE
DEVICE_MAX_CLOCK_FREQUENCYDEVICE_ADDRESS_BITS
DEVICE_MAX_READ_IMAGE_ARGSDEVICE_MAX_WRITE_IMAGE_ARGS
DEVICE_MAX_MEM_ALLOC_SIZEDEVICE_IMAGE2D_MAX_WIDTH
DEVICE_IMAGE2D_MAX_HEIGHTDEVICE_IMAGE3D_MAX_WIDTH
DEVICE_IMAGE3D_MAX_HEIGHTDEVICE_IMAGE3D_MAX_DEPTH
DEVICE_IMAGE_SUPPORTDEVICE_MAX_PARAMETER_SIZE
DEVICE_MAX_SAMPLERSDEVICE_MEM_BASE_ADDR_ALIGN
DEVICE_MIN_DATA_TYPE_ALIGN_SIZEDEVICE_SINGLE_FP_CONFIG
DEVICE_GLOBAL_MEM_CACHE_TYPEDEVICE_GLOBAL_MEM_CACHELINE_SIZE
DEVICE_GLOBAL_MEM_CACHE_SIZEDEVICE_GLOBAL_MEM_SIZE
DEVICE_MAX_CONSTANT_BUFFER_SIZEDEVICE_MAX_CONSTANT_ARGS
DEVICE_LOCAL_MEM_TYPEDEVICE_LOCAL_MEM_SIZE
DEVICE_ERROR_CORRECTION_SUPPORTDEVICE_PROFILING_TIMER_RESOLUTION
DEVICE_ENDIAN_LITTLEDEVICE_AVAILABLE
DEVICE_COMPILER_AVAILABLEDEVICE_EXECUTION_CAPABILITIES
DEVICE_QUEUE_PROPERTIESDEVICE_NAME
DEVICE_VENDORDRIVER_VERSION
DEVICE_PROFILEDEVICE_VERSION
DEVICE_EXTENSIONSDEVICE_PLATFORM
DEVICE_PREFERRED_VECTOR_WIDTH_HALFDEVICE_HOST_UNIFIED_MEMORY
DEVICE_NATIVE_VECTOR_WIDTH_CHARDEVICE_NATIVE_VECTOR_WIDTH_SHORT
DEVICE_NATIVE_VECTOR_WIDTH_INTDEVICE_NATIVE_VECTOR_WIDTH_LONG
DEVICE_NATIVE_VECTOR_WIDTH_FLOATDEVICE_NATIVE_VECTOR_WIDTH_DOUBLE
DEVICE_NATIVE_VECTOR_WIDTH_HALFDEVICE_OPENCL_C_VERSION
DEVICE_DOUBLE_FP_CONFIGDEVICE_LINKER_AVAILABLE
DEVICE_BUILT_IN_KERNELSDEVICE_IMAGE_MAX_BUFFER_SIZE
DEVICE_IMAGE_MAX_ARRAY_SIZEDEVICE_PARENT_DEVICE
DEVICE_PARTITION_MAX_SUB_DEVICESDEVICE_PARTITION_PROPERTIES
DEVICE_PARTITION_AFFINITY_DOMAINDEVICE_PARTITION_TYPE
DEVICE_REFERENCE_COUNTDEVICE_PREFERRED_INTEROP_USER_SYNC
DEVICE_PRINTF_BUFFER_SIZEDEVICE_QUEUE_ON_HOST_PROPERTIES
DEVICE_MAX_READ_WRITE_IMAGE_ARGSDEVICE_MAX_GLOBAL_VARIABLE_SIZE
DEVICE_QUEUE_ON_DEVICE_PROPERTIESDEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE
DEVICE_QUEUE_ON_DEVICE_MAX_SIZEDEVICE_MAX_ON_DEVICE_QUEUES
DEVICE_MAX_ON_DEVICE_EVENTSDEVICE_SVM_CAPABILITIES
DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZEDEVICE_MAX_PIPE_ARGS
DEVICE_PIPE_MAX_ACTIVE_RESERVATIONSDEVICE_PIPE_MAX_PACKET_SIZE
DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENTDEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT
DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENTDEVICE_IL_VERSION
DEVICE_MAX_NUM_SUB_GROUPSDEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS
param_name
,
PointerBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns specific information about an OpenCL device.

public static int
clGetDeviceInfo(long device, int param_name, int[] param_value, PointerBuffer param_value_size_ret)

Array version of: GetDeviceInfo

public static int
clGetDeviceInfo(long device, int param_name, long[] param_value, PointerBuffer param_value_size_ret)

Array version of: GetDeviceInfo

public static int

Returns:

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.
clGetEventInfo
(long
the event object being queried
event
,
int param_name, ByteBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about an event object.

public static int

Returns:

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.
clGetEventInfo
(long
the event object being queried
event
,
int param_name, IntBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about an event object.

public static int

Returns:

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.
clGetEventInfo
(long
the event object being queried
event
,
int param_name, PointerBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about an event object.

public static int
clGetEventInfo(long event, int param_name, int[] param_value, PointerBuffer param_value_size_ret)

Array version of: GetEventInfo

public static int

Returns:

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.
clGetEventProfilingInfo
(long
the event object
event
,
int param_name, ByteBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns profiling information for the command associated with event.

public static int

Returns:

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.
clGetEventProfilingInfo
(long
the event object
event
,
int param_name, LongBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns profiling information for the command associated with event.

public static int
clGetEventProfilingInfo(long event, int param_name, long[] param_value, PointerBuffer param_value_size_ret)

Array version of: GetEventProfilingInfo

public static long

Returns:

the extension function address
clGetExtensionFunctionAddress
(ByteBuffer
the extension function name
funcname
)

Returns the address of the extension function named by funcname.

public static long

Returns:

the extension function address
clGetExtensionFunctionAddress
(CharSequence
the extension function name
funcname
)

Returns the address of the extension function named by funcname.

public static int

Returns:

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.
clGetImageInfo
(long
the image object being queried
image
,
int param_name, ByteBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information specific to an image object.

public static int

Returns:

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.
clGetImageInfo
(long
the image object being queried
image
,
int param_name, IntBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information specific to an image object.

public static int

Returns:

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.
clGetImageInfo
(long
the image object being queried
image
,
int param_name, PointerBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information specific to an image object.

public static int
clGetImageInfo(long image, int param_name, int[] param_value, PointerBuffer param_value_size_ret)

Array version of: GetImageInfo

public static int

Returns:

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.
clGetKernelInfo
(long
the kernel object being queried
kernel
,
int param_name, ByteBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about a kernel object.

public static int

Returns:

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.
clGetKernelInfo
(long
the kernel object being queried
kernel
,
int param_name, IntBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about a kernel object.

public static int

Returns:

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.
clGetKernelInfo
(long
the kernel object being queried
kernel
,
int param_name, PointerBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about a kernel object.

public static int
clGetKernelInfo(long kernel, int param_name, int[] param_value, PointerBuffer param_value_size_ret)

Array version of: GetKernelInfo

public static int

Returns:

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.
clGetKernelWorkGroupInfo
(long
the kernel object being queried
kernel
,
long
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.
device
,
int param_name, ByteBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about the kernel object that may be specific to a device.

public static int

Returns:

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.
clGetKernelWorkGroupInfo
(long
the kernel object being queried
kernel
,
long
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.
device
,
int param_name, IntBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about the kernel object that may be specific to a device.

public static int

Returns:

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.
clGetKernelWorkGroupInfo
(long
the kernel object being queried
kernel
,
long
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.
device
,
int param_name, LongBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about the kernel object that may be specific to a device.

public static int

Returns:

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.
clGetKernelWorkGroupInfo
(long
the kernel object being queried
kernel
,
long
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.
device
,
int param_name, PointerBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about the kernel object that may be specific to a device.

public static int
clGetKernelWorkGroupInfo(long kernel, long device, int param_name, int[] param_value, PointerBuffer param_value_size_ret)

Array version of: GetKernelWorkGroupInfo

public static int
clGetKernelWorkGroupInfo(long kernel, long device, int param_name, long[] param_value, PointerBuffer param_value_size_ret)

Array version of: GetKernelWorkGroupInfo

public static int

Returns:

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.
clGetMemObjectInfo
(long
the memory object being queried
memobj
,
int param_name, ByteBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information that is common to all memory objects (buffer and image objects).

public static int

Returns:

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.
clGetMemObjectInfo
(long
the memory object being queried
memobj
,
int param_name, IntBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information that is common to all memory objects (buffer and image objects).

public static int

Returns:

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.
clGetMemObjectInfo
(long
the memory object being queried
memobj
,
int param_name, LongBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information that is common to all memory objects (buffer and image objects).

public static int

Returns:

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.
clGetMemObjectInfo
(long
the memory object being queried
memobj
,
int param_name, PointerBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information that is common to all memory objects (buffer and image objects).

public static int
clGetMemObjectInfo(long memobj, int param_name, int[] param_value, PointerBuffer param_value_size_ret)

Array version of: GetMemObjectInfo

public static int
clGetMemObjectInfo(long memobj, int param_name, long[] param_value, PointerBuffer param_value_size_ret)

Array version of: GetMemObjectInfo

public static int

Returns:

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.
clGetPlatformIDs
(PointerBuffer
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.
platforms
,
IntBuffer
returns the number of OpenCL platforms available. If num_platforms is NULL, this argument is ignored.
num_platforms
)

Obtains the list of available platforms.

public static int
clGetPlatformIDs(PointerBuffer platforms, int[] num_platforms)

Array version of: GetPlatformIDs

public static int

Returns:

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.
clGetPlatformInfo
(long
the platform to query
platform
,
int param_name, ByteBuffer
the memory location where appropriate values for a given param_name will be returned
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about the specified OpenCL platform.

public static int

Returns:

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.
clGetPlatformInfo
(long
the platform to query
platform
,
int param_name, LongBuffer
the memory location where appropriate values for a given param_name will be returned
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about the specified OpenCL platform.

public static int
clGetPlatformInfo(long platform, int param_name, long[] param_value, PointerBuffer param_value_size_ret)

Array version of: GetPlatformInfo

public static int

Returns:

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.
clGetProgramBuildInfo
(long
the program object being queried
program
,
long
the device for which build information is being queried. device must be a valid device associated with program.
device
,
int param_name, ByteBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns build information for each device in the program object.

public static int

Returns:

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.
clGetProgramBuildInfo
(long
the program object being queried
program
,
long
the device for which build information is being queried. device must be a valid device associated with program.
device
,
int param_name, IntBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns build information for each device in the program object.

public static int

Returns:

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.
clGetProgramBuildInfo
(long
the program object being queried
program
,
long
the device for which build information is being queried. device must be a valid device associated with program.
device
,
int param_name, PointerBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns build information for each device in the program object.

public static int
clGetProgramBuildInfo(long program, long device, int param_name, int[] param_value, PointerBuffer param_value_size_ret)

Array version of: GetProgramBuildInfo

public static int

Returns:

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.
clGetProgramInfo
(long
the program object being queried
program
,
int param_name, ByteBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about a program object.

public static int

Returns:

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.
clGetProgramInfo
(long
the program object being queried
program
,
int param_name, IntBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about a program object.

public static int

Returns:

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.
clGetProgramInfo
(long
the program object being queried
program
,
int param_name, PointerBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about a program object.

public static int
clGetProgramInfo(long program, int param_name, int[] param_value, PointerBuffer param_value_size_ret)

Array version of: GetProgramInfo

public static int

Returns:

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.
clGetSamplerInfo
(long
the sampler being queried
sampler
,
int param_name, ByteBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about a sampler object.

public static int

Returns:

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.
clGetSamplerInfo
(long
the sampler being queried
sampler
,
int param_name, IntBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about a sampler object.

public static int

Returns:

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.
clGetSamplerInfo
(long
the sampler being queried
sampler
,
int param_name, PointerBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about a sampler object.

public static int
clGetSamplerInfo(long sampler, int param_name, int[] param_value, PointerBuffer param_value_size_ret)

Array version of: GetSamplerInfo

public static int

Returns:

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.
clGetSupportedImageFormats
(long
a valid OpenCL context on which the image object(s) will be created
context
,
long
a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:
MEM_READ_WRITEMEM_WRITE_ONLYMEM_READ_ONLYMEM_USE_HOST_PTRMEM_ALLOC_HOST_PTR
MEM_COPY_HOST_PTRMEM_HOST_WRITE_ONLYMEM_HOST_READ_ONLYMEM_HOST_NO_ACCESS
flags
,
int image_type, CLImageFormat.Buffer
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.
image_formats
,
IntBuffer
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.
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
public static int
clGetSupportedImageFormats(long context, long flags, int image_type, CLImageFormat.Buffer image_formats, int[] num_image_formats)

Array version of: GetSupportedImageFormats

public static int

Returns:

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.
  • 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.
clReleaseCommandQueue
(long
the command-queue to release
command_queue
)

Decrements the command_queue reference count.

public static int

Returns:

SUCCESS 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.
clReleaseContext
(long
the context to release
context
)

Decrements the context reference count.

public static int

Returns:

SUCCESS 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.
clReleaseEvent
(long
the event to release
event
)

Decrements the event reference count.

public static int

Returns:

SUCCESS 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.
clReleaseKernel
(long
the kernel to release
kernel
)

Decrements the kernel reference count.

public static int

Returns:

SUCCESS 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.
clReleaseMemObject
(long
the memory object to release
memobj
)

Decrements the memobj reference count.

public static int

Returns:

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.
  • 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.
clReleaseProgram
(long
the program object to release
program
)

Decrements the program reference count.

public static int

Returns:

SUCCESS 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.
clReleaseSampler
(long
the sample object to release
sampler
)

Decrements the sampler reference count.

public static int

Returns:

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.
  • 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.
clRetainCommandQueue
(long
the command-queue to retain
command_queue
)

Increments the command_queue reference count.

public static int

Returns:

SUCCESS 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.
clRetainContext
(long
the context to retain
context
)

Increments the context reference count.

public static int

Returns:

SUCCESS 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.
clRetainEvent
(long
the event to retain
event
)

Increments the event reference count.

public static int

Returns:

SUCCESS 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.
clRetainKernel
(long
the kernel to retain
kernel
)

Increments the kernel reference count.

public static int

Returns:

SUCCESS 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.
clRetainMemObject
(long
the memory object to retain
memobj
)

Increments the memobj reference count.

public static int

Returns:

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.
  • 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.
clRetainProgram
(long
the program object to retain
program
)

Increments the program reference count.

public static int

Returns:

SUCCESS 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.
clRetainSampler
(long
the sample object to retain
sampler
)

Increments the sampler reference count.

public static int

Returns:

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.
clSetKernelArg
(long
a valid kernel object
kernel
,
int
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_index
,
long
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.
arg_size
)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg
(long
a valid kernel object
kernel
,
int
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_index
,
ByteBuffer
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.

arg_value
)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg
(long
a valid kernel object
kernel
,
int
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_index
,
ShortBuffer
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.

arg_value
)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg
(long
a valid kernel object
kernel
,
int
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_index
,
IntBuffer
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.

arg_value
)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg
(long
a valid kernel object
kernel
,
int
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_index
,
LongBuffer
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.

arg_value
)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg
(long
a valid kernel object
kernel
,
int
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_index
,
FloatBuffer
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.

arg_value
)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg
(long
a valid kernel object
kernel
,
int
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_index
,
DoubleBuffer
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.

arg_value
)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg
(long
a valid kernel object
kernel
,
int
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_index
,
PointerBuffer
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.

arg_value
)

Set the argument value for a specific argument of a kernel.

public static int
clSetKernelArg(long kernel, int arg_index, short[] arg_value)

Array version of: SetKernelArg

public static int
clSetKernelArg(long kernel, int arg_index, int[] arg_value)

Array version of: SetKernelArg

public static int
clSetKernelArg(long kernel, int arg_index, long[] arg_value)

Array version of: SetKernelArg

public static int
clSetKernelArg(long kernel, int arg_index, float[] arg_value)

Array version of: SetKernelArg

public static int
clSetKernelArg(long kernel, int arg_index, double[] arg_value)

Array version of: SetKernelArg

public static int

Returns:

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.
clSetKernelArg1b
(long
a valid kernel object
kernel
,
int
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_index
,
byte arg0)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg1d
(long
a valid kernel object
kernel
,
int
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_index
,
double arg0)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg1f
(long
a valid kernel object
kernel
,
int
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_index
,
float arg0)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg1i
(long
a valid kernel object
kernel
,
int
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_index
,
int arg0)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg1l
(long
a valid kernel object
kernel
,
int
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_index
,
long arg0)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg1p
(long
a valid kernel object
kernel
,
int
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_index
,
long arg0)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg1s
(long
a valid kernel object
kernel
,
int
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_index
,
short arg0)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg2b
(long
a valid kernel object
kernel
,
int
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_index
,
byte arg0, byte arg1)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg2d
(long
a valid kernel object
kernel
,
int
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_index
,
double arg0, double arg1)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg2f
(long
a valid kernel object
kernel
,
int
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_index
,
float arg0, float arg1)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg2i
(long
a valid kernel object
kernel
,
int
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_index
,
int arg0, int arg1)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg2l
(long
a valid kernel object
kernel
,
int
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_index
,
long arg0, long arg1)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg2p
(long
a valid kernel object
kernel
,
int
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_index
,
long arg0, long arg1)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg2s
(long
a valid kernel object
kernel
,
int
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_index
,
short arg0, short arg1)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg4b
(long
a valid kernel object
kernel
,
int
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_index
,
byte arg0, byte arg1, byte arg2, byte arg3)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg4d
(long
a valid kernel object
kernel
,
int
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_index
,
double arg0, double arg1, double arg2, double arg3)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg4f
(long
a valid kernel object
kernel
,
int
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_index
,
float arg0, float arg1, float arg2, float arg3)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg4i
(long
a valid kernel object
kernel
,
int
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_index
,
int arg0, int arg1, int arg2, int arg3)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg4l
(long
a valid kernel object
kernel
,
int
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_index
,
long arg0, long arg1, long arg2, long arg3)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg4p
(long
a valid kernel object
kernel
,
int
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_index
,
long arg0, long arg1, long arg2, long arg3)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

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.
clSetKernelArg4s
(long
a valid kernel object
kernel
,
int
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_index
,
short arg0, short arg1, short arg2, short arg3)

Set the argument value for a specific argument of a kernel.

public static int

Returns:

always SUCCESS
clUnloadCompiler
()

Allows the implementation to release the resources allocated by the OpenCL compiler.

public static int

Returns:

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.
clWaitForEvents
(PointerBuffer
the list of events
event_list
)

Waits on the host thread for commands identified by event objects in event_list to complete.

public static int

Returns:

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.
clWaitForEvents
(long event)

Waits on the host thread for commands identified by event objects in event_list to complete.

private static long
getMemObjectInfoPointer(long cl_mem, int param_name)

public static int
nclBuildProgram(long program, int
the number of devices listed in device_list
num_devices
,
long device_list, long options, long pfn_notify, long user_data)

Unsafe version of: BuildProgram

public static long
nclCreateBuffer(long context, long flags, long
the size in bytes of the buffer memory object to be allocated
size
,
long host_ptr, long errcode_ret)

Unsafe version of: CreateBuffer

public static long
nclCreateCommandQueue(long context, long device, long properties, long errcode_ret)

Unsafe version of: CreateCommandQueue

public static long
nclCreateContext(long properties, int
the number of devices specified in the devices argument
num_devices
,
long devices, long pfn_notify, long user_data, long errcode_ret)

Unsafe version of: CreateContext

public static long
nclCreateContextFromType(long properties, long device_type, long pfn_notify, long user_data, long errcode_ret)

Unsafe version of: CreateContextFromType

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)

Unsafe version of: CreateImage2D

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)

Unsafe version of: CreateImage3D

public static long
nclCreateKernel(long program, long kernel_name, long errcode_ret)

Unsafe version of: CreateKernel

public static int
nclCreateKernelsInProgram(long program, int
the size of memory pointed to by kernels specified as the number of cl_kernel entries
num_kernels
,
long kernels, long num_kernels_ret)

Unsafe version of: CreateKernelsInProgram

public static long
nclCreateProgramWithBinary(long context, int
the number of devices listed in device_list
num_devices
,
long device_list, long lengths, long binaries, long binary_status, long errcode_ret)

Unsafe version of: CreateProgramWithBinary

public static long
nclCreateProgramWithSource(long context, int
the number of elements in the strings and lengths arrays
count
,
long strings, long lengths, long errcode_ret)

Unsafe version of: CreateProgramWithSource

public static long
nclCreateSampler(long context, int normalized_coords, int addressing_mode, int filter_mode, long errcode_ret)

Unsafe version of: CreateSampler

public static int
nclEnqueueCopyBuffer(long command_queue, long src_buffer, long dst_buffer, long src_offset, long dst_offset, long size, int
the number of events in event_wait_list
num_events_in_wait_list
,
long event_wait_list, long event)

Unsafe version of: EnqueueCopyBuffer

public static int
nclEnqueueCopyBufferToImage(long command_queue, long src_buffer, long dst_image, long src_offset, long dst_origin, long region, int
the number of events in event_wait_list
num_events_in_wait_list
,
long event_wait_list, long event)

Unsafe version of: EnqueueCopyBufferToImage

public static int
nclEnqueueCopyImage(long command_queue, long src_image, long dst_image, long src_origin, long dst_origin, long region, int
the number of events in event_wait_list
num_events_in_wait_list
,
long event_wait_list, long event)

Unsafe version of: EnqueueCopyImage

public static int
nclEnqueueCopyImageToBuffer(long command_queue, long src_image, long dst_buffer, long src_origin, long region, long dst_offset, int
the number of events in event_wait_list
num_events_in_wait_list
,
long event_wait_list, long event)

Unsafe version of: EnqueueCopyImageToBuffer

public static long
nclEnqueueMapBuffer(long command_queue, long buffer, int blocking_map, long map_flags, long offset, long size, int
the number of events in event_wait_list
num_events_in_wait_list
,
long event_wait_list, long event, long errcode_ret)

Unsafe version of: EnqueueMapBuffer

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
the number of events in event_wait_list
num_events_in_wait_list
,
long event_wait_list, long event, long errcode_ret)

Unsafe version of: EnqueueMapImage

public static int
nclEnqueueMarker(long command_queue, long event)

Unsafe version of: EnqueueMarker

public static int
nclEnqueueNativeKernel(long command_queue, long user_func, long args, long
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.

cb_args
,
int
the number of buffer objects that are passed in args
num_mem_objects
,
long mem_list, long args_mem_loc, int
the number of events in event_wait_list
num_events_in_wait_list
,
long event_wait_list, long event)

Unsafe version of: EnqueueNativeKernel

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
the number of events in event_wait_list
num_events_in_wait_list
,
long event_wait_list, long event)

Unsafe version of: EnqueueNDRangeKernel

public static int
nclEnqueueReadBuffer(long command_queue, long buffer, int blocking_read, long offset, long
the size in bytes of data being read
size
,
long ptr, int
the number of events in event_wait_list
num_events_in_wait_list
,
long event_wait_list, long event)

Unsafe version of: EnqueueReadBuffer

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
the number of events in event_wait_list
num_events_in_wait_list
,
long event_wait_list, long event)

Unsafe version of: EnqueueReadImage

public static int
nclEnqueueTask(long command_queue, long kernel, int
the number of events in event_wait_list
num_events_in_wait_list
,
long event_wait_list, long event)

Unsafe version of: EnqueueTask

public static int
nclEnqueueUnmapMemObject(long command_queue, long memobj, long mapped_ptr, int
the number of events in event_wait_list
num_events_in_wait_list
,
long event_wait_list, long event)

Unsafe version of: EnqueueUnmapMemObject

public static int
nclEnqueueWaitForEvents(long command_queue, int
the number of events in event_list
num_events
,
long event_list)

Unsafe version of: EnqueueWaitForEvents

public static int
nclEnqueueWriteBuffer(long command_queue, long buffer, int blocking_write, long offset, long
the size in bytes of data being written
size
,
long ptr, int
the number of events in event_wait_list
num_events_in_wait_list
,
long event_wait_list, long event)

Unsafe version of: EnqueueWriteBuffer

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
the number of events in event_wait_list
num_events_in_wait_list
,
long event_wait_list, long event)

Unsafe version of: EnqueueWriteImage

public static int
nclGetCommandQueueInfo(long command_queue, int param_name, long
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.
param_value_size
,
long param_value, long param_value_size_ret)

Unsafe version of: GetCommandQueueInfo

public static int
nclGetContextInfo(long context, int param_name, long
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.
param_value_size
,
long param_value, long param_value_size_ret)

Unsafe version of: GetContextInfo

public static int
nclGetDeviceIDs(long platform, long device_type, int
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.
num_entries
,
long devices, long num_devices)

Unsafe version of: GetDeviceIDs

public static int
nclGetDeviceInfo(long device, int param_name, long
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.
param_value_size
,
long param_value, long param_value_size_ret)

Unsafe version of: GetDeviceInfo

public static int
nclGetEventInfo(long event, int param_name, long
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.
param_value_size
,
long param_value, long param_value_size_ret)

Unsafe version of: GetEventInfo

public static int
nclGetEventProfilingInfo(long event, int param_name, long
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.
param_value_size
,
long param_value, long param_value_size_ret)

Unsafe version of: GetEventProfilingInfo

public static long
public static int
nclGetImageInfo(long image, int param_name, long
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.
param_value_size
,
long param_value, long param_value_size_ret)

Unsafe version of: GetImageInfo

public static int
nclGetKernelInfo(long kernel, int param_name, long
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.
param_value_size
,
long param_value, long param_value_size_ret)

Unsafe version of: GetKernelInfo

public static int
nclGetKernelWorkGroupInfo(long kernel, long device, int param_name, long
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.
param_value_size
,
long param_value, long param_value_size_ret)

Unsafe version of: GetKernelWorkGroupInfo

public static int
nclGetMemObjectInfo(long memobj, int param_name, long
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.
param_value_size
,
long param_value, long param_value_size_ret)

Unsafe version of: GetMemObjectInfo

public static int
nclGetPlatformIDs(int
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.
num_entries
,
long platforms, long num_platforms)

Unsafe version of: GetPlatformIDs

public static int
nclGetPlatformInfo(long platform, int param_name, long
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.
param_value_size
,
long param_value, long param_value_size_ret)

Unsafe version of: GetPlatformInfo

public static int
nclGetProgramBuildInfo(long program, long device, int param_name, long
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.
param_value_size
,
long param_value, long param_value_size_ret)

Unsafe version of: GetProgramBuildInfo

public static int
nclGetProgramInfo(long program, int param_name, long
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.
param_value_size
,
long param_value, long param_value_size_ret)

Unsafe version of: GetProgramInfo

public static int
nclGetSamplerInfo(long sampler, int param_name, long
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.
param_value_size
,
long param_value, long param_value_size_ret)

Unsafe version of: GetSamplerInfo

public static int
nclGetSupportedImageFormats(long context, long flags, int image_type, int
the number of entries that can be returned in the memory location given by image_formats
num_entries
,
long image_formats, long num_image_formats)

Unsafe version of: GetSupportedImageFormats

public static int
nclSetKernelArg(long kernel, int arg_index, long
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.
arg_size
,
long arg_value)

Unsafe version of: SetKernelArg

public static int
nclWaitForEvents(int
the number of events in event_list
num_events
,
long event_list)

Unsafe version of: WaitForEvents

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait