Class CL12
- java.lang.Object
-
- org.lwjgl.opencl.CL12
-
public class CL12 extends java.lang.ObjectThe core OpenCL 1.2 functionality.
-
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static intclCompileProgram(long program, PointerBuffer device_list, java.nio.ByteBuffer options, PointerBuffer input_headers, PointerBuffer header_include_names, CLProgramCallbackI pfn_notify, long user_data)Compiles a program's source for all the devices or a specific device(s) in the OpenCL context associated withprogram.static intclCompileProgram(long program, PointerBuffer device_list, java.lang.CharSequence options, long[] input_headers, java.lang.CharSequence[] header_include_names, CLProgramCallbackI pfn_notify, long user_data)Compiles a program's source for all the devices or a specific device(s) in the OpenCL context associated withprogram.static intclCompileProgram(long program, PointerBuffer device_list, java.lang.CharSequence options, long input_header, java.lang.CharSequence header_include_name, CLProgramCallbackI pfn_notify, long user_data)Compiles a program's source for all the devices or a specific device(s) in the OpenCL context associated withprogram.static intclCompileProgram(long program, PointerBuffer device_list, java.lang.CharSequence options, PointerBuffer input_headers, PointerBuffer header_include_names, CLProgramCallbackI pfn_notify, long user_data)Compiles a program's source for all the devices or a specific device(s) in the OpenCL context associated withprogram.static longclCreateImage(long context, long flags, CLImageFormat image_format, CLImageDesc image_desc, java.nio.ByteBuffer host_ptr, int[] errcode_ret)Array version of:CreateImagestatic longclCreateImage(long context, long flags, CLImageFormat image_format, CLImageDesc image_desc, java.nio.ByteBuffer host_ptr, java.nio.IntBuffer errcode_ret)Creates a 1D image, 1D image buffer, 1D image array, 2D image, 2D image array or 3D image object.static longclCreateImage(long context, long flags, CLImageFormat image_format, CLImageDesc image_desc, float[] host_ptr, int[] errcode_ret)float[] version of:CreateImagestatic longclCreateImage(long context, long flags, CLImageFormat image_format, CLImageDesc image_desc, java.nio.FloatBuffer host_ptr, java.nio.IntBuffer errcode_ret)FloatBuffer version of:CreateImagestatic longclCreateImage(long context, long flags, CLImageFormat image_format, CLImageDesc image_desc, int[] host_ptr, int[] errcode_ret)int[] version of:CreateImagestatic longclCreateImage(long context, long flags, CLImageFormat image_format, CLImageDesc image_desc, java.nio.IntBuffer host_ptr, java.nio.IntBuffer errcode_ret)IntBuffer version of:CreateImagestatic longclCreateImage(long context, long flags, CLImageFormat image_format, CLImageDesc image_desc, short[] host_ptr, int[] errcode_ret)short[] version of:CreateImagestatic longclCreateImage(long context, long flags, CLImageFormat image_format, CLImageDesc image_desc, java.nio.ShortBuffer host_ptr, java.nio.IntBuffer errcode_ret)ShortBuffer version of:CreateImagestatic longclCreateProgramWithBuiltInKernels(long context, int num_devices, long device, java.lang.CharSequence kernel_names, java.nio.IntBuffer errcode_ret)Creates a program object for a context, and loads the information related to the built-in kernels into a program object.static longclCreateProgramWithBuiltInKernels(long context, int num_devices, PointerBuffer device_list, java.nio.ByteBuffer kernel_names, int[] errcode_ret)Array version of:CreateProgramWithBuiltInKernelsstatic longclCreateProgramWithBuiltInKernels(long context, int num_devices, PointerBuffer device_list, java.nio.ByteBuffer kernel_names, java.nio.IntBuffer errcode_ret)Creates a program object for a context, and loads the information related to the built-in kernels into a program object.static longclCreateProgramWithBuiltInKernels(long context, int num_devices, PointerBuffer device_list, java.lang.CharSequence kernel_names, int[] errcode_ret)Array version of:CreateProgramWithBuiltInKernelsstatic longclCreateProgramWithBuiltInKernels(long context, int num_devices, PointerBuffer device_list, java.lang.CharSequence kernel_names, java.nio.IntBuffer errcode_ret)Creates a program object for a context, and loads the information related to the built-in kernels into a program object.static intclCreateSubDevices(long in_device, PointerBuffer properties, PointerBuffer out_devices, int[] num_devices_ret)Array version of:CreateSubDevicesstatic intclCreateSubDevices(long in_device, PointerBuffer properties, PointerBuffer out_devices, java.nio.IntBuffer num_devices_ret)Creates an array of sub-devices that each reference a non-intersecting set of compute units withinin_device, according to a partition scheme given byproperties.static intclEnqueueBarrierWithWaitList(long command_queue, PointerBuffer event_wait_list, PointerBuffer event)enqueues a barrier command which waits for either a list of events to complete, or if the list is empty it waits for all commands previously enqueued incommand_queueto complete before it completes.static intclEnqueueFillBuffer(long command_queue, long buffer, java.nio.ByteBuffer pattern, long offset, long size, PointerBuffer event_wait_list, PointerBuffer event)Enqueues a command to fill a buffer object with a pattern of a given pattern size.static intclEnqueueFillImage(long command_queue, long image, java.nio.ByteBuffer fill_color, PointerBuffer origin, PointerBuffer region, PointerBuffer event_wait_list, PointerBuffer event)Enqueues a command to fill an image object with a specified color.static intclEnqueueMarkerWithWaitList(long command_queue, PointerBuffer event_wait_list, PointerBuffer event)Enqueues a marker command which waits for either a list of events to complete, or if the list is empty it waits for all commands previously enqueued incommand_queueto complete before it completes.static intclEnqueueMigrateMemObjects(long command_queue, PointerBuffer mem_objects, long flags, PointerBuffer event_wait_list, PointerBuffer event)Enqueues a command to indicate which device a set of memory objects should be associated with.static longclGetExtensionFunctionAddressForPlatform(long platform, java.nio.ByteBuffer funcname)Returns the address of the extension function named byfuncnamefor a givenplatform.static longclGetExtensionFunctionAddressForPlatform(long platform, java.lang.CharSequence funcname)Returns the address of the extension function named byfuncnamefor a givenplatform.static intclGetKernelArgInfo(long kernel, int arg_indx, int param_name, java.nio.ByteBuffer param_value, PointerBuffer param_value_size_ret)Returns information about the arguments of a kernel.static intclGetKernelArgInfo(long kernel, int arg_indx, int param_name, int[] param_value, PointerBuffer param_value_size_ret)int[] version of:GetKernelArgInfostatic intclGetKernelArgInfo(long kernel, int arg_indx, int param_name, java.nio.IntBuffer param_value, PointerBuffer param_value_size_ret)IntBuffer version of:GetKernelArgInfostatic intclGetKernelArgInfo(long kernel, int arg_indx, int param_name, long[] param_value, PointerBuffer param_value_size_ret)long[] version of:GetKernelArgInfostatic intclGetKernelArgInfo(long kernel, int arg_indx, int param_name, java.nio.LongBuffer param_value, PointerBuffer param_value_size_ret)LongBuffer version of:GetKernelArgInfostatic longclLinkProgram(long context, PointerBuffer device_list, java.nio.ByteBuffer options, PointerBuffer input_programs, CLProgramCallbackI pfn_notify, long user_data)Links a set of compiled program objects and libraries for all the devices or a specific device(s) in the OpenCL context and creates an executable.static longclLinkProgram(long context, PointerBuffer device_list, java.lang.CharSequence options, long input_program, CLProgramCallbackI pfn_notify, long user_data)Links a set of compiled program objects and libraries for all the devices or a specific device(s) in the OpenCL context and creates an executable.static longclLinkProgram(long context, PointerBuffer device_list, java.lang.CharSequence options, PointerBuffer input_programs, CLProgramCallbackI pfn_notify, long user_data)Links a set of compiled program objects and libraries for all the devices or a specific device(s) in the OpenCL context and creates an executable.static intclReleaseDevice(long device)Decrements the device reference count ifdeviceis a valid sub-device created by a call toCreateSubDevices.static intclRetainDevice(long device)Increments the device reference count ifdeviceis a valid sub-device created by a call toCreateSubDevices.static intclUnloadPlatformCompiler(long platform)Allows the implementation to release the resources allocated by the OpenCL compiler for platform.
-
-
-
Field Detail
-
CL_COMPILE_PROGRAM_FAILURE
public static final int CL_COMPILE_PROGRAM_FAILURE
Error Codes.- See Also:
- Constant Field Values
-
CL_LINKER_NOT_AVAILABLE
public static final int CL_LINKER_NOT_AVAILABLE
Error Codes.- See Also:
- Constant Field Values
-
CL_LINK_PROGRAM_FAILURE
public static final int CL_LINK_PROGRAM_FAILURE
Error Codes.- See Also:
- Constant Field Values
-
CL_DEVICE_PARTITION_FAILED
public static final int CL_DEVICE_PARTITION_FAILED
Error Codes.- See Also:
- Constant Field Values
-
CL_KERNEL_ARG_INFO_NOT_AVAILABLE
public static final int CL_KERNEL_ARG_INFO_NOT_AVAILABLE
Error Codes.- See Also:
- Constant Field Values
-
CL_INVALID_IMAGE_DESCRIPTOR
public static final int CL_INVALID_IMAGE_DESCRIPTOR
Error Codes.- See Also:
- Constant Field Values
-
CL_INVALID_COMPILER_OPTIONS
public static final int CL_INVALID_COMPILER_OPTIONS
Error Codes.- See Also:
- Constant Field Values
-
CL_INVALID_LINKER_OPTIONS
public static final int CL_INVALID_LINKER_OPTIONS
Error Codes.- See Also:
- Constant Field Values
-
CL_INVALID_DEVICE_PARTITION_COUNT
public static final int CL_INVALID_DEVICE_PARTITION_COUNT
Error Codes.- See Also:
- Constant Field Values
-
CL_VERSION_1_2
public static final int CL_VERSION_1_2
OpenCL Version.- See Also:
- Constant Field Values
-
CL_BLOCKING
public static final int CL_BLOCKING
cl_bool- See Also:
- Constant Field Values
-
CL_NON_BLOCKING
public static final int CL_NON_BLOCKING
cl_bool- See Also:
- Constant Field Values
-
CL_DEVICE_TYPE_CUSTOM
public static final int CL_DEVICE_TYPE_CUSTOM
cl_device_type - bitfield- See Also:
- Constant Field Values
-
CL_DEVICE_DOUBLE_FP_CONFIG
public static final int CL_DEVICE_DOUBLE_FP_CONFIG
cl_device_info- See Also:
- Constant Field Values
-
CL_DEVICE_LINKER_AVAILABLE
public static final int CL_DEVICE_LINKER_AVAILABLE
cl_device_info- See Also:
- Constant Field Values
-
CL_DEVICE_BUILT_IN_KERNELS
public static final int CL_DEVICE_BUILT_IN_KERNELS
cl_device_info- See Also:
- Constant Field Values
-
CL_DEVICE_IMAGE_MAX_BUFFER_SIZE
public static final int CL_DEVICE_IMAGE_MAX_BUFFER_SIZE
cl_device_info- See Also:
- Constant Field Values
-
CL_DEVICE_IMAGE_MAX_ARRAY_SIZE
public static final int CL_DEVICE_IMAGE_MAX_ARRAY_SIZE
cl_device_info- See Also:
- Constant Field Values
-
CL_DEVICE_PARENT_DEVICE
public static final int CL_DEVICE_PARENT_DEVICE
cl_device_info- See Also:
- Constant Field Values
-
CL_DEVICE_PARTITION_MAX_SUB_DEVICES
public static final int CL_DEVICE_PARTITION_MAX_SUB_DEVICES
cl_device_info- See Also:
- Constant Field Values
-
CL_DEVICE_PARTITION_PROPERTIES
public static final int CL_DEVICE_PARTITION_PROPERTIES
cl_device_info- See Also:
- Constant Field Values
-
CL_DEVICE_PARTITION_AFFINITY_DOMAIN
public static final int CL_DEVICE_PARTITION_AFFINITY_DOMAIN
cl_device_info- See Also:
- Constant Field Values
-
CL_DEVICE_PARTITION_TYPE
public static final int CL_DEVICE_PARTITION_TYPE
cl_device_info- See Also:
- Constant Field Values
-
CL_DEVICE_REFERENCE_COUNT
public static final int CL_DEVICE_REFERENCE_COUNT
cl_device_info- See Also:
- Constant Field Values
-
CL_DEVICE_PREFERRED_INTEROP_USER_SYNC
public static final int CL_DEVICE_PREFERRED_INTEROP_USER_SYNC
cl_device_info- See Also:
- Constant Field Values
-
CL_DEVICE_PRINTF_BUFFER_SIZE
public static final int CL_DEVICE_PRINTF_BUFFER_SIZE
cl_device_info- See Also:
- Constant Field Values
-
CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT
public static final int CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT
cl_device_fp_config - bitfield- See Also:
- Constant Field Values
-
CL_CONTEXT_INTEROP_USER_SYNC
public static final int CL_CONTEXT_INTEROP_USER_SYNC
cl_context_properties- See Also:
- Constant Field Values
-
CL_DEVICE_PARTITION_BY_COUNTS_LIST_END
public static final int CL_DEVICE_PARTITION_BY_COUNTS_LIST_END
cl_device_partition_property list null-terminator- See Also:
- Constant Field Values
-
CL_DEVICE_PARTITION_EQUALLY
public static final int CL_DEVICE_PARTITION_EQUALLY
Split the aggregate device into as many smaller aggregate devices as can be created, each containingncompute units. The valuenis passed as the value accompanying this property. Ifndoes not divide evenly intoDEVICE_PARTITION_MAX_COMPUTE_UNITS, then the remaining compute units are not used.- See Also:
- Constant Field Values
-
CL_DEVICE_PARTITION_BY_COUNTS
public static final int CL_DEVICE_PARTITION_BY_COUNTS
This property is followed by aDEVICE_PARTITION_BY_COUNTS_LIST_ENDterminated list of compute unit counts. For each nonzero countmin the list, a sub-device is created withmcompute units in it.The number of non-zero count entries in the list may not exceed
DEVICE_PARTITION_MAX_SUB_DEVICES.The total number of compute units specified may not exceed
DEVICE_PARTITION_MAX_COMPUTE_UNITS.- See Also:
- Constant Field Values
-
CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN
public static final int CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN
Split the device into smaller aggregate devices containing one or more compute units that all share part of a cache hierarchy. The value accompanying this property may be drawn from the following list:DEVICE_AFFINITY_DOMAIN_NUMA– Split the device into sub-devices comprised of compute units that share a NUMA node.DEVICE_AFFINITY_DOMAIN_L4_CACHE– Split the device into sub-devices comprised of compute units that share a level 4 data cache.DEVICE_AFFINITY_DOMAIN_L3_CACHE– Split the device into sub-devices comprised of compute units that share a level 3 data cache.DEVICE_AFFINITY_DOMAIN_L2_CACHE– Split the device into sub-devices comprised of compute units that share a level 2 data cache.DEVICE_AFFINITY_DOMAIN_L1_CACHE– Split the device into sub-devices comprised of compute units that share a level 1 data cache.DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE– Split the device along the next partitionable affinity domain. The implementation shall find the first level along which the device or sub-device may be further subdivided in the order NUMA, L4, L3, L2, L1, and partition the device into sub-devices comprised of compute units that share memory subsystems at this level.
The user may determine what happened by calling
GetDeviceInfo(DEVICE_PARTITION_TYPE) on the sub-devices.- See Also:
- Constant Field Values
-
CL_DEVICE_AFFINITY_DOMAIN_NUMA
public static final int CL_DEVICE_AFFINITY_DOMAIN_NUMA
cl_device_affinity_domain- See Also:
- Constant Field Values
-
CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE
public static final int CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE
cl_device_affinity_domain- See Also:
- Constant Field Values
-
CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE
public static final int CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE
cl_device_affinity_domain- See Also:
- Constant Field Values
-
CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE
public static final int CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE
cl_device_affinity_domain- See Also:
- Constant Field Values
-
CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE
public static final int CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE
cl_device_affinity_domain- See Also:
- Constant Field Values
-
CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE
public static final int CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE
cl_device_affinity_domain- See Also:
- Constant Field Values
-
CL_MEM_HOST_WRITE_ONLY
public static final int CL_MEM_HOST_WRITE_ONLY
cl_mem_flags - bitfield- See Also:
- Constant Field Values
-
CL_MEM_HOST_READ_ONLY
public static final int CL_MEM_HOST_READ_ONLY
cl_mem_flags - bitfield- See Also:
- Constant Field Values
-
CL_MEM_HOST_NO_ACCESS
public static final int CL_MEM_HOST_NO_ACCESS
cl_mem_flags - bitfield- See Also:
- Constant Field Values
-
CL_MIGRATE_MEM_OBJECT_HOST
public static final int CL_MIGRATE_MEM_OBJECT_HOST
cl_mem_migration_flags - bitfield- See Also:
- Constant Field Values
-
CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED
public static final int CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED
cl_mem_migration_flags - bitfield- See Also:
- Constant Field Values
-
CL_MEM_OBJECT_IMAGE2D_ARRAY
public static final int CL_MEM_OBJECT_IMAGE2D_ARRAY
cl_mem_object_type- See Also:
- Constant Field Values
-
CL_MEM_OBJECT_IMAGE1D
public static final int CL_MEM_OBJECT_IMAGE1D
cl_mem_object_type- See Also:
- Constant Field Values
-
CL_MEM_OBJECT_IMAGE1D_ARRAY
public static final int CL_MEM_OBJECT_IMAGE1D_ARRAY
cl_mem_object_type- See Also:
- Constant Field Values
-
CL_MEM_OBJECT_IMAGE1D_BUFFER
public static final int CL_MEM_OBJECT_IMAGE1D_BUFFER
cl_mem_object_type- See Also:
- Constant Field Values
-
CL_IMAGE_ARRAY_SIZE
public static final int CL_IMAGE_ARRAY_SIZE
cl_image_info- See Also:
- Constant Field Values
-
CL_IMAGE_BUFFER
public static final int CL_IMAGE_BUFFER
cl_image_info- See Also:
- Constant Field Values
-
CL_IMAGE_NUM_MIP_LEVELS
public static final int CL_IMAGE_NUM_MIP_LEVELS
cl_image_info- See Also:
- Constant Field Values
-
CL_IMAGE_NUM_SAMPLES
public static final int CL_IMAGE_NUM_SAMPLES
cl_image_info- See Also:
- Constant Field Values
-
CL_MAP_WRITE_INVALIDATE_REGION
public static final int CL_MAP_WRITE_INVALIDATE_REGION
cl_map_flags - bitfield- See Also:
- Constant Field Values
-
CL_PROGRAM_NUM_KERNELS
public static final int CL_PROGRAM_NUM_KERNELS
cl_program_info- See Also:
- Constant Field Values
-
CL_PROGRAM_KERNEL_NAMES
public static final int CL_PROGRAM_KERNEL_NAMES
cl_program_info- See Also:
- Constant Field Values
-
CL_PROGRAM_BINARY_TYPE
public static final int CL_PROGRAM_BINARY_TYPE
cl_program_build_info- See Also:
- Constant Field Values
-
CL_PROGRAM_BINARY_TYPE_NONE
public static final int CL_PROGRAM_BINARY_TYPE_NONE
cl_program_binary_type- See Also:
- Constant Field Values
-
CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT
public static final int CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT
cl_program_binary_type- See Also:
- Constant Field Values
-
CL_PROGRAM_BINARY_TYPE_LIBRARY
public static final int CL_PROGRAM_BINARY_TYPE_LIBRARY
cl_program_binary_type- See Also:
- Constant Field Values
-
CL_PROGRAM_BINARY_TYPE_EXECUTABLE
public static final int CL_PROGRAM_BINARY_TYPE_EXECUTABLE
cl_program_binary_type- See Also:
- Constant Field Values
-
CL_KERNEL_ATTRIBUTES
public static final int CL_KERNEL_ATTRIBUTES
cl_kernel_info- See Also:
- Constant Field Values
-
CL_KERNEL_ARG_ADDRESS_QUALIFIER
public static final int CL_KERNEL_ARG_ADDRESS_QUALIFIER
cl_kernel_arg_info- See Also:
- Constant Field Values
-
CL_KERNEL_ARG_ACCESS_QUALIFIER
public static final int CL_KERNEL_ARG_ACCESS_QUALIFIER
cl_kernel_arg_info- See Also:
- Constant Field Values
-
CL_KERNEL_ARG_TYPE_NAME
public static final int CL_KERNEL_ARG_TYPE_NAME
cl_kernel_arg_info- See Also:
- Constant Field Values
-
CL_KERNEL_ARG_TYPE_QUALIFIER
public static final int CL_KERNEL_ARG_TYPE_QUALIFIER
cl_kernel_arg_info- See Also:
- Constant Field Values
-
CL_KERNEL_ARG_NAME
public static final int CL_KERNEL_ARG_NAME
cl_kernel_arg_info- See Also:
- Constant Field Values
-
CL_KERNEL_ARG_ADDRESS_GLOBAL
public static final int CL_KERNEL_ARG_ADDRESS_GLOBAL
cl_kernel_arg_address_qualifier- See Also:
- Constant Field Values
-
CL_KERNEL_ARG_ADDRESS_LOCAL
public static final int CL_KERNEL_ARG_ADDRESS_LOCAL
cl_kernel_arg_address_qualifier- See Also:
- Constant Field Values
-
CL_KERNEL_ARG_ADDRESS_CONSTANT
public static final int CL_KERNEL_ARG_ADDRESS_CONSTANT
cl_kernel_arg_address_qualifier- See Also:
- Constant Field Values
-
CL_KERNEL_ARG_ADDRESS_PRIVATE
public static final int CL_KERNEL_ARG_ADDRESS_PRIVATE
cl_kernel_arg_address_qualifier- See Also:
- Constant Field Values
-
CL_KERNEL_ARG_ACCESS_READ_ONLY
public static final int CL_KERNEL_ARG_ACCESS_READ_ONLY
cl_kernel_arg_access_qualifier- See Also:
- Constant Field Values
-
CL_KERNEL_ARG_ACCESS_WRITE_ONLY
public static final int CL_KERNEL_ARG_ACCESS_WRITE_ONLY
cl_kernel_arg_access_qualifier- See Also:
- Constant Field Values
-
CL_KERNEL_ARG_ACCESS_READ_WRITE
public static final int CL_KERNEL_ARG_ACCESS_READ_WRITE
cl_kernel_arg_access_qualifier- See Also:
- Constant Field Values
-
CL_KERNEL_ARG_ACCESS_NONE
public static final int CL_KERNEL_ARG_ACCESS_NONE
cl_kernel_arg_access_qualifier- See Also:
- Constant Field Values
-
CL_KERNEL_ARG_TYPE_NONE
public static final int CL_KERNEL_ARG_TYPE_NONE
cl_kernel_arg_type_qualifier- See Also:
- Constant Field Values
-
CL_KERNEL_ARG_TYPE_CONST
public static final int CL_KERNEL_ARG_TYPE_CONST
cl_kernel_arg_type_qualifier- See Also:
- Constant Field Values
-
CL_KERNEL_ARG_TYPE_RESTRICT
public static final int CL_KERNEL_ARG_TYPE_RESTRICT
cl_kernel_arg_type_qualifier- See Also:
- Constant Field Values
-
CL_KERNEL_ARG_TYPE_VOLATILE
public static final int CL_KERNEL_ARG_TYPE_VOLATILE
cl_kernel_arg_type_qualifier- See Also:
- Constant Field Values
-
CL_KERNEL_GLOBAL_WORK_SIZE
public static final int CL_KERNEL_GLOBAL_WORK_SIZE
cl_kernel_work_group_info- See Also:
- Constant Field Values
-
CL_COMMAND_BARRIER
public static final int CL_COMMAND_BARRIER
cl_command_type- See Also:
- Constant Field Values
-
CL_COMMAND_MIGRATE_MEM_OBJECTS
public static final int CL_COMMAND_MIGRATE_MEM_OBJECTS
cl_command_type- See Also:
- Constant Field Values
-
CL_COMMAND_FILL_BUFFER
public static final int CL_COMMAND_FILL_BUFFER
cl_command_type- See Also:
- Constant Field Values
-
CL_COMMAND_FILL_IMAGE
public static final int CL_COMMAND_FILL_IMAGE
cl_command_type- See Also:
- Constant Field Values
-
-
Method Detail
-
clGetExtensionFunctionAddressForPlatform
public static long clGetExtensionFunctionAddressForPlatform(long platform, java.nio.ByteBuffer funcname)Returns the address of the extension function named byfuncnamefor a givenplatform. 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 or platform is not a valid platform. A non-NULLreturn value forclGetExtensionFunctionAddressForPlatformdoes not guarantee that an extension function is actually supported by the platform. 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.clGetExtensionFunctionAddressForPlatformmay not be queried for core (non-extension) functions in OpenCL. For functions that are queryable withclGetExtensionFunctionAddressForPlatform, 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:
platform- the platform to queryfuncname- the extension function name
-
clGetExtensionFunctionAddressForPlatform
public static long clGetExtensionFunctionAddressForPlatform(long platform, java.lang.CharSequence funcname)Returns the address of the extension function named byfuncnamefor a givenplatform. 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 or platform is not a valid platform. A non-NULLreturn value forclGetExtensionFunctionAddressForPlatformdoes not guarantee that an extension function is actually supported by the platform. 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.clGetExtensionFunctionAddressForPlatformmay not be queried for core (non-extension) functions in OpenCL. For functions that are queryable withclGetExtensionFunctionAddressForPlatform, 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:
platform- the platform to queryfuncname- the extension function name
-
clRetainDevice
public static int clRetainDevice(long device)
Increments the device reference count ifdeviceis a valid sub-device created by a call toCreateSubDevices. Ifdeviceis a root level device i.e. acl_device_idreturned byGetDeviceIDs, the device reference count remains unchanged.- Parameters:
device- the device to retain- Returns:
SUCCESSif the function is executed successfully or the device is a root-level device. Otherwise, it returns one of the following errors:INVALID_DEVICEifdeviceis not a valid sub-device created by a call toCreateSubDevices.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.
-
clReleaseDevice
public static int clReleaseDevice(long device)
Decrements the device reference count ifdeviceis a valid sub-device created by a call toCreateSubDevices. Ifdeviceis a root level device i.e. acl_device_idreturned byGetDeviceIDs, the device reference count remains unchanged.After the
devicereference count becomes zero and all the objects attached todevice(such as command-queues) are released, the device object is deleted.- Parameters:
device- the device to release- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_DEVICEifdeviceis not a valid sub-device created by a call toCreateSubDevices.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.
-
clCreateSubDevices
public static int clCreateSubDevices(long in_device, PointerBuffer properties, PointerBuffer out_devices, java.nio.IntBuffer num_devices_ret)Creates an array of sub-devices that each reference a non-intersecting set of compute units withinin_device, according to a partition scheme given byproperties. The output sub-devices may be used in every way that the root (or parent) device can be used, including creating contexts, building programs, further calls toclCreateSubDevicesand creating command-queues. When a command-queue is created against a sub-device, the commands enqueued on the queue are executed only on the sub-device.A few examples that describe how to specify partition properties in
propertiesargument toclCreateSubDevicesare given below:- To partition a device containing 16 compute units into two sub-devices, each containing 8 compute units, pass the following in
properties:
[DEVICE_PARTITION_EQUALLY, 8, 0 ] - To partition a device with four compute units into two sub-devices with one sub-device containing 3 compute units and the other sub-device 1 compute
unit, pass the following in
propertiesargument:
[DEVICE_PARTITION_BY_COUNTS, 3, 1,DEVICE_PARTITION_BY_COUNTS_LIST_END, 0 ] - To split a device along the outermost cache line (if any), pass the following in
propertiesargument:
[DEVICE_PARTITION_BY_AFFINITY_DOMAIN,DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE, 0 ]
- Parameters:
in_device- the device to be partitionedproperties- specifies howin_deviceis to be partition described by a partition name and its corresponding value. Each partition name is immediately followed by the corresponding desired value. The list is terminated with 0. Only one partitioning scheme can be specified inproperties. One of:DEVICE_PARTITION_EQUALLYDEVICE_PARTITION_BY_COUNTSDEVICE_PARTITION_BY_AFFINITY_DOMAINout_devices- the buffer where the OpenCL sub-devices will be returned. Ifout_devicesisNULL, this argument is ignored. Ifout_devicesis notNULL,num_devicesmust be greater than or equal to the number of sub-devices that device may be partitioned into according to the partitioning scheme specified inproperties.num_devices_ret- the number of sub-devices that device may be partitioned into according to the partitioning scheme specified inproperties. Ifnum_devices_retisNULL, it is ignored.- Returns:
SUCCESSif the partition is created successfully. Otherwise, it returns aNULLvalue with the following error values returned inerrcode_ret:INVALID_DEVICEifin_deviceis not valid.INVALID_VALUEif values specified inpropertiesare not valid or if values specified inpropertiesare valid but not supported by the device.INVALID_VALUEifout_devicesis notNULLandnum_devicesis less than the number of sub-devices created by the partition scheme.DEVICE_PARTITION_FAILEDif the partition name is supported by the implementation butin_devicecould not be further partitioned.INVALID_DEVICE_PARTITION_COUNTif the partition name specified inpropertiesisDEVICE_PARTITION_BY_COUNTSand the number of sub-devices requested exceedsDEVICE_PARTITION_MAX_SUB_DEVICESor the total number of compute units requested exceedsDEVICE_PARTITION_MAX_COMPUTE_UNITSforin_device, or the number of compute units requested for one or more sub-devices is less than zero or the number of sub-devices requested exceedsDEVICE_PARTITION_MAX_COMPUTE_UNITSforin_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.
- To partition a device containing 16 compute units into two sub-devices, each containing 8 compute units, pass the following in
-
clCreateImage
public static long clCreateImage(long context, long flags, CLImageFormat image_format, CLImageDesc image_desc, java.nio.ByteBuffer host_ptr, java.nio.IntBuffer errcode_ret)Creates a 1D image, 1D image buffer, 1D image array, 2D image, 2D image array or 3D image object.For a 3D image or 2D image array, the image data specified by
host_ptris stored as a linear sequence of adjacent 2D image slices or 2D images respectively. Each 2D image is a linear sequence of adjacent scanlines. Each scanline is a linear sequence of image elements.For a 2D image, the image data specified by
host_ptris stored as a linear sequence of adjacent scanlines. Each scanline is a linear sequence of image elements.For a 1D image array, the image data specified by
host_ptris stored as a linear sequence of adjacent 1D images respectively. Each 1D image or 1D image buffer is a single scanline which is a linear sequence of adjacent elements.- 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.For all image types except
MEM_OBJECT_IMAGE1D_BUFFER, if value specified forflagsis 0, the default is used which isMEM_READ_WRITE.For
MEM_OBJECT_IMAGE1D_BUFFERimage type, if theMEM_READ_WRITE,MEM_READ_ONLYorMEM_WRITE_ONLYvalues are not specified inflags, they are inherited from the corresponding memory access qualifers associated with buffer. TheMEM_USE_HOST_PTR,MEM_ALLOC_HOST_PTRandMEM_COPY_HOST_PTRvalues cannot be specified inflagsbut are inherited from the corresponding memory access qualifiers associated with buffer. IfMEM_COPY_HOST_PTRis specified in the memory access qualifier values associated with buffer it does not imply any additional copies when the sub-buffer is created from buffer. If theMEM_HOST_WRITE_ONLY,MEM_HOST_READ_ONLYorMEM_HOST_NO_ACCESSvalues are not specified inflags, they are inherited from the corresponding memory access qualifiers associated with buffer. 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_desc- a pointer to aCLImageDescstructure that describes type and dimensions of the image to be allocatedhost_ptr- a pointer to the image data that may already be allocated by the application. Refer to table below for a description of how large the buffer thathost_ptrpoints to must be.ImageType Size of buffer that host_ptrpoints toMEM_OBJECT_IMAGE1D≥ image_row_pitchMEM_OBJECT_IMAGE1D_BUFFER≥ image_row_pitchMEM_OBJECT_IMAGE2D≥ image_row_pitch * image_heightMEM_OBJECT_IMAGE3D≥ image_slice_pitch * image_depthMEM_OBJECT_IMAGE1D_ARRAY≥ image_slice_pitch * image_array_sizeMEM_OBJECT_IMAGE2D_ARRAY≥ image_slice_pitch * image_array_sizeerrcode_ret- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.- Returns:
- a valid non-zero image object and the
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_FORMAT_DESCRIPTORif a 2D image is created from a buffer and the row pitch and base address alignment does not follow the rules described for creating a 2D image from a buffer.INVALID_IMAGE_FORMAT_DESCRIPTORif a 2D image is created from a 2D image object and the rules described above are not followed.INVALID_IMAGE_DESCRIPTORif values specified inimage_descare not valid or ifimage_descisNULL.INVALID_IMAGE_SIZEif image dimensions specified inimage_descexceed the maximum image dimensions for 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.INVALID_VALUEif an image buffer is being created and the buffer object was created withMEM_WRITE_ONLYand flags specifiesMEM_READ_WRITEorMEM_READ_ONLY, or if the buffer object was created withMEM_READ_ONLYand flags specifiesMEM_READ_WRITEorMEM_WRITE_ONLY, or if flags specifiesMEM_USE_HOST_PTRorMEM_ALLOC_HOST_PTRorMEM_COPY_HOST_PTR.INVALID_VALUEif an image buffer is being created or an image is being created from another memory object (image or buffer) and themem_objectobject was created withMEM_HOST_WRITE_ONLYand flags specifiesMEM_HOST_READ_ONLY, or ifmem_objectwas created withMEM_HOST_READ_ONLYand flags specifiesMEM_HOST_WRITE_ONLY, or ifmem_objectwas created withMEM_HOST_NO_ACCESSand flags specifiesMEM_HOST_READ_ONLYorMEM_HOST_WRITE_ONLY.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 in context that support images.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.
-
clCreateImage
public static long clCreateImage(long context, long flags, CLImageFormat image_format, CLImageDesc image_desc, java.nio.ShortBuffer host_ptr, java.nio.IntBuffer errcode_ret)ShortBuffer version of:CreateImage
-
clCreateImage
public static long clCreateImage(long context, long flags, CLImageFormat image_format, CLImageDesc image_desc, java.nio.IntBuffer host_ptr, java.nio.IntBuffer errcode_ret)IntBuffer version of:CreateImage
-
clCreateImage
public static long clCreateImage(long context, long flags, CLImageFormat image_format, CLImageDesc image_desc, java.nio.FloatBuffer host_ptr, java.nio.IntBuffer errcode_ret)FloatBuffer version of:CreateImage
-
clCreateProgramWithBuiltInKernels
public static long clCreateProgramWithBuiltInKernels(long context, int num_devices, PointerBuffer device_list, java.nio.ByteBuffer kernel_names, java.nio.IntBuffer errcode_ret)Creates a program object for a context, and loads the information related to the built-in kernels into a program object.- Parameters:
context- a valid OpenCL contextnum_devices- the number of devices listed indevice_listdevice_list- a pointer to a list of devices that are incontext.device_listmust be a non-NULLvalue. The built-in kernels are loaded for devices specified in this list.The devices associated with the program object will be the list of devices specified by
device_list. The list of devices specified bydevice_listmust be devices associated withcontext.kernel_names- a semi-colon separated list of built-in kernel nameserrcode_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_VALUEifkernel_namesisNULLorkernel_namescontains a kernel name that is not supported by any of the devices indevice_list.INVALID_DEVICEif devices listed indevice_listare not in the list of devices associated withcontext.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.
-
clCreateProgramWithBuiltInKernels
public static long clCreateProgramWithBuiltInKernels(long context, int num_devices, PointerBuffer device_list, java.lang.CharSequence kernel_names, java.nio.IntBuffer errcode_ret)Creates a program object for a context, and loads the information related to the built-in kernels into a program object.- Parameters:
context- a valid OpenCL contextnum_devices- the number of devices listed indevice_listdevice_list- a pointer to a list of devices that are incontext.device_listmust be a non-NULLvalue. The built-in kernels are loaded for devices specified in this list.The devices associated with the program object will be the list of devices specified by
device_list. The list of devices specified bydevice_listmust be devices associated withcontext.kernel_names- a semi-colon separated list of built-in kernel nameserrcode_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_VALUEifkernel_namesisNULLorkernel_namescontains a kernel name that is not supported by any of the devices indevice_list.INVALID_DEVICEif devices listed indevice_listare not in the list of devices associated withcontext.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.
-
clCreateProgramWithBuiltInKernels
public static long clCreateProgramWithBuiltInKernels(long context, int num_devices, long device, java.lang.CharSequence kernel_names, java.nio.IntBuffer errcode_ret)Creates a program object for a context, and loads the information related to the built-in kernels into a program object.- Parameters:
context- a valid OpenCL contextnum_devices- the number of devices listed indevice_listkernel_names- a semi-colon separated list of built-in kernel nameserrcode_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_VALUEifkernel_namesisNULLorkernel_namescontains a kernel name that is not supported by any of the devices indevice_list.INVALID_DEVICEif devices listed indevice_listare not in the list of devices associated withcontext.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.
-
clCompileProgram
public static int clCompileProgram(long program, PointerBuffer device_list, java.nio.ByteBuffer options, PointerBuffer input_headers, PointerBuffer header_include_names, CLProgramCallbackI pfn_notify, long user_data)Compiles a program's source for all the devices or a specific device(s) in the OpenCL context associated withprogram. The pre-processor runs before the program sources are compiled. The compiled binary is built for all devices associated withprogramor the list of devices specified. The compiled binary can be queried usingGetProgramInfo(program,PROGRAM_BINARIES, …) and can be specified toCreateProgramWithBinaryto create a new program object.- Parameters:
program- the program object that is the compilation targetdevice_list- a pointer to a list of devices associated withprogram. Ifdevice_listis aNULLvalue, the compile is performed for all devices associated with program. Ifdevice_listis a non-NULLvalue, the compile is performed for devices specified in this list.options- a pointer to a null-terminated string of characters that describes the compilation options to be used for building the program executableinput_headers- an array of program embedded headers created withCreateProgramWithSourceheader_include_names- an array that has a one to one correspondence withinput_headers. Each entry inheader_include_namesspecifies the include name used by source in program that comes from an embedded header. The corresponding entry ininput_headersidentifies the program object which contains the header source to be used. The embedded headers are first searched before the headers in the list of directories specified by the –I compile option. If multiple entries inheader_include_namesrefer to the same header name, the first one encountered will be used.pfn_notify- a function pointer to a notification routine. The notification routine is a callback function that an application can register and which will be called when the program executable has been built (successfully or unsuccessfully).If
pfn_notifyis notNULL,clCompileProgramdoes not need to wait for the compiler to complete and can return immediately once the compilation can begin. The compilation can begin if the context, program whose sources are being compiled, list of devices, input headers, programs that describe input headers and compiler options specified are all valid and appropriate host and device resources needed to perform the compile are available.If
pfn_notifyisNULL,clCompileProgramdoes not return until the compiler 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 greater than zero, or ifdevice_listis notNULLandnum_devicesis zero.INVALID_VALUEifnum_input_headersis zero andheader_include_namesorinput_headersare notNULLor ifnum_input_headersis not zero andheader_include_namesorinput_headersareNULL.INVALID_VALUEifpfn_notifyisNULLbutuser_datais notNULL.INVALID_DEVICEif OpenCL devices listed indevice_listare not in the list of devices associated with program.INVALID_COMPILER_OPTIONSif the compiler options specified by options are invalid.INVALID_OPERATIONif the compilation or build of a program executable for any of the devices listed indevice_listby a previous call toclCompileProgramorBuildProgramfor program has not completed.COMPILER_NOT_AVAILABLEif a compiler is not available i.e.DEVICE_COMPILER_AVAILABLEis set toFALSE.COMPILE_PROGRAM_FAILUREif there is a failure to compile the program source. This error will be returned ifclCompileProgramdoes not return until the compile has completed.INVALID_OPERATIONif there are kernel objects attached toprogram.INVALID_OPERATIONifprogramhas no source i.e. it has not been created withCreateProgramWithSource.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.
-
clCompileProgram
public static int clCompileProgram(long program, PointerBuffer device_list, java.lang.CharSequence options, PointerBuffer input_headers, PointerBuffer header_include_names, CLProgramCallbackI pfn_notify, long user_data)Compiles a program's source for all the devices or a specific device(s) in the OpenCL context associated withprogram. The pre-processor runs before the program sources are compiled. The compiled binary is built for all devices associated withprogramor the list of devices specified. The compiled binary can be queried usingGetProgramInfo(program,PROGRAM_BINARIES, …) and can be specified toCreateProgramWithBinaryto create a new program object.- Parameters:
program- the program object that is the compilation targetdevice_list- a pointer to a list of devices associated withprogram. Ifdevice_listis aNULLvalue, the compile is performed for all devices associated with program. Ifdevice_listis a non-NULLvalue, the compile is performed for devices specified in this list.options- a pointer to a null-terminated string of characters that describes the compilation options to be used for building the program executableinput_headers- an array of program embedded headers created withCreateProgramWithSourceheader_include_names- an array that has a one to one correspondence withinput_headers. Each entry inheader_include_namesspecifies the include name used by source in program that comes from an embedded header. The corresponding entry ininput_headersidentifies the program object which contains the header source to be used. The embedded headers are first searched before the headers in the list of directories specified by the –I compile option. If multiple entries inheader_include_namesrefer to the same header name, the first one encountered will be used.pfn_notify- a function pointer to a notification routine. The notification routine is a callback function that an application can register and which will be called when the program executable has been built (successfully or unsuccessfully).If
pfn_notifyis notNULL,clCompileProgramdoes not need to wait for the compiler to complete and can return immediately once the compilation can begin. The compilation can begin if the context, program whose sources are being compiled, list of devices, input headers, programs that describe input headers and compiler options specified are all valid and appropriate host and device resources needed to perform the compile are available.If
pfn_notifyisNULL,clCompileProgramdoes not return until the compiler 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 greater than zero, or ifdevice_listis notNULLandnum_devicesis zero.INVALID_VALUEifnum_input_headersis zero andheader_include_namesorinput_headersare notNULLor ifnum_input_headersis not zero andheader_include_namesorinput_headersareNULL.INVALID_VALUEifpfn_notifyisNULLbutuser_datais notNULL.INVALID_DEVICEif OpenCL devices listed indevice_listare not in the list of devices associated with program.INVALID_COMPILER_OPTIONSif the compiler options specified by options are invalid.INVALID_OPERATIONif the compilation or build of a program executable for any of the devices listed indevice_listby a previous call toclCompileProgramorBuildProgramfor program has not completed.COMPILER_NOT_AVAILABLEif a compiler is not available i.e.DEVICE_COMPILER_AVAILABLEis set toFALSE.COMPILE_PROGRAM_FAILUREif there is a failure to compile the program source. This error will be returned ifclCompileProgramdoes not return until the compile has completed.INVALID_OPERATIONif there are kernel objects attached toprogram.INVALID_OPERATIONifprogramhas no source i.e. it has not been created withCreateProgramWithSource.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.
-
clCompileProgram
public static int clCompileProgram(long program, PointerBuffer device_list, java.lang.CharSequence options, long[] input_headers, java.lang.CharSequence[] header_include_names, CLProgramCallbackI pfn_notify, long user_data)Compiles a program's source for all the devices or a specific device(s) in the OpenCL context associated withprogram. The pre-processor runs before the program sources are compiled. The compiled binary is built for all devices associated withprogramor the list of devices specified. The compiled binary can be queried usingGetProgramInfo(program,PROGRAM_BINARIES, …) and can be specified toCreateProgramWithBinaryto create a new program object.- Parameters:
program- the program object that is the compilation targetdevice_list- a pointer to a list of devices associated withprogram. Ifdevice_listis aNULLvalue, the compile is performed for all devices associated with program. Ifdevice_listis a non-NULLvalue, the compile is performed for devices specified in this list.options- a pointer to a null-terminated string of characters that describes the compilation options to be used for building the program executableinput_headers- an array of program embedded headers created withCreateProgramWithSourceheader_include_names- an array that has a one to one correspondence withinput_headers. Each entry inheader_include_namesspecifies the include name used by source in program that comes from an embedded header. The corresponding entry ininput_headersidentifies the program object which contains the header source to be used. The embedded headers are first searched before the headers in the list of directories specified by the –I compile option. If multiple entries inheader_include_namesrefer to the same header name, the first one encountered will be used.pfn_notify- a function pointer to a notification routine. The notification routine is a callback function that an application can register and which will be called when the program executable has been built (successfully or unsuccessfully).If
pfn_notifyis notNULL,clCompileProgramdoes not need to wait for the compiler to complete and can return immediately once the compilation can begin. The compilation can begin if the context, program whose sources are being compiled, list of devices, input headers, programs that describe input headers and compiler options specified are all valid and appropriate host and device resources needed to perform the compile are available.If
pfn_notifyisNULL,clCompileProgramdoes not return until the compiler 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 greater than zero, or ifdevice_listis notNULLandnum_devicesis zero.INVALID_VALUEifnum_input_headersis zero andheader_include_namesorinput_headersare notNULLor ifnum_input_headersis not zero andheader_include_namesorinput_headersareNULL.INVALID_VALUEifpfn_notifyisNULLbutuser_datais notNULL.INVALID_DEVICEif OpenCL devices listed indevice_listare not in the list of devices associated with program.INVALID_COMPILER_OPTIONSif the compiler options specified by options are invalid.INVALID_OPERATIONif the compilation or build of a program executable for any of the devices listed indevice_listby a previous call toclCompileProgramorBuildProgramfor program has not completed.COMPILER_NOT_AVAILABLEif a compiler is not available i.e.DEVICE_COMPILER_AVAILABLEis set toFALSE.COMPILE_PROGRAM_FAILUREif there is a failure to compile the program source. This error will be returned ifclCompileProgramdoes not return until the compile has completed.INVALID_OPERATIONif there are kernel objects attached toprogram.INVALID_OPERATIONifprogramhas no source i.e. it has not been created withCreateProgramWithSource.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.
-
clCompileProgram
public static int clCompileProgram(long program, PointerBuffer device_list, java.lang.CharSequence options, long input_header, java.lang.CharSequence header_include_name, CLProgramCallbackI pfn_notify, long user_data)Compiles a program's source for all the devices or a specific device(s) in the OpenCL context associated withprogram. The pre-processor runs before the program sources are compiled. The compiled binary is built for all devices associated withprogramor the list of devices specified. The compiled binary can be queried usingGetProgramInfo(program,PROGRAM_BINARIES, …) and can be specified toCreateProgramWithBinaryto create a new program object.- Parameters:
program- the program object that is the compilation targetdevice_list- a pointer to a list of devices associated withprogram. Ifdevice_listis aNULLvalue, the compile is performed for all devices associated with program. Ifdevice_listis a non-NULLvalue, the compile is performed for devices specified in this list.options- a pointer to a null-terminated string of characters that describes the compilation options to be used for building the program executablepfn_notify- a function pointer to a notification routine. The notification routine is a callback function that an application can register and which will be called when the program executable has been built (successfully or unsuccessfully).If
pfn_notifyis notNULL,clCompileProgramdoes not need to wait for the compiler to complete and can return immediately once the compilation can begin. The compilation can begin if the context, program whose sources are being compiled, list of devices, input headers, programs that describe input headers and compiler options specified are all valid and appropriate host and device resources needed to perform the compile are available.If
pfn_notifyisNULL,clCompileProgramdoes not return until the compiler 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 greater than zero, or ifdevice_listis notNULLandnum_devicesis zero.INVALID_VALUEifnum_input_headersis zero andheader_include_namesorinput_headersare notNULLor ifnum_input_headersis not zero andheader_include_namesorinput_headersareNULL.INVALID_VALUEifpfn_notifyisNULLbutuser_datais notNULL.INVALID_DEVICEif OpenCL devices listed indevice_listare not in the list of devices associated with program.INVALID_COMPILER_OPTIONSif the compiler options specified by options are invalid.INVALID_OPERATIONif the compilation or build of a program executable for any of the devices listed indevice_listby a previous call toclCompileProgramorBuildProgramfor program has not completed.COMPILER_NOT_AVAILABLEif a compiler is not available i.e.DEVICE_COMPILER_AVAILABLEis set toFALSE.COMPILE_PROGRAM_FAILUREif there is a failure to compile the program source. This error will be returned ifclCompileProgramdoes not return until the compile has completed.INVALID_OPERATIONif there are kernel objects attached toprogram.INVALID_OPERATIONifprogramhas no source i.e. it has not been created withCreateProgramWithSource.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.
-
clLinkProgram
public static long clLinkProgram(long context, PointerBuffer device_list, java.nio.ByteBuffer options, PointerBuffer input_programs, CLProgramCallbackI pfn_notify, long user_data)Links a set of compiled program objects and libraries for all the devices or a specific device(s) in the OpenCL context and creates an executable.clLinkProgramcreates a new program object which contains this executable. The executable binary can be queried usingGetProgramInfo(program,PROGRAM_BINARIES, …) and can be specified toCreateProgramWithBinaryto create a new program object.The devices associated with the returned program object will be the list of devices specified by
device_listor ifdevice_listisNULLit will be the list of devices associated with context.- Parameters:
context- a valid OpenCL contextdevice_list- a pointer to a list of devices that are incontext. Ifdevice_listis aNULLvalue, the link is performed for all devices associated withcontextfor which a compiled object is available. Ifdevice_listis a non-NULLvalue, the link is performed for devices specified in this list for which a compiled object is available.options- a pointer to a null-terminated string of characters that describes the link options to be used for building the program executableinput_programs- an array of program objects that are compiled binaries or libraries that are to be linked to create the program executable. For each device indevice_listor ifdevice_listisNULLthe list of devices associated withcontext, the following cases occur:- All programs specified by
input_programscontain a compiled binary or library for the device. In this case, a link is performed to generate a program executable for this device. - None of the programs contain a compiled binary or library for that device. In this case, no link is performed and there will be no program executable generated for this device.
- All other cases will return a
INVALID_OPERATIONerror.
- All programs specified by
pfn_notify- a function pointer to a notification routine. The notification routine is a callback function that an application can register and which will be called when the program executable has been built (successfully or unsuccessfully).If
pfn_notifyis notNULL,clLinkProgramdoes not need to wait for the linker to complete and can return immediately once the linking operation can begin. Once the linker has completed, thepfn_notifycallback function is called which returns the program object returned byclLinkProgram. The application can query the link status and log for this program object. 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,clLinkProgramdoes not return until the linker has completed.user_data- will be passed as an argument whenpfn_notifyis called.user_datacan beNULL.- Returns:
- a valid non-zero program object, if the linking operation can begin. The linking operation can begin if the context, list of devices, input programs and
linker options specified are all valid and appropriate host and device resources needed to perform the link are available.
If
pfn_notifyisNULL, theerrcode_retwill be set toSUCCESSif the link operation was successful andLINK_PROGRAM_FAILUREif there is a failure to link the compiled binaries and/or libraries.If
pfn_notifyis notNULL,clLinkProgramdoes not have to wait until the linker to complete and can returnSUCCESSinerrcode_retif the linking operation can begin. Thepfn_notifycallback function will return aSUCCESSorLINK_PROGRAM_FAILUREif the linking operation was successful or not.Otherwise
clLinkProgramreturns aNULLprogram object with an appropriate error inerrcode_ret. The application should query the linker status of this program object to check if the link was successful or not. The list of errors that can be returned are:INVALID_CONTEXTifcontextis not a valid context.INVALID_VALUEifdevice_listisNULLandnum_devicesis greater than zero, or ifdevice_listis notNULLandnum_devicesis zero.INVALID_VALUEifnum_input_programsis zero andinput_programsisNULLor ifnum_input_programsis zero andinput_programsis notNULLor ifnum_input_programsis not zero andinput_programsisNULL.INVALID_PROGRAMif programs specified ininput_programsare not valid program objects.INVALID_VALUEifpfn_notifyisNULLbutuser_datais notNULL.INVALID_DEVICEif OpenCL devices listed indevice_listare not in the list of devices associated withcontext.INVALID_LINKER_OPTIONSif the linker options specified byoptionsare invalid.INVALID_OPERATIONif the compilation or build of a program executable for any of the devices listed indevice_listby a previous call toCompileProgramorBuildProgramfor program has not completed.INVALID_OPERATIONif the rules for devices containing compiled binaries or libraries as described ininput_programsargument above are not followed.LINKER_NOT_AVAILABLEif a linker is not available i.e.DEVICE_LINKER_AVAILABLEis set toFALSE.LINK_PROGRAM_FAILUREif there is a failure to link the compiled binaries and/or libraries.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.
-
clLinkProgram
public static long clLinkProgram(long context, PointerBuffer device_list, java.lang.CharSequence options, PointerBuffer input_programs, CLProgramCallbackI pfn_notify, long user_data)Links a set of compiled program objects and libraries for all the devices or a specific device(s) in the OpenCL context and creates an executable.clLinkProgramcreates a new program object which contains this executable. The executable binary can be queried usingGetProgramInfo(program,PROGRAM_BINARIES, …) and can be specified toCreateProgramWithBinaryto create a new program object.The devices associated with the returned program object will be the list of devices specified by
device_listor ifdevice_listisNULLit will be the list of devices associated with context.- Parameters:
context- a valid OpenCL contextdevice_list- a pointer to a list of devices that are incontext. Ifdevice_listis aNULLvalue, the link is performed for all devices associated withcontextfor which a compiled object is available. Ifdevice_listis a non-NULLvalue, the link is performed for devices specified in this list for which a compiled object is available.options- a pointer to a null-terminated string of characters that describes the link options to be used for building the program executableinput_programs- an array of program objects that are compiled binaries or libraries that are to be linked to create the program executable. For each device indevice_listor ifdevice_listisNULLthe list of devices associated withcontext, the following cases occur:- All programs specified by
input_programscontain a compiled binary or library for the device. In this case, a link is performed to generate a program executable for this device. - None of the programs contain a compiled binary or library for that device. In this case, no link is performed and there will be no program executable generated for this device.
- All other cases will return a
INVALID_OPERATIONerror.
- All programs specified by
pfn_notify- a function pointer to a notification routine. The notification routine is a callback function that an application can register and which will be called when the program executable has been built (successfully or unsuccessfully).If
pfn_notifyis notNULL,clLinkProgramdoes not need to wait for the linker to complete and can return immediately once the linking operation can begin. Once the linker has completed, thepfn_notifycallback function is called which returns the program object returned byclLinkProgram. The application can query the link status and log for this program object. 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,clLinkProgramdoes not return until the linker has completed.user_data- will be passed as an argument whenpfn_notifyis called.user_datacan beNULL.- Returns:
- a valid non-zero program object, if the linking operation can begin. The linking operation can begin if the context, list of devices, input programs and
linker options specified are all valid and appropriate host and device resources needed to perform the link are available.
If
pfn_notifyisNULL, theerrcode_retwill be set toSUCCESSif the link operation was successful andLINK_PROGRAM_FAILUREif there is a failure to link the compiled binaries and/or libraries.If
pfn_notifyis notNULL,clLinkProgramdoes not have to wait until the linker to complete and can returnSUCCESSinerrcode_retif the linking operation can begin. Thepfn_notifycallback function will return aSUCCESSorLINK_PROGRAM_FAILUREif the linking operation was successful or not.Otherwise
clLinkProgramreturns aNULLprogram object with an appropriate error inerrcode_ret. The application should query the linker status of this program object to check if the link was successful or not. The list of errors that can be returned are:INVALID_CONTEXTifcontextis not a valid context.INVALID_VALUEifdevice_listisNULLandnum_devicesis greater than zero, or ifdevice_listis notNULLandnum_devicesis zero.INVALID_VALUEifnum_input_programsis zero andinput_programsisNULLor ifnum_input_programsis zero andinput_programsis notNULLor ifnum_input_programsis not zero andinput_programsisNULL.INVALID_PROGRAMif programs specified ininput_programsare not valid program objects.INVALID_VALUEifpfn_notifyisNULLbutuser_datais notNULL.INVALID_DEVICEif OpenCL devices listed indevice_listare not in the list of devices associated withcontext.INVALID_LINKER_OPTIONSif the linker options specified byoptionsare invalid.INVALID_OPERATIONif the compilation or build of a program executable for any of the devices listed indevice_listby a previous call toCompileProgramorBuildProgramfor program has not completed.INVALID_OPERATIONif the rules for devices containing compiled binaries or libraries as described ininput_programsargument above are not followed.LINKER_NOT_AVAILABLEif a linker is not available i.e.DEVICE_LINKER_AVAILABLEis set toFALSE.LINK_PROGRAM_FAILUREif there is a failure to link the compiled binaries and/or libraries.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.
-
clLinkProgram
public static long clLinkProgram(long context, PointerBuffer device_list, java.lang.CharSequence options, long input_program, CLProgramCallbackI pfn_notify, long user_data)Links a set of compiled program objects and libraries for all the devices or a specific device(s) in the OpenCL context and creates an executable.clLinkProgramcreates a new program object which contains this executable. The executable binary can be queried usingGetProgramInfo(program,PROGRAM_BINARIES, …) and can be specified toCreateProgramWithBinaryto create a new program object.The devices associated with the returned program object will be the list of devices specified by
device_listor ifdevice_listisNULLit will be the list of devices associated with context.- Parameters:
context- a valid OpenCL contextdevice_list- a pointer to a list of devices that are incontext. Ifdevice_listis aNULLvalue, the link is performed for all devices associated withcontextfor which a compiled object is available. Ifdevice_listis a non-NULLvalue, the link is performed for devices specified in this list for which a compiled object is available.options- a pointer to a null-terminated string of characters that describes the link options to be used for building the program executablepfn_notify- a function pointer to a notification routine. The notification routine is a callback function that an application can register and which will be called when the program executable has been built (successfully or unsuccessfully).If
pfn_notifyis notNULL,clLinkProgramdoes not need to wait for the linker to complete and can return immediately once the linking operation can begin. Once the linker has completed, thepfn_notifycallback function is called which returns the program object returned byclLinkProgram. The application can query the link status and log for this program object. 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,clLinkProgramdoes not return until the linker has completed.user_data- will be passed as an argument whenpfn_notifyis called.user_datacan beNULL.- Returns:
- a valid non-zero program object, if the linking operation can begin. The linking operation can begin if the context, list of devices, input programs and
linker options specified are all valid and appropriate host and device resources needed to perform the link are available.
If
pfn_notifyisNULL, theerrcode_retwill be set toSUCCESSif the link operation was successful andLINK_PROGRAM_FAILUREif there is a failure to link the compiled binaries and/or libraries.If
pfn_notifyis notNULL,clLinkProgramdoes not have to wait until the linker to complete and can returnSUCCESSinerrcode_retif the linking operation can begin. Thepfn_notifycallback function will return aSUCCESSorLINK_PROGRAM_FAILUREif the linking operation was successful or not.Otherwise
clLinkProgramreturns aNULLprogram object with an appropriate error inerrcode_ret. The application should query the linker status of this program object to check if the link was successful or not. The list of errors that can be returned are:INVALID_CONTEXTifcontextis not a valid context.INVALID_VALUEifdevice_listisNULLandnum_devicesis greater than zero, or ifdevice_listis notNULLandnum_devicesis zero.INVALID_VALUEifnum_input_programsis zero andinput_programsisNULLor ifnum_input_programsis zero andinput_programsis notNULLor ifnum_input_programsis not zero andinput_programsisNULL.INVALID_PROGRAMif programs specified ininput_programsare not valid program objects.INVALID_VALUEifpfn_notifyisNULLbutuser_datais notNULL.INVALID_DEVICEif OpenCL devices listed indevice_listare not in the list of devices associated withcontext.INVALID_LINKER_OPTIONSif the linker options specified byoptionsare invalid.INVALID_OPERATIONif the compilation or build of a program executable for any of the devices listed indevice_listby a previous call toCompileProgramorBuildProgramfor program has not completed.INVALID_OPERATIONif the rules for devices containing compiled binaries or libraries as described ininput_programsargument above are not followed.LINKER_NOT_AVAILABLEif a linker is not available i.e.DEVICE_LINKER_AVAILABLEis set toFALSE.LINK_PROGRAM_FAILUREif there is a failure to link the compiled binaries and/or libraries.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.
-
clUnloadPlatformCompiler
public static int clUnloadPlatformCompiler(long platform)
Allows the implementation to release the resources allocated by the OpenCL compiler for platform. 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 toBuildProgram,CompileProgramorLinkProgramafterclUnloadPlatformCompilerwill reload the compiler, if necessary, to build the appropriate program executable.- Parameters:
platform- the platform for which to unload the compiler- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_PLATFORMifplatformis not a valid platform.
-
clGetKernelArgInfo
public static int clGetKernelArgInfo(long kernel, int arg_indx, int param_name, java.nio.ByteBuffer param_value, PointerBuffer param_value_size_ret)Returns information about the arguments of a kernel. Kernel argument information is only available if the program object associated with kernel is created withCreateProgramWithSourceand the program executable is built with the-cl-kernel-arg-infooption specified in options argument toBuildProgramorCompileProgram.- Parameters:
kernel- specifies the kernel object being queriedarg_indx- 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.param_name- the argument information to query. One of:KERNEL_ARG_ADDRESS_QUALIFIERKERNEL_ARG_ACCESS_QUALIFIERKERNEL_ARG_TYPE_NAMEKERNEL_ARG_TYPE_QUALIFIERKERNEL_ARG_NAMEparam_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_ARG_INDEXifarg_indxis not a valid argument index.INVALID_VALUEifparam_nameis not valid, or if size in bytes specified byparam_valuesize is < size of return type andparam_valueis notNULL.KERNEL_ARG_INFO_NOT_AVAILABLEif the argument information is not available forkernel.INVALID_KERNELifkernelis a not a valid kernel object.
-
clGetKernelArgInfo
public static int clGetKernelArgInfo(long kernel, int arg_indx, int param_name, java.nio.IntBuffer param_value, PointerBuffer param_value_size_ret)IntBuffer version of:GetKernelArgInfo
-
clGetKernelArgInfo
public static int clGetKernelArgInfo(long kernel, int arg_indx, int param_name, java.nio.LongBuffer param_value, PointerBuffer param_value_size_ret)LongBuffer version of:GetKernelArgInfo
-
clEnqueueFillBuffer
public static int clEnqueueFillBuffer(long command_queue, long buffer, java.nio.ByteBuffer pattern, long offset, long size, PointerBuffer event_wait_list, PointerBuffer event)Enqueues a command to fill a buffer object with a pattern of a given pattern size. The usage information which indicates whether the memory object can be read or written by a kernel and/or the host and is given by thecl_mem_flagsargument value specified when buffer is created is ignored byclEnqueueFillBuffer.- Parameters:
command_queue- the command-queue in which the fill command will be queued. The OpenCL context associated withcommand_queueandbuffermust be the same.buffer- a valid buffer objectpattern- pointer to the data pattern of sizepattern_sizein bytes.patternwill be used to fill a region in buffer starting atoffsetand issizebytes in size. The data pattern must be a scalar or vector integer or floating-point data type supported by OpenCL. For example, if buffer is to be filled with a pattern offloat4values, then pattern will be a pointer to acl_float4value andpattern_sizewill besizeof(cl_float4). The maximum value ofpattern_sizeis the size of the largest integer or floating-point vector data type supported by the OpenCL device. The memory associated withpatterncan be reused or freed after the function returns.offset- the location in bytes of the region being filled inbufferand must be a multiple ofpattern_sizesize- the size in bytes of region being filled inbufferand must be a multiple ofpattern_sizeevent_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_VALUEifoffsetoroffset + sizerequire accessing elements outside the buffer buffer object respectively.INVALID_VALUEifpatternisNULLor ifpattern_sizeis 0 or ifpattern_sizeis not one of[1, 2, 4, 8, 16, 32, 64, 128].INVALID_VALUEifoffsetandsizeare not a multiple ofpattern_size.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.MEM_OBJECT_ALLOCATION_FAILUREif there is a failure to allocate memory for data store associated withbuffer.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.
-
clEnqueueFillImage
public static int clEnqueueFillImage(long command_queue, long image, java.nio.ByteBuffer fill_color, PointerBuffer origin, PointerBuffer region, PointerBuffer event_wait_list, PointerBuffer event)Enqueues a command to fill an image object with a specified color. The usage information which indicates whether the memory object can be read or written by a kernel and/or the host and is given by thecl_mem_flagsargument value specified when image is created is ignored byclEnqueueFillImage.- Parameters:
command_queue- the command-queue in which the fill command will be queued. The OpenCL context associated withcommand_queueandimagemust be the same.image- a valid image objectfill_color- the fill color. The fill color is a four component RGBA floating-point color value if theimagechannel data type is not an unnormalized signed and unsigned integer type, is a four component signed integer value if theimagechannel data type is an unnormalized signed integer type and is a four component unsigned integer value if theimagechannel data type is an unnormalized unsigned integer type. The fill color will be converted to the appropriate image channel format and order associated withimage.origin- the(x, y, z)offset in pixels in the 1D, 2D or 3D image, the(x, y)offset and the image index in the 2D image array or the(x)offset and the image index in the 1D image array. If image is a 2D image object,origin[2]must be 0. If image is a 1D image or 1D image buffer object,origin[1]andorigin[2]must be 0. If image is a 1D image array object,origin[2]must be 0. If image is a 1D image array object,origin[1]describes the image index in the 1D image array. If image is a 2D image array object,origin[2]describes the image index in the 2D image array.region- the(width, height, depth)in pixels of the 1D, 2D or 3D rectangle, the(width, height)in pixels of the 2D rectangle and the number of images of a 2D image array or the(width)in pixels of the 1D rectangle and the number of images of a 1D image array. If image is a 2D image object,region[2]must be 1. If image is a 1D image or 1D image buffer object,region[1]andregion[2]must be 1. If image is 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_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_VALUEiffill_colorisNULL.INVALID_VALUEif the region being filled as 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) for image are not supported by device associated with queue.IMAGE_FORMAT_NOT_SUPPORTEDif image format (image channel order and data type) for image are not supported by device associated with queue.MEM_OBJECT_ALLOCATION_FAILUREif there is a failure to allocate memory for data store associated withimage.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.
-
clEnqueueMigrateMemObjects
public static int clEnqueueMigrateMemObjects(long command_queue, PointerBuffer mem_objects, long flags, PointerBuffer event_wait_list, PointerBuffer event)Enqueues a command to indicate which device a set of memory objects should be associated with. Typically, memory objects are implicitly migrated to a device for which enqueued commands, using the memory object, are targeted.clEnqueueMigrateMemObjectsallows this migration to be explicitly performed ahead of the dependent commands. This allows a user to preemptively change the association of a memory object, through regular command queue scheduling, in order to prepare for another upcoming command. This also permits an application to overlap the placement of memory objects with other unrelated operations before these memory objects are needed potentially hiding transfer latencies. Once the event, returned fromclEnqueueMigrateMemObjects, has been markedCOMPLETEthe memory objects specified inmem_objectshave been successfully migrated to the device associated withcommand_queue. The migrated memory object shall remain resident on the device until another command is enqueued that either implicitly or explicitly migrates it away.clEnqueueMigrateMemObjectscan also be used to direct the initial placement of a memory object, after creation, possibly avoiding the initial overhead of instantiating the object on the first enqueued command to use it.The user is responsible for managing the event dependencies, associated with this command, in order to avoid overlapping access to memory objects. Improperly specified event dependencies passed to
clEnqueueMigrateMemObjectscould result in undefined results.- Parameters:
command_queue- a valid command-queue. The specified set of memory objects inmem_objectswill be migrated to the OpenCL device associated withcommand_queueor to the host if theMIGRATE_MEM_OBJECT_HOSThas been specified.mem_objects- a pointer to a list of memory objectsflags- a bit-field that is used to specify migration options. One of:MIGRATE_MEM_OBJECT_HOSTMIGRATE_MEM_OBJECT_CONTENT_UNDEFINEDevent_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_queueand memory objects inmem_objectsare not the same or if the context associated withcommand_queueand events inevent_wait_listare not the same.INVALID_MEM_OBJECTif any of the memory objects inmem_objectsis not a valid memory object.INVALID_VALUEifnum_mem_objectsis zero or ifmem_objectsisNULL.INVALID_VALUEifflagsis not 0 or is not any of the values described in the table above.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.MEM_OBJECT_ALLOCATION_FAILUREif there is a failure to allocate memory for the specified set of memory objects inmem_objects.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.
-
clEnqueueMarkerWithWaitList
public static int clEnqueueMarkerWithWaitList(long command_queue, PointerBuffer event_wait_list, PointerBuffer event)Enqueues a marker command which waits for either a list of events to complete, or if the list is empty it waits for all commands previously enqueued incommand_queueto complete before it completes. This command returns an event which can be waited on, i.e. this event can be waited on to insure that all events either in theevent_wait_listor all previously enqueued commands, queued before this command tocommand_queue, have completed.- Parameters:
command_queue- a valid command-queueevent_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 successfully executed. 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_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.
-
clEnqueueBarrierWithWaitList
public static int clEnqueueBarrierWithWaitList(long command_queue, PointerBuffer event_wait_list, PointerBuffer event)enqueues a barrier command which waits for either a list of events to complete, or if the list is empty it waits for all commands previously enqueued incommand_queueto complete before it completes. This command blocks command execution, that is, any following commands enqueued after it do not execute until it completes. This command returns an event which can be waited on, i.e. this event can be waited on to insure that all events either in theevent_wait_listor all previously enqueued commands, queued before this command tocommand_queue, have completed.- Parameters:
command_queue- a valid command-queueevent_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 successfully executed. 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_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.
-
clCreateSubDevices
public static int clCreateSubDevices(long in_device, PointerBuffer properties, PointerBuffer out_devices, int[] num_devices_ret)Array version of:CreateSubDevices
-
clCreateImage
public static long clCreateImage(long context, long flags, CLImageFormat image_format, CLImageDesc image_desc, java.nio.ByteBuffer host_ptr, int[] errcode_ret)Array version of:CreateImage
-
clCreateImage
public static long clCreateImage(long context, long flags, CLImageFormat image_format, CLImageDesc image_desc, short[] host_ptr, int[] errcode_ret)short[] version of:CreateImage
-
clCreateImage
public static long clCreateImage(long context, long flags, CLImageFormat image_format, CLImageDesc image_desc, int[] host_ptr, int[] errcode_ret)int[] version of:CreateImage
-
clCreateImage
public static long clCreateImage(long context, long flags, CLImageFormat image_format, CLImageDesc image_desc, float[] host_ptr, int[] errcode_ret)float[] version of:CreateImage
-
clCreateProgramWithBuiltInKernels
public static long clCreateProgramWithBuiltInKernels(long context, int num_devices, PointerBuffer device_list, java.nio.ByteBuffer kernel_names, int[] errcode_ret)Array version of:CreateProgramWithBuiltInKernels
-
clCreateProgramWithBuiltInKernels
public static long clCreateProgramWithBuiltInKernels(long context, int num_devices, PointerBuffer device_list, java.lang.CharSequence kernel_names, int[] errcode_ret)Array version of:CreateProgramWithBuiltInKernels
-
clGetKernelArgInfo
public static int clGetKernelArgInfo(long kernel, int arg_indx, int param_name, int[] param_value, PointerBuffer param_value_size_ret)int[] version of:GetKernelArgInfo
-
clGetKernelArgInfo
public static int clGetKernelArgInfo(long kernel, int arg_indx, int param_name, long[] param_value, PointerBuffer param_value_size_ret)long[] version of:GetKernelArgInfo
-
-