Class CL10
- java.lang.Object
-
- org.lwjgl.opencl.CL10
-
public class CL10 extends java.lang.ObjectThe core OpenCL 1.0 functionality.
-
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static intclBuildProgram(long program, long device, java.lang.CharSequence options, CLProgramCallbackI pfn_notify, long user_data)static intclBuildProgram(long program, org.lwjgl.PointerBuffer device_list, java.nio.ByteBuffer options, CLProgramCallbackI pfn_notify, long user_data)static intclBuildProgram(long program, org.lwjgl.PointerBuffer device_list, java.lang.CharSequence options, CLProgramCallbackI pfn_notify, long user_data)static longclCreateBuffer(long context, long flags, java.nio.ByteBuffer host_ptr, int[] errcode_ret)static longclCreateBuffer(long context, long flags, java.nio.ByteBuffer host_ptr, java.nio.IntBuffer errcode_ret)static longclCreateBuffer(long context, long flags, double[] host_ptr, int[] errcode_ret)static longclCreateBuffer(long context, long flags, java.nio.DoubleBuffer host_ptr, java.nio.IntBuffer errcode_ret)static longclCreateBuffer(long context, long flags, float[] host_ptr, int[] errcode_ret)static longclCreateBuffer(long context, long flags, java.nio.FloatBuffer host_ptr, java.nio.IntBuffer errcode_ret)static longclCreateBuffer(long context, long flags, int[] host_ptr, int[] errcode_ret)static longclCreateBuffer(long context, long flags, java.nio.IntBuffer host_ptr, java.nio.IntBuffer errcode_ret)static longclCreateBuffer(long context, long flags, long size, java.nio.IntBuffer errcode_ret)static longclCreateBuffer(long context, long flags, short[] host_ptr, int[] errcode_ret)static longclCreateBuffer(long context, long flags, java.nio.ShortBuffer host_ptr, java.nio.IntBuffer errcode_ret)static longclCreateCommandQueue(long context, long device, long properties, int[] errcode_ret)Reference Page - This function is deprecated after OpenCL 1.2static longclCreateCommandQueue(long context, long device, long properties, java.nio.IntBuffer errcode_ret)Reference Page - This function is deprecated after OpenCL 1.2static longclCreateContext(org.lwjgl.PointerBuffer properties, long device, CLContextCallbackI pfn_notify, long user_data, java.nio.IntBuffer errcode_ret)static longclCreateContext(org.lwjgl.PointerBuffer properties, org.lwjgl.PointerBuffer devices, CLContextCallbackI pfn_notify, long user_data, int[] errcode_ret)static longclCreateContext(org.lwjgl.PointerBuffer properties, org.lwjgl.PointerBuffer devices, CLContextCallbackI pfn_notify, long user_data, java.nio.IntBuffer errcode_ret)static longclCreateContextFromType(org.lwjgl.PointerBuffer properties, long device_type, CLContextCallbackI pfn_notify, long user_data, int[] errcode_ret)static longclCreateContextFromType(org.lwjgl.PointerBuffer properties, long device_type, CLContextCallbackI pfn_notify, long user_data, java.nio.IntBuffer errcode_ret)static longclCreateImage2D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_row_pitch, java.nio.ByteBuffer host_ptr, int[] errcode_ret)Reference Page - This function is deprecated after OpenCL 1.1static longclCreateImage2D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_row_pitch, java.nio.ByteBuffer host_ptr, java.nio.IntBuffer errcode_ret)Reference Page - This function is deprecated after OpenCL 1.1static longclCreateImage2D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_row_pitch, float[] host_ptr, int[] errcode_ret)Reference Page - This function is deprecated after OpenCL 1.1static longclCreateImage2D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_row_pitch, java.nio.FloatBuffer host_ptr, java.nio.IntBuffer errcode_ret)Reference Page - This function is deprecated after OpenCL 1.1static longclCreateImage2D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_row_pitch, int[] host_ptr, int[] errcode_ret)Reference Page - This function is deprecated after OpenCL 1.1static longclCreateImage2D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_row_pitch, java.nio.IntBuffer host_ptr, java.nio.IntBuffer errcode_ret)Reference Page - This function is deprecated after OpenCL 1.1static longclCreateImage2D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_row_pitch, short[] host_ptr, int[] errcode_ret)Reference Page - This function is deprecated after OpenCL 1.1static longclCreateImage2D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_row_pitch, java.nio.ShortBuffer host_ptr, java.nio.IntBuffer errcode_ret)Reference Page - This function is deprecated after OpenCL 1.1static longclCreateImage3D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, java.nio.ByteBuffer host_ptr, int[] errcode_ret)Reference Page - This function is deprecated after OpenCL 1.1static longclCreateImage3D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, java.nio.ByteBuffer host_ptr, java.nio.IntBuffer errcode_ret)Reference Page - This function is deprecated after OpenCL 1.1static longclCreateImage3D(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)Reference Page - This function is deprecated after OpenCL 1.1static longclCreateImage3D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, java.nio.FloatBuffer host_ptr, java.nio.IntBuffer errcode_ret)Reference Page - This function is deprecated after OpenCL 1.1static longclCreateImage3D(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)Reference Page - This function is deprecated after OpenCL 1.1static longclCreateImage3D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, java.nio.IntBuffer host_ptr, java.nio.IntBuffer errcode_ret)Reference Page - This function is deprecated after OpenCL 1.1static longclCreateImage3D(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)Reference Page - This function is deprecated after OpenCL 1.1static longclCreateImage3D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, java.nio.ShortBuffer host_ptr, java.nio.IntBuffer errcode_ret)Reference Page - This function is deprecated after OpenCL 1.1static longclCreateKernel(long program, java.nio.ByteBuffer kernel_name, int[] errcode_ret)static longclCreateKernel(long program, java.nio.ByteBuffer kernel_name, java.nio.IntBuffer errcode_ret)static longclCreateKernel(long program, java.lang.CharSequence kernel_name, int[] errcode_ret)static longclCreateKernel(long program, java.lang.CharSequence kernel_name, java.nio.IntBuffer errcode_ret)static intclCreateKernelsInProgram(long program, org.lwjgl.PointerBuffer kernels, int[] num_kernels_ret)static intclCreateKernelsInProgram(long program, org.lwjgl.PointerBuffer kernels, java.nio.IntBuffer num_kernels_ret)static longclCreateProgramWithBinary(long context, org.lwjgl.PointerBuffer device_list, java.nio.ByteBuffer[] binaries, java.nio.IntBuffer binary_status, java.nio.IntBuffer errcode_ret)static longclCreateProgramWithBinary(long context, org.lwjgl.PointerBuffer device_list, java.nio.ByteBuffer binary, java.nio.IntBuffer binary_status, java.nio.IntBuffer errcode_ret)static longclCreateProgramWithBinary(long context, org.lwjgl.PointerBuffer device_list, org.lwjgl.PointerBuffer lengths, org.lwjgl.PointerBuffer binaries, int[] binary_status, int[] errcode_ret)static longclCreateProgramWithBinary(long context, org.lwjgl.PointerBuffer device_list, org.lwjgl.PointerBuffer lengths, org.lwjgl.PointerBuffer binaries, java.nio.IntBuffer binary_status, java.nio.IntBuffer errcode_ret)static longclCreateProgramWithSource(long context, java.lang.CharSequence[] strings, java.nio.IntBuffer errcode_ret)static longclCreateProgramWithSource(long context, java.lang.CharSequence string, java.nio.IntBuffer errcode_ret)static longclCreateProgramWithSource(long context, org.lwjgl.PointerBuffer strings, org.lwjgl.PointerBuffer lengths, int[] errcode_ret)static longclCreateProgramWithSource(long context, org.lwjgl.PointerBuffer strings, org.lwjgl.PointerBuffer lengths, java.nio.IntBuffer errcode_ret)static longclCreateSampler(long context, boolean normalized_coords, int addressing_mode, int filter_mode, int[] errcode_ret)Reference Page - This function is deprecated after OpenCL 1.2static longclCreateSampler(long context, boolean normalized_coords, int addressing_mode, int filter_mode, java.nio.IntBuffer errcode_ret)Reference Page - This function is deprecated after OpenCL 1.2static intclEnqueueBarrier(long command_queue)Reference Page - This function is deprecated after OpenCL 1.1static intclEnqueueCopyBuffer(long command_queue, long src_buffer, long dst_buffer, long src_offset, long dst_offset, long size, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueCopyBufferToImage(long command_queue, long src_buffer, long dst_image, long src_offset, org.lwjgl.PointerBuffer dst_origin, org.lwjgl.PointerBuffer region, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueCopyImage(long command_queue, long src_image, long dst_image, org.lwjgl.PointerBuffer src_origin, org.lwjgl.PointerBuffer dst_origin, org.lwjgl.PointerBuffer region, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueCopyImageToBuffer(long command_queue, long src_image, long dst_buffer, org.lwjgl.PointerBuffer src_origin, org.lwjgl.PointerBuffer region, long dst_offset, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static java.nio.ByteBufferclEnqueueMapBuffer(long command_queue, long buffer, boolean blocking_map, long map_flags, long offset, long size, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event, int[] errcode_ret, java.nio.ByteBuffer old_buffer)static java.nio.ByteBufferclEnqueueMapBuffer(long command_queue, long buffer, boolean blocking_map, long map_flags, long offset, long size, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event, java.nio.IntBuffer errcode_ret, java.nio.ByteBuffer old_buffer)static java.nio.ByteBufferclEnqueueMapImage(long command_queue, long image, boolean blocking_map, long map_flags, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, org.lwjgl.PointerBuffer image_row_pitch, org.lwjgl.PointerBuffer image_slice_pitch, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event, int[] errcode_ret, java.nio.ByteBuffer old_buffer)static java.nio.ByteBufferclEnqueueMapImage(long command_queue, long image, boolean blocking_map, long map_flags, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, org.lwjgl.PointerBuffer image_row_pitch, org.lwjgl.PointerBuffer image_slice_pitch, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event, int[] errcode_ret, long length, java.nio.ByteBuffer old_buffer)static java.nio.ByteBufferclEnqueueMapImage(long command_queue, long image, boolean blocking_map, long map_flags, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, org.lwjgl.PointerBuffer image_row_pitch, org.lwjgl.PointerBuffer image_slice_pitch, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event, java.nio.IntBuffer errcode_ret, java.nio.ByteBuffer old_buffer)static java.nio.ByteBufferclEnqueueMapImage(long command_queue, long image, boolean blocking_map, long map_flags, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, org.lwjgl.PointerBuffer image_row_pitch, org.lwjgl.PointerBuffer image_slice_pitch, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event, java.nio.IntBuffer errcode_ret, long length, java.nio.ByteBuffer old_buffer)static intclEnqueueMarker(long command_queue, org.lwjgl.PointerBuffer event)Reference Page - This function is deprecated after OpenCL 1.1static intclEnqueueNativeKernel(long command_queue, CLNativeKernelI user_func, java.nio.ByteBuffer args, long memobj, long memobj_loc, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueNativeKernel(long command_queue, CLNativeKernelI user_func, java.nio.ByteBuffer args, org.lwjgl.PointerBuffer mem_list, org.lwjgl.PointerBuffer args_mem_loc, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueNDRangeKernel(long command_queue, long kernel, int work_dim, org.lwjgl.PointerBuffer global_work_offset, org.lwjgl.PointerBuffer global_work_size, org.lwjgl.PointerBuffer local_work_size, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, java.nio.ByteBuffer ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, double[] ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, java.nio.DoubleBuffer ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, float[] ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, java.nio.FloatBuffer ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, int[] ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, java.nio.IntBuffer ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, short[] ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, java.nio.ShortBuffer ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueReadImage(long command_queue, long image, boolean blocking_read, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long row_pitch, long slice_pitch, java.nio.ByteBuffer ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueReadImage(long command_queue, long image, boolean blocking_read, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long row_pitch, long slice_pitch, double[] ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueReadImage(long command_queue, long image, boolean blocking_read, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long row_pitch, long slice_pitch, java.nio.DoubleBuffer ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueReadImage(long command_queue, long image, boolean blocking_read, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long row_pitch, long slice_pitch, float[] ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueReadImage(long command_queue, long image, boolean blocking_read, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long row_pitch, long slice_pitch, java.nio.FloatBuffer ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueReadImage(long command_queue, long image, boolean blocking_read, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long row_pitch, long slice_pitch, int[] ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueReadImage(long command_queue, long image, boolean blocking_read, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long row_pitch, long slice_pitch, java.nio.IntBuffer ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueReadImage(long command_queue, long image, boolean blocking_read, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long row_pitch, long slice_pitch, short[] ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueReadImage(long command_queue, long image, boolean blocking_read, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long row_pitch, long slice_pitch, java.nio.ShortBuffer ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueTask(long command_queue, long kernel, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)Reference Page - This function is deprecated after OpenCL 1.2static intclEnqueueUnmapMemObject(long command_queue, long memobj, java.nio.ByteBuffer mapped_ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueWaitForEvents(long command_queue, long event)Reference Page - This function is deprecated after OpenCL 1.1static intclEnqueueWaitForEvents(long command_queue, org.lwjgl.PointerBuffer event_list)Reference Page - This function is deprecated after OpenCL 1.1static intclEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, java.nio.ByteBuffer ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, double[] ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, java.nio.DoubleBuffer ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, float[] ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, java.nio.FloatBuffer ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, int[] ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, java.nio.IntBuffer ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, short[] ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, java.nio.ShortBuffer ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueWriteImage(long command_queue, long image, boolean blocking_write, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long input_row_pitch, long input_slice_pitch, java.nio.ByteBuffer ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueWriteImage(long command_queue, long image, boolean blocking_write, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long input_row_pitch, long input_slice_pitch, double[] ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueWriteImage(long command_queue, long image, boolean blocking_write, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long input_row_pitch, long input_slice_pitch, java.nio.DoubleBuffer ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueWriteImage(long command_queue, long image, boolean blocking_write, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long input_row_pitch, long input_slice_pitch, float[] ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueWriteImage(long command_queue, long image, boolean blocking_write, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long input_row_pitch, long input_slice_pitch, java.nio.FloatBuffer ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueWriteImage(long command_queue, long image, boolean blocking_write, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long input_row_pitch, long input_slice_pitch, int[] ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueWriteImage(long command_queue, long image, boolean blocking_write, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long input_row_pitch, long input_slice_pitch, java.nio.IntBuffer ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueWriteImage(long command_queue, long image, boolean blocking_write, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long input_row_pitch, long input_slice_pitch, short[] ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclEnqueueWriteImage(long command_queue, long image, boolean blocking_write, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long input_row_pitch, long input_slice_pitch, java.nio.ShortBuffer ptr, org.lwjgl.PointerBuffer event_wait_list, org.lwjgl.PointerBuffer event)static intclFinish(long command_queue)static intclFlush(long command_queue)static intclGetCommandQueueInfo(long command_queue, int param_name, java.nio.ByteBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetCommandQueueInfo(long command_queue, int param_name, int[] param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetCommandQueueInfo(long command_queue, int param_name, java.nio.IntBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetCommandQueueInfo(long command_queue, int param_name, long[] param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetCommandQueueInfo(long command_queue, int param_name, java.nio.LongBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetCommandQueueInfo(long command_queue, int param_name, org.lwjgl.PointerBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetContextInfo(long context, int param_name, java.nio.ByteBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetContextInfo(long context, int param_name, int[] param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetContextInfo(long context, int param_name, java.nio.IntBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetContextInfo(long context, int param_name, org.lwjgl.PointerBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetDeviceIDs(long platform, long device_type, org.lwjgl.PointerBuffer devices, int[] num_devices)static intclGetDeviceIDs(long platform, long device_type, org.lwjgl.PointerBuffer devices, java.nio.IntBuffer num_devices)static intclGetDeviceInfo(long device, int param_name, java.nio.ByteBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetDeviceInfo(long device, int param_name, int[] param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetDeviceInfo(long device, int param_name, java.nio.IntBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetDeviceInfo(long device, int param_name, long[] param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetDeviceInfo(long device, int param_name, java.nio.LongBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetDeviceInfo(long device, int param_name, org.lwjgl.PointerBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetEventInfo(long event, int param_name, java.nio.ByteBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetEventInfo(long event, int param_name, int[] param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetEventInfo(long event, int param_name, java.nio.IntBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetEventInfo(long event, int param_name, org.lwjgl.PointerBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetEventProfilingInfo(long event, int param_name, java.nio.ByteBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetEventProfilingInfo(long event, int param_name, long[] param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetEventProfilingInfo(long event, int param_name, java.nio.LongBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static longclGetExtensionFunctionAddress(java.nio.ByteBuffer funcname)Reference Page - This function is deprecated after OpenCL 1.1static longclGetExtensionFunctionAddress(java.lang.CharSequence funcname)Reference Page - This function is deprecated after OpenCL 1.1static intclGetImageInfo(long image, int param_name, java.nio.ByteBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetImageInfo(long image, int param_name, int[] param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetImageInfo(long image, int param_name, java.nio.IntBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetImageInfo(long image, int param_name, org.lwjgl.PointerBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetKernelInfo(long kernel, int param_name, java.nio.ByteBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetKernelInfo(long kernel, int param_name, int[] param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetKernelInfo(long kernel, int param_name, java.nio.IntBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetKernelInfo(long kernel, int param_name, org.lwjgl.PointerBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetKernelWorkGroupInfo(long kernel, long device, int param_name, java.nio.ByteBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetKernelWorkGroupInfo(long kernel, long device, int param_name, int[] param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetKernelWorkGroupInfo(long kernel, long device, int param_name, java.nio.IntBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetKernelWorkGroupInfo(long kernel, long device, int param_name, long[] param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetKernelWorkGroupInfo(long kernel, long device, int param_name, java.nio.LongBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetKernelWorkGroupInfo(long kernel, long device, int param_name, org.lwjgl.PointerBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetMemObjectInfo(long memobj, int param_name, java.nio.ByteBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetMemObjectInfo(long memobj, int param_name, int[] param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetMemObjectInfo(long memobj, int param_name, java.nio.IntBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetMemObjectInfo(long memobj, int param_name, long[] param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetMemObjectInfo(long memobj, int param_name, java.nio.LongBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetMemObjectInfo(long memobj, int param_name, org.lwjgl.PointerBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetPlatformIDs(org.lwjgl.PointerBuffer platforms, int[] num_platforms)static intclGetPlatformIDs(org.lwjgl.PointerBuffer platforms, java.nio.IntBuffer num_platforms)static intclGetPlatformInfo(long platform, int param_name, java.nio.ByteBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetPlatformInfo(long platform, int param_name, long[] param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetPlatformInfo(long platform, int param_name, java.nio.LongBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetProgramBuildInfo(long program, long device, int param_name, java.nio.ByteBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetProgramBuildInfo(long program, long device, int param_name, int[] param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetProgramBuildInfo(long program, long device, int param_name, java.nio.IntBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetProgramBuildInfo(long program, long device, int param_name, org.lwjgl.PointerBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetProgramInfo(long program, int param_name, java.nio.ByteBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetProgramInfo(long program, int param_name, int[] param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetProgramInfo(long program, int param_name, java.nio.IntBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetProgramInfo(long program, int param_name, org.lwjgl.PointerBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetSamplerInfo(long sampler, int param_name, java.nio.ByteBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetSamplerInfo(long sampler, int param_name, int[] param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetSamplerInfo(long sampler, int param_name, java.nio.IntBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetSamplerInfo(long sampler, int param_name, org.lwjgl.PointerBuffer param_value, org.lwjgl.PointerBuffer param_value_size_ret)static intclGetSupportedImageFormats(long context, long flags, int image_type, CLImageFormat.Buffer image_formats, int[] num_image_formats)static intclGetSupportedImageFormats(long context, long flags, int image_type, CLImageFormat.Buffer image_formats, java.nio.IntBuffer num_image_formats)static intclReleaseCommandQueue(long command_queue)static intclReleaseContext(long context)static intclReleaseEvent(long event)static intclReleaseKernel(long kernel)static intclReleaseMemObject(long memobj)static intclReleaseProgram(long program)static intclReleaseSampler(long sampler)static intclRetainCommandQueue(long command_queue)static intclRetainContext(long context)static intclRetainEvent(long event)static intclRetainKernel(long kernel)static intclRetainMemObject(long memobj)static intclRetainProgram(long program)static intclRetainSampler(long sampler)static intclSetKernelArg(long kernel, int arg_index, java.nio.ByteBuffer arg_value)static intclSetKernelArg(long kernel, int arg_index, double[] arg_value)static intclSetKernelArg(long kernel, int arg_index, java.nio.DoubleBuffer arg_value)static intclSetKernelArg(long kernel, int arg_index, float[] arg_value)static intclSetKernelArg(long kernel, int arg_index, java.nio.FloatBuffer arg_value)static intclSetKernelArg(long kernel, int arg_index, int[] arg_value)static intclSetKernelArg(long kernel, int arg_index, java.nio.IntBuffer arg_value)static intclSetKernelArg(long kernel, int arg_index, long arg_size)static intclSetKernelArg(long kernel, int arg_index, long[] arg_value)static intclSetKernelArg(long kernel, int arg_index, java.nio.LongBuffer arg_value)static intclSetKernelArg(long kernel, int arg_index, org.lwjgl.PointerBuffer arg_value)static intclSetKernelArg(long kernel, int arg_index, short[] arg_value)static intclSetKernelArg(long kernel, int arg_index, java.nio.ShortBuffer arg_value)static intclSetKernelArg1b(long kernel, int arg_index, byte arg0)static intclSetKernelArg1d(long kernel, int arg_index, double arg0)static intclSetKernelArg1f(long kernel, int arg_index, float arg0)static intclSetKernelArg1i(long kernel, int arg_index, int arg0)static intclSetKernelArg1l(long kernel, int arg_index, long arg0)static intclSetKernelArg1p(long kernel, int arg_index, long arg0)static intclSetKernelArg1s(long kernel, int arg_index, short arg0)static intclSetKernelArg2b(long kernel, int arg_index, byte arg0, byte arg1)static intclSetKernelArg2d(long kernel, int arg_index, double arg0, double arg1)static intclSetKernelArg2f(long kernel, int arg_index, float arg0, float arg1)static intclSetKernelArg2i(long kernel, int arg_index, int arg0, int arg1)static intclSetKernelArg2l(long kernel, int arg_index, long arg0, long arg1)static intclSetKernelArg2p(long kernel, int arg_index, long arg0, long arg1)static intclSetKernelArg2s(long kernel, int arg_index, short arg0, short arg1)static intclSetKernelArg3b(long kernel, int arg_index, byte arg0, byte arg1, byte arg2)static intclSetKernelArg3d(long kernel, int arg_index, double arg0, double arg1, double arg2)static intclSetKernelArg3f(long kernel, int arg_index, float arg0, float arg1, float arg2)static intclSetKernelArg3i(long kernel, int arg_index, int arg0, int arg1, int arg2)static intclSetKernelArg3l(long kernel, int arg_index, long arg0, long arg1, long arg2)static intclSetKernelArg3p(long kernel, int arg_index, long arg0, long arg1, long arg2)static intclSetKernelArg3s(long kernel, int arg_index, short arg0, short arg1, short arg2)static intclSetKernelArg4b(long kernel, int arg_index, byte arg0, byte arg1, byte arg2, byte arg3)static intclSetKernelArg4d(long kernel, int arg_index, double arg0, double arg1, double arg2, double arg3)static intclSetKernelArg4f(long kernel, int arg_index, float arg0, float arg1, float arg2, float arg3)static intclSetKernelArg4i(long kernel, int arg_index, int arg0, int arg1, int arg2, int arg3)static intclSetKernelArg4l(long kernel, int arg_index, long arg0, long arg1, long arg2, long arg3)static intclSetKernelArg4p(long kernel, int arg_index, long arg0, long arg1, long arg2, long arg3)static intclSetKernelArg4s(long kernel, int arg_index, short arg0, short arg1, short arg2, short arg3)static intclUnloadCompiler()Reference Page - This function is deprecated after OpenCL 1.1static intclWaitForEvents(long event)static intclWaitForEvents(org.lwjgl.PointerBuffer event_list)
-
-
-
Field Detail
-
CL_SUCCESS, CL_DEVICE_NOT_FOUND, CL_DEVICE_NOT_AVAILABLE, CL_COMPILER_NOT_AVAILABLE, CL_MEM_OBJECT_ALLOCATION_FAILURE, CL_OUT_OF_RESOURCES, CL_OUT_OF_HOST_MEMORY, CL_PROFILING_INFO_NOT_AVAILABLE, CL_MEM_COPY_OVERLAP, CL_IMAGE_FORMAT_MISMATCH, CL_IMAGE_FORMAT_NOT_SUPPORTED, CL_BUILD_PROGRAM_FAILURE, CL_MAP_FAILURE, CL_INVALID_VALUE, CL_INVALID_DEVICE_TYPE, CL_INVALID_PLATFORM, CL_INVALID_DEVICE, CL_INVALID_CONTEXT, CL_INVALID_QUEUE_PROPERTIES, CL_INVALID_COMMAND_QUEUE, CL_INVALID_HOST_PTR, CL_INVALID_MEM_OBJECT, CL_INVALID_IMAGE_FORMAT_DESCRIPTOR, CL_INVALID_IMAGE_SIZE, CL_INVALID_SAMPLER, CL_INVALID_BINARY, CL_INVALID_BUILD_OPTIONS, CL_INVALID_PROGRAM, CL_INVALID_PROGRAM_EXECUTABLE, CL_INVALID_KERNEL_NAME, CL_INVALID_KERNEL_DEFINITION, CL_INVALID_KERNEL, CL_INVALID_ARG_INDEX, CL_INVALID_ARG_VALUE, CL_INVALID_ARG_SIZE, CL_INVALID_KERNEL_ARGS, CL_INVALID_WORK_DIMENSION, CL_INVALID_WORK_GROUP_SIZE, CL_INVALID_WORK_ITEM_SIZE, CL_INVALID_GLOBAL_OFFSET, CL_INVALID_EVENT_WAIT_LIST, CL_INVALID_EVENT, CL_INVALID_OPERATION, CL_INVALID_BUFFER_SIZE, CL_INVALID_GLOBAL_WORK_SIZE
Error Codes
-
CL_VERSION_1_0
OpenCL Version
-
CL_PLATFORM_PROFILE, CL_PLATFORM_VERSION, CL_PLATFORM_NAME, CL_PLATFORM_VENDOR, CL_PLATFORM_EXTENSIONS
cl_platform_info
-
CL_DEVICE_TYPE_DEFAULT, CL_DEVICE_TYPE_CPU, CL_DEVICE_TYPE_GPU, CL_DEVICE_TYPE_ACCELERATOR, CL_DEVICE_TYPE_ALL
cl_device_type - bitfield
-
CL_DEVICE_TYPE, CL_DEVICE_VENDOR_ID, CL_DEVICE_MAX_COMPUTE_UNITS, CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS, CL_DEVICE_MAX_WORK_GROUP_SIZE, CL_DEVICE_MAX_WORK_ITEM_SIZES, CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR, CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT, CL_DEVICE_PREFERRED_VECTOR_WIDTH_, CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG, CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT, CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE, CL_DEVICE_MAX_CLOCK_FREQUENCY, CL_DEVICE_ADDRESS_BITS, CL_DEVICE_MAX_READ_IMAGE_ARGS, CL_DEVICE_MAX_WRITE_IMAGE_ARGS, CL_DEVICE_MAX_MEM_ALLOC_SIZE, CL_DEVICE_IMAGE2D_MAX_WIDTH, CL_DEVICE_IMAGE2D_MAX_HEIGHT, CL_DEVICE_IMAGE3D_MAX_WIDTH, CL_DEVICE_IMAGE3D_MAX_HEIGHT, CL_DEVICE_IMAGE3D_MAX_DEPTH, CL_DEVICE_IMAGE_SUPPORT, CL_DEVICE_MAX_PARAMETER_SIZE, CL_DEVICE_MAX_SAMPLERS, CL_DEVICE_MEM_BASE_ADDR_ALIGN, CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE, CL_DEVICE_SINGLE_FP_CONFIG, CL_DEVICE_GLOBAL_MEM_CACHE_TYPE, CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE, CL_DEVICE_GLOBAL_MEM_CACHE_SIZE, CL_DEVICE_GLOBAL_MEM_SIZE, CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE, CL_DEVICE_MAX_CONSTANT_ARGS, CL_DEVICE_LOCAL_MEM_TYPE, CL_DEVICE_LOCAL_MEM_SIZE, CL_DEVICE_ERROR_CORRECTION_SUPPORT, CL_DEVICE_PROFILING_TIMER_RESOLUTION, CL_DEVICE_ENDIAN_LITTLE, CL_DEVICE_AVAILABLE, CL_DEVICE_COMPILER_AVAILABLE, CL_DEVICE_EXECUTION_CAPABILITIES, CL_DEVICE_QUEUE_PROPERTIES, CL_DEVICE_NAME, CL_DEVICE_VENDOR, CL_DRIVER_VERSION, CL_DEVICE_PROFILE, CL_DEVICE_VERSION, CL_DEVICE_EXTENSIONS, CL_DEVICE_PLATFORM
cl_device_info
-
CL_FP_DENORM, CL_FP_INF_NAN, CL_FP_ROUND_TO_NEAREST, CL_FP_ROUND_TO_ZERO, CL_FP_ROUND_TO_INF, CL_FP_FMA
cl_device_fp_config - bitfield
-
CL_NONE, CL_READ_ONLY_CACHE, CL_READ_WRITE_CACHE
cl_device_mem_cache_type
-
CL_EXEC_KERNEL, CL_EXEC_NATIVE_KERNEL
cl_device_exec_capabilities - bitfield
-
CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, CL_QUEUE_PROFILING_ENABLE
cl_command_queue_properties - bitfield
-
CL_CONTEXT_REFERENCE_COUNT, CL_CONTEXT_DEVICES, CL_CONTEXT_PROPERTIES
cl_context_info
-
CL_CONTEXT_PLATFORM
cl_context_info + cl_context_properties
-
CL_QUEUE_CONTEXT, CL_QUEUE_DEVICE, CL_QUEUE_REFERENCE_COUNT, CL_QUEUE_PROPERTIES
cl_command_queue_info
-
CL_MEM_READ_WRITE, CL_MEM_WRITE_ONLY, CL_MEM_READ_ONLY, CL_MEM_USE_HOST_PTR, CL_MEM_ALLOC_HOST_PTR, CL_MEM_COPY_HOST_PTR
cl_mem_flags - bitfield
-
CL_R, CL_A, CL_RG, CL_RA, CL_RGB, CL_RGBA, CL_BGRA, CL_ARGB, CL_INTENSITY, CL_LUMINANCE
cl_channel_order
-
CL_SNORM_INT8, CL_SNORM_INT16, CL_UNORM_INT8, CL_UNORM_INT16, CL_UNORM_SHORT_565, CL_UNORM_SHORT_555, CL_UNORM_INT_101010, CL_SIGNED_INT8, CL_SIGNED_INT16, CL_SIGNED_INT32, CL_UNSIGNED_INT8, CL_UNSIGNED_INT16, CL_UNSIGNED_INT32, CL_HALF_FLOAT, CL_FLOAT
cl_channel_type
-
CL_MEM_OBJECT_BUFFER, CL_MEM_OBJECT_IMAGE2D, CL_MEM_OBJECT_IMAGE3D
cl_mem_object_type
-
CL_MEM_TYPE, CL_MEM_FLAGS, CL_MEM_SIZE, CL_MEM_HOST_PTR, CL_MEM_MAP_COUNT, CL_MEM_REFERENCE_COUNT, CL_MEM_CONTEXT
cl_mem_info
-
CL_IMAGE_FORMAT, CL_IMAGE_ELEMENT_SIZE, CL_IMAGE_ROW_PITCH, CL_IMAGE_SLICE_PITCH, CL_IMAGE_WIDTH, CL_IMAGE_HEIGHT, CL_IMAGE_DEPTH
cl_image_info
-
CL_ADDRESS_NONE, CL_ADDRESS_CLAMP_TO_EDGE, CL_ADDRESS_CLAMP, CL_ADDRESS_REPEAT
cl_addressing_mode
-
CL_FILTER_NEAREST, CL_FILTER_LINEAR
cl_filter_mode
-
CL_SAMPLER_REFERENCE_COUNT, CL_SAMPLER_CONTEXT, CL_SAMPLER_NORMALIZED_COORDS, CL_SAMPLER_ADDRESSING_MODE, CL_SAMPLER_FILTER_MODE
cl_sampler_info
-
CL_MAP_READ, CL_MAP_WRITE
cl_map_flags - bitfield
-
CL_PROGRAM_REFERENCE_COUNT, CL_PROGRAM_CONTEXT, CL_PROGRAM_NUM_DEVICES, CL_PROGRAM_DEVICES, CL_PROGRAM_SOURCE, CL_PROGRAM_BINARY_SIZES, CL_PROGRAM_BINARIES
cl_program_info
-
CL_PROGRAM_BUILD_STATUS, CL_PROGRAM_BUILD_OPTIONS, CL_PROGRAM_BUILD_LOG
cl_program_build_info
-
CL_BUILD_SUCCESS, CL_BUILD_NONE, CL_BUILD_ERROR, CL_BUILD_IN_PROGRESS
cl_build_status
-
CL_KERNEL_FUNCTION_NAME, CL_KERNEL_NUM_ARGS, CL_KERNEL_REFERENCE_COUNT, CL_KERNEL_CONTEXT, CL_KERNEL_PROGRAM
cl_kernel_info
-
CL_KERNEL_WORK_GROUP_SIZE, CL_KERNEL_COMPILE_WORK_GROUP_SIZE, CL_KERNEL_LOCAL_MEM_SIZE
cl_kernel_work_group_info
-
CL_EVENT_COMMAND_QUEUE, CL_EVENT_COMMAND_TYPE, CL_EVENT_REFERENCE_COUNT, CL_EVENT_COMMAND_EXECUTION_STATUS
cl_event_info
-
CL_COMMAND_NDRANGE_KERNEL, CL_COMMAND_TASK, CL_COMMAND_NATIVE_KERNEL, CL_COMMAND_READ_BUFFER, CL_COMMAND_WRITE_BUFFER, CL_COMMAND_COPY_BUFFER, CL_COMMAND_READ_IMAGE, CL_COMMAND_WRITE_IMAGE, CL_COMMAND_COPY_IMAGE, CL_COMMAND_COPY_IMAGE_TO_BUFFER, CL_COMMAND_COPY_BUFFER_TO_IMAGE, CL_COMMAND_MAP_BUFFER, CL_COMMAND_MAP_IMAGE, CL_COMMAND_UNMAP_MEM_OBJECT, CL_COMMAND_MARKER, CL_COMMAND_ACQUIRE_GL_OBJECTS, CL_COMMAND_RELEASE_GL_OBJECTS
cl_command_type
-
CL_COMPLETE, CL_RUNNING, CL_SUBMITTED, CL_QUEUED
command execution status
-
-
Method Detail
-
clGetPlatformIDs
public static int clGetPlatformIDs(@Nullable org.lwjgl.PointerBuffer platforms, @Nullable java.nio.IntBuffer num_platforms)Obtains the list of available platforms.- Parameters:
platforms- returns a list of OpenCL platforms found. Thecl_platform_idvalues returned inplatformscan be used to identify a specific OpenCL platform. Ifplatformsargument isNULL, this argument is ignored. The number of OpenCL platforms returned is the minimum of the value specified bynum_entriesor the number of OpenCL platforms available.num_platforms- returns the number of OpenCL platforms available. Ifnum_platformsisNULL, this argument is ignored.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_VALUEifnum_entriesis equal to zero andplatformsis notNULLor if bothnum_platformsandplatformsareNULL.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clGetPlatformInfo
public static int clGetPlatformInfo(long platform, int param_name, @Nullable java.nio.ByteBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetPlatformInfo(long platform, int param_name, @Nullable java.nio.LongBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Returns information about the specified OpenCL platform.- Parameters:
platform- the platform to queryparam_name- the parameter to query. One of:PLATFORM_PROFILEPLATFORM_VERSIONPLATFORM_NAMEPLATFORM_VENDORPLATFORM_EXTENSIONSPLATFORM_HOST_TIMER_RESOLUTIONparam_value- the memory location where appropriate values for a givenparam_namewill be returnedparam_value_size_ret- the actual size in bytes of data being queried byparam_value. IfNULL, it is ignored.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_PLATFORMifplatformis not a valid platform.INVALID_VALUEifparam_nameis not one of the supported values or if size in bytes specified byparam_value_sizeis < size of return type andparam_valueis not aNULLvalue.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clGetDeviceIDs
public static int clGetDeviceIDs(long platform, long device_type, @Nullable org.lwjgl.PointerBuffer devices, @Nullable java.nio.IntBuffer num_devices)Obtains the list of devices available on a platform.- Parameters:
platform- the platform to querydevice_type- a bitfield that identifies the type of OpenCL device. Thedevice_typecan be used to query specific OpenCL devices or all OpenCL devices available. One or more of:DEVICE_TYPE_DEFAULTDEVICE_TYPE_CPUDEVICE_TYPE_GPUDEVICE_TYPE_ACCELERATORDEVICE_TYPE_ALLDEVICE_TYPE_CUSTOMdevices- returns a list of OpenCL devices found. Thecl_device_idvalues returned indevicescan be used to identify a specific OpenCL device. Ifdevicesargument isNULL, this argument is ignored. The number of OpenCL devices returned is the minimum of the value specified bynum_entriesor the number of OpenCL devices whose type matchesdevice_type.num_devices- returns the number of OpenCL devices available that matchdevice_type. Ifnum_devicesisNULL, this argument is ignored.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_PLATFORMifplatformis not a valid platform.INVALID_DEVICE_TYPEifdevice_typeis not a valid value.INVALID_VALUEifnum_entriesis equal to zero anddevicesis notNULLor if bothnum_devicesanddevicesareNULL.DEVICE_NOT_FOUNDif no OpenCL devices that matcheddevice_typewere found.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clGetDeviceInfo
public static int clGetDeviceInfo(long device, int param_name, @Nullable java.nio.ByteBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetDeviceInfo(long device, int param_name, @Nullable java.nio.IntBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetDeviceInfo(long device, int param_name, @Nullable java.nio.LongBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetDeviceInfo(long device, int param_name, @Nullable org.lwjgl.PointerBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Returns specific information about an OpenCL device.devicemay be a device returned byGetDeviceIDsor a sub-device created byCreateSubDevices. Ifdeviceis a sub-device, the specific information for the sub-device will be returned.- Parameters:
device- the device to queryparam_name- an enumeration constant tha identifies the device information being queried. One of:param_value- a pointer to memory where the appropriate result being queried is returned. Ifparam_valueisNULL, it is ignored.param_value_size_ret- the actual size in bytes of data being queried byparam_value. IfNULL, it is ignored.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_DEVICEifdeviceis not valid.INVALID_VALUEifparam_nameis not one of the supported values or if size in bytes specified byparam_value_sizeis < size of return type andparam_valueis not aNULLvalue or ifparam_nameis a value that is available as an extension and the corresponding extension is not supported by the device.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clCreateContext
public static long clCreateContext(org.lwjgl.PointerBuffer properties, org.lwjgl.PointerBuffer devices, @Nullable CLContextCallbackI pfn_notify, long user_data, @Nullable java.nio.IntBuffer errcode_ret)Creates an OpenCL context. An OpenCL context is created with one or more devices. Contexts are used by the OpenCL runtime for managing objects such as command-queues, memory, program and kernel objects and for executing kernels on one or more devices specified in the context.- Parameters:
properties- a list of context property names and their corresponding values. Each property name is immediately followed by the corresponding desired value. The list is terminated with 0. One of:CONTEXT_PLATFORMCONTEXT_INTEROP_USER_SYNCGL_CONTEXT_KHREGL_DISPLAY_KHRGLX_DISPLAY_KHRWGL_HDC_KHRCGL_SHAREGROUP_KHRdevices- a list of unique devices returned byGetDeviceIDsor sub-devices created byCreateSubDevicesfor a platformpfn_notify- a callback function that can be registered by the application. This callback function will be used by the OpenCL implementation to report information on errors during context creation as well as errors that occur at runtime in this context. This callback function may be called asynchronously by the OpenCL implementation. It is the application's responsibility to ensure that the callback function is thread-safe.If
pfn_notifyisNULL, no callback function is registered.user_data- will be passed as theuser_dataargument whenpfn_notifyis called.user_datacan beNULL.errcode_ret- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.- Returns:
- a valid non-zero context and
errcode_retis set toSUCCESSif the context is created successfully. Otherwise, it returns aNULLvalue with the following error values returned inerrcode_ret:INVALID_PLATFORMifpropertiesisNULLand no platform could be selected or if platform value specified in properties is not a valid platform.INVALID_PROPERTYif context property name inpropertiesis 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_VALUEifdevicesisNULL.INVALID_VALUEifnum_devicesis equal to zero.INVALID_VALUEifpfn_notifyisNULLbutuser_datais notNULL.INVALID_DEVICEifdevicescontains an invalid device.DEVICE_NOT_AVAILABLEif a device indevicesis currently not available even though the device was returned byGetDeviceIDs.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clCreateContext
public static long clCreateContext(org.lwjgl.PointerBuffer properties, long device, @Nullable CLContextCallbackI pfn_notify, long user_data, @Nullable java.nio.IntBuffer errcode_ret)Creates an OpenCL context. An OpenCL context is created with one or more devices. Contexts are used by the OpenCL runtime for managing objects such as command-queues, memory, program and kernel objects and for executing kernels on one or more devices specified in the context.- Parameters:
properties- a list of context property names and their corresponding values. Each property name is immediately followed by the corresponding desired value. The list is terminated with 0. One of:CONTEXT_PLATFORMCONTEXT_INTEROP_USER_SYNCGL_CONTEXT_KHREGL_DISPLAY_KHRGLX_DISPLAY_KHRWGL_HDC_KHRCGL_SHAREGROUP_KHRpfn_notify- a callback function that can be registered by the application. This callback function will be used by the OpenCL implementation to report information on errors during context creation as well as errors that occur at runtime in this context. This callback function may be called asynchronously by the OpenCL implementation. It is the application's responsibility to ensure that the callback function is thread-safe.If
pfn_notifyisNULL, no callback function is registered.user_data- will be passed as theuser_dataargument whenpfn_notifyis called.user_datacan beNULL.errcode_ret- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.- Returns:
- a valid non-zero context and
errcode_retis set toSUCCESSif the context is created successfully. Otherwise, it returns aNULLvalue with the following error values returned inerrcode_ret:INVALID_PLATFORMifpropertiesisNULLand no platform could be selected or if platform value specified in properties is not a valid platform.INVALID_PROPERTYif context property name inpropertiesis 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_VALUEifdevicesisNULL.INVALID_VALUEifnum_devicesis equal to zero.INVALID_VALUEifpfn_notifyisNULLbutuser_datais notNULL.INVALID_DEVICEifdevicescontains an invalid device.DEVICE_NOT_AVAILABLEif a device indevicesis currently not available even though the device was returned byGetDeviceIDs.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clCreateContextFromType
public static long clCreateContextFromType(org.lwjgl.PointerBuffer properties, long device_type, @Nullable CLContextCallbackI pfn_notify, long user_data, @Nullable java.nio.IntBuffer errcode_ret)Creates a context using devices of the specified type. SeeCreateContextfor details.- Parameters:
properties- a list of context property names and their corresponding values. Each property name is immediately followed by the corresponding desired value. The list is terminated with 0.device_type- a bit-field that identifies the type of device. One of:DEVICE_TYPE_DEFAULTDEVICE_TYPE_CPUDEVICE_TYPE_GPUDEVICE_TYPE_ACCELERATORDEVICE_TYPE_ALLDEVICE_TYPE_CUSTOMpfn_notify- a callback function that can be registered by the applicationuser_data- will be passed as theuser_dataargument whenpfn_notifyis called.user_datacan beNULL.errcode_ret- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.
-
clRetainContext
public static int clRetainContext(long context)
Increments the context reference count.CreateContextandCreateContextFromTypeperform an implicit retain. This is very helpful for 3rd party libraries, which typically get a context passed to them by the application. However, it is possible that the application may delete the context without informing the library. Allowing functions to attach to (i.e. retain) and release a context solves the problem of a context being used by a library no longer being valid.- Parameters:
context- the context to retain- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_CONTEXTifcontextis not a valid context.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clReleaseContext
public static int clReleaseContext(long context)
Decrements the context reference count.After the context reference count becomes zero and all the objects attached to context (such as memory objects, command-queues) are released, the context is deleted.
- Parameters:
context- the context to release- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_CONTEXTifcontextis not a valid context.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clGetContextInfo
public static int clGetContextInfo(long context, int param_name, @Nullable java.nio.ByteBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetContextInfo(long context, int param_name, @Nullable java.nio.IntBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetContextInfo(long context, int param_name, @Nullable org.lwjgl.PointerBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Queries information about a context.- Parameters:
context- the OpenCL context being queriedparam_name- an enumeration constant that specifies the information to query. One of:CONTEXT_REFERENCE_COUNTCONTEXT_DEVICESCONTEXT_PROPERTIESCONTEXT_NUM_DEVICESparam_value- a pointer to memory where the appropriate result being queried is returned. Ifparam_valueisNULL, it is ignored.param_value_size_ret- the actual size in bytes of data being queried byparam_value. IfNULL, it is ignored.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_CONTEXTifcontextis not a valid context.INVALID_VALUEifparam_nameis not one of the supported values or if size in bytes specified byparam_value_sizeis < size of return type andparam_valueis not aNULLvalue.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clCreateCommandQueue
public static long clCreateCommandQueue(long context, long device, long properties, @Nullable java.nio.IntBuffer errcode_ret)Reference Page - This function is deprecated after OpenCL 1.2
Creates a command-queue on a specific device.OpenCL objects such as memory, program and kernel objects are created using a context. Operations on these objects are performed using a command-queue. The command-queue can be used to queue a set of operations (referred to as commands) in order. Having multiple command-queues allows applications to queue multiple independent commands without requiring synchronization. Note that this should work as long as these objects are not being shared. Sharing of objects across multiple command-queues will require the application to perform appropriate synchronization.
- Parameters:
context- a valid OpenCL contextdevice- a device associated with context. It can either be in the list of devices specified when context is created usingCreateContextor have the same device type as device type specified when context is created usingCreateContextFromType.properties- a bit-field of properties for the command-queue. One of:QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLEQUEUE_PROFILING_ENABLEQUEUE_ON_DEVICEQUEUE_ON_DEVICE_DEFAULTerrcode_ret- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.- Returns:
- a valid non-zero command-queue and
errcode_retis set toSUCCESSif the command-queue is created successfully. Otherwise, it returns aNULLvalue with one of the following error values returned inerrcode_ret:INVALID_CONTEXTifcontextis not a valid context.INVALID_DEVICEifdeviceis not a valid device or is not associated withcontext.INVALID_VALUEif values specified inpropertiesare not valid.INVALID_QUEUE_PROPERTIESif values specified inpropertiesare valid but are not supported by the device.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clRetainCommandQueue
public static int clRetainCommandQueue(long command_queue)
Increments thecommand_queuereference count.CreateCommandQueueperforms an implicit retain. This is very helpful for 3rd party libraries, which typically get a command-queue passed to them by the application. However, it is possible that the application may delete the command-queue without informing the library. Allowing functions to attach to (i.e. retain) and release a command-queue solves the problem of a command-queue being used by a library no longer being valid.- Parameters:
command_queue- the command-queue to retain- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clReleaseCommandQueue
public static int clReleaseCommandQueue(long command_queue)
Decrements thecommand_queuereference count.After the
command_queuereference count becomes zero and all commands queued tocommand_queuehave finished (eg. kernel executions, memory object updates etc.), the command-queue is deleted.clReleaseCommandQueueperforms an implicit flush to issue any previously queued OpenCL commands in command_queue.- Parameters:
command_queue- the command-queue to release- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clGetCommandQueueInfo
public static int clGetCommandQueueInfo(long command_queue, int param_name, @Nullable java.nio.ByteBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetCommandQueueInfo(long command_queue, int param_name, @Nullable java.nio.IntBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetCommandQueueInfo(long command_queue, int param_name, @Nullable java.nio.LongBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetCommandQueueInfo(long command_queue, int param_name, @Nullable org.lwjgl.PointerBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Queries information about a command-queue.- Parameters:
command_queue- the command-queue being queriedparam_name- the information to query. One of:QUEUE_CONTEXTQUEUE_DEVICEQUEUE_REFERENCE_COUNTQUEUE_PROPERTIESQUEUE_SIZEQUEUE_DEVICE_DEFAULTparam_value- a pointer to memory where the appropriate result being queried is returned. Ifparam_valueisNULL, it is ignored.param_value_size_ret- the actual size in bytes of data being queried byparam_value. IfNULL, it is ignored.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.INVALID_VALUEifparam_nameis not one of the supported values or if size in bytes specified byparam_value_sizeis < size of return type andparam_valueis not aNULLvalue.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clCreateBuffer
public static long clCreateBuffer(long context, long flags, long size, @Nullable java.nio.IntBuffer errcode_ret)Creates a buffer object.- Parameters:
context- a valid OpenCL context used to create the buffer objectflags- a bit-field that is used to specify allocation and usage information such as the memory area that should be used to allocate the buffer object and how it will be used. If value specified for flags is 0, the default is used which isMEM_READ_WRITE. One of:MEM_READ_WRITEMEM_WRITE_ONLYMEM_READ_ONLYMEM_USE_HOST_PTRMEM_ALLOC_HOST_PTRMEM_COPY_HOST_PTRMEM_HOST_WRITE_ONLYMEM_HOST_READ_ONLYMEM_HOST_NO_ACCESSsize- the size in bytes of the buffer memory object to be allocatederrcode_ret- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.- Returns:
- a valid non-zero buffer object and
errcode_retis set toSUCCESSif the buffer object is created successfully. Otherwise, it returns aNULLvalue with one of the following error values returned inerrcode_ret:INVALID_CONTEXTifcontextis not a valid context.INVALID_VALUEif values specified in flags are not valid.INVALID_BUFFER_SIZEif size is 0. Implementations may returnINVALID_BUFFER_SIZEif size is greater thanDEVICE_MAX_MEM_ALLOC_SIZEvalue all devices in context.INVALID_HOST_PTRifhost_ptrisNULLandMEM_USE_HOST_PTRorMEM_COPY_HOST_PTRare set in flags or ifhost_ptris notNULLbutMEM_COPY_HOST_PTRorMEM_USE_HOST_PTRare not set in flags.MEM_OBJECT_ALLOCATION_FAILUREif there is a failure to allocate memory for buffer object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clCreateBuffer
public static long clCreateBuffer(long context, long flags, java.nio.ByteBuffer host_ptr, @Nullable java.nio.IntBuffer errcode_ret) public static long clCreateBuffer(long context, long flags, java.nio.ShortBuffer host_ptr, @Nullable java.nio.IntBuffer errcode_ret) public static long clCreateBuffer(long context, long flags, java.nio.IntBuffer host_ptr, @Nullable java.nio.IntBuffer errcode_ret) public static long clCreateBuffer(long context, long flags, java.nio.FloatBuffer host_ptr, @Nullable java.nio.IntBuffer errcode_ret) public static long clCreateBuffer(long context, long flags, java.nio.DoubleBuffer host_ptr, @Nullable java.nio.IntBuffer errcode_ret)Creates a buffer object.- Parameters:
context- a valid OpenCL context used to create the buffer objectflags- a bit-field that is used to specify allocation and usage information such as the memory area that should be used to allocate the buffer object and how it will be used. If value specified for flags is 0, the default is used which isMEM_READ_WRITE. One of:MEM_READ_WRITEMEM_WRITE_ONLYMEM_READ_ONLYMEM_USE_HOST_PTRMEM_ALLOC_HOST_PTRMEM_COPY_HOST_PTRMEM_HOST_WRITE_ONLYMEM_HOST_READ_ONLYMEM_HOST_NO_ACCESShost_ptr- a pointer to the buffer data that may already be allocated by the application. The size of the buffer thathost_ptrpoints to must be ≥sizebytes.errcode_ret- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.- Returns:
- a valid non-zero buffer object and
errcode_retis set toSUCCESSif the buffer object is created successfully. Otherwise, it returns aNULLvalue with one of the following error values returned inerrcode_ret:INVALID_CONTEXTifcontextis not a valid context.INVALID_VALUEif values specified in flags are not valid.INVALID_BUFFER_SIZEif size is 0. Implementations may returnINVALID_BUFFER_SIZEif size is greater thanDEVICE_MAX_MEM_ALLOC_SIZEvalue all devices in context.INVALID_HOST_PTRifhost_ptrisNULLandMEM_USE_HOST_PTRorMEM_COPY_HOST_PTRare set in flags or ifhost_ptris notNULLbutMEM_COPY_HOST_PTRorMEM_USE_HOST_PTRare not set in flags.MEM_OBJECT_ALLOCATION_FAILUREif there is a failure to allocate memory for buffer object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clEnqueueReadBuffer
public static int clEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, java.nio.ByteBuffer ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, java.nio.ShortBuffer ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, java.nio.IntBuffer ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, java.nio.FloatBuffer ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, java.nio.DoubleBuffer ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)Enqueues a command to read from a buffer object to host memory.Calling
clEnqueueReadBufferto read a region of the buffer object with theptrargument value set tohost_ptr + offset, wherehost_ptris a pointer to the memory region specified when the buffer object being read is created withMEM_USE_HOST_PTR, must meet the following requirements in order to avoid undefined behavior:- All commands that use this buffer object or a memory object (buffer or image) created from this buffer object have finished execution before the read command begins execution.
- The buffer object or memory objects created from this buffer object are not mapped.
- The buffer object or memory objects created from this buffer object are not used by any command-queue until the read command has finished execution.
- Parameters:
command_queue- the command-queue in which the read command will be queued.command_queueandbuffermust be created with the same OpenCL context.buffer- a valid buffer objectblocking_read- indicates if the read operation is blocking or non-blockingIf
blocking_readisTRUEi.e. the read command is blocking,clEnqueueReadBufferdoes not return until the buffer data has been read and copied into memory pointed to byptr.If
blocking_readisFALSEi.e. the read command is non-blocking,clEnqueueReadBufferqueues a non-blocking read command and returns. The contents of the buffer thatptrpoints to cannot be used until the read command has completed. Theeventargument 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 thatptrpoints to can be used by the application.offset- the offset in bytes in the buffer object to read fromptr- the pointer to buffer in host memory where data is to be read intoevent_wait_list- a list of events that need to complete before this particular command can be executed. Ifevent_wait_listisNULL, then this particular command does not wait on any event to complete. The events specified inevent_wait_listact as synchronization points. The context associated with events inevent_wait_listandcommand_queuemust be the same.event- Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.eventcan beNULLin which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If theevent_wait_listand theeventarguments are notNULL, the event argument should not refer to an element of theevent_wait_listarray.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.INVALID_CONTEXTif the context associated withcommand_queueandbufferare not the same or if the context associated withcommand_queueand events inevent_wait_listare not the same.INVALID_MEM_OBJECTifbufferis not a valid buffer object.INVALID_VALUEif the region being read specified by(offset, size)is out of bounds or ifptris aNULLvalue or ifsizeis 0.INVALID_EVENT_WAIT_LISTifevent_wait_listisNULLandnum_events_in_wait_list> 0, orevent_wait_listis notNULLandnum_events_in_wait_listis 0, or if event objects inevent_wait_listare not valid events.MISALIGNED_SUB_BUFFER_OFFSETifbufferis a sub-buffer object and offset specified when the sub-buffer object is created is not aligned toDEVICE_MEM_BASE_ADDR_ALIGNvalue for device associated with queue.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LISTif the read operation is blocking and the execution status of any of the events inevent_wait_listis a negative integer value.MEM_OBJECT_ALLOCATION_FAILUREif there is a failure to allocate memory for data store associated with buffer.INVALID_OPERATIONifclEnqueueReadBufferis called on buffer which has been created withMEM_HOST_WRITE_ONLYorMEM_HOST_NO_ACCESS.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clEnqueueWriteBuffer
public static int clEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, java.nio.ByteBuffer ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, java.nio.ShortBuffer ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, java.nio.IntBuffer ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, java.nio.FloatBuffer ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, java.nio.DoubleBuffer ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)Enqueues a command to write to a buffer object from host memory.Calling
clEnqueueWriteBufferto update the latest bits in a region of the buffer object with theptrargument value set tohost_ptr + offset, wherehost_ptris a pointer to the memory region specified when the buffer object being written is created withMEM_USE_HOST_PTR, must meet the following requirements in order to avoid undefined behavior:- The host memory region given by
(host_ptr + offset, cb)contains the latest bits when the enqueued write command begins execution. - The buffer object or memory objects created from this buffer object are not mapped.
- The buffer object or memory objects created from this buffer object are not used by any command-queue until the write command has finished execution.
- Parameters:
command_queue- the command-queue in which the write command will be queued.command_queueandbuffermust be created with the same OpenCL context.buffer- a valid buffer objectblocking_write- indicates if the write operation is blocking or non-blockingIf
blocking_writeisTRUE, the OpenCL implementation copies the data referred to byptrand enqueues the write operation in the command-queue. The memory pointed to byptrcan be reused by the application after theclEnqueueWriteBuffercall returns.If
blocking_writeisFALSE, the OpenCL implementation will useptrto perform a nonblocking write. As the write is non-blocking the implementation can return immediately. The memory pointed to byptrcannot be reused by the application after the call returns. Theeventargument 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 byptrcan then be reused by the application.offset- the offset in bytes in the buffer object to write toptr- the pointer to buffer in host memory where data is to be written fromevent_wait_list- a list of events that need to complete before this particular command can be executed. Ifevent_wait_listisNULL, then this particular command does not wait on any event to complete. The events specified inevent_wait_listact as synchronization points. The context associated with events inevent_wait_listandcommand_queuemust be the same.event- Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.eventcan beNULLin which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If theevent_wait_listand theeventarguments are notNULL, the event argument should not refer to an element of theevent_wait_listarray.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.INVALID_CONTEXTif the context associated withcommand_queueandbufferare not the same or if the context associated withcommand_queueand events inevent_wait_listare not the same.INVALID_MEM_OBJECTifbufferis not a valid buffer object.INVALID_VALUEif the region being written specified by(offset, size)is out of bounds or ifptris aNULLvalue or ifsizeis 0.INVALID_EVENT_WAIT_LISTifevent_wait_listisNULLandnum_events_in_wait_list> 0, orevent_wait_listis notNULLandnum_events_in_wait_listis 0, or if event objects inevent_wait_listare not valid events.MISALIGNED_SUB_BUFFER_OFFSETifbufferis a sub-buffer object and offset specified when the sub-buffer object is created is not aligned toDEVICE_MEM_BASE_ADDR_ALIGNvalue for device associated with queue.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LISTif the write operation is blocking and the execution status of any of the events inevent_wait_listis a negative integer value.MEM_OBJECT_ALLOCATION_FAILUREif there is a failure to allocate memory for data store associated with buffer.INVALID_OPERATIONifclEnqueueWriteBufferis called on buffer which has been created withMEM_HOST_READ_ONLYorMEM_HOST_NO_ACCESS.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
- The host memory region given by
-
clEnqueueCopyBuffer
public static int clEnqueueCopyBuffer(long command_queue, long src_buffer, long dst_buffer, long src_offset, long dst_offset, long size, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)Enqueues a command to copy a buffer object identified bysrc_bufferto another buffer object identified bydst_buffer.- Parameters:
command_queue- the command-queue in which the copy command will be queued. The OpenCL context associated withcommand_queue,src_bufferanddst_buffermust be the same.src_buffer- the source bufferdst_buffer- the destination buffersrc_offset- the offset where to begin copying data fromsrc_buffer.dst_offset- the offset where to begin copying data intodst_buffersize- the size in bytes to copyevent_wait_list- a list of events that need to complete before this particular command can be executed. Ifevent_wait_listisNULL, then this particular command does not wait on any event to complete. The events specified inevent_wait_listact as synchronization points. The context associated with events inevent_wait_listandcommand_queuemust be the same.event- Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.eventcan beNULLin which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If theevent_wait_listand theeventarguments are notNULL, the event argument should not refer to an element of theevent_wait_listarray.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.INVALID_CONTEXTif the context associated withcommand_queue,src_bufferanddst_bufferare not the same or if the context associated withcommand_queueand events inevent_wait_listare not the same.INVALID_MEM_OBJECTifsrc_bufferanddst_bufferare not valid buffer objects.INVALID_VALUEifsrc_offset,dst_offset,size,src_offset + sizeordst_offset + sizerequire accessing elements outside thesrc_bufferanddst_bufferbuffer objects respectively.INVALID_VALUEifsizeis 0.INVALID_EVENT_WAIT_LISTifevent_wait_listisNULLandnum_events_in_wait_list> 0, orevent_wait_listis notNULLandnum_events_in_wait_listis 0, or if event objects inevent_wait_listare not valid events.MISALIGNED_SUB_BUFFER_OFFSETifsrc_bufferis a sub-buffer object and offset specified when the sub-buffer object is created is not aligned toDEVICE_MEM_BASE_ADDR_ALIGNvalue for device associated with queue.MISALIGNED_SUB_BUFFER_OFFSETifdst_bufferis a sub-buffer object and offset specified when the sub-buffer object is created is not aligned toDEVICE_MEM_BASE_ADDR_ALIGNvalue for device associated with queue.MEM_COPY_OVERLAPifsrc_bufferanddst_bufferare the same buffer or sub-buffer object and the source and destination regions overlap or ifsrc_bufferanddst_bufferare different sub-buffers of the same associated buffer object and they overlap. The regions overlap ifsrc_offset ≤ dst_offset ≤ src_offset + size – 1or ifdst_offset ≤ src_offset ≤ dst_offset + size – 1.MEM_OBJECT_ALLOCATION_FAILUREif there is a failure to allocate memory for data store associated withsrc_bufferordst_buffer.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clEnqueueMapBuffer
@Nullable public static java.nio.ByteBuffer clEnqueueMapBuffer(long command_queue, long buffer, boolean blocking_map, long map_flags, long offset, long size, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event, @Nullable java.nio.IntBuffer errcode_ret, @Nullable java.nio.ByteBuffer old_buffer)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.The pointer returned maps a region starting at
offsetand is at leastsizebytes in size. The result of a memory access outside this region is undefined.If the buffer object is created with
MEM_USE_HOST_PTRset inmem_flags, the following will be true:- The
host_ptrspecified inCreateBufferis guaranteed to contain the latest bits in the region being mapped when theclEnqueueMapBuffercommand has completed. - The pointer value returned by
clEnqueueMapBufferwill be derived from thehost_ptrspecified when the buffer object is created.
Mapped buffer objects are unmapped using
EnqueueUnmapMemObject.- Parameters:
command_queue- a valid command-queuebuffer- a valid buffer object. The OpenCL context associated with command_queue and buffer must be the same.blocking_map- indicates if the map operation is blocking or non-blocking.If
blocking_mapisTRUE,clEnqueueMapBufferdoes 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 byclEnqueueMapBuffer.If
blocking_mapisFALSEi.e. map operation is non-blocking, the pointer to the mapped region returned byclEnqueueMapBuffercannot be used until the map command has completed. Theeventargument 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 byclEnqueueMapBuffer.map_flags- a bit-field. One of:MAP_READMAP_WRITEMAP_WRITE_INVALIDATE_REGIONoffset- the offset in bytes of the region in the buffer object that is being mappedsize- the size in bytes of the region in the buffer object that is being mappedevent_wait_list- a list of events that need to complete before this particular command can be executed. Ifevent_wait_listisNULL, then this particular command does not wait on any event to complete. The events specified inevent_wait_listact as synchronization points. The context associated with events inevent_wait_listandcommand_queuemust be the same.event- Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.eventcan beNULLin which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If theevent_wait_listand theeventarguments are notNULL, the event argument should not refer to an element of theevent_wait_listarray.errcode_ret- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.- Returns:
- a pointer to the mapped region. The
errcode_retis set toSUCCESS. ANULLpointer is returned otherwise with one of the following error values returned inerrcode_ret:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.INVALID_CONTEXTif context associated withcommand_queueandbufferare not the same or if the context associated withcommand_queueand events inevent_wait_listare not the same.INVALID_MEM_OBJECTifbufferis not a valid buffer object.INVALID_VALUEif region being mapped given by(offset, size)is out of bounds or ifsizeis 0 or if values specified inmap_flagsare not valid.INVALID_EVENT_WAIT_LISTifevent_wait_listisNULLandnum_events_in_wait_list> 0, orevent_wait_listis notNULLandnum_events_in_wait_listis 0, or if event objects inevent_wait_listare not valid events.MISALIGNED_SUB_BUFFER_OFFSETifbufferis a sub-buffer object and offset specified when the sub-buffer object is created is not aligned toDEVICE_MEM_BASE_ADDR_ALIGNvalue for device associated with queue.MAP_FAILUREif there is a failure to map the requested region into the host address space. This error cannot occur for buffer objects created withMEM_USE_HOST_PTRorMEM_ALLOC_HOST_PTR.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LISTif the map operation is blocking and the execution status of any of the events inevent_wait_listis a negative integer value.MEM_OBJECT_ALLOCATION_FAILUREif there is a failure to allocate memory for data store associated withbuffer.INVALID_OPERATIONif buffer has been created withMEM_HOST_WRITE_ONLYorMEM_HOST_NO_ACCESSandMAP_READis set inmap_flagsor ifbufferhas been created withMEM_HOST_READ_ONLYorMEM_HOST_NO_ACCESSandMAP_WRITEorMAP_WRITE_INVALIDATE_REGIONis set inmap_flags.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
- The
-
clCreateImage2D
public static long clCreateImage2D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_row_pitch, @Nullable java.nio.ByteBuffer host_ptr, @Nullable java.nio.IntBuffer errcode_ret) public static long clCreateImage2D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_row_pitch, @Nullable java.nio.ShortBuffer host_ptr, @Nullable java.nio.IntBuffer errcode_ret) public static long clCreateImage2D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_row_pitch, @Nullable java.nio.IntBuffer host_ptr, @Nullable java.nio.IntBuffer errcode_ret) public static long clCreateImage2D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_row_pitch, @Nullable java.nio.FloatBuffer host_ptr, @Nullable java.nio.IntBuffer errcode_ret)Reference Page - This function is deprecated after OpenCL 1.1
Creates a 2D image object.- Parameters:
context- a valid OpenCL context on which the image object is to be createdflags- a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:MEM_READ_WRITEMEM_WRITE_ONLYMEM_READ_ONLYMEM_USE_HOST_PTRMEM_ALLOC_HOST_PTRMEM_COPY_HOST_PTRMEM_HOST_WRITE_ONLYMEM_HOST_READ_ONLYMEM_HOST_NO_ACCESSimage_format- a pointer to aCLImageFormatstructure that describes format properties of the image to be allocatedimage_width- the width of the image in pixelsimage_height- the height of the image in pixelsimage_row_pitch- the scan-line pitch in bytes. This must be 0 ifhost_ptrisNULLand can be either 0 or ≥image_width * sizeof element in bytes ifhost_ptris notNULL. Ifhost_ptris notNULLandimage_row_pitch= 0,image_row_pitchis calculated asimage_width * size of elementin bytes. Ifimage_row_pitchis not 0, it must be a multiple of the image element size in bytes.host_ptr- a pointer to the image data that may already be allocated by the application. The size of the buffer thathost_ptrpoints 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 byhost_ptris stored as a linear sequence of adjacent scanlines. Each scanline is stored as a linear sequence of image elements.errcode_ret- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.- Returns:
- a valid non-zero image object and
errcode_retis set toSUCCESSif the image object is created successfully. Otherwise, it returns aNULLvalue with one of the following error values returned inerrcode_ret:INVALID_CONTEXTifcontextis not a valid context.INVALID_VALUEif values specified inflagsare not valid.INVALID_IMAGE_FORMAT_DESCRIPTORif values specified inimage_formatare not valid or ifimage_formatisNULL.INVALID_IMAGE_SIZEifimage_widthorimage_heightare 0 or if they exceed values specified inDEVICE_IMAGE2D_MAX_WIDTHorDEVICE_IMAGE2D_MAX_HEIGHTrespectively for all devices incontextor if values specified byimage_row_pitchdo not follow rules described in the argument description.INVALID_HOST_PTRifhost_ptrisNULLandMEM_USE_HOST_PTRorMEM_COPY_HOST_PTRare set in flags or ifhost_ptris notNULLbutMEM_COPY_HOST_PTRorMEM_USE_HOST_PTRare not set in flags.IMAGE_FORMAT_NOT_SUPPORTEDif theimage_formatis not supported.MEM_OBJECT_ALLOCATION_FAILUREif there is a failure to allocate memory for image object.INVALID_OPERATIONif there are no devices incontextthat support images (i.e.DEVICE_IMAGE_SUPPORTisFALSE).OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clCreateImage3D
public static long clCreateImage3D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, @Nullable java.nio.ByteBuffer host_ptr, @Nullable java.nio.IntBuffer errcode_ret) public static long clCreateImage3D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, @Nullable java.nio.ShortBuffer host_ptr, @Nullable java.nio.IntBuffer errcode_ret) public static long clCreateImage3D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, @Nullable java.nio.IntBuffer host_ptr, @Nullable java.nio.IntBuffer errcode_ret) public static long clCreateImage3D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, @Nullable java.nio.FloatBuffer host_ptr, @Nullable java.nio.IntBuffer errcode_ret)Reference Page - This function is deprecated after OpenCL 1.1
Creates a 3D image object.- Parameters:
context- a valid OpenCL context on which the image object is to be createdflags- a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:MEM_READ_WRITEMEM_WRITE_ONLYMEM_READ_ONLYMEM_USE_HOST_PTRMEM_ALLOC_HOST_PTRMEM_COPY_HOST_PTRMEM_HOST_WRITE_ONLYMEM_HOST_READ_ONLYMEM_HOST_NO_ACCESSimage_format- a pointer to aCLImageFormatstructure that describes format properties of the image to be allocatedimage_width- the width of the image in pixelsimage_height- the height of the image in pixelsimage_depth- the depth of the image in pixels. This must be a value > 1.image_row_pitch- the scan-line pitch in bytes. This must be 0 ifhost_ptrisNULLand can be either 0 or ≥image_width * sizeof element in bytes ifhost_ptris notNULL. Ifhost_ptris notNULLandimage_row_pitch= 0,image_row_pitchis calculated asimage_width * size of elementin bytes. Ifimage_row_pitchis not 0, it must be a multiple of the image element size in bytes.image_slice_pitch- the size in bytes of each 2D slice in the 3D image. This must be 0 ifhost_ptrisNULLand can be either 0 or ≥image_row_pitch * image_heightifhost_ptris notNULL. Ifhost_ptris notNULLandimage_slice_pitch = 0,image_slice_pitchis calculated asimage_row_pitch * image_height. Ifimage_slice_pitchis not 0, it must be a multiple of theimage_row_pitch.host_ptr- a pointer to the image data that may already be allocated by the application. The size of the buffer thathost_ptrpoints 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 byhost_ptris stored as a linear sequence of adjacent 2D slices. Each 2D slice is a linear sequence of adjacent scanlines. Each scanline is a linear sequence of image elements.errcode_ret- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.- Returns:
- a valid non-zero image object and
errcode_retis set toSUCCESSif the image object is created successfully. Otherwise, it returns aNULLvalue with one of the following error values returned inerrcode_ret:INVALID_CONTEXTifcontextis not a valid context.INVALID_VALUEif values specified inflagsare not valid.INVALID_IMAGE_FORMAT_DESCRIPTORif values specified inimage_formatare not valid or ifimage_formatisNULL.INVALID_IMAGE_SIZEifimage_width,image_heightare 0 or ifimage_depth≤ 1 or if they exceed values specified inDEVICE_IMAGE3D_MAX_WIDTH,DEVICE_IMAGE3D_MAX_HEIGHTorDEVICE_IMAGE3D_MAX_DEPTHrespectively for all devices incontextor if values specified byimage_row_pitchandimage_slice_pitchdo not follow rules described in the argument descriptions.INVALID_HOST_PTRifhost_ptrisNULLandMEM_USE_HOST_PTRorMEM_COPY_HOST_PTRare set in flags or ifhost_ptris notNULLbutMEM_COPY_HOST_PTRorMEM_USE_HOST_PTRare not set in flags.IMAGE_FORMAT_NOT_SUPPORTEDif theimage_formatis not supported.MEM_OBJECT_ALLOCATION_FAILUREif there is a failure to allocate memory for image object.INVALID_OPERATIONif there are no devices incontextthat support images (i.e.DEVICE_IMAGE_SUPPORTisFALSE).OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clGetSupportedImageFormats
public static int clGetSupportedImageFormats(long context, long flags, int image_type, @Nullable CLImageFormat.Buffer image_formats, @Nullable java.nio.IntBuffer num_image_formats)Can be used to get the list of image formats supported by an OpenCL implementation when the following information about an image memory object is specified:- Context
- Image type – 1D, 2D, or 3D image, 1D image buffer, 1D or 2D image array
- Image object allocation information
clGetSupportedImageFormatsreturns a union of image formats supported by all devices in the context.- Parameters:
context- a valid OpenCL context on which the image object(s) will be createdflags- a bit-field that is used to specify allocation and usage information about the image memory object being created. One of:MEM_READ_WRITEMEM_WRITE_ONLYMEM_READ_ONLYMEM_USE_HOST_PTRMEM_ALLOC_HOST_PTRMEM_COPY_HOST_PTRMEM_HOST_WRITE_ONLYMEM_HOST_READ_ONLYMEM_HOST_NO_ACCESSimage_type- the image type. One of:MEM_OBJECT_IMAGE1DMEM_OBJECT_IMAGE1D_BUFFERMEM_OBJECT_BUFFERMEM_OBJECT_IMAGE2DMEM_OBJECT_IMAGE3DMEM_OBJECT_IMAGE1D_ARRAYMEM_OBJECT_IMAGE2D_ARRAYMEM_OBJECT_PIPEimage_formats- a pointer to a memory location where the list of supported image formats are returned. Each entry describes aCLImageFormatstructure supported by the OpenCL implementation. Ifimage_formatsisNULL, it is ignored.num_image_formats- the actual number of supported image formats for a specific context and values specified byflags. Ifnum_image_formatsisNULL, it is ignored.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_CONTEXTifcontextis not a valid context.INVALID_VALUEifflagsorimage_typeare not valid, or ifnum_entriesis 0 andimage_formatsis notNULL.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clEnqueueReadImage
public static int clEnqueueReadImage(long command_queue, long image, boolean blocking_read, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long row_pitch, long slice_pitch, java.nio.ByteBuffer ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueReadImage(long command_queue, long image, boolean blocking_read, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long row_pitch, long slice_pitch, java.nio.ShortBuffer ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueReadImage(long command_queue, long image, boolean blocking_read, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long row_pitch, long slice_pitch, java.nio.IntBuffer ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueReadImage(long command_queue, long image, boolean blocking_read, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long row_pitch, long slice_pitch, java.nio.FloatBuffer ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueReadImage(long command_queue, long image, boolean blocking_read, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long row_pitch, long slice_pitch, java.nio.DoubleBuffer ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)Enqueues a command to read from an image or image array object to host memory.Calling
clEnqueueReadImageto read a region of the image with theptrargument value set tohost_ptr + (origin[2] * image slice pitch + origin[1] * image row pitch + origin[0] * bytes per pixel), wherehost_ptris a pointer to the memory region specified when the image being read is created withMEM_USE_HOST_PTR, must meet the following requirements in order to avoid undefined behavior:- All commands that use this image object have finished execution before the read command begins execution.
- The row_pitch and slice_pitch argument values in clEnqueueReadImage must be set to the image row pitch and slice pitch.
- The image object is not mapped.
- The image object is not used by any command-queue until the read command has finished execution.
- Parameters:
command_queue- the command-queue in which the read command will be queued.command_queueandimagemust be created with the same OpenCL context.image- a valid image or image array objectblocking_read- indicates if the read operation is blocking or non-blocking.If
blocking_readisTRUEi.e. the read command is blocking,clEnqueueReadImagedoes not return until the buffer data has been read and copied into memory pointed to byptr.If
blocking_readisFALSEi.e. the read command is non-blocking,clEnqueueReadImagequeues a non-blocking read command and returns. The contents of the buffer thatptrpoints to cannot be used until the read command has completed. Theeventargument 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 thatptrpoints to can be used by the application.origin- defines the(x, y, z)offset in pixels in the 1D, 2D or 3D image, the(x, y)offset and the image index in the 2D image array or the(x)offset and the image index in the 1D image array. Ifimageis a 2D image object,origin[2]must be 0. Ifimageis a 1D image or 1D image buffer object,origin[1]andorigin[2]must be 0. Ifimageis a 1D image array object,origin[2]must be 0. Ifimageis a 1D image array object,origin[1]describes the image index in the 1D image array. Ifimageis a 2D image array object,origin[2]describes the image index in the 2D image array.region- defines the(width, height, depth)in pixels of the 1D, 2D or 3D rectangle, the(width, height)in pixels of the 2D rectangle and the number of images of a 2D image array or the(width)in pixels of the 1D rectangle and the number of images of a 1D image array. Ifimageis a 2D image object,region[2]must be 1. Ifimageis a 1D image or 1D image buffer object,region[1]andregion[2]must be 1. Ifimageis a 1D image array object,region[2]must be 1. The values inregioncannot be 0.row_pitch- the length of each row in bytes. This value must be greater than or equal to theelement size in bytes * width. Ifrow_pitchis set to 0, the appropriate row pitch is calculated based on the size of each element in bytes multiplied bywidth.slice_pitch- the size in bytes of the 2D slice of the 3D region of a 3D image or each image of a 1D or 2D image array being read. This must be 0 ifimageis a 1D or 2D image. This value must be greater than or equal torow_pitch * height. Ifslice_pitchis set to 0, the appropriate slice pitch is calculated based on therow_pitch * height.ptr- the pointer to a buffer in host memory where image data is to be read toevent_wait_list- a list of events that need to complete before this particular command can be executed. Ifevent_wait_listisNULL, then this particular command does not wait on any event to complete. The events specified inevent_wait_listact as synchronization points. The context associated with events inevent_wait_listandcommand_queuemust be the same.event- Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.eventcan beNULLin which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If theevent_wait_listand theeventarguments are notNULL, the event argument should not refer to an element of theevent_wait_listarray.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.INVALID_CONTEXTif the context associated withcommand_queueandimageare not the same or if the context associated withcommand_queueand events inevent_wait_listare not the same.INVALID_MEM_OBJECTifimageis not a valid image object.INVALID_VALUEif the region being read specified byoriginandregionis out of bounds or ifptris aNULLvalue.INVALID_VALUEif values inoriginandregiondo not follow rules described in the argument description fororiginandregion.INVALID_EVENT_WAIT_LISTifevent_wait_listisNULLandnum_events_in_wait_list> 0, orevent_wait_listis notNULLandnum_events_in_wait_listis 0, or if event objects inevent_wait_listare not valid events.INVALID_IMAGE_SIZEif image dimensions (image width, height, specified or compute row and/or slice pitch) forimageare not supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTEDif image format (image channel order and data type) forimageare not supported by device associated with queue.MEM_OBJECT_ALLOCATION_FAILUREif there is a failure to allocate memory for data store associated withimage.INVALID_OPERATIONif the device associated withcommand_queuedoes not support images (i.e.DEVICE_IMAGE_SUPPORTisFALSE).INVALID_OPERATIONifclEnqueueReadImageis called on image which has been created withMEM_HOST_WRITE_ONLYorMEM_HOST_NO_ACCESS.INVALID_OPERATIONifclEnqueueWriteImageis called on image which has been created withMEM_HOST_READ_ONLYorMEM_HOST_NO_ACCESS.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LISTif the read operation is blocking and the execution status of any of the events inevent_wait_listis a negative integer value.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clEnqueueWriteImage
public static int clEnqueueWriteImage(long command_queue, long image, boolean blocking_write, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long input_row_pitch, long input_slice_pitch, java.nio.ByteBuffer ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueWriteImage(long command_queue, long image, boolean blocking_write, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long input_row_pitch, long input_slice_pitch, java.nio.ShortBuffer ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueWriteImage(long command_queue, long image, boolean blocking_write, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long input_row_pitch, long input_slice_pitch, java.nio.IntBuffer ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueWriteImage(long command_queue, long image, boolean blocking_write, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long input_row_pitch, long input_slice_pitch, java.nio.FloatBuffer ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueWriteImage(long command_queue, long image, boolean blocking_write, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long input_row_pitch, long input_slice_pitch, java.nio.DoubleBuffer ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)Enqueues a command to write to an image or image array object from host memory.Calling
clEnqueueWriteImageto update the latest bits in a region of the image with theptrargument value set tohost_ptr + (origin[2] * image slice pitch + origin[1] * image row pitch + origin[0] * bytes per pixel), wherehost_ptris a pointer to the memory region specified when the image being written is created withMEM_USE_HOST_PTR, must meet the following requirements in order to avoid undefined behavior:- The host memory region being written contains the latest bits when the enqueued write command begins execution.
- The input_row_pitch and input_slice_pitch argument values in clEnqueueWriteImage must be set to the image row pitch and slice pitch.
- The image object is not mapped.
- The image object is not used by any command-queue until the write command has finished execution.
- Parameters:
command_queue- the command-queue in which the write command will be queued.command_queueandimagemust be created with the same OpenCL context.image- a valid image or image array objectblocking_write- indicates if the read operation is blocking or non-blocking.If
blocking_writeisTRUE, the OpenCL implementation copies the data referred to byptrand enqueues the write command in the command-queue. The memory pointed to byptrcan be reused by the application after theclEnqueueWriteImagecall returns.If
blocking_writeisFALSE, the OpenCL implementation will useptrto perform a non-blocking write. As the write is non-blocking the implementation can return immediately. The memory pointed to byptrcannot be reused by the application after the call returns. Theeventargument 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 byptrcan then be reused by the application.origin- defines the(x, y, z)offset in pixels in the 1D, 2D or 3D image, the(x, y)offset and the image index in the 2D image array or the(x)offset and the image index in the 1D image array. Ifimageis a 2D image object,origin[2]must be 0. Ifimageis a 1D image or 1D image buffer object,origin[1]andorigin[2]must be 0. Ifimageis a 1D image array object,origin[2]must be 0. Ifimageis a 1D image array object,origin[1]describes the image index in the 1D image array. Ifimageis a 2D image array object,origin[2]describes the image index in the 2D image array.region- defines the(width, height, depth)in pixels of the 1D, 2D or 3D rectangle, the(width, height)in pixels of the 2D rectangle and the number of images of a 2D image array or the(width)in pixels of the 1D rectangle and the number of images of a 1D image array. Ifimageis a 2D image object,region[2]must be 1. Ifimageis a 1D image or 1D image buffer object,region[1]andregion[2]must be 1. Ifimageis a 1D image array object,region[2]must be 1. The values inregioncannot be 0.input_row_pitch- the length of each row in bytes. This value must be greater than or equal to theelement size in bytes * width. Ifinput_row_pitchis set to 0, the appropriate row pitch is calculated based on the size of each element in bytes multiplied bywidth.input_slice_pitch- the size in bytes of the 2D slice of the 3D region of a 3D image or each image of a 1D or 2D image array being written. This must be 0 ifimageis a 1D or 2D image. This value must be greater than or equal toinput_row_pitch * height. Ifinput_slice_pitchis set to 0, the appropriate slice pitch is calculated based on theinput_row_pitch * height.ptr- the pointer to a buffer in host memory where image data is to be written fromevent_wait_list- a list of events that need to complete before this particular command can be executed. Ifevent_wait_listisNULL, then this particular command does not wait on any event to complete. The events specified inevent_wait_listact as synchronization points. The context associated with events inevent_wait_listandcommand_queuemust be the same.event- Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.eventcan beNULLin which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If theevent_wait_listand theeventarguments are notNULL, the event argument should not refer to an element of theevent_wait_listarray.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.INVALID_CONTEXTif the context associated withcommand_queueandimageare not the same or if the context associated withcommand_queueand events inevent_wait_listare not the same.INVALID_MEM_OBJECTifimageis not a valid image object.INVALID_VALUEif the region being written specified byoriginandregionis out of bounds or ifptris aNULLvalue.INVALID_VALUEif values inoriginandregiondo not follow rules described in the argument description fororiginandregion.INVALID_EVENT_WAIT_LISTifevent_wait_listisNULLandnum_events_in_wait_list> 0, orevent_wait_listis notNULLandnum_events_in_wait_listis 0, or if event objects inevent_wait_listare not valid events.INVALID_IMAGE_SIZEif image dimensions (image width, height, specified or compute row and/or slice pitch) forimageare not supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTEDif image format (image channel order and data type) forimageare not supported by device associated with queue.MEM_OBJECT_ALLOCATION_FAILUREif there is a failure to allocate memory for data store associated withimage.INVALID_OPERATIONif the device associated withcommand_queuedoes not support images (i.e.DEVICE_IMAGE_SUPPORTisFALSE).INVALID_OPERATIONifclEnqueueReadImageis called on image which has been created withMEM_HOST_WRITE_ONLYorMEM_HOST_NO_ACCESS.INVALID_OPERATIONifclEnqueueWriteImageis called on image which has been created withMEM_HOST_READ_ONLYorMEM_HOST_NO_ACCESS.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LISTif the write operation is blocking and the execution status of any of the events inevent_wait_listis a negative integer value.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clEnqueueCopyImage
public static int clEnqueueCopyImage(long command_queue, long src_image, long dst_image, org.lwjgl.PointerBuffer src_origin, org.lwjgl.PointerBuffer dst_origin, org.lwjgl.PointerBuffer region, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)Enqueues a command to copy image objects.src_imageanddst_imagecan be 1D, 2D, 3D image or a 1D, 2D image array objects allowing us to perform the following actions:- Copy a 1D image object to a 1D image object.
- Copy a 1D image object to a scanline of a 2D image object and vice-versa.
- Copy a 1D image object to a scanline of a 2D slice of a 3D image object and vice-versa.
- Copy a 1D image object to a scanline of a specific image index of a 1D or 2D image array object and vice-versa.
- Copy a 2D image object to a 2D image object.
- Copy a 2D image object to a 2D slice of a 3D image object and vice-versa.
- Copy a 2D image object to a specific image index of a 2D image array object and vice-versa.
- Copy images from a 1D image array object to a 1D image array object.
- Copy images from a 2D image array object to a 2D image array object.
- Copy a 3D image object to a 3D image object.
- Parameters:
command_queue- the command-queue in which the copy command will be queued. The OpenCL context associated withcommand_queue,src_imageanddst_imagemust be the same.src_image-dst_image-src_origin- the(x, y, z)offset in pixels in the 1D, 2D or 3D image, the(x, y)offset and the image index in the 2D image array or the(x)offset and the image index in the 1D image array. Ifsrc_imageis a 2D image object,src_origin[2]must be 0. Ifsrc_imageis a 1D image object,src_origin[1]andsrc_origin[2]must be 0. Ifsrc_imageis a 1D image array object,src_origin[2]must be 0. Ifsrc_imageis a 1D image array object,src_origin[1]describes the image index in the 1D image array. Ifsrc_imageis a 2D image array object,src_origin[2]describes the image index in the 2D image array.dst_origin- the(x, y, z)offset in pixels in the 1D, 2D or 3D image, the(x, y)offset and the image index in the 2D image array or the(x)offset and the image index in the 1D image array. Ifdst_imageis a 2D image object,dst_origin[2]must be 0. Ifdst_imageis a 1D image or 1D image buffer object,dst_origin[1]anddst_origin[2]must be 0. Ifdst_imageis a 1D image array object,dst_origin[2]must be 0. Ifdst_imageis a 1D image array object,dst_origin[1]describes the image index in the 1D image array. Ifdst_imageis a 2D image array object,dst_origin[2]describes the image index in the 2D image array.region- the(width, height, depth)in pixels of the 1D, 2D or 3D rectangle, the(width, height)in pixels of the 2D rectangle and the number of images of a 2D image array or the(width)in pixels of the 1D rectangle and the number of images of a 1D image array. Ifsrc_imageordst_imageis a 2D image object,region[2]must be 1. Ifsrc_imageordst_imageis a 1D image or 1D image buffer object,region[1]andregion[2]must be 1. Ifsrc_imageordst_imageis a 1D image array object,region[2]must be 1. The values inregioncannot be 0.event_wait_list- a list of events that need to complete before this particular command can be executed. Ifevent_wait_listisNULL, then this particular command does not wait on any event to complete. The events specified inevent_wait_listact as synchronization points. The context associated with events inevent_wait_listandcommand_queuemust be the same.event- Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.eventcan beNULLin which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If theevent_wait_listand theeventarguments are notNULL, the event argument should not refer to an element of theevent_wait_listarray.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.INVALID_CONTEXTif the context associated withcommand_queue,src_imageanddst_imageare not the same or if the context associated withcommand_queueand events inevent_wait_listare not the same.INVALID_MEM_OBJECTifsrc_imageanddst_imageare not valid image objects.IMAGE_FORMAT_MISMATCHifsrc_imageanddst_imagedo not use the same image format.INVALID_VALUEif the 2D or 3D rectangular region specified bysrc_originandsrc_origin + regionrefers to a region outsidesrc_image, or if the 2D or 3D rectangular region specified bydst_originanddst_origin + regionrefers to a region outsidedst_image.INVALID_VALUEif values insrc_origin,dst_originandregiondo not follow rules described in the argument description forsrc_origin,dst_originandregion.INVALID_EVENT_WAIT_LISTifevent_wait_listisNULLandnum_events_in_wait_list> 0, orevent_wait_listis notNULLandnum_events_in_wait_listis 0, or if event objects inevent_wait_listare not valid events.INVALID_IMAGE_SIZEif image dimensions (image width, height, specified or compute row and/or slice pitch) forsrc_imageordst_imageare not supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTEDif image format (image channel order and data type) forsrc_imageordst_imageare not supported by device associated with queue.MEM_OBJECT_ALLOCATION_FAILUREif there is a failure to allocate memory for data store associated withsrc_imageordst_image.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.INVALID_OPERATIONif the device associated withcommand_queuedoes not support images (i.e.DEVICE_IMAGE_SUPPORTisFALSE).MEM_COPY_OVERLAPifsrc_imageanddst_imageare the same image object and the source and destination regions overlap.
-
clEnqueueCopyImageToBuffer
public static int clEnqueueCopyImageToBuffer(long command_queue, long src_image, long dst_buffer, org.lwjgl.PointerBuffer src_origin, org.lwjgl.PointerBuffer region, long dst_offset, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)Enqueues a command to copy an image object to a buffer object.- Parameters:
command_queue- a valid command-queue. The OpenCL context associated withcommand_queue,src_imageanddst_buffermust be the same.src_image- a valid image objectdst_buffer- a valid buffer objectsrc_origin- the(x, y, z)offset in pixels in the 1D, 2D or 3D image, the(x, y)offset and the image index in the 2D image array or the(x)offset and the image index in the 1D image array. Ifsrc_imageis a 2D image object,src_origin[2]must be 0. Ifsrc_imageis a 1D image object,src_origin[1]andsrc_origin[2]must be 0. Ifsrc_imageis a 1D image array object,src_origin[2]must be 0. Ifsrc_imageis a 1D image array object,src_origin[1]describes the image index in the 1D image array. Ifsrc_imageis a 2D image array object,src_origin[2]describes the image index in the 2D image array.region- the(width, height, depth)in pixels of the 1D, 2D or 3D rectangle, the(width, height)in pixels of the 2D rectangle and the number of images of a 2D image array or the(width)in pixels of the 1D rectangle and the number of images of a 1D image array. Ifsrc_imageis a 2D image object,region[2]must be 1. Ifsrc_imageis a 1D image or 1D image buffer object,region[1]andregion[2]must be 1. Ifsrc_imageis a 1D image array object,region[2]must be 1. The values inregioncannot be 0.dst_offset- the offset where to begin copying data intodst_buffer. The size in bytes of the region to be copied referred to asdst_cbis computed aswidth * height * depth * bytes/image elementifsrc_imageis a 3D image object, is computed aswidth * height * bytes/image elementifsrc_imageis a 2D image, is computed aswidth * height * arraysize * bytes/image elementifsrc_imageis a 2D image array object, is computed aswidth * bytes/image elementifsrc_imageis a 1D image or 1D image buffer object and is computed aswidth * arraysize * bytes/image elementifsrc_imageis a 1D image array object.event_wait_list- a list of events that need to complete before this particular command can be executed. Ifevent_wait_listisNULL, then this particular command does not wait on any event to complete. The events specified inevent_wait_listact as synchronization points. The context associated with events inevent_wait_listandcommand_queuemust be the same.event- Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.eventcan beNULLin which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If theevent_wait_listand theeventarguments are notNULL, the event argument should not refer to an element of theevent_wait_listarray.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.INVALID_CONTEXTif the context associated withcommand_queue,src_imageanddst_bufferare not the same or if the context associated withcommand_queueand events inevent_wait_listare not the same.INVALID_MEM_OBJECTifsrc_imageis not a valid image object ordst_bufferis not a valid buffer object or ifsrc_imageis a 1D image buffer object created fromdst_buffer.INVALID_VALUEif the 1D, 2D or 3D rectangular region specified bysrc_originandsrc_origin + regionrefers to a region outsidesrc_image, or if the region specified bydst_offsetanddst_offset + dst_cbto a region outsidedst_buffer.INVALID_VALUEif values insrc_originand region do not follow rules described in the argument description forsrc_originandregion.INVALID_EVENT_WAIT_LISTifevent_wait_listisNULLandnum_events_in_wait_list> 0, orevent_wait_listis notNULLandnum_events_in_wait_listis 0, or if event objects inevent_wait_listare not valid events.MISALIGNED_SUB_BUFFER_OFFSETifdst_bufferis a sub-buffer object and offset specified when the sub-buffer object is created is not aligned toDEVICE_MEM_BASE_ADDR_ALIGNvalue for device associated with queue.INVALID_IMAGE_SIZEif image dimensions (image width, height, specified or compute row and/or slice pitch) forsrc_imageare not supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTEDif image format (image channel order and data type) forsrc_imageare not supported by device associated with queue.MEM_OBJECT_ALLOCATION_FAILUREif there is a failure to allocate memory for data store associated withsrc_imageordst_buffer.INVALID_OPERATIONif the device associated withcommand_queuedoes not support images (i.e.DEVICE_IMAGE_SUPPORTisFALSE).OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clEnqueueCopyBufferToImage
public static int clEnqueueCopyBufferToImage(long command_queue, long src_buffer, long dst_image, long src_offset, org.lwjgl.PointerBuffer dst_origin, org.lwjgl.PointerBuffer region, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)Enqueues a command to copy a buffer object to an image object.- Parameters:
command_queue- a valid command-queue. The OpenCL context associated withcommand_queue,src_bufferanddst_imagemust be the same.src_buffer- a valid buffer objectdst_image- a valid image objectsrc_offset- the offset where to begin copying data fromsrc_bufferdst_origin- the(x, y, z)offset in pixels in the 1D, 2D or 3D image, the(x, y)offset and the image index in the 2D image array or the(x)offset and the image index in the 1D image array. Ifdst_imageis a 2D image object,dst_origin[2]must be 0. Ifdst_imageis a 1D image or 1D image buffer object,dst_origin[1]anddst_origin[2]must be 0. Ifdst_imageis a 1D image array object,dst_origin[2]must be 0. Ifdst_imageis a 1D image array object,dst_origin[1]describes the image index in the 1D image array. Ifdst_imageis a 2D image array object,dst_origin[2]describes the image index in the 2D image array.region- the(width, height, depth)in pixels of the 1D, 2D or 3D rectangle, the(width, height)in pixels of the 2D rectangle and the number of images of a 2D image array or the(width)in pixels of the 1D rectangle and the number of images of a 1D image array. Ifdst_imageis a 2D image object,region[2]must be 1. Ifdst_imageis a 1D image or 1D image buffer object,region[1]andregion[2]must be 1. Ifdst_imageis a 1D image array object,region[2]must be 1. The values inregioncannot be 0.event_wait_list- a list of events that need to complete before this particular command can be executed. Ifevent_wait_listisNULL, then this particular command does not wait on any event to complete. The events specified inevent_wait_listact as synchronization points. The context associated with events inevent_wait_listandcommand_queuemust be the same.event- Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.eventcan beNULLin which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If theevent_wait_listand theeventarguments are notNULL, the event argument should not refer to an element of theevent_wait_listarray.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.INVALID_CONTEXTif the context associated withcommand_queue,src_bufferanddst_imageare not the same or if the context associated withcommand_queueand events inevent_wait_listare not the same.INVALID_MEM_OBJECTifsrc_bufferis not a valid buffer object ordst_imageis not a valid image object or ifdst_imageis a 1D image buffer object created fromsrc_buffer.INVALID_VALUEif the 1D, 2D or 3D rectangular region specified bydst_originanddst_origin + regionrefer to a region outsidedst_image, or if the region specified bysrc_offsetandsrc_offset + src_cb referto a region outsidesrc_buffer.INVALID_VALUEif values indst_originandregiondo not follow rules described in the argument description fordst_originandregion.INVALID_EVENT_WAIT_LISTifevent_wait_listisNULLandnum_events_in_wait_list> 0, orevent_wait_listis notNULLandnum_events_in_wait_listis 0, or if event objects inevent_wait_listare not valid events.MISALIGNED_SUB_BUFFER_OFFSETifsrc_bufferis a sub-buffer object and offset specified when the sub-buffer object is created is not aligned toDEVICE_MEM_BASE_ADDR_ALIGNvalue for device associated with queue.INVALID_IMAGE_SIZEif image dimensions (image width, height, specified or compute row and/or slice pitch) fordst_imageare not supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTEDif image format (image channel order and data type) fordst_imageare not supported by device associated with queue.MEM_OBJECT_ALLOCATION_FAILUREif there is a failure to allocate memory for data store associated withsrc_bufferordst_image.INVALID_OPERATIONif the device associated withcommand_queuedoes not support images (i.e.DEVICE_IMAGE_SUPPORTisFALSE).OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clEnqueueMapImage
@Nullable public static java.nio.ByteBuffer clEnqueueMapImage(long command_queue, long image, boolean blocking_map, long map_flags, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, org.lwjgl.PointerBuffer image_row_pitch, @Nullable org.lwjgl.PointerBuffer image_slice_pitch, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event, @Nullable java.nio.IntBuffer errcode_ret, @Nullable java.nio.ByteBuffer old_buffer) @Nullable public static java.nio.ByteBuffer clEnqueueMapImage(long command_queue, long image, boolean blocking_map, long map_flags, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, org.lwjgl.PointerBuffer image_row_pitch, @Nullable org.lwjgl.PointerBuffer image_slice_pitch, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event, @Nullable java.nio.IntBuffer errcode_ret, long length, @Nullable java.nio.ByteBuffer old_buffer)Enqueues a command to map a region in the image object given byimageinto the host address space and returns a pointer to this mapped region.The pointer returned maps a 1D, 2D or 3D region starting at
originand is at leastregion[0]pixels in size for a 1D image, 1D image buffer or 1D image array,(image_row_pitch * region[1])pixels in size for a 2D image or 2D image array, and(image_slice_pitch * region[2])pixels in size for a 3D image. The result of a memory access outside this region is undefined.If the image object is created with
MEM_USE_HOST_PTRset inmem_flags, the following will be true:- The
host_ptrspecified inCreateImageis guaranteed to contain the latest bits in the region being mapped when theclEnqueueMapImagecommand has completed. - The pointer value returned by
clEnqueueMapImagewill be derived from thehost_ptrspecified when the image object is created.
Mapped image objects are unmapped using
EnqueueUnmapMemObject.- Parameters:
command_queue- a valid command-queueimage- a valid image object. The OpenCL context associated withcommand_queueandimagemust be the same.blocking_map- indicates if the map operation is blocking or non-blocking.If
blocking_mapisTRUE,clEnqueueMapImagedoes 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 byclEnqueueMapImage.If
blocking_mapisFALSEi.e. map operation is non-blocking, the pointer to the mapped region returned byclEnqueueMapImagecannot be used until the map command has completed. Theeventargument 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 byclEnqueueMapImage.map_flags- a bit-field. One of:MAP_READMAP_WRITEMAP_WRITE_INVALIDATE_REGIONorigin- 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. Ifimageis a 2D image object,origin[2]must be 0. Ifimageis a 1D image or 1D image buffer object,origin[1]andorigin[2]must be 0. Ifimageis a 1D image array object,origin[2]must be 0. Ifimageis a 1D image array object,origin[1]describes the image index in the 1D image array. Ifimageis a 2D image array object,origin[2]describes the image index in the 2D image array.region- the(width, height, depth)in pixels of the 1D, 2D or 3D rectangle, the(width, height)in pixels of the 2D rectangle and the number of images of a 2D image array or the(width)in pixels of the 1D rectangle and the number of images of a 1D image array. Ifimageis a 2D image object,region[2]must be 1. Ifimageis a 1D image or 1D image buffer object,region[1]andregion[2]must be 1. Ifimageis a 1D image array object,region[2]must be 1. The values inregioncannot be 0.image_row_pitch- the scan-line pitch in bytes for the mapped region. This must be a non-NULLvalue.image_slice_pitch- returns the size in bytes of each 2D slice of a 3D image or the size of each 1D or 2D image in a 1D or 2D image array for the mapped region. For a 1D and 2D image, zero is returned if this argument is notNULL. For a 3D image, 1D and 2D image array,image_slice_pitchmust be a non-NULLvalue.event_wait_list- a list of events that need to complete before this particular command can be executed. Ifevent_wait_listisNULL, then this particular command does not wait on any event to complete. The events specified inevent_wait_listact as synchronization points. The context associated with events inevent_wait_listandcommand_queuemust be the same.event- Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.eventcan beNULLin which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If theevent_wait_listand theeventarguments are notNULL, the event argument should not refer to an element of theevent_wait_listarray.errcode_ret- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.- Returns:
- a pointer to the mapped region. The
errcode_retis set toSUCCESS. ANULLpointer is returned otherwise with one of the following error values returned inerrcode_ret:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.INVALID_CONTEXTif context associated withcommand_queueand image are not the same or if context associated withcommand_queueand events inevent_wait_listare not the same.INVALID_MEM_OBJECTifimageis not a valid image object.INVALID_VALUEif region being mapped given by(origin, origin+region)is out of bounds or if values specified inmap_flagsare not valid.INVALID_VALUEif values inoriginandregiondo not follow rules described in the argument description fororiginandregion.INVALID_VALUEifimage_row_pitchisNULL.INVALID_VALUEifimageis a 3D image, 1D or 2D image array object andimage_slice_pitchisNULL.INVALID_EVENT_WAIT_LISTifevent_wait_listisNULLandnum_events_in_wait_list> 0, orevent_wait_listis notNULLandnum_events_in_wait_listis 0, or if event objects inevent_wait_listare not valid events.INVALID_IMAGE_SIZEif image dimensions (image width, height, specified or compute row and/or slice pitch) forimageare not supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTEDif image format (image channel order and data type) forimageare not supported by device associated with queue.MAP_FAILUREif there is a failure to map the requested region into the host address space. This error cannot occur for image objects created withMEM_USE_HOST_PTRorMEM_ALLOC_HOST_PTR.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LISTif the map operation is blocking and the execution status of any of the events inevent_wait_listis a negative integer value.MEM_OBJECT_ALLOCATION_FAILUREif there is a failure to allocate memory for data store associated withimage.INVALID_OPERATIONif the device associated withcommand_queuedoes not support images (i.e.DEVICE_IMAGE_SUPPORTisFALSE).INVALID_OPERATIONifimagehas been created withMEM_HOST_WRITE_ONLYorMEM_HOST_NO_ACCESSandMAP_READis set inmap_flagsor if image has been created withMEM_HOST_READ_ONLYorMEM_HOST_NO_ACCESSandMAP_WRITEorMAP_WRITE_INVALIDATE_REGIONis set inmap_flags.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
- The
-
clGetImageInfo
public static int clGetImageInfo(long image, int param_name, @Nullable java.nio.ByteBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetImageInfo(long image, int param_name, @Nullable java.nio.IntBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetImageInfo(long image, int param_name, @Nullable org.lwjgl.PointerBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Returns information specific to an image object.- Parameters:
image- the image object being queriedparam_name- the information to query. One of:IMAGE_FORMATIMAGE_ELEMENT_SIZEIMAGE_ROW_PITCHIMAGE_SLICE_PITCHIMAGE_WIDTHIMAGE_HEIGHTIMAGE_DEPTHIMAGE_ARRAY_SIZEIMAGE_BUFFERIMAGE_NUM_MIP_LEVELSIMAGE_NUM_SAMPLESparam_value- a pointer to memory where the appropriate result being queried is returned. Ifparam_valueisNULL, it is ignored.param_value_size_ret- the actual size in bytes of data being queried byparam_value. IfNULL, it is ignored.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_VALUEifparam_nameis not valid, or if size in bytes specified byparam_value_sizeis < size of return type andparam_valueis notNULL.INVALID_MEM_OBJECTifimageis a not a valid image object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clRetainMemObject
public static int clRetainMemObject(long memobj)
Increments thememobjreference count.CreateBuffer,CreateSubBufferandCreateImageperform an implicit retain.- Parameters:
memobj- the memory object to retain- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_MEM_OBJECTifmemobjis not a valid memory object (buffer or image object).OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clReleaseMemObject
public static int clReleaseMemObject(long memobj)
Decrements thememobjreference count.After the
memobjreference count becomes zero and commands queued for execution on a command-queue(s) that usememobjhave finished, the memory object is deleted. Ifmemobjis a buffer object,memobjcannot be deleted until all sub-buffer objects associated withmemobjare deleted.- Parameters:
memobj- the memory object to release- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_MEM_OBJECTifmemobjis not a valid memory object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clEnqueueUnmapMemObject
public static int clEnqueueUnmapMemObject(long command_queue, long memobj, java.nio.ByteBuffer mapped_ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)Enqueues a command to unmap a previously mapped region of a memory object. Reads or writes from the host using the pointer returned byEnqueueMapBufferorEnqueueMapImageare considered to be complete.EnqueueMapBuffer, andEnqueueMapImageincrements the mapped count of the memory object. The initial mapped count value of the memory object is zero. Multiple calls toEnqueueMapBuffer, orEnqueueMapImageon the same memory object will increment this mapped count by appropriate number of calls.clEnqueueUnmapMemObjectdecrements the mapped count of the memory object.EnqueueMapBuffer, andEnqueueMapImageact as synchronization points for a region of the buffer object being mapped.- Parameters:
command_queue- a valid command-queuememobj- a valid memory object. The OpenCL context associated withcommand_queueandmemobjmust be the same.mapped_ptr- the host address returned by a previous call toEnqueueMapBuffer, orEnqueueMapImageformemobjevent_wait_list- a list of events that need to complete before this particular command can be executed. Ifevent_wait_listisNULL, then this particular command does not wait on any event to complete. The events specified inevent_wait_listact as synchronization points. The context associated with events inevent_wait_listandcommand_queuemust be the same.event- Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.eventcan beNULLin which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If theevent_wait_listand theeventarguments are notNULL, the event argument should not refer to an element of theevent_wait_listarray.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.INVALID_MEM_OBJECTifmemobjis not a valid memory object.INVALID_VALUEifmapped_ptris not a valid pointer returned byEnqueueMapBuffer, orEnqueueMapImageformemobj.INVALID_EVENT_WAIT_LISTifevent_wait_listisNULLandnum_events_in_wait_list> 0, orevent_wait_listis notNULLandnum_events_in_wait_listis 0, or if event objects inevent_wait_listare not valid events.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.INVALID_CONTEXTif context associated withcommand_queueandmemobjare not the same or if the context associated withcommand_queueand events inevent_wait_listare not the same.
-
clGetMemObjectInfo
public static int clGetMemObjectInfo(long memobj, int param_name, @Nullable java.nio.ByteBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetMemObjectInfo(long memobj, int param_name, @Nullable java.nio.IntBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetMemObjectInfo(long memobj, int param_name, @Nullable java.nio.LongBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetMemObjectInfo(long memobj, int param_name, @Nullable org.lwjgl.PointerBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Returns information that is common to all memory objects (buffer and image objects).- Parameters:
memobj- the memory object being queriedparam_name- the information to query. One of:MEM_TYPEMEM_FLAGSMEM_SIZEMEM_HOST_PTRMEM_MAP_COUNTMEM_REFERENCE_COUNTMEM_CONTEXTMEM_ASSOCIATED_MEMOBJECTMEM_OFFSETMEM_USES_SVM_POINTERparam_value- a pointer to memory where the appropriate result being queried is returned. Ifparam_valueisNULL, it is ignored.param_value_size_ret- the actual size in bytes of data being queried byparam_value. IfNULL, it is ignored.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_VALUEifparam_nameis not valid, or if size in bytes specified byparam_value_sizeis < size of return type andparam_valueis notNULL.INVALID_MEM_OBJECTifmemobjis a not a valid memory object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clCreateSampler
public static long clCreateSampler(long context, boolean normalized_coords, int addressing_mode, int filter_mode, @Nullable java.nio.IntBuffer errcode_ret)Reference Page - This function is deprecated after OpenCL 1.2
Creates a sampler object.A sampler object describes how to sample an image when the image is read in the kernel. The built-in functions to read from an image in a kernel take a sampler as an argument. The sampler arguments to the image read function can be sampler objects created using OpenCL functions and passed as argument values to the kernel or can be samplers declared inside a kernel.
- Parameters:
context- a valid OpenCL contextnormalized_coords- determines if the image coordinates specified are normalized or notaddressing_mode- specifies how out-of-range image coordinates are handled when reading from an image. One of:ADDRESS_NONEADDRESS_CLAMP_TO_EDGEADDRESS_CLAMPADDRESS_REPEATADDRESS_MIRRORED_REPEATfilter_mode- the type of filter that must be applied when reading an image. One of:FILTER_NEARESTFILTER_LINEARerrcode_ret- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.- Returns:
- a valid non-zero sampler object and
errcode_retis set toSUCCESSif the sampler object is created successfully. Otherwise, it returns aNULLvalue with one of the following error values returned inerrcode_ret:INVALID_CONTEXTifcontextis not a valid context.INVALID_VALUEifaddressing_mode,filter_modeornormalized_coordsor combination of these argument values are not valid.INVALID_OPERATIONif images are not supported by any device associated withcontext(i.e.DEVICE_IMAGE_SUPPORTisFALSE).OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clRetainSampler
public static int clRetainSampler(long sampler)
Increments the sampler reference count.CreateSamplerperforms an implicit retain.- Parameters:
sampler- the sample object to retain- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_SAMPLERif sampler is not a valid sampler object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clReleaseSampler
public static int clReleaseSampler(long sampler)
Decrements the sampler reference count. The sampler object is deleted after the reference count becomes zero and commands queued for execution on a command-queue(s) that use sampler have finished.- Parameters:
sampler- the sample object to release- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_SAMPLERifsampleris not a valid sampler object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clGetSamplerInfo
public static int clGetSamplerInfo(long sampler, int param_name, @Nullable java.nio.ByteBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetSamplerInfo(long sampler, int param_name, @Nullable java.nio.IntBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetSamplerInfo(long sampler, int param_name, @Nullable org.lwjgl.PointerBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Returns information about a sampler object.- Parameters:
sampler- the sampler being queriedparam_name- the information to query. One of:SAMPLER_REFERENCE_COUNTSAMPLER_CONTEXTSAMPLER_NORMALIZED_COORDSSAMPLER_ADDRESSING_MODESAMPLER_FILTER_MODESAMPLER_MIP_FILTER_MODESAMPLER_LOD_MINSAMPLER_LOD_MAXparam_value- a pointer to memory where the appropriate result being queried is returned. Ifparam_valueisNULL, it is ignored.param_value_size_ret- the actual size in bytes of data being queried byparam_value. IfNULL, it is ignored.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_VALUEifparam_nameis not valid, or if size in bytes specified byparam_value_sizeis < size of return type andparam_valueis notNULL.INVALID_SAMPLERifsampleris a not a valid sampler object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clCreateProgramWithSource
public static long clCreateProgramWithSource(long context, org.lwjgl.PointerBuffer strings, @Nullable org.lwjgl.PointerBuffer lengths, @Nullable java.nio.IntBuffer errcode_ret)Creates a program object for a context, and loads the source code specified by the text strings in the strings array into the program object. The devices associated with the program object are the devices associated withcontext. The source code specified by strings is either an OpenCL C program source, header or implementation-defined source for custom devices that support an online compiler.- Parameters:
context- a valid OpenCL contextstrings- an array ofcountpointers to optionally null-terminated character strings that make up the source codelengths- an array with the number of chars in each string (the string length). If an element inlengthsis zero, its accompanying string is null-terminated. IflengthsisNULL, all strings in thestringsargument are considered null-terminated. Any length value passed in that is greater than zero excludes the null terminator in its count.errcode_ret- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.- Returns:
- a valid non-zero program object and
errcode_retis set toSUCCESSif the program object is created successfully. Otherwise, it returns aNULLvalue with one of the following error values returned inerrcode_ret:INVALID_CONTEXTifcontextis not a valid context.INVALID_VALUEifcountis zero or ifstringsor any entry instringsisNULL.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clCreateProgramWithSource
public static long clCreateProgramWithSource(long context, java.lang.CharSequence[] strings, @Nullable java.nio.IntBuffer errcode_ret)Creates a program object for a context, and loads the source code specified by the text strings in the strings array into the program object. The devices associated with the program object are the devices associated withcontext. The source code specified by strings is either an OpenCL C program source, header or implementation-defined source for custom devices that support an online compiler.- Parameters:
context- a valid OpenCL contextstrings- an array ofcountpointers to optionally null-terminated character strings that make up the source codeerrcode_ret- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.- Returns:
- a valid non-zero program object and
errcode_retis set toSUCCESSif the program object is created successfully. Otherwise, it returns aNULLvalue with one of the following error values returned inerrcode_ret:INVALID_CONTEXTifcontextis not a valid context.INVALID_VALUEifcountis zero or ifstringsor any entry instringsisNULL.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clCreateProgramWithSource
public static long clCreateProgramWithSource(long context, java.lang.CharSequence string, @Nullable java.nio.IntBuffer errcode_ret)Creates a program object for a context, and loads the source code specified by the text strings in the strings array into the program object. The devices associated with the program object are the devices associated withcontext. The source code specified by strings is either an OpenCL C program source, header or implementation-defined source for custom devices that support an online compiler.- Parameters:
context- a valid OpenCL contexterrcode_ret- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.- Returns:
- a valid non-zero program object and
errcode_retis set toSUCCESSif the program object is created successfully. Otherwise, it returns aNULLvalue with one of the following error values returned inerrcode_ret:INVALID_CONTEXTifcontextis not a valid context.INVALID_VALUEifcountis zero or ifstringsor any entry instringsisNULL.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clCreateProgramWithBinary
public static long clCreateProgramWithBinary(long context, org.lwjgl.PointerBuffer device_list, org.lwjgl.PointerBuffer lengths, org.lwjgl.PointerBuffer binaries, @Nullable java.nio.IntBuffer binary_status, @Nullable java.nio.IntBuffer errcode_ret)Creates a program object for a context, and loads the binary bits specified bybinaryinto the program object.The program binaries specified by
binariescontain the bits that describe one of the following:- a program executable to be run on the device(s) associated with
context, - a compiled program for device(s) associated with
context, or - a library of compiled programs for device(s) associated with
context.
The program binary can consist of either or both:
- Device-specific code and/or,
- Implementation-specific intermediate representation (IR) which will be converted to the device-specific code.
OpenCL allows applications to create a program object using the program source or binary and build appropriate program executables. This can be very useful as it allows applications to load program source and then compile and link to generate a program executable online on its first instance for appropriate OpenCL devices in the system. These executables can now be queried and cached by the application. Future instances of the application launching will no longer need to compile and link the program executables. The cached executables can be read and loaded by the application, which can help significantly reduce the application initialization time.
- Parameters:
context- a valid OpenCL contextdevice_list- a pointer to a list of devices that are incontext. device_list must be a non-NULLvalue. The binaries are loaded for devices specified in this list.lengths- an array of the size in bytes of the program binaries to be loaded for devices specified bydevice_list.binaries- an array of pointers to program binaries to be loaded for devices specified bydevice_list. For each device given bydevice_list[i], the pointer to the program binary for that device is given bybinaries[i]and the length of this corresponding binary is given bylengths[i].lengths[i]cannot be zero andbinaries[i]cannot be aNULLpointer.binary_status- returns whether the program binary for each device specified in device_list was loaded successfully or not. It is an array ofnum_devicesentries and returnsSUCCESSinbinary_status[i]if binary was successfully loaded for device specified bydevice_list[i]; otherwise returnsINVALID_VALUEiflengths[i]is zero or ifbinaries[i]is aNULLvalue orINVALID_BINARYinbinary_status[i]if program binary is not a valid binary for the specified device. Ifbinary_statusisNULL, it is ignored.errcode_ret- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.- Returns:
- a valid non-zero program object and
errcode_retis set toSUCCESSif the program object is created successfully. Otherwise, it returns aNULLvalue with one of the following error values returned inerrcode_ret:INVALID_CONTEXTifcontextis not a valid context.INVALID_VALUEifdevice_listisNULLornum_devicesis zero.INVALID_DEVICEif OpenCL devices listed indevice_listare not in the list of devices associated withcontext.INVALID_VALUEiflengthsorbinariesareNULLor if any entry inlengths[i]is zero orbinaries[i]isNULL.INVALID_BINARYif an invalid program binary was encountered for any device.binary_statuswill return specific status for each device.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
- a program executable to be run on the device(s) associated with
-
clCreateProgramWithBinary
public static long clCreateProgramWithBinary(long context, org.lwjgl.PointerBuffer device_list, java.nio.ByteBuffer[] binaries, @Nullable java.nio.IntBuffer binary_status, @Nullable java.nio.IntBuffer errcode_ret)Creates a program object for a context, and loads the binary bits specified bybinaryinto the program object.The program binaries specified by
binariescontain the bits that describe one of the following:- a program executable to be run on the device(s) associated with
context, - a compiled program for device(s) associated with
context, or - a library of compiled programs for device(s) associated with
context.
The program binary can consist of either or both:
- Device-specific code and/or,
- Implementation-specific intermediate representation (IR) which will be converted to the device-specific code.
OpenCL allows applications to create a program object using the program source or binary and build appropriate program executables. This can be very useful as it allows applications to load program source and then compile and link to generate a program executable online on its first instance for appropriate OpenCL devices in the system. These executables can now be queried and cached by the application. Future instances of the application launching will no longer need to compile and link the program executables. The cached executables can be read and loaded by the application, which can help significantly reduce the application initialization time.
- Parameters:
context- a valid OpenCL contextdevice_list- a pointer to a list of devices that are incontext. device_list must be a non-NULLvalue. The binaries are loaded for devices specified in this list.binaries- an array of pointers to program binaries to be loaded for devices specified bydevice_list. For each device given bydevice_list[i], the pointer to the program binary for that device is given bybinaries[i]and the length of this corresponding binary is given bylengths[i].lengths[i]cannot be zero andbinaries[i]cannot be aNULLpointer.binary_status- returns whether the program binary for each device specified in device_list was loaded successfully or not. It is an array ofnum_devicesentries and returnsSUCCESSinbinary_status[i]if binary was successfully loaded for device specified bydevice_list[i]; otherwise returnsINVALID_VALUEiflengths[i]is zero or ifbinaries[i]is aNULLvalue orINVALID_BINARYinbinary_status[i]if program binary is not a valid binary for the specified device. Ifbinary_statusisNULL, it is ignored.errcode_ret- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.- Returns:
- a valid non-zero program object and
errcode_retis set toSUCCESSif the program object is created successfully. Otherwise, it returns aNULLvalue with one of the following error values returned inerrcode_ret:INVALID_CONTEXTifcontextis not a valid context.INVALID_VALUEifdevice_listisNULLornum_devicesis zero.INVALID_DEVICEif OpenCL devices listed indevice_listare not in the list of devices associated withcontext.INVALID_VALUEiflengthsorbinariesareNULLor if any entry inlengths[i]is zero orbinaries[i]isNULL.INVALID_BINARYif an invalid program binary was encountered for any device.binary_statuswill return specific status for each device.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
- a program executable to be run on the device(s) associated with
-
clCreateProgramWithBinary
public static long clCreateProgramWithBinary(long context, org.lwjgl.PointerBuffer device_list, java.nio.ByteBuffer binary, @Nullable java.nio.IntBuffer binary_status, @Nullable java.nio.IntBuffer errcode_ret)Creates a program object for a context, and loads the binary bits specified bybinaryinto the program object.The program binaries specified by
binariescontain the bits that describe one of the following:- a program executable to be run on the device(s) associated with
context, - a compiled program for device(s) associated with
context, or - a library of compiled programs for device(s) associated with
context.
The program binary can consist of either or both:
- Device-specific code and/or,
- Implementation-specific intermediate representation (IR) which will be converted to the device-specific code.
OpenCL allows applications to create a program object using the program source or binary and build appropriate program executables. This can be very useful as it allows applications to load program source and then compile and link to generate a program executable online on its first instance for appropriate OpenCL devices in the system. These executables can now be queried and cached by the application. Future instances of the application launching will no longer need to compile and link the program executables. The cached executables can be read and loaded by the application, which can help significantly reduce the application initialization time.
- Parameters:
context- a valid OpenCL contextdevice_list- a pointer to a list of devices that are incontext. device_list must be a non-NULLvalue. The binaries are loaded for devices specified in this list.binary_status- returns whether the program binary for each device specified in device_list was loaded successfully or not. It is an array ofnum_devicesentries and returnsSUCCESSinbinary_status[i]if binary was successfully loaded for device specified bydevice_list[i]; otherwise returnsINVALID_VALUEiflengths[i]is zero or ifbinaries[i]is aNULLvalue orINVALID_BINARYinbinary_status[i]if program binary is not a valid binary for the specified device. Ifbinary_statusisNULL, it is ignored.errcode_ret- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.- Returns:
- a valid non-zero program object and
errcode_retis set toSUCCESSif the program object is created successfully. Otherwise, it returns aNULLvalue with one of the following error values returned inerrcode_ret:INVALID_CONTEXTifcontextis not a valid context.INVALID_VALUEifdevice_listisNULLornum_devicesis zero.INVALID_DEVICEif OpenCL devices listed indevice_listare not in the list of devices associated withcontext.INVALID_VALUEiflengthsorbinariesareNULLor if any entry inlengths[i]is zero orbinaries[i]isNULL.INVALID_BINARYif an invalid program binary was encountered for any device.binary_statuswill return specific status for each device.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
- a program executable to be run on the device(s) associated with
-
clRetainProgram
public static int clRetainProgram(long program)
- Parameters:
program- the program object to retain- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_PROGRAMifprogramis not a valid program object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clReleaseProgram
public static int clReleaseProgram(long program)
Decrements theprogramreference count. The program object is deleted after all kernel objects associated with program have been deleted and the program reference count becomes zero.- Parameters:
program- the program object to release- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_PROGRAMifprogramis not a valid program object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clBuildProgram
public static int clBuildProgram(long program, @Nullable org.lwjgl.PointerBuffer device_list, java.nio.ByteBuffer options, @Nullable CLProgramCallbackI pfn_notify, long user_data) public static int clBuildProgram(long program, @Nullable org.lwjgl.PointerBuffer device_list, java.lang.CharSequence options, @Nullable CLProgramCallbackI pfn_notify, long user_data)Builds (compiles & links) a program executable from the program source or binary for all the devices or a specific device(s) in the OpenCL context associated withprogram. OpenCL allows program executables to be built using the source or the binary.clBuildProgrammust be called forprogramcreated using eitherCreateProgramWithSourceorCreateProgramWithBinaryto build the program executable for one or more devices associated withprogram. Ifprogramis created withCreateProgramWithBinary, then the program binary must be an executable binary (not a compiled binary or library).The executable binary can be queried using
GetProgramInfoand can be specified toCreateProgramWithBinaryto create a new program object.- Parameters:
program- the program objectdevice_list- a pointer to a list of devices associated withprogram. Ifdevice_listis aNULLvalue, the program executable is built for all devices associated withprogramfor which a source or binary has been loaded. Ifdevice_listis a non-NULLvalue, the program executable is built for devices specified in this list for which a source or binary has been loaded.options- a pointer to a null-terminated string of characters that describes the build options to be used for building the program executablepfn_notify- a function pointer to a notification routine. The notification routine is a callback function that an application can register and which will be called when the program executable has been built (successfully or unsuccessfully). Ifpfn_notifyis notNULL,clBuildProgramdoes 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. Ifpfn_notifyisNULL,clBuildProgramdoes not return until the build has completed. This callback function may be called asynchronously by the OpenCL implementation. It is the application's responsibility to ensure that the callback function is thread-safe.user_data- will be passed as an argument whenpfn_notifyis called.user_datacan beNULL.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_PROGRAMifprogramis not a valid program object.INVALID_VALUEifdevice_listisNULLandnum_devicesis > 0, or ifdevice_listis notNULLandnum_devicesis 0.INVALID_VALUEifpfn_notifyisNULLbutuser_datais notNULL.INVALID_DEVICEif OpenCL devices listed indevice_listare not in the list of devices associated with program.INVALID_BINARYifprogramis created withCreateProgramWithBinaryand devices listed indevice_listdo not have a valid program binary loaded.INVALID_BUILD_OPTIONSif the build options specified byoptionsare invalid.INVALID_OPERATIONif the build of a program executable for any of the devices listed indevice_listby a previous call toclBuildProgramforprogramhas not completed.COMPILER_NOT_AVAILABLEifprogramis created withCreateProgramWithSourceand a compiler is not available i.e.DEVICE_COMPILER_AVAILABLEis set toFALSE.BUILD_PROGRAM_FAILUREif there is a failure to build the program executable. This error will be returned ifclBuildProgramdoes not return until the build has completed.INVALID_OPERATIONif there are kernel objects attached toprogram.INVALID_OPERATIONif program was not created withCreateProgramWithSourceorCreateProgramWithBinary.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clBuildProgram
public static int clBuildProgram(long program, @Nullable long device, java.lang.CharSequence options, @Nullable CLProgramCallbackI pfn_notify, long user_data)Builds (compiles & links) a program executable from the program source or binary for all the devices or a specific device(s) in the OpenCL context associated withprogram. OpenCL allows program executables to be built using the source or the binary.clBuildProgrammust be called forprogramcreated using eitherCreateProgramWithSourceorCreateProgramWithBinaryto build the program executable for one or more devices associated withprogram. Ifprogramis created withCreateProgramWithBinary, then the program binary must be an executable binary (not a compiled binary or library).The executable binary can be queried using
GetProgramInfoand can be specified toCreateProgramWithBinaryto create a new program object.- Parameters:
program- the program objectoptions- a pointer to a null-terminated string of characters that describes the build options to be used for building the program executablepfn_notify- a function pointer to a notification routine. The notification routine is a callback function that an application can register and which will be called when the program executable has been built (successfully or unsuccessfully). Ifpfn_notifyis notNULL,clBuildProgramdoes 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. Ifpfn_notifyisNULL,clBuildProgramdoes not return until the build has completed. This callback function may be called asynchronously by the OpenCL implementation. It is the application's responsibility to ensure that the callback function is thread-safe.user_data- will be passed as an argument whenpfn_notifyis called.user_datacan beNULL.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_PROGRAMifprogramis not a valid program object.INVALID_VALUEifdevice_listisNULLandnum_devicesis > 0, or ifdevice_listis notNULLandnum_devicesis 0.INVALID_VALUEifpfn_notifyisNULLbutuser_datais notNULL.INVALID_DEVICEif OpenCL devices listed indevice_listare not in the list of devices associated with program.INVALID_BINARYifprogramis created withCreateProgramWithBinaryand devices listed indevice_listdo not have a valid program binary loaded.INVALID_BUILD_OPTIONSif the build options specified byoptionsare invalid.INVALID_OPERATIONif the build of a program executable for any of the devices listed indevice_listby a previous call toclBuildProgramforprogramhas not completed.COMPILER_NOT_AVAILABLEifprogramis created withCreateProgramWithSourceand a compiler is not available i.e.DEVICE_COMPILER_AVAILABLEis set toFALSE.BUILD_PROGRAM_FAILUREif there is a failure to build the program executable. This error will be returned ifclBuildProgramdoes not return until the build has completed.INVALID_OPERATIONif there are kernel objects attached toprogram.INVALID_OPERATIONif program was not created withCreateProgramWithSourceorCreateProgramWithBinary.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clUnloadCompiler
public static int clUnloadCompiler()
Reference Page - This function is deprecated after OpenCL 1.1
Allows the implementation to release the resources allocated by the OpenCL compiler. This is a hint from the application and does not guarantee that the compiler will not be used in the future or that the compiler will actually be unloaded by the implementation.Calls to
BuildProgramafterUnloadCompilerwill reload the compiler, if necessary, to build the appropriate program executable.- Returns:
- always
SUCCESS
-
clGetProgramInfo
public static int clGetProgramInfo(long program, int param_name, @Nullable java.nio.ByteBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetProgramInfo(long program, int param_name, @Nullable java.nio.IntBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetProgramInfo(long program, int param_name, @Nullable org.lwjgl.PointerBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Returns information about a program object.- Parameters:
program- the program object being queriedparam_name- the information to query. One of:PROGRAM_REFERENCE_COUNTPROGRAM_CONTEXTPROGRAM_NUM_DEVICESPROGRAM_DEVICESPROGRAM_SOURCEPROGRAM_BINARY_SIZESPROGRAM_BINARIESPROGRAM_NUM_KERNELSPROGRAM_KERNEL_NAMESPROGRAM_ILparam_value- a pointer to memory where the appropriate result being queried is returned. Ifparam_valueisNULL, it is ignored.param_value_size_ret- the actual size in bytes of data being queried byparam_value. IfNULL, it is ignored.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_VALUEifparam_nameis not valid, or if size in bytes specified byparam_value_sizeis < size of return type andparam_valueis notNULL.INVALID_PROGRAMifprogramis a not a valid program object.INVALID_PROGRAM_EXECUTABLEifparam_nameisPROGRAM_NUM_KERNELSorPROGRAM_KERNEL_NAMESand a successful program executable has not been built for at least one device in the list of devices associated withprogram.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clGetProgramBuildInfo
public static int clGetProgramBuildInfo(long program, long device, int param_name, @Nullable java.nio.ByteBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetProgramBuildInfo(long program, long device, int param_name, @Nullable java.nio.IntBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetProgramBuildInfo(long program, long device, int param_name, @Nullable org.lwjgl.PointerBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Returns build information for each device in the program object.- Parameters:
program- the program object being querieddevice- the device for which build information is being queried.devicemust be a valid device associated withprogram.param_name- the information to query. One of:PROGRAM_BUILD_STATUSPROGRAM_BUILD_OPTIONSPROGRAM_BUILD_LOGPROGRAM_BINARY_TYPEPROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZEparam_value- a pointer to memory where the appropriate result being queried is returned. Ifparam_valueisNULL, it is ignored.param_value_size_ret- the actual size in bytes of data being queried byparam_value. IfNULL, it is ignored.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_DEVICEifdeviceis not in the list of devices associated with program.INVALID_VALUEifparam_nameis not valid, or if size in bytes specified byparam_value_sizeis < size of return type andparam_valueis notNULL.INVALID_PROGRAMifprogramis a not a valid program object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clCreateKernel
public static long clCreateKernel(long program, java.nio.ByteBuffer kernel_name, @Nullable java.nio.IntBuffer errcode_ret) public static long clCreateKernel(long program, java.lang.CharSequence kernel_name, @Nullable java.nio.IntBuffer errcode_ret)Creates a kernel object.A kernel is a function declared in a program. A kernel is identified by the
__kernelqualifier applied to any function in a program. A kernel object encapsulates the specific__kernelfunction declared in a program and the argument values to be used when executing this__kernelfunction.Kernel objects can only be created once you have a program object with a valid program source or binary loaded into the program object and the program executable has been successfully built for one or more devices associated with program. No changes to the program executable are allowed while there are kernel objects associated with a program object. This means that calls to
BuildProgramandCompileProgramreturnINVALID_OPERATIONif there are kernel objects attached to a program object. The OpenCL context associated with program will be the context associated with kernel. The list of devices associated with program are the devices associated with kernel. Devices associated with a program object for which a valid program executable has been built can be used to execute kernels declared in the program object.- Parameters:
program- a program object with a successfully built executablekernel_name- a function name in the program declared with the__kernelqualifiererrcode_ret- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.- Returns:
- a valid non-zero kernel object and
errcode_retis set toSUCCESSif the kernel object is created successfully. Otherwise, it returns aNULLvalue with one of the following error values returned inerrcode_ret:INVALID_PROGRAMifprogramis not a valid program object.INVALID_PROGRAM_EXECUTABLEif there is no successfully built executable forprogram.INVALID_KERNEL_NAMEifkernel_nameis not found inprogram.INVALID_KERNEL_DEFINITIONif the function definition for__kernelfunction given bykernel_namesuch as the number of arguments, the argument types are not the same for all devices for which the program executable has been built.INVALID_VALUEifkernel_nameisNULL.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clCreateKernelsInProgram
public static int clCreateKernelsInProgram(long program, @Nullable org.lwjgl.PointerBuffer kernels, @Nullable java.nio.IntBuffer num_kernels_ret)Creates kernel objects for all kernel functions inprogram. Kernel objects are not created for any__kernelfunctions inprogramthat do not have the same function definition across all devices for which a program executable has been successfully built.See
CreateKernelfor more details.- Parameters:
program- a program object with a successfully built executablekernels- the buffer where the kernel objects for kernels inprogramwill be returned. IfkernelsisNULL, it is ignored. Ifkernelsis notNULL,num_kernelsmust be greater than or equal to the number of kernels inprogram.num_kernels_ret- the number of kernels inprogram. Ifnum_kernels_retisNULL, it is ignored.- Returns:
SUCCESSif the kernel objects were successfully allocated. Otherwise, it returns one of the following errors:INVALID_PROGRAMifprogramis not a valid program object.INVALID_PROGRAM_EXECUTABLEif there is no successfully built executable for any device inprogram.INVALID_VALUEifkernelsis notNULLandnum_kernelsis less than the number of kernels inprogram.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clRetainKernel
public static int clRetainKernel(long kernel)
Increments thekernelreference count.CreateKernelorCreateKernelsInProgramdo an implicit retain.- Parameters:
kernel- the kernel to retain- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_KERNELif kernel is not a valid kernel object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clReleaseKernel
public static int clReleaseKernel(long kernel)
Decrements thekernelreference count.The kernel object is deleted once the number of instances that are retained to
kernelbecome zero and the kernel object is no longer needed by any enqueued commands that usekernel.- Parameters:
kernel- the kernel to release- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_KERNELif kernel is not a valid kernel object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clSetKernelArg
public static int clSetKernelArg(long kernel, int arg_index, long arg_size)Set the argument value for a specific argument of a kernel.- Parameters:
kernel- a valid kernel objectarg_index- the argument index. Arguments to the kernel are referred by indices that go from 0 for the leftmost argument ton - 1, wherenis 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 form, 2 forfilter_weights, 3 forsrc_imageand 4 fordst_image.NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values by
clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.arg_size- the size of the argument value. If the argument is a memory object, the size is the size of the buffer or image object type. For arguments declared with the__localqualifier, the size specified will be the size in bytes of the buffer that must be allocated for the__localargument. If the argument is of typesampler_t, thearg_sizevalue must be equal tosizeof(cl_sampler). For all other arguments, the size will be the size of argument type.- Returns:
SUCCESSif the function was executed successfully. Otherwise, it returns one of the following errors:INVALID_KERNELifkernelis not a valid kernel object.INVALID_ARG_INDEXifarg_indexis not a valid argument index.INVALID_ARG_VALUEifarg_valuespecified is not a valid value.INVALID_MEM_OBJECTfor an argument declared to be a memory object when the specifiedarg_valueis not a valid memory object.INVALID_SAMPLERfor an argument declared to be of typesampler_twhen the specifiedarg_valueis not a valid sampler object.INVALID_ARG_SIZEifarg_sizedoes 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 andarg_size != sizeof(cl_mem)or ifarg_sizeis zero and the argument is declared with the__localqualifier or if the argument is a sampler andarg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDEDif the size in bytes of the memory object (if the argument was declared with constant qualifier) orarg_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 becl::max_sizedefined in OpenCL 2.2 C++ Kernel Language specification orSpvDecorationMaxByteOffsetdefined in SPIR-V 1.2 Specification.INVALID_ARG_VALUEif the argument is an image declared with theread_onlyqualifier andarg_valuerefers to an image object created withcl_mem_flagsofMEM_WRITE_ONLYor if the image argument is declared with thewrite_onlyqualifier andarg_valuerefers to an image object created withcl_mem_flagsofMEM_READ_ONLY.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clSetKernelArg
public static int clSetKernelArg(long kernel, int arg_index, java.nio.ByteBuffer arg_value) public static int clSetKernelArg(long kernel, int arg_index, java.nio.ShortBuffer arg_value) public static int clSetKernelArg(long kernel, int arg_index, java.nio.IntBuffer arg_value) public static int clSetKernelArg(long kernel, int arg_index, java.nio.LongBuffer arg_value) public static int clSetKernelArg(long kernel, int arg_index, java.nio.FloatBuffer arg_value) public static int clSetKernelArg(long kernel, int arg_index, java.nio.DoubleBuffer arg_value) public static int clSetKernelArg(long kernel, int arg_index, org.lwjgl.PointerBuffer arg_value)Set the argument value for a specific argument of a kernel.- Parameters:
kernel- a valid kernel objectarg_index- the argument index. Arguments to the kernel are referred by indices that go from 0 for the leftmost argument ton - 1, wherenis 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 form, 2 forfilter_weights, 3 forsrc_imageand 4 fordst_image.NOTE: A kernel object does not update the reference count for objects such as memory, sampler objects specified as argument values by
clSetKernelArg, Users may not rely on a kernel object to retain objects specified as argument values to the kernel.arg_value- a pointer to data that should be used as the argument value for argument specified byarg_index. The argument data pointed to byarg_valueis copied and thearg_valuepointer can therefore be reused by the application afterclSetKernelArgreturns. The argument value specified is the value used by all API calls that enqueue kernel (EnqueueNDRangeKernelandEnqueueTask) until the argument value is changed by a call toclSetKernelArgforkernel.If the argument is a memory object (buffer, image or image array), the
arg_valueentry 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, thearg_valuepointer can beNULLor point to aNULLvalue in which case aNULLvalue will be used as the value for the argument declared as a pointer to__globalor__constantmemory in the kernel. If the argument is declared with the__localqualifier, thearg_valueentry must beNULL. If the argument is of typesampler_t, thearg_valueentry 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__constantqualifier, the size in bytes of the memory object cannot exceedDEVICE_MAX_CONSTANT_BUFFER_SIZEand the number of arguments declared as pointers to__constantmemory cannot exceedDEVICE_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 typeimage3d_t. The memory object specified as argument value must be a 1D image object if the argument is declared to be of typeimage1d_t. The memory object specified as argument value must be a 1D image buffer object if the argument is declared to be of typeimage1d_buffer_t. The memory object specified as argument value must be a 1D image array object if argument is declared to be of typeimage1d_array_t. The memory object specified as argument value must be a 2D image array object if argument is declared to be of typeimage2d_array_t.For all other kernel arguments, the
arg_valueentry must be a pointer to the actual data to be used as argument value.- Returns:
SUCCESSif the function was executed successfully. Otherwise, it returns one of the following errors:INVALID_KERNELifkernelis not a valid kernel object.INVALID_ARG_INDEXifarg_indexis not a valid argument index.INVALID_ARG_VALUEifarg_valuespecified is not a valid value.INVALID_MEM_OBJECTfor an argument declared to be a memory object when the specifiedarg_valueis not a valid memory object.INVALID_SAMPLERfor an argument declared to be of typesampler_twhen the specifiedarg_valueis not a valid sampler object.INVALID_ARG_SIZEifarg_sizedoes 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 andarg_size != sizeof(cl_mem)or ifarg_sizeis zero and the argument is declared with the__localqualifier or if the argument is a sampler andarg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDEDif the size in bytes of the memory object (if the argument was declared with constant qualifier) orarg_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 becl::max_sizedefined in OpenCL 2.2 C++ Kernel Language specification orSpvDecorationMaxByteOffsetdefined in SPIR-V 1.2 Specification.INVALID_ARG_VALUEif the argument is an image declared with theread_onlyqualifier andarg_valuerefers to an image object created withcl_mem_flagsofMEM_WRITE_ONLYor if the image argument is declared with thewrite_onlyqualifier andarg_valuerefers to an image object created withcl_mem_flagsofMEM_READ_ONLY.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clSetKernelArg1b, clSetKernelArg2b, clSetKernelArg3b, clSetKernelArg4b, clSetKernelArg1s, clSetKernelArg2s, clSetKernelArg3s, clSetKernelArg4s, clSetKernelArg1i, clSetKernelArg2i, clSetKernelArg3i, clSetKernelArg4i, clSetKernelArg1l, clSetKernelArg2l, clSetKernelArg3l, clSetKernelArg4l, clSetKernelArg1f, clSetKernelArg2f, clSetKernelArg3f, clSetKernelArg4f, clSetKernelArg1d, clSetKernelArg2d, clSetKernelArg3d, clSetKernelArg4d, clSetKernelArg1p, clSetKernelArg2p, clSetKernelArg3p, clSetKernelArg4p
public static int clSetKernelArg1b(long kernel, int arg_index, byte arg0) public static int clSetKernelArg2b(long kernel, int arg_index, byte arg0, byte arg1) public static int clSetKernelArg3b(long kernel, int arg_index, byte arg0, byte arg1, byte arg2) public static int clSetKernelArg4b(long kernel, int arg_index, byte arg0, byte arg1, byte arg2, byte arg3) public static int clSetKernelArg1s(long kernel, int arg_index, short arg0) public static int clSetKernelArg2s(long kernel, int arg_index, short arg0, short arg1) public static int clSetKernelArg3s(long kernel, int arg_index, short arg0, short arg1, short arg2) public static int clSetKernelArg4s(long kernel, int arg_index, short arg0, short arg1, short arg2, short arg3) public static int clSetKernelArg1i(long kernel, int arg_index, int arg0) public static int clSetKernelArg2i(long kernel, int arg_index, int arg0, int arg1) public static int clSetKernelArg3i(long kernel, int arg_index, int arg0, int arg1, int arg2) public static int clSetKernelArg4i(long kernel, int arg_index, int arg0, int arg1, int arg2, int arg3) public static int clSetKernelArg1l(long kernel, int arg_index, long arg0) public static int clSetKernelArg2l(long kernel, int arg_index, long arg0, long arg1) public static int clSetKernelArg3l(long kernel, int arg_index, long arg0, long arg1, long arg2) public static int clSetKernelArg4l(long kernel, int arg_index, long arg0, long arg1, long arg2, long arg3) public static int clSetKernelArg1f(long kernel, int arg_index, float arg0) public static int clSetKernelArg2f(long kernel, int arg_index, float arg0, float arg1) public static int clSetKernelArg3f(long kernel, int arg_index, float arg0, float arg1, float arg2) public static int clSetKernelArg4f(long kernel, int arg_index, float arg0, float arg1, float arg2, float arg3) public static int clSetKernelArg1d(long kernel, int arg_index, double arg0) public static int clSetKernelArg2d(long kernel, int arg_index, double arg0, double arg1) public static int clSetKernelArg3d(long kernel, int arg_index, double arg0, double arg1, double arg2) public static int clSetKernelArg4d(long kernel, int arg_index, double arg0, double arg1, double arg2, double arg3) public static int clSetKernelArg1p(long kernel, int arg_index, long arg0) public static int clSetKernelArg2p(long kernel, int arg_index, long arg0, long arg1) public static int clSetKernelArg3p(long kernel, int arg_index, long arg0, long arg1, long arg2) public static int clSetKernelArg4p(long kernel, int arg_index, long arg0, long arg1, long arg2, long arg3)Set the argument value for a specific argument of a kernel.- Parameters:
kernel- a valid kernel objectarg_index- the argument index. Arguments to the kernel are referred by indices that go from 0 for the leftmost argument ton - 1, wherenis 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 form, 2 forfilter_weights, 3 forsrc_imageand 4 fordst_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.- Returns:
SUCCESSif the function was executed successfully. Otherwise, it returns one of the following errors:INVALID_KERNELifkernelis not a valid kernel object.INVALID_ARG_INDEXifarg_indexis not a valid argument index.INVALID_ARG_VALUEifarg_valuespecified is not a valid value.INVALID_MEM_OBJECTfor an argument declared to be a memory object when the specifiedarg_valueis not a valid memory object.INVALID_SAMPLERfor an argument declared to be of typesampler_twhen the specifiedarg_valueis not a valid sampler object.INVALID_ARG_SIZEifarg_sizedoes 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 andarg_size != sizeof(cl_mem)or ifarg_sizeis zero and the argument is declared with the__localqualifier or if the argument is a sampler andarg_size != sizeof(cl_sampler).MAX_SIZE_RESTRICTION_EXCEEDEDif the size in bytes of the memory object (if the argument was declared with constant qualifier) orarg_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 becl::max_sizedefined in OpenCL 2.2 C++ Kernel Language specification orSpvDecorationMaxByteOffsetdefined in SPIR-V 1.2 Specification.INVALID_ARG_VALUEif the argument is an image declared with theread_onlyqualifier andarg_valuerefers to an image object created withcl_mem_flagsofMEM_WRITE_ONLYor if the image argument is declared with thewrite_onlyqualifier andarg_valuerefers to an image object created withcl_mem_flagsofMEM_READ_ONLY.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clGetKernelInfo
public static int clGetKernelInfo(long kernel, int param_name, @Nullable java.nio.ByteBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetKernelInfo(long kernel, int param_name, @Nullable java.nio.IntBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetKernelInfo(long kernel, int param_name, @Nullable org.lwjgl.PointerBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Returns information about a kernel object.- Parameters:
kernel- the kernel object being queriedparam_name- the information to query. One of:KERNEL_FUNCTION_NAMEKERNEL_NUM_ARGSKERNEL_REFERENCE_COUNTKERNEL_CONTEXTKERNEL_PROGRAMKERNEL_ATTRIBUTESparam_value- a pointer to memory where the appropriate result being queried is returned. Ifparam_valueisNULL, it is ignored.param_value_size_ret- the actual size in bytes of data being queried byparam_value. IfNULL, it is ignored.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_VALUEifparam_nameis not valid, or if size in bytes specified byparam_value_sizeis < size of return type andparam_valueis notNULL.INVALID_KERNELifkernelis a not a valid kernel object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clGetKernelWorkGroupInfo
public static int clGetKernelWorkGroupInfo(long kernel, long device, int param_name, @Nullable java.nio.ByteBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetKernelWorkGroupInfo(long kernel, long device, int param_name, @Nullable java.nio.IntBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetKernelWorkGroupInfo(long kernel, long device, int param_name, @Nullable java.nio.LongBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetKernelWorkGroupInfo(long kernel, long device, int param_name, @Nullable org.lwjgl.PointerBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Returns information about the kernel object that may be specific to a device.- Parameters:
kernel- the kernel object being querieddevice- identifies a specific device in the list of devices associated withkernel. The list of devices is the list of devices in the OpenCL context that is associated withkernel. If the list of devices associated withkernelis a single device,devicecan be aNULLvalue.param_name- the information to query. One of:KERNEL_WORK_GROUP_SIZEKERNEL_COMPILE_WORK_GROUP_SIZEKERNEL_LOCAL_MEM_SIZEKERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLEKERNEL_PRIVATE_MEM_SIZEKERNEL_GLOBAL_WORK_SIZEparam_value- a pointer to memory where the appropriate result being queried is returned. Ifparam_valueisNULL, it is ignored.param_value_size_ret- the actual size in bytes of data being queried byparam_value. IfNULL, it is ignored.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_DEVICEifdeviceis not in the list of devices associated withkernelor ifdeviceisNULLbut there is more than one device associated withkernel.INVALID_VALUEifparam_nameis not valid, or if size in bytes specified byparam_value_sizeis < size of return type andparam_valueis notNULL.INVALID_VALUEifparam_nameisKERNEL_GLOBAL_WORK_SIZEanddeviceis not a custom device or kernel is not a built-in kernel.INVALID_KERNELifkernelis a not a valid kernel object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clEnqueueNDRangeKernel
public static int clEnqueueNDRangeKernel(long command_queue, long kernel, int work_dim, @Nullable org.lwjgl.PointerBuffer global_work_offset, @Nullable org.lwjgl.PointerBuffer global_work_size, @Nullable org.lwjgl.PointerBuffer local_work_size, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)Enqueues a command to execute a kernel on a device.- Parameters:
command_queue- a valid command-queue. The kernel will be queued for execution on the device associated withcommand_queue.kernel- a valid kernel object. The OpenCL context associated withkernelandcommand_queuemust be the same.work_dim- the number of dimensions used to specify the global work-items and work-items in the work-group.work_dimmust be greater than zero and less than or equal toDEVICE_MAX_WORK_ITEM_DIMENSIONS.global_work_offset- can be used to specify an array ofwork_dimunsigned values that describe the offset used to calculate the global ID of a work-item. Ifglobal_work_offsetisNULL, the global IDs start at offset(0, 0, … 0).global_work_size- points to an array ofwork_dimunsigned values that describe the number of global work-items inwork_dimdimensions that will execute the kernel function. The total number of global work-items is computed asglobal_work_size[0] * … * global_work_size[work_dim – 1].local_work_size- points to an array ofwork_dimunsigned 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 bykernel. The total number of work-items in a work-group is computed aslocal_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 theDEVICE_MAX_WORK_GROUP_SIZEvalue and the number of work-items specified inlocal_work_size[0], … local_work_size[work_dim – 1]must be less than or equal to the corresponding values specified byDEVICE_MAX_WORK_ITEM_SIZES[0], …DEVICE_MAX_WORK_ITEM_SIZES[work_dim – 1]. The explicitly specifiedlocal_work_sizewill be used to determine how to break the global work-items specified byglobal_work_sizeinto appropriate work-group instances. Iflocal_work_sizeis specified, the values specified inglobal_work_size[0], … global_work_size[work_dim - 1]must be evenly divisible by the corresponding values specified inlocal_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 bylocal_work_sizemust match the value specified by thereqd_work_group_sizeattribute qualifier.local_work_sizecan also be aNULLvalue in which case the OpenCL implementation will determine how to be break the global work-items into appropriate work-group instances.event_wait_list- a list of events that need to complete before this particular command can be executed. Ifevent_wait_listisNULL, then this particular command does not wait on any event to complete. The events specified inevent_wait_listact as synchronization points. The context associated with events inevent_wait_listandcommand_queuemust be the same.event- Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.eventcan beNULLin which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If theevent_wait_listand theeventarguments are notNULL, the event argument should not refer to an element of theevent_wait_listarray.- Returns:
SUCCESSif the kernel execution was successfully queued. Otherwise, it returns one of the following errors:INVALID_PROGRAM_EXECUTABLEif there is no successfully built program executable available for device associated withcommand_queue.INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.INVALID_KERNELifkernelis not a valid kernel object.INVALID_CONTEXTif context associated withcommand_queueandkernelare not the same or if the context associated withcommand_queueand events inevent_wait_listare not the same.INVALID_KERNEL_ARGSif the kernel argument values have not been specified.INVALID_WORK_DIMENSIONifwork_dimis not a valid value (i.e. a value between 1 and 3).INVALID_GLOBAL_WORK_SIZEifglobal_work_sizeisNULL, or if any of the values specified inglobal_work_size[0], … global_work_size[work_dim – 1]are 0 or exceed the range given by thesizeof(size_t)for the device on which the kernel execution will be enqueued.INVALID_GLOBAL_OFFSETif the value specified inglobal_work_size+ the corresponding values inglobal_work_offsetfor any dimensions is greater than thesizeof(size_t)for the device on which the kernel execution will be enqueued.INVALID_WORK_GROUP_SIZEiflocal_work_sizeis specified and number of work-items specified byglobal_work_sizeis not evenly divisible by size of work-group given bylocal_work_sizeor 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_SIZEiflocal_work_sizeis specified and the total number of work-items in the work-group computed aslocal_work_size[0] * … * local_work_size[work_dim – 1]is greater than the value specified byDEVICE_MAX_WORK_GROUP_SIZEINVALID_WORK_GROUP_SIZEiflocal_work_sizeisNULLand 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_SIZEif the number of work-items specified in any oflocal_work_size[0], … local_work_size[work_dim – 1]is greater than the corresponding values specified byDEVICE_MAX_WORK_ITEM_SIZES[0], …DEVICE_MAX_WORK_ITEM_SIZES[work_dim – 1].MISALIGNED_SUB_BUFFER_OFFSETif 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 toDEVICE_MEM_BASE_ADDR_ALIGNvalue for device associated with queue.INVALID_IMAGE_SIZEif 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_SUPPORTEDif 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_RESOURCESif 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 specifiedlocal_work_sizecauses 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 theDEVICE_MAX_READ_IMAGE_ARGSvalue for device or the number of write-only image args used in kernel exceed theDEVICE_MAX_WRITE_IMAGE_ARGSvalue for device or the number of samplers used in kernel exceedDEVICE_MAX_SAMPLERSfor device.MEM_OBJECT_ALLOCATION_FAILUREif there is a failure to allocate memory for data store associated with image or buffer objects specified as arguments to kernel.INVALID_EVENT_WAIT_LISTifevent_wait_listisNULLandnum_events_in_wait_list> 0, orevent_wait_listis notNULLandnum_events_in_wait_listis 0, or if event objects inevent_wait_listare not valid events.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clEnqueueTask
public static int clEnqueueTask(long command_queue, long kernel, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)Reference Page - This function is deprecated after OpenCL 1.2
Enqueues a command to execute a kernel on a device. The kernel is executed using a single work-item.clEnqueueTaskis equivalent to callingEnqueueNDRangeKernelwithwork_dim = 1,global_work_offset = NULL,global_work_size[0]set to 1 andlocal_work_size[0]set to 1.- Parameters:
command_queue- a valid command-queue. The kernel will be queued for execution on the device associated withcommand_queue.kernel- a valid kernel object. The OpenCL context associated withkernelandcommand_queuemust be the same.event_wait_list- a list of events that need to complete before this particular command can be executed. Ifevent_wait_listisNULL, then this particular command does not wait on any event to complete. The events specified inevent_wait_listact as synchronization points. The context associated with events inevent_wait_listandcommand_queuemust be the same.event- Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.eventcan beNULLin which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If theevent_wait_listand theeventarguments are notNULL, the event argument should not refer to an element of theevent_wait_listarray.- Returns:
SUCCESSif the kernel execution was successfully queued. Otherwise, seeEnqueueNDRangeKernel.
-
clEnqueueNativeKernel
public static int clEnqueueNativeKernel(long command_queue, CLNativeKernelI user_func, @Nullable java.nio.ByteBuffer args, @Nullable org.lwjgl.PointerBuffer mem_list, @Nullable org.lwjgl.PointerBuffer args_mem_loc, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)Enqueues a command to execute a native C/C++ function not compiled using the OpenCL compiler.- Parameters:
command_queue- a valid command-queue. A native user function can only be executed on a command-queue created on a device that hasEXEC_NATIVE_KERNELcapability set inDEVICE_EXECUTION_CAPABILITIES.user_func- a pointer to a host-callable user functionargs- a pointer to the args list thatuser_funcshould be called withmem_list- a list of valid buffer objects, ifnum_mem_objects> 0. The buffer object values specified inmem_listare memory object handles (cl_mem values) returned byCreateBufferorNULL.args_mem_loc- a pointer to appropriate locations thatargspoints to where memory object handles (cl_mem values) are stored. Before the user function is executed, the memory object handles are replaced by pointers to global memory.event_wait_list- a list of events that need to complete before this particular command can be executed. Ifevent_wait_listisNULL, then this particular command does not wait on any event to complete. The events specified inevent_wait_listact as synchronization points. The context associated with events inevent_wait_listandcommand_queuemust be the same.event- Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.eventcan beNULLin which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If theevent_wait_listand theeventarguments are notNULL, the event argument should not refer to an element of theevent_wait_listarray.- Returns:
SUCCESSif the user function execution instance was successfully queued. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.INVALID_CONTEXTif context associated withcommand_queueand events inevent_wait_listare not the same.INVALID_VALUEifuser_funcisNULL.INVALID_VALUEifargsis aNULLvalue andcb_args> 0, or ifargsis aNULLvalue andnum_mem_objects> 0.INVALID_VALUEifargsis notNULLandcb_argsis 0.INVALID_VALUEifnum_mem_objects> 0 andmem_listorargs_mem_locareNULL.INVALID_VALUEifnum_mem_objects= 0 andmem_listorargs_mem_locare notNULL.INVALID_OPERATIONif the device associated withcommand_queuecannot execute the native kernel.INVALID_MEM_OBJECTif one or more memory objects specified inmem_listare not valid or are not buffer objects.OUT_OF_RESOURCESif 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_FAILUREif there is a failure to allocate memory for data store associated with buffer objects specified as arguments to kernel.INVALID_EVENT_WAIT_LISTifevent_wait_listisNULLandnum_events_in_wait_list> 0, orevent_wait_listis notNULLandnum_events_in_wait_listis 0, or if event objects inevent_wait_listare not valid events.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clEnqueueNativeKernel
public static int clEnqueueNativeKernel(long command_queue, CLNativeKernelI user_func, @Nullable java.nio.ByteBuffer args, @Nullable long memobj, @Nullable long memobj_loc, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)Enqueues a command to execute a native C/C++ function not compiled using the OpenCL compiler.- Parameters:
command_queue- a valid command-queue. A native user function can only be executed on a command-queue created on a device that hasEXEC_NATIVE_KERNELcapability set inDEVICE_EXECUTION_CAPABILITIES.user_func- a pointer to a host-callable user functionargs- a pointer to the args list thatuser_funcshould be called withevent_wait_list- a list of events that need to complete before this particular command can be executed. Ifevent_wait_listisNULL, then this particular command does not wait on any event to complete. The events specified inevent_wait_listact as synchronization points. The context associated with events inevent_wait_listandcommand_queuemust be the same.event- Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.eventcan beNULLin which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If theevent_wait_listand theeventarguments are notNULL, the event argument should not refer to an element of theevent_wait_listarray.- Returns:
SUCCESSif the user function execution instance was successfully queued. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.INVALID_CONTEXTif context associated withcommand_queueand events inevent_wait_listare not the same.INVALID_VALUEifuser_funcisNULL.INVALID_VALUEifargsis aNULLvalue andcb_args> 0, or ifargsis aNULLvalue andnum_mem_objects> 0.INVALID_VALUEifargsis notNULLandcb_argsis 0.INVALID_VALUEifnum_mem_objects> 0 andmem_listorargs_mem_locareNULL.INVALID_VALUEifnum_mem_objects= 0 andmem_listorargs_mem_locare notNULL.INVALID_OPERATIONif the device associated withcommand_queuecannot execute the native kernel.INVALID_MEM_OBJECTif one or more memory objects specified inmem_listare not valid or are not buffer objects.OUT_OF_RESOURCESif 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_FAILUREif there is a failure to allocate memory for data store associated with buffer objects specified as arguments to kernel.INVALID_EVENT_WAIT_LISTifevent_wait_listisNULLandnum_events_in_wait_list> 0, orevent_wait_listis notNULLandnum_events_in_wait_listis 0, or if event objects inevent_wait_listare not valid events.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clWaitForEvents
public static int clWaitForEvents(org.lwjgl.PointerBuffer event_list)
Waits on the host thread for commands identified by event objects inevent_listto complete. A command is considered complete if its execution status isCOMPLETEor a negative value. The events specified inevent_listact as synchronization points.- Parameters:
event_list- the list of events- Returns:
SUCCESSif the execution status of all events in event_list isCOMPLETE. Otherwise, it returns one of the following errors:INVALID_VALUEifnum_eventsis zero orevent_listisNULL.INVALID_CONTEXTif events specified inevent_listdo not belong to the same context.INVALID_EVENTif event objects specified inevent_listare not valid event objects.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LISTif the execution status of any of the events inevent_listis a negative integer value.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clWaitForEvents
public static int clWaitForEvents(long event)
Waits on the host thread for commands identified by event objects inevent_listto complete. A command is considered complete if its execution status isCOMPLETEor a negative value. The events specified inevent_listact as synchronization points.- Returns:
SUCCESSif the execution status of all events in event_list isCOMPLETE. Otherwise, it returns one of the following errors:INVALID_VALUEifnum_eventsis zero orevent_listisNULL.INVALID_CONTEXTif events specified inevent_listdo not belong to the same context.INVALID_EVENTif event objects specified inevent_listare not valid event objects.EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LISTif the execution status of any of the events inevent_listis a negative integer value.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clGetEventInfo
public static int clGetEventInfo(long event, int param_name, @Nullable java.nio.ByteBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetEventInfo(long event, int param_name, @Nullable java.nio.IntBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetEventInfo(long event, int param_name, @Nullable org.lwjgl.PointerBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Returns information about an event object.Using
clGetEventInfoto determine if a command identified by event has finished execution (i.e.EVENT_COMMAND_EXECUTION_STATUSreturnsCOMPLETE) is not a synchronization point. There are no guarantees that the memory objects being modified by command associated with event will be visible to other enqueued commands.- Parameters:
event- the event object being queriedparam_name- the information to query. One of:EVENT_COMMAND_QUEUEEVENT_COMMAND_TYPEEVENT_REFERENCE_COUNTEVENT_COMMAND_EXECUTION_STATUSEVENT_CONTEXTparam_value- a pointer to memory where the appropriate result being queried is returned. Ifparam_valueisNULL, it is ignored.param_value_size_ret- the actual size in bytes of data being queried byparam_value. IfNULL, it is ignored.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_VALUEifparam_nameis not valid, or if size in bytes specified byparam_value_sizeis < size of return type andparam_valueis notNULL.INVALID_VALUEif information to query given inparam_namecannot be queried for event.INVALID_EVENTifeventis a not a valid event object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clRetainEvent
public static int clRetainEvent(long event)
Increments the event reference count. The OpenCL commands that return an event perform an implicit retain.- Parameters:
event- the event to retain- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_EVENTifeventis not a valid event object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clReleaseEvent
public static int clReleaseEvent(long event)
Decrements the event reference count.The event object is deleted once the reference count becomes zero, the specific command identified by this event has completed (or terminated) and there are no commands in the command-queues of a context that require a wait for this event to complete.
NOTE: Developers should be careful when releasing their last reference count on events created by
CreateUserEventthat have not yet been set to status ofCOMPLETEor an error. If the user event was used in theevent_wait_listargument passed to a clEnqueue*** API or another application host thread is waiting for it inWaitForEvents, those commands and host threads will continue to wait for the event status to reachCOMPLETEor error, even after the user has released the object. Since in this scenario the developer has released his last reference count to the user event, it would be in principle no longer valid for him to change the status of the event to unblock all the other machinery. As a result the waiting tasks will wait forever, and associated events, cl_mem objects, command queues and contexts are likely to leak. In-order command-queues caught up in this deadlock may cease to do any work.- Parameters:
event- the event to release- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_EVENTifeventis not a valid event object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clEnqueueMarker
public static int clEnqueueMarker(long command_queue, @Nullable org.lwjgl.PointerBuffer event)Reference Page - This function is deprecated after OpenCL 1.1
Enqueues a marker command tocommand_queue. The marker command is not completed until all commands enqueued before it have completed. The marker command returns an event which can be waited on, i.e. this event can be waited on to insure that all commands, which have been queued before the marker command, have been completed.- Parameters:
command_queue- the command-queue to insert the marker toevent- Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.eventcan beNULLin which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If theevent_wait_listand theeventarguments are notNULL, the event argument should not refer to an element of theevent_wait_listarray.- Returns:
SUCCESSif the function is successfully executed. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.INVALID_VALUEifeventis aNULLvalue.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clEnqueueBarrier
public static int clEnqueueBarrier(long command_queue)
Reference Page - This function is deprecated after OpenCL 1.1
Enqueues a barrier operation. TheclEnqueueBarriercommand ensures that all queued commands incommand_queuehave finished execution before the next batch of commands can begin execution. TheclEnqueueBarriercommand is a synchronization point.- Parameters:
command_queue- the command-queue to insert the barrier to- Returns:
SUCCESSif the function is successfully executed. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clEnqueueWaitForEvents
public static int clEnqueueWaitForEvents(long command_queue, org.lwjgl.PointerBuffer event_list)Reference Page - This function is deprecated after OpenCL 1.1
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.- Parameters:
command_queue- the command-queueevent_list- the list of events- Returns:
SUCCESSif the function was successfully executed. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.INVALID_CONTEXTif the context associated withcommand_queueand events inevent_listare not the same.INVALID_VALUEifnum_eventsis zero orevent_listisNULL.INVALID_EVENTif event objects specified inevent_listare not valid events.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clEnqueueWaitForEvents
public static int clEnqueueWaitForEvents(long command_queue, long event)Reference Page - This function is deprecated after OpenCL 1.1
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.- Parameters:
command_queue- the command-queue- Returns:
SUCCESSif the function was successfully executed. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.INVALID_CONTEXTif the context associated withcommand_queueand events inevent_listare not the same.INVALID_VALUEifnum_eventsis zero orevent_listisNULL.INVALID_EVENTif event objects specified inevent_listare not valid events.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clGetEventProfilingInfo
public static int clGetEventProfilingInfo(long event, int param_name, @Nullable java.nio.ByteBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetEventProfilingInfo(long event, int param_name, @Nullable java.nio.LongBuffer param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Returns profiling information for the command associated withevent.- Parameters:
event- the event objectparam_name- the profiling data to query. One of:PROFILING_COMMAND_QUEUEDPROFILING_COMMAND_SUBMITPROFILING_COMMAND_STARTPROFILING_COMMAND_ENDPROFILING_COMMAND_COMPLETEparam_value- a pointer to memory where the appropriate result being queried is returned. Ifparam_valueisNULL, it is ignored.param_value_size_ret- the actual size in bytes of data being queried byparam_value. IfNULL, it is ignored.- Returns:
SUCCESSif the function is executed successfully and the profiling information has been recorded. Otherwise, it returns one of the following errors:PROFILING_INFO_NOT_AVAILABLEif theQUEUE_PROFILING_ENABLEflag is not set for the command-queue, if the execution status of the command identified byeventis notCOMPLETEor ifeventis a user event object.INVALID_VALUEifparam_nameis not valid, or if size in bytes specified byparam_value_sizeis < size of return type andparam_valueis notNULL.INVALID_EVENTifeventis a not a valid event object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clFlush
public static int clFlush(long command_queue)
Issues all previously queued OpenCL commands incommand_queueto the device associated withcommand_queue.clFlushonly guarantees that all queued commands tocommand_queuewill eventually be submitted to the appropriate device. There is no guarantee that they will be complete afterclFlushreturns.Any blocking commands queued in a command-queue and
ReleaseCommandQueueperform an implicit flush of the command-queue. These blocking commands areEnqueueReadBuffer,EnqueueReadBufferRect,EnqueueReadImage, withblocking_readset toTRUE;EnqueueWriteBuffer,EnqueueWriteBufferRect,EnqueueWriteImagewithblocking_writeset toTRUE;EnqueueMapBuffer,EnqueueMapImagewithblocking_mapset toTRUE; orWaitForEvents.To use event objects that refer to commands enqueued in a command-queue as event objects to wait on by commands enqueued in a different command-queue, the application must call a
clFlushor any blocking commands that perform an implicit flush of the command-queue where the commands that refer to these event objects are enqueued.- Parameters:
command_queue- the command-queue- Returns:
SUCCESSif the function call was executed successfully. Otherwise, it returns one of the following errors:INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clFinish
public static int clFinish(long command_queue)
Blocks until all previously queued OpenCL commands incommand_queueare issued to the associated device and have completed.clFinishdoes not return until all previously queued commands incommand_queuehave been processed and completed.clFinishis also a synchronization point.- Parameters:
command_queue- the command-queue
-
clGetExtensionFunctionAddress
public static long clGetExtensionFunctionAddress(java.nio.ByteBuffer funcname) public static long clGetExtensionFunctionAddress(java.lang.CharSequence funcname)
Reference Page - This function is deprecated after OpenCL 1.1
Returns the address of the extension function named byfuncname. The pointer returned should be cast to a function pointer type matching the extension function's definition defined in the appropriate extension specification and header file. A return value ofNULLindicates that the specified function does not exist for the implementation. A non-NULLreturn value forclGetExtensionFunctionAddressdoes not guarantee that an extension function is actually supported. The application must also make a corresponding query usingclGetPlatformInfo(platform, CL_PLATFORM_EXTENSIONS, … )orclGetDeviceInfo(device, CL_DEVICE_EXTENSIONS, … )to determine if an extension is supported by the OpenCL implementation.clGetExtensionFunctionAddressmay not be queried for core (non-extension) functions in OpenCL. For functions that are queryable withclGetExtensionFunctionAddress, implementations may choose to also export those functions statically from the object libraries implementing those functions. However, portable applications cannot rely on this behavior.- Parameters:
funcname- the extension function name- Returns:
- the extension function address
-
clGetPlatformIDs
public static int clGetPlatformIDs(@Nullable org.lwjgl.PointerBuffer platforms, @Nullable int[] num_platforms)Array version of:GetPlatformIDs
-
clGetPlatformInfo
public static int clGetPlatformInfo(long platform, int param_name, @Nullable long[] param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Array version of:GetPlatformInfo
-
clGetDeviceIDs
public static int clGetDeviceIDs(long platform, long device_type, @Nullable org.lwjgl.PointerBuffer devices, @Nullable int[] num_devices)Array version of:GetDeviceIDs
-
clGetDeviceInfo
public static int clGetDeviceInfo(long device, int param_name, @Nullable int[] param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetDeviceInfo(long device, int param_name, @Nullable long[] param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Array version of:GetDeviceInfo
-
clCreateContext
public static long clCreateContext(org.lwjgl.PointerBuffer properties, org.lwjgl.PointerBuffer devices, @Nullable CLContextCallbackI pfn_notify, long user_data, @Nullable int[] errcode_ret)Array version of:CreateContext
-
clCreateContextFromType
public static long clCreateContextFromType(org.lwjgl.PointerBuffer properties, long device_type, @Nullable CLContextCallbackI pfn_notify, long user_data, @Nullable int[] errcode_ret)Array version of:CreateContextFromType
-
clGetContextInfo
public static int clGetContextInfo(long context, int param_name, @Nullable int[] param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Array version of:GetContextInfo
-
clCreateCommandQueue
public static long clCreateCommandQueue(long context, long device, long properties, @Nullable int[] errcode_ret)Reference Page - This function is deprecated after OpenCL 1.2
Array version of:CreateCommandQueue
-
clGetCommandQueueInfo
public static int clGetCommandQueueInfo(long command_queue, int param_name, @Nullable int[] param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetCommandQueueInfo(long command_queue, int param_name, @Nullable long[] param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Array version of:GetCommandQueueInfo
-
clCreateBuffer
public static long clCreateBuffer(long context, long flags, java.nio.ByteBuffer host_ptr, @Nullable int[] errcode_ret) public static long clCreateBuffer(long context, long flags, short[] host_ptr, @Nullable int[] errcode_ret) public static long clCreateBuffer(long context, long flags, int[] host_ptr, @Nullable int[] errcode_ret) public static long clCreateBuffer(long context, long flags, float[] host_ptr, @Nullable int[] errcode_ret) public static long clCreateBuffer(long context, long flags, double[] host_ptr, @Nullable int[] errcode_ret)Array version of:CreateBuffer
-
clEnqueueReadBuffer
public static int clEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, short[] ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, int[] ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, float[] ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueReadBuffer(long command_queue, long buffer, boolean blocking_read, long offset, double[] ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)Array version of:EnqueueReadBuffer
-
clEnqueueWriteBuffer
public static int clEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, short[] ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, int[] ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, float[] ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueWriteBuffer(long command_queue, long buffer, boolean blocking_write, long offset, double[] ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)Array version of:EnqueueWriteBuffer
-
clEnqueueMapBuffer
@Nullable public static java.nio.ByteBuffer clEnqueueMapBuffer(long command_queue, long buffer, boolean blocking_map, long map_flags, long offset, long size, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event, @Nullable int[] errcode_ret, @Nullable java.nio.ByteBuffer old_buffer)Array version of:EnqueueMapBuffer
-
clCreateImage2D
public static long clCreateImage2D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_row_pitch, @Nullable java.nio.ByteBuffer host_ptr, @Nullable int[] errcode_ret) public static long clCreateImage2D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_row_pitch, @Nullable short[] host_ptr, @Nullable int[] errcode_ret) public static long clCreateImage2D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_row_pitch, @Nullable int[] host_ptr, @Nullable int[] errcode_ret) public static long clCreateImage2D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_row_pitch, @Nullable float[] host_ptr, @Nullable int[] errcode_ret)Reference Page - This function is deprecated after OpenCL 1.1
Array version of:CreateImage2D
-
clCreateImage3D
public static long clCreateImage3D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, @Nullable java.nio.ByteBuffer host_ptr, @Nullable int[] errcode_ret) public static long clCreateImage3D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, @Nullable short[] host_ptr, @Nullable int[] errcode_ret) public static long clCreateImage3D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, @Nullable int[] host_ptr, @Nullable int[] errcode_ret) public static long clCreateImage3D(long context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, @Nullable float[] host_ptr, @Nullable int[] errcode_ret)Reference Page - This function is deprecated after OpenCL 1.1
Array version of:CreateImage3D
-
clGetSupportedImageFormats
public static int clGetSupportedImageFormats(long context, long flags, int image_type, @Nullable CLImageFormat.Buffer image_formats, @Nullable int[] num_image_formats)Array version of:GetSupportedImageFormats
-
clEnqueueReadImage
public static int clEnqueueReadImage(long command_queue, long image, boolean blocking_read, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long row_pitch, long slice_pitch, short[] ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueReadImage(long command_queue, long image, boolean blocking_read, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long row_pitch, long slice_pitch, int[] ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueReadImage(long command_queue, long image, boolean blocking_read, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long row_pitch, long slice_pitch, float[] ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueReadImage(long command_queue, long image, boolean blocking_read, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long row_pitch, long slice_pitch, double[] ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)Array version of:EnqueueReadImage
-
clEnqueueWriteImage
public static int clEnqueueWriteImage(long command_queue, long image, boolean blocking_write, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long input_row_pitch, long input_slice_pitch, short[] ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueWriteImage(long command_queue, long image, boolean blocking_write, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long input_row_pitch, long input_slice_pitch, int[] ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueWriteImage(long command_queue, long image, boolean blocking_write, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long input_row_pitch, long input_slice_pitch, float[] ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event) public static int clEnqueueWriteImage(long command_queue, long image, boolean blocking_write, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, long input_row_pitch, long input_slice_pitch, double[] ptr, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)Array version of:EnqueueWriteImage
-
clEnqueueMapImage
@Nullable public static java.nio.ByteBuffer clEnqueueMapImage(long command_queue, long image, boolean blocking_map, long map_flags, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, org.lwjgl.PointerBuffer image_row_pitch, @Nullable org.lwjgl.PointerBuffer image_slice_pitch, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event, @Nullable int[] errcode_ret, @Nullable java.nio.ByteBuffer old_buffer) @Nullable public static java.nio.ByteBuffer clEnqueueMapImage(long command_queue, long image, boolean blocking_map, long map_flags, org.lwjgl.PointerBuffer origin, org.lwjgl.PointerBuffer region, org.lwjgl.PointerBuffer image_row_pitch, @Nullable org.lwjgl.PointerBuffer image_slice_pitch, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event, @Nullable int[] errcode_ret, long length, @Nullable java.nio.ByteBuffer old_buffer)Array version of:EnqueueMapImage
-
clGetImageInfo
public static int clGetImageInfo(long image, int param_name, @Nullable int[] param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Array version of:GetImageInfo
-
clGetMemObjectInfo
public static int clGetMemObjectInfo(long memobj, int param_name, @Nullable int[] param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetMemObjectInfo(long memobj, int param_name, @Nullable long[] param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Array version of:GetMemObjectInfo
-
clCreateSampler
public static long clCreateSampler(long context, boolean normalized_coords, int addressing_mode, int filter_mode, @Nullable int[] errcode_ret)Reference Page - This function is deprecated after OpenCL 1.2
Array version of:CreateSampler
-
clGetSamplerInfo
public static int clGetSamplerInfo(long sampler, int param_name, @Nullable int[] param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Array version of:GetSamplerInfo
-
clCreateProgramWithSource
public static long clCreateProgramWithSource(long context, org.lwjgl.PointerBuffer strings, @Nullable org.lwjgl.PointerBuffer lengths, @Nullable int[] errcode_ret)Array version of:CreateProgramWithSource
-
clCreateProgramWithBinary
public static long clCreateProgramWithBinary(long context, org.lwjgl.PointerBuffer device_list, org.lwjgl.PointerBuffer lengths, org.lwjgl.PointerBuffer binaries, @Nullable int[] binary_status, @Nullable int[] errcode_ret)Array version of:CreateProgramWithBinary
-
clGetProgramInfo
public static int clGetProgramInfo(long program, int param_name, @Nullable int[] param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Array version of:GetProgramInfo
-
clGetProgramBuildInfo
public static int clGetProgramBuildInfo(long program, long device, int param_name, @Nullable int[] param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Array version of:GetProgramBuildInfo
-
clCreateKernel
public static long clCreateKernel(long program, java.nio.ByteBuffer kernel_name, @Nullable int[] errcode_ret) public static long clCreateKernel(long program, java.lang.CharSequence kernel_name, @Nullable int[] errcode_ret)Array version of:CreateKernel
-
clCreateKernelsInProgram
public static int clCreateKernelsInProgram(long program, @Nullable org.lwjgl.PointerBuffer kernels, @Nullable int[] num_kernels_ret)Array version of:CreateKernelsInProgram
-
clSetKernelArg
public static int clSetKernelArg(long kernel, int arg_index, short[] arg_value) public static int clSetKernelArg(long kernel, int arg_index, int[] arg_value) public static int clSetKernelArg(long kernel, int arg_index, long[] arg_value) public static int clSetKernelArg(long kernel, int arg_index, float[] arg_value) public static int clSetKernelArg(long kernel, int arg_index, double[] arg_value)Array version of:SetKernelArg
-
clGetKernelInfo
public static int clGetKernelInfo(long kernel, int param_name, @Nullable int[] param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Array version of:GetKernelInfo
-
clGetKernelWorkGroupInfo
public static int clGetKernelWorkGroupInfo(long kernel, long device, int param_name, @Nullable int[] param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret) public static int clGetKernelWorkGroupInfo(long kernel, long device, int param_name, @Nullable long[] param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Array version of:GetKernelWorkGroupInfo
-
clGetEventInfo
public static int clGetEventInfo(long event, int param_name, @Nullable int[] param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Array version of:GetEventInfo
-
clGetEventProfilingInfo
public static int clGetEventProfilingInfo(long event, int param_name, @Nullable long[] param_value, @Nullable org.lwjgl.PointerBuffer param_value_size_ret)Array version of:GetEventProfilingInfo
-
-