Class KHRSuggestedLocalWorkSize


  • public class KHRSuggestedLocalWorkSize
    extends java.lang.Object
    Native bindings to the khr_suggested_local_work_size extension.

    This extension adds the ability to query a suggested local work group size for a kernel running on a device for a specified global work size and global work offset. The suggested local work group size will match the work group size that would be chosen if the kernel were enqueued with the specified global work size and global work offset and a NULL local work size.

    By using the suggested local work group size query an application has greater insight into the local work group size chosen by the OpenCL implementation, and the OpenCL implementation need not re-compute the local work group size if the same kernel is enqueued multiple times with the same parameters.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int clGetKernelSuggestedLocalWorkSizeKHR​(long command_queue, long kernel, org.lwjgl.PointerBuffer global_work_offset, org.lwjgl.PointerBuffer global_work_size, org.lwjgl.PointerBuffer suggested_local_work_size)
      Query a suggested local work size for a kernel object.
      static int nclGetKernelSuggestedLocalWorkSizeKHR​(long command_queue, long kernel, int work_dim, long global_work_offset, long global_work_size, long suggested_local_work_size)
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • nclGetKernelSuggestedLocalWorkSizeKHR

        public static int nclGetKernelSuggestedLocalWorkSizeKHR​(long command_queue,
                                                                long kernel,
                                                                int work_dim,
                                                                long global_work_offset,
                                                                long global_work_size,
                                                                long suggested_local_work_size)
        Parameters:
        work_dim - specifies the number of work dimensions in the input global work offset and global work size, and the output suggested local work size
      • clGetKernelSuggestedLocalWorkSizeKHR

        public static int clGetKernelSuggestedLocalWorkSizeKHR​(long command_queue,
                                                               long kernel,
                                                               @Nullable
                                                               org.lwjgl.PointerBuffer global_work_offset,
                                                               org.lwjgl.PointerBuffer global_work_size,
                                                               org.lwjgl.PointerBuffer suggested_local_work_size)
        Query a suggested local work size for a kernel object.

        The returned suggested local work size is expected to match the local work size that would be chosen if the specified kernel object, with the same kernel arguments, were enqueued into the specified command queue with the specified global work size, specified global work offset, and with a NULL local work size.

        Parameters:
        command_queue - specifies the command queue and device for the query
        kernel - the kernel object and kernel arguments for the query. The OpenCL context associated with kernel and command_queue must the same.
        global_work_offset - can be used to specify an array of at least work_dim global ID offset values for the query. This is optional and may be NULL to indicate there is no global ID offset.