Class KHRCreateCommandQueue


  • public class KHRCreateCommandQueue
    extends java.lang.Object
    Native bindings to the khr_create_command_queue extension.

    This extension allows OpenCL 1.x devices to support an equivalent of the CreateCommandQueueWithProperties API that was added in OpenCL 2.0. This allows OpenCL 1.x devices to support other optional extensions or features that use the clCreateCommandQueueWithProperties API to specify additional command queue properties that cannot be specified using the OpenCL 1.x clCreateCommandQueue API.

    No new command queue properties are required by this extension. Applications may use the existing DEVICE_QUEUE_PROPERTIES query to determine command queue properties that are supported by the device.

    OpenCL 2.x devices may support this extension for compatibility. In this scenario, the function added by this extension will have the same capabilities as the core clCreateCommandQueueWithProperties API. Applications that only target OpenCL 2.x devices should use the core OpenCL 2.x clCreateCommandQueueWithProperties API instead of this extension API.

    • Method Detail

      • nclCreateCommandQueueWithPropertiesKHR

        public static long nclCreateCommandQueueWithPropertiesKHR​(long context,
                                                                  long device,
                                                                  long properties,
                                                                  long errcode_ret)
      • clCreateCommandQueueWithPropertiesKHR

        public static long clCreateCommandQueueWithPropertiesKHR​(long context,
                                                                 long device,
                                                                 @Nullable
                                                                 java.nio.LongBuffer properties,
                                                                 @Nullable
                                                                 java.nio.IntBuffer errcode_ret)
        Parameters:
        context - a valid OpenCL context
        device - a device associated with context. It can either be in the list of devices specified when context is created using CreateContext or have the same device type as device type specified when context is created using CreateContextFromType.
        properties - a list of properties for the command-queue and their corresponding values. Each property name is immediately followed by the corresponding desired value. The list is terminated with 0. If a supported property and its value is not specified in properties, its default value will be used. properties can be NULL in which case the default values for supported command-queue properties will be used. Must be:
        QUEUE_PROPERTIES
        errcode_ret - will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
        Returns:
        a valid non-zero command-queue and errcode_ret is set to SUCCESS if the command-queue is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret:
        • INVALID_CONTEXT if context is not a valid context.
        • INVALID_DEVICE if device is not a valid device or is not associated with context.
        • INVALID_VALUE if values specified in properties are not valid.
        • INVALID_QUEUE_PROPERTIES if values specified in properties are valid but are not supported by the device.
        • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
        • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
      • clCreateCommandQueueWithPropertiesKHR

        public static long clCreateCommandQueueWithPropertiesKHR​(long context,
                                                                 long device,
                                                                 @Nullable
                                                                 long[] properties,
                                                                 @Nullable
                                                                 int[] errcode_ret)