Top Description Fields Constructors Methods
org.lwjgl.opencl

public Class CL11

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

The core OpenCL 1.1 functionality.

Field Summary

Modifier and TypeField and Description
public static final int
CL_ADDRESS_MIRRORED_REPEAT

cl_addressing_mode.

public static final int
CL_BUFFER_CREATE_TYPE_REGION

cl_buffer_create_type.

public static final int
public static final int
public static final int
CL_COMMAND_USER

cl_command_type.

public static final int
public static final int
CL_CONTEXT_NUM_DEVICES

cl_context_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
CL_EVENT_CONTEXT

cl_event_info.

public static final int
public static final int
CL_FP_SOFT_FLOAT

cl_device_fp_config - bitfield.

public static final int
CL_INVALID_PROPERTY

Error Codes.

public static final int
public static final int
CL_KERNEL_PRIVATE_MEM_SIZE

cl_kernel_work_group_info.

public static final int
public static final int
CL_MEM_OFFSET

cl_mem_info.

public static final int
public static final int
CL_RGBx

cl_channel_order.

public static final int
CL_RGx

cl_channel_order.

public static final int
CL_Rx

cl_channel_order.

public static final int
CL_VERSION_1_1

OpenCL Version.

Inherited from org.lwjgl.opencl.CL10:
CL_ACL_ADDRESS_CLAMPCL_ADDRESS_CLAMP_TO_EDGECL_ADDRESS_NONECL_ADDRESS_REPEATCL_ARGBCL_BGRACL_BUILD_ERRORCL_BUILD_IN_PROGRESSCL_BUILD_NONECL_BUILD_PROGRAM_FAILURECL_BUILD_SUCCESSCL_COMMAND_ACQUIRE_GL_OBJECTSCL_COMMAND_COPY_BUFFERCL_COMMAND_COPY_BUFFER_TO_IMAGECL_COMMAND_COPY_IMAGECL_COMMAND_COPY_IMAGE_TO_BUFFERCL_COMMAND_MAP_BUFFERCL_COMMAND_MAP_IMAGECL_COMMAND_MARKERCL_COMMAND_NATIVE_KERNELCL_COMMAND_NDRANGE_KERNELCL_COMMAND_READ_BUFFERCL_COMMAND_READ_IMAGECL_COMMAND_RELEASE_GL_OBJECTSCL_COMMAND_TASKCL_COMMAND_UNMAP_MEM_OBJECTCL_COMMAND_WRITE_BUFFERCL_COMMAND_WRITE_IMAGECL_COMPILER_NOT_AVAILABLECL_COMPLETECL_CONTEXT_DEVICESCL_CONTEXT_PLATFORMCL_CONTEXT_PROPERTIESCL_CONTEXT_REFERENCE_COUNTCL_DEVICE_ADDRESS_BITSCL_DEVICE_AVAILABLECL_DEVICE_COMPILER_AVAILABLECL_DEVICE_ENDIAN_LITTLECL_DEVICE_ERROR_CORRECTION_SUPPORTCL_DEVICE_EXECUTION_CAPABILITIESCL_DEVICE_EXTENSIONSCL_DEVICE_GLOBAL_MEM_CACHE_SIZECL_DEVICE_GLOBAL_MEM_CACHE_TYPECL_DEVICE_GLOBAL_MEM_CACHELINE_SIZECL_DEVICE_GLOBAL_MEM_SIZECL_DEVICE_IMAGE2D_MAX_HEIGHTCL_DEVICE_IMAGE2D_MAX_WIDTHCL_DEVICE_IMAGE3D_MAX_DEPTHCL_DEVICE_IMAGE3D_MAX_HEIGHTCL_DEVICE_IMAGE3D_MAX_WIDTHCL_DEVICE_IMAGE_SUPPORTCL_DEVICE_LOCAL_MEM_SIZECL_DEVICE_LOCAL_MEM_TYPECL_DEVICE_MAX_CLOCK_FREQUENCYCL_DEVICE_MAX_COMPUTE_UNITSCL_DEVICE_MAX_CONSTANT_ARGSCL_DEVICE_MAX_CONSTANT_BUFFER_SIZECL_DEVICE_MAX_MEM_ALLOC_SIZECL_DEVICE_MAX_PARAMETER_SIZECL_DEVICE_MAX_READ_IMAGE_ARGSCL_DEVICE_MAX_SAMPLERSCL_DEVICE_MAX_WORK_GROUP_SIZECL_DEVICE_MAX_WORK_ITEM_DIMENSIONSCL_DEVICE_MAX_WORK_ITEM_SIZESCL_DEVICE_MAX_WRITE_IMAGE_ARGSCL_DEVICE_MEM_BASE_ADDR_ALIGNCL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZECL_DEVICE_NAMECL_DEVICE_NOT_AVAILABLECL_DEVICE_NOT_FOUNDCL_DEVICE_PLATFORMCL_DEVICE_PREFERRED_VECTOR_WIDTH_CHARCL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLECL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOATCL_DEVICE_PREFERRED_VECTOR_WIDTH_INTCL_DEVICE_PREFERRED_VECTOR_WIDTH_LONGCL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORTCL_DEVICE_PROFILECL_DEVICE_PROFILING_TIMER_RESOLUTIONCL_DEVICE_QUEUE_PROPERTIESCL_DEVICE_SINGLE_FP_CONFIGCL_DEVICE_TYPECL_DEVICE_TYPE_ACCELERATORCL_DEVICE_TYPE_ALLCL_DEVICE_TYPE_CPUCL_DEVICE_TYPE_DEFAULTCL_DEVICE_TYPE_GPUCL_DEVICE_VENDORCL_DEVICE_VENDOR_IDCL_DEVICE_VERSIONCL_DRIVER_VERSIONCL_EVENT_COMMAND_EXECUTION_STATUSCL_EVENT_COMMAND_QUEUECL_EVENT_COMMAND_TYPECL_EVENT_REFERENCE_COUNTCL_EXEC_KERNELCL_EXEC_NATIVE_KERNELCL_FALSECL_FILTER_LINEARCL_FILTER_NEARESTCL_FLOATCL_FP_DENORMCL_FP_FMACL_FP_INF_NANCL_FP_ROUND_TO_INFCL_FP_ROUND_TO_NEARESTCL_FP_ROUND_TO_ZEROCL_GLOBALCL_HALF_FLOATCL_IMAGE_DEPTHCL_IMAGE_ELEMENT_SIZECL_IMAGE_FORMATCL_IMAGE_FORMAT_MISMATCHCL_IMAGE_FORMAT_NOT_SUPPORTEDCL_IMAGE_HEIGHTCL_IMAGE_ROW_PITCHCL_IMAGE_SLICE_PITCHCL_IMAGE_WIDTHCL_INTENSITYCL_INVALID_ARG_INDEXCL_INVALID_ARG_SIZECL_INVALID_ARG_VALUECL_INVALID_BINARYCL_INVALID_BUFFER_SIZECL_INVALID_BUILD_OPTIONSCL_INVALID_COMMAND_QUEUECL_INVALID_CONTEXTCL_INVALID_DEVICECL_INVALID_DEVICE_TYPECL_INVALID_EVENTCL_INVALID_EVENT_WAIT_LISTCL_INVALID_GLOBAL_OFFSETCL_INVALID_GLOBAL_WORK_SIZECL_INVALID_HOST_PTRCL_INVALID_IMAGE_FORMAT_DESCRIPTORCL_INVALID_IMAGE_SIZECL_INVALID_KERNELCL_INVALID_KERNEL_ARGSCL_INVALID_KERNEL_DEFINITIONCL_INVALID_KERNEL_NAMECL_INVALID_MEM_OBJECTCL_INVALID_OPERATIONCL_INVALID_PLATFORMCL_INVALID_PROGRAMCL_INVALID_PROGRAM_EXECUTABLECL_INVALID_QUEUE_PROPERTIESCL_INVALID_SAMPLERCL_INVALID_VALUECL_INVALID_WORK_DIMENSIONCL_INVALID_WORK_GROUP_SIZECL_INVALID_WORK_ITEM_SIZECL_KERNEL_COMPILE_WORK_GROUP_SIZECL_KERNEL_CONTEXTCL_KERNEL_FUNCTION_NAMECL_KERNEL_LOCAL_MEM_SIZECL_KERNEL_NUM_ARGSCL_KERNEL_PROGRAMCL_KERNEL_REFERENCE_COUNTCL_KERNEL_WORK_GROUP_SIZECL_LOCALCL_LUMINANCECL_MAP_FAILURECL_MAP_READCL_MAP_WRITECL_MEM_ALLOC_HOST_PTRCL_MEM_CONTEXTCL_MEM_COPY_HOST_PTRCL_MEM_COPY_OVERLAPCL_MEM_FLAGSCL_MEM_HOST_PTRCL_MEM_MAP_COUNTCL_MEM_OBJECT_ALLOCATION_FAILURECL_MEM_OBJECT_BUFFERCL_MEM_OBJECT_IMAGE2DCL_MEM_OBJECT_IMAGE3DCL_MEM_READ_ONLYCL_MEM_READ_WRITECL_MEM_REFERENCE_COUNTCL_MEM_SIZECL_MEM_TYPECL_MEM_USE_HOST_PTRCL_MEM_WRITE_ONLYCL_NONECL_OUT_OF_HOST_MEMORYCL_OUT_OF_RESOURCESCL_PLATFORM_EXTENSIONSCL_PLATFORM_NAMECL_PLATFORM_PROFILECL_PLATFORM_VENDORCL_PLATFORM_VERSIONCL_PROFILING_COMMAND_ENDCL_PROFILING_COMMAND_QUEUEDCL_PROFILING_COMMAND_STARTCL_PROFILING_COMMAND_SUBMITCL_PROFILING_INFO_NOT_AVAILABLECL_PROGRAM_BINARIESCL_PROGRAM_BINARY_SIZESCL_PROGRAM_BUILD_LOGCL_PROGRAM_BUILD_OPTIONSCL_PROGRAM_BUILD_STATUSCL_PROGRAM_CONTEXTCL_PROGRAM_DEVICESCL_PROGRAM_NUM_DEVICESCL_PROGRAM_REFERENCE_COUNTCL_PROGRAM_SOURCECL_QUEUE_CONTEXTCL_QUEUE_DEVICECL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLECL_QUEUE_PROFILING_ENABLECL_QUEUE_PROPERTIESCL_QUEUE_REFERENCE_COUNTCL_QUEUEDCL_RCL_RACL_READ_ONLY_CACHECL_READ_WRITE_CACHECL_RGCL_RGBCL_RGBACL_RUNNINGCL_SAMPLER_ADDRESSING_MODECL_SAMPLER_CONTEXTCL_SAMPLER_FILTER_MODECL_SAMPLER_NORMALIZED_COORDSCL_SAMPLER_REFERENCE_COUNTCL_SIGNED_INT16CL_SIGNED_INT32CL_SIGNED_INT8CL_SNORM_INT16CL_SNORM_INT8CL_SUBMITTEDCL_SUCCESSCL_TRUECL_UNORM_INT16CL_UNORM_INT8CL_UNORM_INT_101010CL_UNORM_SHORT_555CL_UNORM_SHORT_565CL_UNSIGNED_INT16CL_UNSIGNED_INT32CL_UNSIGNED_INT8CL_VERSION_1_0

Constructor Summary

AccessConstructor and Description
protected
CL11()

Method Summary

Modifier and TypeMethod and Description
public static long

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors in errcode_ret:
clCreateSubBuffer
(long
a valid buffer object and cannot be a sub-buffer object
buffer
,
long
a bit-field that is used to specify allocation and usage information about the sub-buffer memory object being created.

If the MEM_READ_WRITE, MEM_READ_ONLY or MEM_WRITE_ONLY values are not specified in flags, they are inherited from the corresponding memory access qualifers associated with buffer. The MEM_USE_HOST_PTR, MEM_ALLOC_HOST_PTR and MEM_COPY_HOST_PTR values cannot be specified in flags but are inherited from the corresponding memory access qualifiers associated with buffer. If MEM_COPY_HOST_PTR is specified in the memory access qualifier values associated with buffer it does not imply any additional copies when the sub-buffer is created from buffer. If the MEM_HOST_WRITE_ONLY, MEM_HOST_READ_ONLY or MEM_HOST_NO_ACCESS values are not specified in flags, they are inherited from the corresponding memory access qualifiers associated with buffer.

flags
,
int
the type of buffer object to be created. Must be:
BUFFER_CREATE_TYPE_REGION
buffer_create_type
,
ByteBuffer
details about the buffer object to be created.

When buffer_create_type is BUFFER_CREATE_TYPE_REGION, then buffer_create_info is a pointer to a CLBufferRegion structure. (origin, size) defines the offset and size in bytes in buffer.

buffer_create_info
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a new buffer object (referred to as a sub-buffer object) from an existing buffer object.

public static long
clCreateSubBuffer(long buffer, long flags, int buffer_create_type, ByteBuffer buffer_create_info, int[] errcode_ret)

Array version of: CreateSubBuffer

public static long

Returns:

a valid non-zero event object and errcode_ret is set to SUCCESS if the user event 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.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
clCreateUserEvent
(long
a valid OpenCL context
context
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Creates a user event object.

public static long
clCreateUserEvent(long context, int[] errcode_ret)

Array version of: CreateUserEvent

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_origin, region, src_row_pitch, src_slice_pitch) or (dst_origin, region, dst_row_pitch, dst_slice_pitch) require accessing elements outside the src_buffer and dst_buffer buffer objects respectively.
  • INVALID_VALUE if any region array element is 0.
  • INVALID_VALUE if src_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if dst_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if src_slice_pitch is not 0 and is less than region[1] * src_row_pitch or if src_slice_pitch is not 0 and is not a multiple of src_row_pitch.
  • INVALID_VALUE if dst_slice_pitch is not 0 and is less than region[1] * dst_row_pitch or if dst_slice_pitch is not 0 and is not a multiple of dst_row_pitch.
  • INVALID_VALUE if src_buffer and dst_buffer are the same buffer object and src_slice_pitch is not equal to dst_slice_pitch and src_row_pitch is not equal to dst_row_pitch.
  • 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.
  • MEM_COPY_OVERLAP if src_buffer and dst_buffer are the same buffer or subbuffer 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.
  • 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_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.
clEnqueueCopyBufferRect
(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
,
PointerBuffer
the (x, y, z) offset in the memory region associated with src_buffer. For a 2D rectangle region, the z value given by src_origin[2] should be 0. The offset in bytes is computed as src_origin[2] * src_slice_pitch + src_origin[1] * src_row_pitch + src_origin[0].
src_origin
,
PointerBuffer
the (x, y, z) offset in the memory region associated with dst_buffer. For a 2D rectangle region, the z value given by dst_origin[2] should be 0. The offset in bytes is computed as dst_origin[2] * dst_slice_pitch + dst_origin[1] * dst_row_pitch + dst_origin[0].
dst_origin
,
PointerBuffer
the (width in bytes, height in rows, depth in slices) of the 2D or 3D rectangle being copied. For a 2D rectangle, the depth value given by region[2] should be 1. The values in region cannot be 0.
region
,
long
the length of each row in bytes to be used for the memory region associated with src_buffer. If src_row_pitch is 0, src_row_pitch is computed as region[0].
src_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region associated with src_buffer. If src_slice_pitch is 0, src_slice_pitch is computed as region[1] * src_row_pitch.
src_slice_pitch
,
long
the length of each row in bytes to be used for the memory region associated with dst_buffer. If dst_row_pitch is 0, dst_row_pitch is computed as region[0].
dst_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region associated with dst_buffer. If dst_slice_pitch is 0, dst_slice_pitch is computed as region[1] * dst_row_pitch.
dst_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
)

Enqueues a command to copy a 2D or 3D rectangular region from the buffer object identified by src_buffer to a 2D or 3D region in the 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 and buffer are not the same or if the context associated with command_queue and events in event_wait_list are not the same.
  • INVALID_MEM_OBJECT if buffer is not a valid buffer object.
  • INVALID_VALUE if the region being read specified by (buffer_origin, region, buffer_row_pitch, buffer_slice_pitch) is out of bounds.
  • INVALID_VALUE if ptr is a NULL value.
  • INVALID_VALUE if any region array element is 0.
  • INVALID_VALUE if buffer_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if host_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if buffer_slice_pitch is not 0 and is less than region[1] * buffer_row_pitch and not a multiple of buffer_row_pitch.
  • INVALID_VALUE if host_slice_pitch is not 0 and is less than region[1] * host_row_pitch and not a multiple of host_row_pitch.
  • INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events.
  • MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.
  • EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read operation is blocking and the execution status of any of the events in event_wait_list is a negative integer value.
  • MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.
  • INVALID_OPERATION if clEnqueueReadBufferRect is called on buffer which has been created with MEM_HOST_WRITE_ONLY or MEM_HOST_NO_ACCESS.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
clEnqueueReadBufferRect
(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 nonblocking.

If blocking_read is TRUE i.e. the read command is blocking, clEnqueueReadBufferRect 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, clEnqueueReadBufferRect 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
the (x, y, z) offset in the memory region associated with buffer. For a 2D rectangle region, the z value given by buffer_origin[2] should be 0. The offset in bytes is computed as buffer_origin[2] * buffer_slice_pitch + buffer_origin[1] * buffer_row_pitch + buffer_origin[0].
buffer_origin
,
PointerBuffer
the (x, y, z) offset in the memory region pointed to by ptr. For a 2D rectangle region, the z value given by host_origin[2] should be 0. The offset in bytes is computed as host_origin[2] * host_slice_pitch + host_origin[1] * host_row_pitch + host_origin[0].
host_origin
,
PointerBuffer
the (width in bytes, height in rows, depth in slices) of the 2D or 3D rectangle being read or written. For a 2D rectangle copy, the depth value given by region[2] should be 1. The values in region cannot be 0.
region
,
long
the length of each row in bytes to be used for the memory region associated with buffer. If buffer_row_pitch is 0, buffer_row_pitch is computed as region[0].
buffer_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region associated with buffer. If buffer_slice_pitch is 0, buffer_slice_pitch is computed as region[1] * buffer_row_pitch.
buffer_slice_pitch
,
long
the length of each row in bytes to be used for the memory region pointed to by ptr. If host_row_pitch is 0, host_row_pitch is computed as region[0].
host_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region pointed to by ptr. If host_slice_pitch is 0, host_slice_pitch is computed as region[1] * host_row_pitch.
host_slice_pitch
,
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 a 2D or 3D rectangular region 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:
  • INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.
  • INVALID_CONTEXT if the context associated with command_queue and buffer are not the same or if the context associated with command_queue and events in event_wait_list are not the same.
  • INVALID_MEM_OBJECT if buffer is not a valid buffer object.
  • INVALID_VALUE if the region being read specified by (buffer_origin, region, buffer_row_pitch, buffer_slice_pitch) is out of bounds.
  • INVALID_VALUE if ptr is a NULL value.
  • INVALID_VALUE if any region array element is 0.
  • INVALID_VALUE if buffer_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if host_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if buffer_slice_pitch is not 0 and is less than region[1] * buffer_row_pitch and not a multiple of buffer_row_pitch.
  • INVALID_VALUE if host_slice_pitch is not 0 and is less than region[1] * host_row_pitch and not a multiple of host_row_pitch.
  • INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events.
  • MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.
  • EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read operation is blocking and the execution status of any of the events in event_wait_list is a negative integer value.
  • MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.
  • INVALID_OPERATION if clEnqueueReadBufferRect is called on buffer which has been created with MEM_HOST_WRITE_ONLY or MEM_HOST_NO_ACCESS.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
clEnqueueReadBufferRect
(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 nonblocking.

If blocking_read is TRUE i.e. the read command is blocking, clEnqueueReadBufferRect 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, clEnqueueReadBufferRect 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
the (x, y, z) offset in the memory region associated with buffer. For a 2D rectangle region, the z value given by buffer_origin[2] should be 0. The offset in bytes is computed as buffer_origin[2] * buffer_slice_pitch + buffer_origin[1] * buffer_row_pitch + buffer_origin[0].
buffer_origin
,
PointerBuffer
the (x, y, z) offset in the memory region pointed to by ptr. For a 2D rectangle region, the z value given by host_origin[2] should be 0. The offset in bytes is computed as host_origin[2] * host_slice_pitch + host_origin[1] * host_row_pitch + host_origin[0].
host_origin
,
PointerBuffer
the (width in bytes, height in rows, depth in slices) of the 2D or 3D rectangle being read or written. For a 2D rectangle copy, the depth value given by region[2] should be 1. The values in region cannot be 0.
region
,
long
the length of each row in bytes to be used for the memory region associated with buffer. If buffer_row_pitch is 0, buffer_row_pitch is computed as region[0].
buffer_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region associated with buffer. If buffer_slice_pitch is 0, buffer_slice_pitch is computed as region[1] * buffer_row_pitch.
buffer_slice_pitch
,
long
the length of each row in bytes to be used for the memory region pointed to by ptr. If host_row_pitch is 0, host_row_pitch is computed as region[0].
host_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region pointed to by ptr. If host_slice_pitch is 0, host_slice_pitch is computed as region[1] * host_row_pitch.
host_slice_pitch
,
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 a 2D or 3D rectangular region 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:
  • INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.
  • INVALID_CONTEXT if the context associated with command_queue and buffer are not the same or if the context associated with command_queue and events in event_wait_list are not the same.
  • INVALID_MEM_OBJECT if buffer is not a valid buffer object.
  • INVALID_VALUE if the region being read specified by (buffer_origin, region, buffer_row_pitch, buffer_slice_pitch) is out of bounds.
  • INVALID_VALUE if ptr is a NULL value.
  • INVALID_VALUE if any region array element is 0.
  • INVALID_VALUE if buffer_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if host_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if buffer_slice_pitch is not 0 and is less than region[1] * buffer_row_pitch and not a multiple of buffer_row_pitch.
  • INVALID_VALUE if host_slice_pitch is not 0 and is less than region[1] * host_row_pitch and not a multiple of host_row_pitch.
  • INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events.
  • MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.
  • EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read operation is blocking and the execution status of any of the events in event_wait_list is a negative integer value.
  • MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.
  • INVALID_OPERATION if clEnqueueReadBufferRect is called on buffer which has been created with MEM_HOST_WRITE_ONLY or MEM_HOST_NO_ACCESS.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
clEnqueueReadBufferRect
(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 nonblocking.

If blocking_read is TRUE i.e. the read command is blocking, clEnqueueReadBufferRect 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, clEnqueueReadBufferRect 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
the (x, y, z) offset in the memory region associated with buffer. For a 2D rectangle region, the z value given by buffer_origin[2] should be 0. The offset in bytes is computed as buffer_origin[2] * buffer_slice_pitch + buffer_origin[1] * buffer_row_pitch + buffer_origin[0].
buffer_origin
,
PointerBuffer
the (x, y, z) offset in the memory region pointed to by ptr. For a 2D rectangle region, the z value given by host_origin[2] should be 0. The offset in bytes is computed as host_origin[2] * host_slice_pitch + host_origin[1] * host_row_pitch + host_origin[0].
host_origin
,
PointerBuffer
the (width in bytes, height in rows, depth in slices) of the 2D or 3D rectangle being read or written. For a 2D rectangle copy, the depth value given by region[2] should be 1. The values in region cannot be 0.
region
,
long
the length of each row in bytes to be used for the memory region associated with buffer. If buffer_row_pitch is 0, buffer_row_pitch is computed as region[0].
buffer_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region associated with buffer. If buffer_slice_pitch is 0, buffer_slice_pitch is computed as region[1] * buffer_row_pitch.
buffer_slice_pitch
,
long
the length of each row in bytes to be used for the memory region pointed to by ptr. If host_row_pitch is 0, host_row_pitch is computed as region[0].
host_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region pointed to by ptr. If host_slice_pitch is 0, host_slice_pitch is computed as region[1] * host_row_pitch.
host_slice_pitch
,
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 a 2D or 3D rectangular region 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:
  • INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.
  • INVALID_CONTEXT if the context associated with command_queue and buffer are not the same or if the context associated with command_queue and events in event_wait_list are not the same.
  • INVALID_MEM_OBJECT if buffer is not a valid buffer object.
  • INVALID_VALUE if the region being read specified by (buffer_origin, region, buffer_row_pitch, buffer_slice_pitch) is out of bounds.
  • INVALID_VALUE if ptr is a NULL value.
  • INVALID_VALUE if any region array element is 0.
  • INVALID_VALUE if buffer_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if host_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if buffer_slice_pitch is not 0 and is less than region[1] * buffer_row_pitch and not a multiple of buffer_row_pitch.
  • INVALID_VALUE if host_slice_pitch is not 0 and is less than region[1] * host_row_pitch and not a multiple of host_row_pitch.
  • INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events.
  • MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.
  • EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read operation is blocking and the execution status of any of the events in event_wait_list is a negative integer value.
  • MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.
  • INVALID_OPERATION if clEnqueueReadBufferRect is called on buffer which has been created with MEM_HOST_WRITE_ONLY or MEM_HOST_NO_ACCESS.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
clEnqueueReadBufferRect
(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 nonblocking.

If blocking_read is TRUE i.e. the read command is blocking, clEnqueueReadBufferRect 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, clEnqueueReadBufferRect 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
the (x, y, z) offset in the memory region associated with buffer. For a 2D rectangle region, the z value given by buffer_origin[2] should be 0. The offset in bytes is computed as buffer_origin[2] * buffer_slice_pitch + buffer_origin[1] * buffer_row_pitch + buffer_origin[0].
buffer_origin
,
PointerBuffer
the (x, y, z) offset in the memory region pointed to by ptr. For a 2D rectangle region, the z value given by host_origin[2] should be 0. The offset in bytes is computed as host_origin[2] * host_slice_pitch + host_origin[1] * host_row_pitch + host_origin[0].
host_origin
,
PointerBuffer
the (width in bytes, height in rows, depth in slices) of the 2D or 3D rectangle being read or written. For a 2D rectangle copy, the depth value given by region[2] should be 1. The values in region cannot be 0.
region
,
long
the length of each row in bytes to be used for the memory region associated with buffer. If buffer_row_pitch is 0, buffer_row_pitch is computed as region[0].
buffer_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region associated with buffer. If buffer_slice_pitch is 0, buffer_slice_pitch is computed as region[1] * buffer_row_pitch.
buffer_slice_pitch
,
long
the length of each row in bytes to be used for the memory region pointed to by ptr. If host_row_pitch is 0, host_row_pitch is computed as region[0].
host_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region pointed to by ptr. If host_slice_pitch is 0, host_slice_pitch is computed as region[1] * host_row_pitch.
host_slice_pitch
,
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 a 2D or 3D rectangular region 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:
  • INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.
  • INVALID_CONTEXT if the context associated with command_queue and buffer are not the same or if the context associated with command_queue and events in event_wait_list are not the same.
  • INVALID_MEM_OBJECT if buffer is not a valid buffer object.
  • INVALID_VALUE if the region being read specified by (buffer_origin, region, buffer_row_pitch, buffer_slice_pitch) is out of bounds.
  • INVALID_VALUE if ptr is a NULL value.
  • INVALID_VALUE if any region array element is 0.
  • INVALID_VALUE if buffer_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if host_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if buffer_slice_pitch is not 0 and is less than region[1] * buffer_row_pitch and not a multiple of buffer_row_pitch.
  • INVALID_VALUE if host_slice_pitch is not 0 and is less than region[1] * host_row_pitch and not a multiple of host_row_pitch.
  • INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events.
  • MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.
  • EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the read operation is blocking and the execution status of any of the events in event_wait_list is a negative integer value.
  • MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.
  • INVALID_OPERATION if clEnqueueReadBufferRect is called on buffer which has been created with MEM_HOST_WRITE_ONLY or MEM_HOST_NO_ACCESS.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
clEnqueueReadBufferRect
(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 nonblocking.

If blocking_read is TRUE i.e. the read command is blocking, clEnqueueReadBufferRect 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, clEnqueueReadBufferRect 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
the (x, y, z) offset in the memory region associated with buffer. For a 2D rectangle region, the z value given by buffer_origin[2] should be 0. The offset in bytes is computed as buffer_origin[2] * buffer_slice_pitch + buffer_origin[1] * buffer_row_pitch + buffer_origin[0].
buffer_origin
,
PointerBuffer
the (x, y, z) offset in the memory region pointed to by ptr. For a 2D rectangle region, the z value given by host_origin[2] should be 0. The offset in bytes is computed as host_origin[2] * host_slice_pitch + host_origin[1] * host_row_pitch + host_origin[0].
host_origin
,
PointerBuffer
the (width in bytes, height in rows, depth in slices) of the 2D or 3D rectangle being read or written. For a 2D rectangle copy, the depth value given by region[2] should be 1. The values in region cannot be 0.
region
,
long
the length of each row in bytes to be used for the memory region associated with buffer. If buffer_row_pitch is 0, buffer_row_pitch is computed as region[0].
buffer_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region associated with buffer. If buffer_slice_pitch is 0, buffer_slice_pitch is computed as region[1] * buffer_row_pitch.
buffer_slice_pitch
,
long
the length of each row in bytes to be used for the memory region pointed to by ptr. If host_row_pitch is 0, host_row_pitch is computed as region[0].
host_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region pointed to by ptr. If host_slice_pitch is 0, host_slice_pitch is computed as region[1] * host_row_pitch.
host_slice_pitch
,
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 a 2D or 3D rectangular region from a buffer object to host memory.

public static int
clEnqueueReadBufferRect(long command_queue, long buffer, boolean blocking_read, PointerBuffer buffer_origin, PointerBuffer host_origin, PointerBuffer region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, short[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueReadBufferRect

public static int
clEnqueueReadBufferRect(long command_queue, long buffer, boolean blocking_read, PointerBuffer buffer_origin, PointerBuffer host_origin, PointerBuffer region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, int[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueReadBufferRect

public static int
clEnqueueReadBufferRect(long command_queue, long buffer, boolean blocking_read, PointerBuffer buffer_origin, PointerBuffer host_origin, PointerBuffer region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, float[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueReadBufferRect

public static int
clEnqueueReadBufferRect(long command_queue, long buffer, boolean blocking_read, PointerBuffer buffer_origin, PointerBuffer host_origin, PointerBuffer region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, double[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueReadBufferRect

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 and buffer are not the same or if the context associated with command_queue and events in event_wait_list are not the same.
  • INVALID_MEM_OBJECT if buffer is not a valid buffer object.
  • INVALID_VALUE if the region being written specified by (buffer_origin, region, buffer_row_pitch, buffer_slice_pitch) is out of bounds.
  • INVALID_VALUE if ptr is a NULL value.
  • INVALID_VALUE if any region array element is 0.
  • INVALID_VALUE if buffer_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if host_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if buffer_slice_pitch is not 0 and is less than region[1] * buffer_row_pitch and not a multiple of buffer_row_pitch.
  • INVALID_VALUE if host_slice_pitch is not 0 and is less than region[1] * host_row_pitch and not a multiple of host_row_pitch.
  • INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events.
  • MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.
  • EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the write operation is blocking and the execution status of any of the events in event_wait_list is a negative integer value.
  • MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.
  • INVALID_OPERATION if clEnqueueWriteBufferRect is called on buffer which has been created with MEM_HOST_READ_ONLY or MEM_HOST_NO_ACCESS.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
clEnqueueWriteBufferRect
(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 nonblocking.

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 clEnqueueWriteBufferRect 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
the (x, y, z) offset in the memory region associated with buffer. For a 2D rectangle region, the z value given by buffer_origin[2] should be 0. The offset in bytes is computed as buffer_origin[2] * buffer_slice_pitch + buffer_origin[1] * buffer_row_pitch + buffer_origin[0].
buffer_origin
,
PointerBuffer
the (x, y, z) offset in the memory region pointed to by ptr. For a 2D rectangle region, the z value given by host_origin[2] should be 0. The offset in bytes is computed as host_origin[2] * host_slice_pitch + host_origin[1] * host_row_pitch + host_origin[0].
host_origin
,
PointerBuffer
the (width in bytes, height in rows, depth in slices) of the 2D or 3D rectangle being read or written. For a 2D rectangle copy, the depth value given by region[2] should be 1. The values in region cannot be 0.
region
,
long
the length of each row in bytes to be used for the memory region associated with buffer. If buffer_row_pitch is 0, buffer_row_pitch is computed as region[0].
buffer_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region associated with buffer. If buffer_slice_pitch is 0, buffer_slice_pitch is computed as region[1] * buffer_row_pitch.
buffer_slice_pitch
,
long
the length of each row in bytes to be used for the memory region pointed to by ptr. If host_row_pitch is 0, host_row_pitch is computed as region[0].
host_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region pointed to by ptr. If host_slice_pitch is 0, host_slice_pitch is computed as region[1] * host_row_pitch.
host_slice_pitch
,
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 a 2D or 3D rectangular region 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:
  • INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.
  • INVALID_CONTEXT if the context associated with command_queue and buffer are not the same or if the context associated with command_queue and events in event_wait_list are not the same.
  • INVALID_MEM_OBJECT if buffer is not a valid buffer object.
  • INVALID_VALUE if the region being written specified by (buffer_origin, region, buffer_row_pitch, buffer_slice_pitch) is out of bounds.
  • INVALID_VALUE if ptr is a NULL value.
  • INVALID_VALUE if any region array element is 0.
  • INVALID_VALUE if buffer_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if host_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if buffer_slice_pitch is not 0 and is less than region[1] * buffer_row_pitch and not a multiple of buffer_row_pitch.
  • INVALID_VALUE if host_slice_pitch is not 0 and is less than region[1] * host_row_pitch and not a multiple of host_row_pitch.
  • INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events.
  • MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.
  • EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the write operation is blocking and the execution status of any of the events in event_wait_list is a negative integer value.
  • MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.
  • INVALID_OPERATION if clEnqueueWriteBufferRect is called on buffer which has been created with MEM_HOST_READ_ONLY or MEM_HOST_NO_ACCESS.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
clEnqueueWriteBufferRect
(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 nonblocking.

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 clEnqueueWriteBufferRect 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
the (x, y, z) offset in the memory region associated with buffer. For a 2D rectangle region, the z value given by buffer_origin[2] should be 0. The offset in bytes is computed as buffer_origin[2] * buffer_slice_pitch + buffer_origin[1] * buffer_row_pitch + buffer_origin[0].
buffer_origin
,
PointerBuffer
the (x, y, z) offset in the memory region pointed to by ptr. For a 2D rectangle region, the z value given by host_origin[2] should be 0. The offset in bytes is computed as host_origin[2] * host_slice_pitch + host_origin[1] * host_row_pitch + host_origin[0].
host_origin
,
PointerBuffer
the (width in bytes, height in rows, depth in slices) of the 2D or 3D rectangle being read or written. For a 2D rectangle copy, the depth value given by region[2] should be 1. The values in region cannot be 0.
region
,
long
the length of each row in bytes to be used for the memory region associated with buffer. If buffer_row_pitch is 0, buffer_row_pitch is computed as region[0].
buffer_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region associated with buffer. If buffer_slice_pitch is 0, buffer_slice_pitch is computed as region[1] * buffer_row_pitch.
buffer_slice_pitch
,
long
the length of each row in bytes to be used for the memory region pointed to by ptr. If host_row_pitch is 0, host_row_pitch is computed as region[0].
host_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region pointed to by ptr. If host_slice_pitch is 0, host_slice_pitch is computed as region[1] * host_row_pitch.
host_slice_pitch
,
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 a 2D or 3D rectangular region 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:
  • INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.
  • INVALID_CONTEXT if the context associated with command_queue and buffer are not the same or if the context associated with command_queue and events in event_wait_list are not the same.
  • INVALID_MEM_OBJECT if buffer is not a valid buffer object.
  • INVALID_VALUE if the region being written specified by (buffer_origin, region, buffer_row_pitch, buffer_slice_pitch) is out of bounds.
  • INVALID_VALUE if ptr is a NULL value.
  • INVALID_VALUE if any region array element is 0.
  • INVALID_VALUE if buffer_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if host_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if buffer_slice_pitch is not 0 and is less than region[1] * buffer_row_pitch and not a multiple of buffer_row_pitch.
  • INVALID_VALUE if host_slice_pitch is not 0 and is less than region[1] * host_row_pitch and not a multiple of host_row_pitch.
  • INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events.
  • MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.
  • EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the write operation is blocking and the execution status of any of the events in event_wait_list is a negative integer value.
  • MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.
  • INVALID_OPERATION if clEnqueueWriteBufferRect is called on buffer which has been created with MEM_HOST_READ_ONLY or MEM_HOST_NO_ACCESS.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
clEnqueueWriteBufferRect
(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 nonblocking.

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 clEnqueueWriteBufferRect 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
the (x, y, z) offset in the memory region associated with buffer. For a 2D rectangle region, the z value given by buffer_origin[2] should be 0. The offset in bytes is computed as buffer_origin[2] * buffer_slice_pitch + buffer_origin[1] * buffer_row_pitch + buffer_origin[0].
buffer_origin
,
PointerBuffer
the (x, y, z) offset in the memory region pointed to by ptr. For a 2D rectangle region, the z value given by host_origin[2] should be 0. The offset in bytes is computed as host_origin[2] * host_slice_pitch + host_origin[1] * host_row_pitch + host_origin[0].
host_origin
,
PointerBuffer
the (width in bytes, height in rows, depth in slices) of the 2D or 3D rectangle being read or written. For a 2D rectangle copy, the depth value given by region[2] should be 1. The values in region cannot be 0.
region
,
long
the length of each row in bytes to be used for the memory region associated with buffer. If buffer_row_pitch is 0, buffer_row_pitch is computed as region[0].
buffer_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region associated with buffer. If buffer_slice_pitch is 0, buffer_slice_pitch is computed as region[1] * buffer_row_pitch.
buffer_slice_pitch
,
long
the length of each row in bytes to be used for the memory region pointed to by ptr. If host_row_pitch is 0, host_row_pitch is computed as region[0].
host_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region pointed to by ptr. If host_slice_pitch is 0, host_slice_pitch is computed as region[1] * host_row_pitch.
host_slice_pitch
,
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 a 2D or 3D rectangular region 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:
  • INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.
  • INVALID_CONTEXT if the context associated with command_queue and buffer are not the same or if the context associated with command_queue and events in event_wait_list are not the same.
  • INVALID_MEM_OBJECT if buffer is not a valid buffer object.
  • INVALID_VALUE if the region being written specified by (buffer_origin, region, buffer_row_pitch, buffer_slice_pitch) is out of bounds.
  • INVALID_VALUE if ptr is a NULL value.
  • INVALID_VALUE if any region array element is 0.
  • INVALID_VALUE if buffer_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if host_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if buffer_slice_pitch is not 0 and is less than region[1] * buffer_row_pitch and not a multiple of buffer_row_pitch.
  • INVALID_VALUE if host_slice_pitch is not 0 and is less than region[1] * host_row_pitch and not a multiple of host_row_pitch.
  • INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events.
  • MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.
  • EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the write operation is blocking and the execution status of any of the events in event_wait_list is a negative integer value.
  • MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.
  • INVALID_OPERATION if clEnqueueWriteBufferRect is called on buffer which has been created with MEM_HOST_READ_ONLY or MEM_HOST_NO_ACCESS.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
clEnqueueWriteBufferRect
(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 nonblocking.

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 clEnqueueWriteBufferRect 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
the (x, y, z) offset in the memory region associated with buffer. For a 2D rectangle region, the z value given by buffer_origin[2] should be 0. The offset in bytes is computed as buffer_origin[2] * buffer_slice_pitch + buffer_origin[1] * buffer_row_pitch + buffer_origin[0].
buffer_origin
,
PointerBuffer
the (x, y, z) offset in the memory region pointed to by ptr. For a 2D rectangle region, the z value given by host_origin[2] should be 0. The offset in bytes is computed as host_origin[2] * host_slice_pitch + host_origin[1] * host_row_pitch + host_origin[0].
host_origin
,
PointerBuffer
the (width in bytes, height in rows, depth in slices) of the 2D or 3D rectangle being read or written. For a 2D rectangle copy, the depth value given by region[2] should be 1. The values in region cannot be 0.
region
,
long
the length of each row in bytes to be used for the memory region associated with buffer. If buffer_row_pitch is 0, buffer_row_pitch is computed as region[0].
buffer_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region associated with buffer. If buffer_slice_pitch is 0, buffer_slice_pitch is computed as region[1] * buffer_row_pitch.
buffer_slice_pitch
,
long
the length of each row in bytes to be used for the memory region pointed to by ptr. If host_row_pitch is 0, host_row_pitch is computed as region[0].
host_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region pointed to by ptr. If host_slice_pitch is 0, host_slice_pitch is computed as region[1] * host_row_pitch.
host_slice_pitch
,
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 a 2D or 3D rectangular region 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:
  • INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.
  • INVALID_CONTEXT if the context associated with command_queue and buffer are not the same or if the context associated with command_queue and events in event_wait_list are not the same.
  • INVALID_MEM_OBJECT if buffer is not a valid buffer object.
  • INVALID_VALUE if the region being written specified by (buffer_origin, region, buffer_row_pitch, buffer_slice_pitch) is out of bounds.
  • INVALID_VALUE if ptr is a NULL value.
  • INVALID_VALUE if any region array element is 0.
  • INVALID_VALUE if buffer_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if host_row_pitch is not 0 and is less than region[0].
  • INVALID_VALUE if buffer_slice_pitch is not 0 and is less than region[1] * buffer_row_pitch and not a multiple of buffer_row_pitch.
  • INVALID_VALUE if host_slice_pitch is not 0 and is less than region[1] * host_row_pitch and not a multiple of host_row_pitch.
  • INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events.
  • MISALIGNED_SUB_BUFFER_OFFSET if buffer is a sub-buffer object and offset specified when the sub-buffer object is created is not aligned to DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue.
  • EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the write operation is blocking and the execution status of any of the events in event_wait_list is a negative integer value.
  • MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with buffer.
  • INVALID_OPERATION if clEnqueueWriteBufferRect is called on buffer which has been created with MEM_HOST_READ_ONLY or MEM_HOST_NO_ACCESS.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
clEnqueueWriteBufferRect
(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 nonblocking.

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 clEnqueueWriteBufferRect 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
the (x, y, z) offset in the memory region associated with buffer. For a 2D rectangle region, the z value given by buffer_origin[2] should be 0. The offset in bytes is computed as buffer_origin[2] * buffer_slice_pitch + buffer_origin[1] * buffer_row_pitch + buffer_origin[0].
buffer_origin
,
PointerBuffer
the (x, y, z) offset in the memory region pointed to by ptr. For a 2D rectangle region, the z value given by host_origin[2] should be 0. The offset in bytes is computed as host_origin[2] * host_slice_pitch + host_origin[1] * host_row_pitch + host_origin[0].
host_origin
,
PointerBuffer
the (width in bytes, height in rows, depth in slices) of the 2D or 3D rectangle being read or written. For a 2D rectangle copy, the depth value given by region[2] should be 1. The values in region cannot be 0.
region
,
long
the length of each row in bytes to be used for the memory region associated with buffer. If buffer_row_pitch is 0, buffer_row_pitch is computed as region[0].
buffer_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region associated with buffer. If buffer_slice_pitch is 0, buffer_slice_pitch is computed as region[1] * buffer_row_pitch.
buffer_slice_pitch
,
long
the length of each row in bytes to be used for the memory region pointed to by ptr. If host_row_pitch is 0, host_row_pitch is computed as region[0].
host_row_pitch
,
long
the length of each 2D slice in bytes to be used for the memory region pointed to by ptr. If host_slice_pitch is 0, host_slice_pitch is computed as region[1] * host_row_pitch.
host_slice_pitch
,
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 a 2D or 3D rectangular region to a buffer object from host memory.

public static int
clEnqueueWriteBufferRect(long command_queue, long buffer, boolean blocking_write, PointerBuffer buffer_origin, PointerBuffer host_origin, PointerBuffer region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, short[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueWriteBufferRect

public static int
clEnqueueWriteBufferRect(long command_queue, long buffer, boolean blocking_write, PointerBuffer buffer_origin, PointerBuffer host_origin, PointerBuffer region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, int[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueWriteBufferRect

public static int
clEnqueueWriteBufferRect(long command_queue, long buffer, boolean blocking_write, PointerBuffer buffer_origin, PointerBuffer host_origin, PointerBuffer region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, float[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueWriteBufferRect

public static int
clEnqueueWriteBufferRect(long command_queue, long buffer, boolean blocking_write, PointerBuffer buffer_origin, PointerBuffer host_origin, PointerBuffer region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, double[] ptr, PointerBuffer event_wait_list, PointerBuffer event)

Array version of: EnqueueWriteBufferRect

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
clSetEventCallback
(long
a valid event object
event
,
int
the command execution status for which the callback is registered. There is no guarantee that the callback functions registered for various execution status values for an event will be called in the exact order that the execution status of a command changes. Furthermore, it should be noted that receiving a call back for an event with a status other than COMPLETE, in no way implies that the memory model or execution model as defined by the OpenCL specification has changed. For example, it is not valid to assume that a corresponding memory transfer has completed unless the event is in a state COMPLETE. One of:
SUBMITTEDRUNNINGCOMPLETE
command_exec_callback_type
,
CLEventCallbackI
the event callback function that can be registered by the application. 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 the user_data argument when pfn_notify is called. user_data can be NULL.
user_data
)

Registers a user callback function for a specific command execution status.

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.
  • INVALID_VALUE if pfn_notify 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.
clSetMemObjectDestructorCallback
(long
a valid memory object
memobj
,
CLMemObjectDestructorCallbackI
the callback function that can be registered by the application. 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 the user_data argument when pfn_notify is called. user_data can be NULL.
user_data
)

Registers a user callback function with a memory object.

public static int

Returns:

SUCCESS if the function was executed successfully. Otherwise, it returns one of the following errors:
  • INVALID_EVENT if event is not a valid user event object.
  • INVALID_VALUE if the execution_status is not COMPLETE or a negative integer value.
  • INVALID_OPERATION if the execution_status for event has already been changed by a previous call to clSetUserEventStatus.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
clSetUserEventStatus
(long
a user event object created using CreateUserEvent
event
,
int
the new execution status to be set and can be COMPLETE or a negative integer value to indicate an error. A negative integer value causes all enqueued commands that wait on this user event to be terminated. clSetUserEventStatus can only be called once to change the execution status of event.
execution_status
)

Sets the execution status of a user event object.

public static long
nclCreateSubBuffer(long buffer, long flags, int buffer_create_type, long buffer_create_info, long errcode_ret)

Unsafe version of: CreateSubBuffer

public static long
nclCreateUserEvent(long context, long errcode_ret)

Unsafe version of: CreateUserEvent

public static int
nclEnqueueCopyBufferRect(long command_queue, long src_buffer, long dst_buffer, long src_origin, long dst_origin, long region, long src_row_pitch, long src_slice_pitch, long dst_row_pitch, long dst_slice_pitch, int
the number of events in event_wait_list
num_events_in_wait_list
,
long event_wait_list, long event)

Unsafe version of: EnqueueCopyBufferRect

public static int
nclEnqueueReadBufferRect(long command_queue, long buffer, int blocking_read, long buffer_origin, long host_origin, long region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_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: EnqueueReadBufferRect

public static int
nclEnqueueWriteBufferRect(long command_queue, long buffer, int blocking_write, long buffer_origin, long host_origin, long region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_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: EnqueueWriteBufferRect

public static int
nclSetEventCallback(long event, int command_exec_callback_type, long pfn_notify, long user_data)

Unsafe version of: SetEventCallback

public static int
nclSetMemObjectDestructorCallback(long memobj, long pfn_notify, long user_data)

Unsafe version of: SetMemObjectDestructorCallback

Inherited from org.lwjgl.opencl.CL10:
clBuildProgramclBuildProgramclBuildProgramclCreateBufferclCreateBufferclCreateBufferclCreateBufferclCreateBufferclCreateBufferclCreateBufferclCreateBufferclCreateBufferclCreateBufferclCreateBufferclCreateCommandQueueclCreateCommandQueueclCreateContextclCreateContextclCreateContextclCreateContextFromTypeclCreateContextFromTypeclCreateImage2DclCreateImage2DclCreateImage2DclCreateImage2DclCreateImage2DclCreateImage2DclCreateImage2DclCreateImage2DclCreateImage3DclCreateImage3DclCreateImage3DclCreateImage3DclCreateImage3DclCreateImage3DclCreateImage3DclCreateImage3DclCreateKernelclCreateKernelclCreateKernelclCreateKernelclCreateKernelsInProgramclCreateKernelsInProgramclCreateProgramWithBinaryclCreateProgramWithBinaryclCreateProgramWithBinaryclCreateProgramWithBinaryclCreateProgramWithSourceclCreateProgramWithSourceclCreateProgramWithSourceclCreateProgramWithSourceclCreateSamplerclCreateSamplerclEnqueueBarrierclEnqueueCopyBufferclEnqueueCopyBufferToImageclEnqueueCopyImageclEnqueueCopyImageToBufferclEnqueueMapBufferclEnqueueMapBufferclEnqueueMapImageclEnqueueMapImageclEnqueueMapImageclEnqueueMapImageclEnqueueMarkerclEnqueueNativeKernelclEnqueueNativeKernelclEnqueueNDRangeKernelclEnqueueReadBufferclEnqueueReadBufferclEnqueueReadBufferclEnqueueReadBufferclEnqueueReadBufferclEnqueueReadBufferclEnqueueReadBufferclEnqueueReadBufferclEnqueueReadBufferclEnqueueReadImageclEnqueueReadImageclEnqueueReadImageclEnqueueReadImageclEnqueueReadImageclEnqueueReadImageclEnqueueReadImageclEnqueueReadImageclEnqueueReadImageclEnqueueTaskclEnqueueUnmapMemObjectclEnqueueWaitForEventsclEnqueueWaitForEventsclEnqueueWriteBufferclEnqueueWriteBufferclEnqueueWriteBufferclEnqueueWriteBufferclEnqueueWriteBufferclEnqueueWriteBufferclEnqueueWriteBufferclEnqueueWriteBufferclEnqueueWriteBufferclEnqueueWriteImageclEnqueueWriteImageclEnqueueWriteImageclEnqueueWriteImageclEnqueueWriteImageclEnqueueWriteImageclEnqueueWriteImageclEnqueueWriteImageclEnqueueWriteImageclFinishclFlushclGetCommandQueueInfoclGetCommandQueueInfoclGetCommandQueueInfoclGetCommandQueueInfoclGetCommandQueueInfoclGetCommandQueueInfoclGetContextInfoclGetContextInfoclGetContextInfoclGetContextInfoclGetDeviceIDsclGetDeviceIDsclGetDeviceInfoclGetDeviceInfoclGetDeviceInfoclGetDeviceInfoclGetDeviceInfoclGetDeviceInfoclGetEventInfoclGetEventInfoclGetEventInfoclGetEventInfoclGetEventProfilingInfoclGetEventProfilingInfoclGetEventProfilingInfoclGetExtensionFunctionAddressclGetExtensionFunctionAddressclGetImageInfoclGetImageInfoclGetImageInfoclGetImageInfoclGetKernelInfoclGetKernelInfoclGetKernelInfoclGetKernelInfoclGetKernelWorkGroupInfoclGetKernelWorkGroupInfoclGetKernelWorkGroupInfoclGetKernelWorkGroupInfoclGetKernelWorkGroupInfoclGetKernelWorkGroupInfoclGetMemObjectInfoclGetMemObjectInfoclGetMemObjectInfoclGetMemObjectInfoclGetMemObjectInfoclGetMemObjectInfoclGetPlatformIDsclGetPlatformIDsclGetPlatformInfoclGetPlatformInfoclGetPlatformInfoclGetProgramBuildInfoclGetProgramBuildInfoclGetProgramBuildInfoclGetProgramBuildInfoclGetProgramInfoclGetProgramInfoclGetProgramInfoclGetProgramInfoclGetSamplerInfoclGetSamplerInfoclGetSamplerInfoclGetSamplerInfoclGetSupportedImageFormatsclGetSupportedImageFormatsclReleaseCommandQueueclReleaseContextclReleaseEventclReleaseKernelclReleaseMemObjectclReleaseProgramclReleaseSamplerclRetainCommandQueueclRetainContextclRetainEventclRetainKernelclRetainMemObjectclRetainProgramclRetainSamplerclSetKernelArgclSetKernelArgclSetKernelArgclSetKernelArgclSetKernelArgclSetKernelArgclSetKernelArgclSetKernelArgclSetKernelArgclSetKernelArgclSetKernelArgclSetKernelArgclSetKernelArgclSetKernelArg1bclSetKernelArg1dclSetKernelArg1fclSetKernelArg1iclSetKernelArg1lclSetKernelArg1pclSetKernelArg1sclSetKernelArg2bclSetKernelArg2dclSetKernelArg2fclSetKernelArg2iclSetKernelArg2lclSetKernelArg2pclSetKernelArg2sclSetKernelArg4bclSetKernelArg4dclSetKernelArg4fclSetKernelArg4iclSetKernelArg4lclSetKernelArg4pclSetKernelArg4sclUnloadCompilerclWaitForEventsclWaitForEventsnclBuildProgramnclCreateBuffernclCreateCommandQueuenclCreateContextnclCreateContextFromTypenclCreateImage2DnclCreateImage3DnclCreateKernelnclCreateKernelsInProgramnclCreateProgramWithBinarynclCreateProgramWithSourcenclCreateSamplernclEnqueueCopyBuffernclEnqueueCopyBufferToImagenclEnqueueCopyImagenclEnqueueCopyImageToBuffernclEnqueueMapBuffernclEnqueueMapImagenclEnqueueMarkernclEnqueueNativeKernelnclEnqueueNDRangeKernelnclEnqueueReadBuffernclEnqueueReadImagenclEnqueueTasknclEnqueueUnmapMemObjectnclEnqueueWaitForEventsnclEnqueueWriteBuffernclEnqueueWriteImagenclGetCommandQueueInfonclGetContextInfonclGetDeviceIDsnclGetDeviceInfonclGetEventInfonclGetEventProfilingInfonclGetExtensionFunctionAddressnclGetImageInfonclGetKernelInfonclGetKernelWorkGroupInfonclGetMemObjectInfonclGetPlatformIDsnclGetPlatformInfonclGetProgramBuildInfonclGetProgramInfonclGetSamplerInfonclGetSupportedImageFormatsnclSetKernelArgnclWaitForEvents