'\" t .\" Title: clGetKernelInfo .\" Author: The Khronos Group .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 01/14/2021 .\" Manual: OpenCL Manual .\" Source: The Khronos Group .\" Language: English .\" .TH "CLGETKERNELINFO" "3clc" "01/14/2021" "The Khronos Group" "OpenCL Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" clGetKernelInfo \- Returns information about the kernel object\&. .SH "" .HP \w'cl_int\ clGetKernelInfo('u .BI "cl_int clGetKernelInfo(cl_kernel\ " "kernel" ", cl_kernel_info\ " "param_name" ", size_t\ " "param_value_size" ", void\ *" "param_value" ", size_t\ *" "param_value_size_ret" ");" .SH "PARAMETERS" .PP \fI kernel \fR .RS 4 Specifies the kernel object being queried\&. .RE .PP \fI param_name \fR .RS 4 Specifies the information to query\&. The list of supported \fIparam_name\fR types and the information returned in \fIparam_value\fR by \fBclGetKernelInfo\fR is described in the table below\&. .RE .PP \fI param_value \fR .RS 4 A pointer to memory where the appropriate result being queried is returned\&. If \fIparam_value\fR is NULL, it is ignored\&. .RE .PP \fI param_value_size \fR .RS 4 Used to specify the size in bytes of memory pointed to by \fIparam_value\fR\&. This size must be ≥ size of return type as described in the table below\&. .TS allbox tab(:); lB lB lB. T{ cl_kernel_info T}:T{ Return Type T}:T{ Info\&. returned in \fIparam_value\fR T} .T& l l l l l l l l l l l l l l l l l l. T{ \fBCL_KERNEL_FUNCTION_NAME\fR T}:T{ char[] T}:T{ Return the kernel function name\&. T} T{ \fBCL_KERNEL_NUM_ARGS\fR T}:T{ cl_uint T}:T{ Return the number of arguments to \fIkernel\fR\&. T} T{ \fBCL_KERNEL_REFERENCE_COUNT\fR T}:T{ cl_uint T}:T{ Return the \fIkernel\fR reference count\&. .sp 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\&. T} T{ \fBCL_KERNEL_CONTEXT\fR T}:T{ cl_context T}:T{ Return the context associated with \fIkernel\fR\&. T} T{ \fBCL_KERNEL_PROGRAM\fR T}:T{ cl_program T}:T{ Return the program object associated with \fIkernel\fR\&. T} T{ \fBCL_KERNEL_ATTRIBUTES\fR T}:T{ char[] T}:T{ Returns any attributes specified using the __\fBattribute\fR(3clc)__ qualifier with the kernel function declaration in the program source\&. These attributes include those on the __\fBattribute\fR(3clc)__ page and other attributes supported by an implementation\&. .sp Attributes are returned as they were declared inside __\fBattribute\fR(3clc)__((\&.\&.\&.)), with any surrounding whitespace and embedded newlines removed\&. When multiple attributes are present, they are returned as a single, space delimited string\&. T} .TE .sp 1 .RE .PP \fI param_value_size_ret \fR .RS 4 the actual size in bytes of data copied to \fIparam_value\fR\&. If \fIparam_value_size_ret\fR is NULL, it is ignored\&. .RE .SH "ERRORS" .PP Returns CL_SUCCESS if the function is executed successfully\&. Otherwise, it returns one of the following errors: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_INVALID_VALUE if \fIparam_name\fR is not valid, or if size in bytes specified by \fIparam_value_size\fR is < size of return type as described in the table above and \fIparam_value\fR is not NULL\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_INVALID_KERNEL if \fIkernel\fR is not a valid kernel object\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host\&. .RE .SH "SPECIFICATION" .PP \m[blue]\fBOpenCL Specification\fR\m[]\&\s-2\u[1]\d\s+2 .SH "SEE ALSO" .PP \fBclCreateKernel\fR(3clc), \fBclCreateKernelsInProgram\fR(3clc), \fBclGetKernelArgInfo\fR(3clc), \fBclRetainKernel\fR(3clc), \fBclReleaseKernel\fR(3clc), \fBclSetKernelArg\fR(3clc), \fBclGetKernelWorkGroupInfo\fR(3clc) .SH "AUTHORS" .PP \fBThe Khronos Group\fR .SH "COPYRIGHT" .br Copyright \(co 2007-2011 The Khronos Group Inc. .br 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. .sp .SH "NOTES" .IP " 1." 4 OpenCL Specification .RS 4 \%page 162, section 5.7.3 - Kernel Object Queries (updated for 1.2 rev 14) .RE