cl_int
clGetKernelSubGroupInfoKHR
(
| cl_kernel kernel , |
| cl_device_id device , | |
| cl_kernel_sub_group_info param_name , | |
| size_t input_value_size , | |
| const void *input_value , | |
| size_t param_value_size , | |
| void *param_value , | |
size_t
*param_value_size_ret
) |
kernel
Specifies the kernel object being queried.
device
Identifies a specific device in the list of devices associated with
kernel. The list of devices is the list of devices in
the OpenCL context that is associated with kernel. If
the list of devices associated with kernel is a single
device, device can be a NULL value.
param_name
Specifies the information to query. The list of
supported param_name types and the
information returned in param_value by
clGetKernelSubGroupInfoKHR is described in the table
below.
input_value_size
Specifies the size in bytes of memory pointed to by
input_value. This
size must be == size of input type as described in table below.
input_value
A pointer to memory where the appropriate parameterization of the query is passed from.
If input_value is NULL, it is ignored.
param_value
A pointer to memory where the appropriate result being queried is returned.
If param_value is NULL, it is ignored.
param_value_size
Used to specify the size in bytes of memory pointed to by
param_value. This size must be ≥ size of return
type as described in the table below.
param_value_size_ret
Returns the actual size in bytes of data copied to
param_value. If
param_value_size_ret
is NULL, it is ignored.
| cl_kernel_sub_group_info | Input Type | Return Type | Info. returned in param_value |
|---|---|---|---|
CL_KERNEL_MAX_SUB_-
GROUP_SIZE_FOR_NDRANGE
|
size_t * | size_t |
Returns the maximum sub-group size for this kernel. All subgroups must be the same size, while the last sub-group in any work-group (i.e. the sub-group with the maximum index) could be the same or smaller size.
The |
CCL_KERNEL_SUB_GROUP_-
COUNT_FOR_NDRANGE
|
size_t * | size_t |
Returns the number of sub-groups that will be present in each work-group for a given local work size. All workgroups, apart from the last work-group in each dimension in the presence of non-uniform work-group sizes, will have the same number of subgroups.
The |
Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
device is
not in the list of devices associated with kernel or if
device is NULL but there is more than one device associated
with kernel.
param_name is not
valid, or if size in bytes specified by param_value_size
is < size of return type as described in the table above and
param_value is not NULL.
param_name is
CL_KERNEL_SUB_GROUP_SIZE_FOR_NDRANGE
and the size in bytes specified by
input_value_size is not valid
or if input_value is NULL.
kernel is a not
a valid kernel object.
Copyright © 2007-2013 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.