cl_int
clGetProgramInfo
(
| cl_program program, |
cl_program_info param_name, | |
size_t param_value_size, | |
void *param_value, | |
size_t *param_value_size_ret) |
program
Specifies the program object being queried.
param_name
Specifies the information to query. The list of supported param_name
types and the information returned in param_value
by clGetProgramInfo
is described in the table below.
cl_program_info | Return Type and Info. returned in param_value |
---|---|
CL_PROGRAM_REFERENCE_COUNT
|
Return type: cl_uint
Return the The reference count returned should be considered immediately stale. It is unsuitable for general use in applications. This feature is provided for identifying memory leaks. |
CL_PROGRAM_CONTEXT
|
Return type: cl_context
Return the context specified when the program object is created |
CL_PROGRAM_NUM_DEVICES
|
Return type: cl_uint
Return the number of devices associated with |
CL_PROGRAM_DEVICES
|
Return type: cl_device_id[]
Return the list of devices associated with the program object. This can be the devices associated with context on which the program object has been created or can be a subset of devices that are specified when a progam object is created using clCreateProgramWithBinary. |
CL_PROGRAM_SOURCE
|
Return type: char[]
Return the program source code specified by clCreateProgramWithSource. The source string returned is a concatenation of all source strings specified to clCreateProgramWithSource with a null terminator. The concatenation strips any nulls in the original source strings.
The actual number of characters that
represents the program source code
including the null terminator is returned
in |
CL_PROGRAM_BINARY_SIZES
|
Return type: size_t[]
Returns an array that contains the size
in bytes of the program binary for each
device associated with |
CL_PROGRAM_BINARIES
|
Return type: unsigned char *[]
Return the program binaries for all
devices associated with
Each entry in this array is used by the
implementation as the location in
memory where to copy the program
binary for a specific device, if there is a
binary available. To find out which
device the program binary in the array
refers to, use the
If an entry value in the array is NULL, the implementation skips copying the program binary for the specific device identified by the array index. |
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 greater than or equal to the size of return type as described in the table above.
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.
Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
param_name
is not valid, or if size in
bytes specified by param_value_size
is less than the size of return type as described
in the table above and param_value
is not NULL.
program
is not a valid program object.