'\" t .\" Title: clGetKernelArgInfo .\" Author: The Khronos Group .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 01/14/2021 .\" Manual: OpenCL Manual .\" Source: The Khronos Group .\" Language: English .\" .TH "CLGETKERNELARGINFO" "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" clGetKernelArgInfo \- Returns information about the arguments of a kernel\&. .SH "" .HP \w'cl_int\ clGetKernelArgInfo('u .BI "cl_int clGetKernelArgInfo(cl_kernel\ " "kernel" ", cl_uint\ " "arg_indx" ", cl_kernel_arg_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 arg_indx \fR .RS 4 The argument index\&. Arguments to the kernel are referred by indices that go from 0 for the leftmost argument to \fIn\fR \- 1, where \fIn\fR is the total number of arguments declared by a kernel\&. .RE .PP \fI param_name \fR .RS 4 Specifies the argument information to query\&. The list of supported \fIparam_name\fR types and the information returned in \fIparam_value\fR by \fBclGetKernelArgInfo\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_arg_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. T{ \fBCL_KERNEL_ARG_ADDRESS_QUALIFIER\fR T}:T{ cl_kernel_arg_\- address_qualifier T}:T{ Returns the address qualifier specified for the argument given by \fIarg_indx\fR\&. This can be one of the following values: .sp .if n \{\ .RS 4 .\} .nf \fBCL_KERNEL_ARG_ADDRESS_GLOBAL\fR \fBCL_KERNEL_ARG_ADDRESS_LOCAL\fR \fBCL_KERNEL_ARG_ADDRESS_CONSTANT\fR \fBCL_KERNEL_ARG_ADDRESS_PRIVATE\fR .fi .if n \{\ .RE .\} .sp If no address qualifier is specified, the default address qualifier which is \fBCL_KERNEL_ARG_ADDRESS_PRIVATE\fR is returned\&. T} T{ \fBCL_KERNEL_ARG_ACCESS_QUALIFIER\fR T}:T{ cl_kernel_arg_\- access_qualifier T}:T{ Returns the access qualifier specified for the argument given by \fIarg_indx\fR\&. This can be one of the following values: .sp .if n \{\ .RS 4 .\} .nf \fBCL_KERNEL_ARG_ACCESS_READ_ONLY\fR \fBCL_KERNEL_ARG_ACCESS_WRITE_ONLY\fR \fBCL_KERNEL_ARG_ACCESS_READ_WRITE\fR \fBCL_KERNEL_ARG_ACCESS_NONE\fR .fi .if n \{\ .RE .\} .sp If argument is not an image type, \fBCL_KERNEL_ARG_ACCESS_NONE\fR is returned\&. If argument is an image type, the access qualifier specified or the default access qualifier is returned\&. T} T{ \fBCL_KERNEL_ARG_TYPE_NAME\fR T}:T{ char[] T}:T{ Returns the type name specified for the argument given by \fIarg_indx\fR\&. The type name returned will be the argument type name as it was declared with any whitespace removed\&. If argument type name is an unsigned scalar type (i\&.e\&. unsigned char, unsigned short, unsigned int, unsigned long), uchar, ushort, uint and ulong will be returned\&. The argument type name returned does not include any type qualifiers\&. T} T{ \fBCL_KERNEL_ARG_TYPE_QUALIFIER\fR T}:T{ cl_kernel_arg\- type_qualifier T}:T{ Returns the type qualifier specified for the argument given by \fIarg_indx\fR\&. The returned value can be: \fBCL_KERNEL_ARG_TYPE_CONST\fR, \fBCL_KERNEL_ARG_TYPE_RESTRICT\fR, \fBCL_KERNEL_ARG_TYPE_VOLATILE\fR, a combination of the above enums or \fBCL_KERNEL_ARG_TYPE_NONE\fR\&. .sp NOTE: \fBCL_KERNEL_ARG_TYPE_VOLATILE\fR is returned if the argument is a pointer and the pointer is declared with the volatile qualifier\&. T} T{ \fBCL_KERNEL_ARG_NAME\fR T}:T{ char[] T}:T{ Returns the name specified for the argument given by \fIarg_indx\fR\&. T} .TE .sp 1 .RE .PP \fI param_value_size_ret \fR .RS 4 Returns 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 "NOTES" .PP Kernel argument information is only available if the program object associated with \fIkernel\fR is created with \fBclCreateProgramWithSource\fR(3clc) and the program executable is built with the \-cl\-kernel\-arg\-info option specified in \fIoptions\fR argument to \fBclBuildProgram\fR(3clc) or \fBclCompileProgram\fR(3clc)\&. .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_ARG_INDEX if \fIarg_indx\fR is not a valid argument index\&. .RE .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_KERNEL_ARG_INFO_NOT_AVAILABLE if the argument information is not available for kernel\&. .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 .SH "SPECIFICATION" .PP \m[blue]\fBOpenCL Specification\fR\m[]\&\s-2\u[1]\d\s+2 .SH "SEE ALSO" .PP \fBclCreateKernel\fR(3clc), \fBclGetKernelInfo\fR(3clc), \fBclCreateKernelsInProgram\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 166, section 5.7.3 - Kernel Object Queries (updated for 1.2 rev 14) .RE