table of contents
CLGETKERNELWORKGROUP(3clc) | OpenCL Manual | CLGETKERNELWORKGROUP(3clc) |
NAME¶
clGetKernelWorkGroupInfo - Returns information about the kernel object that may be specific to a device.
¶
cl_int clGetKernelWorkGroupInfo(cl_kernel kernel, cl_device_id device, cl_kernel_work_group_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret);
PARAMETERS¶
kernel
device
param_name
param_value
param_value_size
cl_kernel_work_group_info | Return Type | Info. returned in param_value |
CL_KERNEL_GLOBAL_WORK_SIZE | size_t[3] | This provides a mechanism for the application to query the maximum global size that can be used to execute a kernel (i.e. global_work_size argument to clEnqueueNDRangeKernel(3clc)) on a custom device given by device or a built-in kernel on an OpenCL device given by device. If device is not a custom device or kernel is not a built-in kernel, clGetKernelArgInfo(3clc) returns the error CL_INVALID_VALUE. |
CL_KERNEL_WORK_GROUP_SIZE | size_t | This provides a mechanism for the application to query the maximum work-group size that can be used to execute a kernel on a specific device given by device. The OpenCL implementation uses the resource requirements of the kernel (register usage etc.) to determine what this work-group size should be. |
CL_KERNEL_COMPILE_- WORK_GROUP_SIZE | size_t[3] | Returns the work-group size specified by the __attribute__((reqd_work_group_size(X, Y, Z))) qualifier. See functionQualifiers(3clc). If the work-group size is not specified using the above attribute qualifier (0, 0, 0) is returned. |
CL_KERNEL_LOCAL_MEM_SIZE | cl_ulong | Returns the amount of local memory in bytes being used by a kernel. This includes local memory that may be needed by an implementation to execute the kernel, variables declared inside the kernel with the local(3clc) address qualifier and local memory to be allocated for arguments to the kernel declared as pointers with the local(3clc) address qualifier and whose size is specified with clSetKernelArg(3clc). If the local memory size, for any pointer argument to the kernel declared with the local(3clc) address qualifier, is not specified, its size is assumed to be 0. |
CL_KERNEL_PREFERRED_WORK_- GROUP_SIZE_MULTIPLE | size_t | Returns the preferred multiple of workgroup size for launch. This is a performance hint. Specifying a workgroup size that is not a multiple of the value returned by this query as the value of the local work size argument to clEnqueueNDRangeKernel(3clc)will not fail to enqueue the kernel for execution unless the work-group size specified is larger than the device maximum. |
CL_KERNEL_PRIVATE_MEM_SIZE | cl_ulong | Returns the minimum amount of private memory, in bytes, used by each workitem in the kernel. This value may include any private memory needed by an implementation to execute the kernel, including that used by the language built-ins and variable declared inside the kernel with the private(3clc) qualifier. |
param_value_size_ret
ERRORS¶
Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
SPECIFICATION¶
OpenCL Specification[1]
SEE ALSO¶
clCreateKernel(3clc), clCreateKernelsInProgram(3clc), clReleaseKernel(3clc), clRetainKernel(3clc), clSetKernelArg(3clc), clGetKernelInfo(3clc)
AUTHORS¶
The Khronos Group
COPYRIGHT¶
Copyright © 2007-2011 The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to the
condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.
NOTES¶
- 1.
- OpenCL Specification
01/14/2021 | The Khronos Group |