Description

Table 1. Built-in Kernel Query Functions

Built-in Function

Description

uint get_kernel_work_group_size(void (^block)(void))
uint get_kernel_work_group_size(void (^block)(local void *, …​))

This provides a mechanism to query the maximum work-group size that can be used to execute a block on a specific device given by device.

block specifies the block to be enqueued.

uint get_kernel_preferred_ work_group_size_multiple( void (^block)(void))
uint get_kernel_preferred_ work_group_size_multiple( void (^block)(local void *, …​))

Returns the preferred multiple of work-group size for launch. This is a performance hint. Specifying a work-group size that is not a multiple of the value returned by this query as the value of the local work size argument to enqueue_kernel will not fail to enqueue the block for execution unless the work-group size specified is larger than the device maximum.

See Also

Document Notes

For more information, see the OpenCL C Specification

This page is extracted from the OpenCL C Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.