1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
21
<year>2007-2011</year>
22
<holder>The Khronos Group Inc.
23
Permission is hereby granted, free of charge, to any person obtaining a
24
copy of this software and/or associated documentation files (the
25
"Materials"), to deal in the Materials without restriction, including
26
without limitation the rights to use, copy, modify, merge, publish,
27
distribute, sublicense, and/or sell copies of the Materials, and to
28
permit persons to whom the Materials are furnished to do so, subject to
29
the condition that this copyright notice and permission notice shall be included
30
in all copies or substantial portions of the Materials.</holder>
33
<manvolnum>3</manvolnum>
36
<!-- ================================ SYNOPSIS -->
38
<refnamediv id="clGetKernelArgInfo">
44
Returns information about the arguments of a kernel.
48
<refsynopsisdiv xmlns:xlink="http://www.w3.org/1999/xlink"><title></title>
52
<link xlink:href="scalarDataTypes.html">cl_int</link>
53
<function>clGetKernelArgInfo</function>
57
<link xlink:href="abstractDataTypes.html">cl_kernel</link>
58
<parameter>kernel</parameter>
62
<link xlink:href="scalarDataTypes.html">cl_uint</link>
63
<parameter>arg_indx</parameter>
67
<link xlink:href="enums.html#cl_kernel_arg_info">cl_kernel_arg_info</link>
68
<parameter>param_name</parameter>
72
<link xlink:href="scalarDataTypes.html">size_t</link>
73
<parameter>param_value_size</parameter>
77
<link xlink:href="scalarDataTypes.html">void</link>
78
<parameter>*param_value</parameter>
82
<link xlink:href="scalarDataTypes.html">size_t</link>
83
<parameter>*param_value_size_ret</parameter>
89
<!-- ================================ PARAMETERS -->
91
<refsect1 id="parameters">
92
<title>Parameters</title>
95
<term> <varname> kernel </varname> </term>
98
Specifies the kernel object being queried.
104
<term> <varname> arg_indx </varname> </term>
107
The argument index. Arguments to the kernel are referred by indices that
108
go from 0 for the leftmost argument to <varname>n</varname> - 1, where
109
<varname>n</varname> is the total number of arguments declared by a kernel.
115
<term> <varname> param_name </varname> </term>
118
Specifies the argument information to query. The list of supported
119
<varname>param_name</varname> types and the information returned in
120
<varname>param_value</varname> by <function>clGetKernelArgInfo</function>
121
is described in the table below.
127
<term> <varname> param_value </varname> </term>
130
A pointer to memory where the appropriate result being queried is returned.
131
If <varname>param_value</varname> is NULL, it is ignored.
137
<term> <varname> param_value_size </varname> </term>
140
Used to specify the size in bytes of memory pointed to by <varname>param_value</varname>.
141
This size must be > size of return type as described in the table below.
145
<informaltable frame="all"><anchor id="cl_kernel_info"/>
146
<tgroup cols="3" align="left" colsep="1" rowsep="1">
147
<colspec colname="col1" colnum="1" />
148
<colspec colname="col2" colnum="2" />
149
<colspec colname="col3" colnum="3" />
152
<entry>cl_kernel_arg_info</entry>
153
<entry>Return Type</entry>
154
<entry>Info. returned in <varname>param_value</varname></entry>
160
<entry><constant>CL_KERNEL_ARG_ADDRESS_QUALIFIER</constant></entry>
161
<entry>cl_kernel_arg_-
162
address_qualifier</entry>
165
Returns the address qualifier specified for the argument given by <varname>arg_indx</varname>.
166
This can be one of the following values:
169
<constant>CL_KERNEL_ARG_ADDRESS_GLOBAL</constant>
170
<constant>CL_KERNEL_ARG_ADDRESS_LOCAL</constant>
171
<constant>CL_KERNEL_ARG_ADDRESS_CONSTANT</constant>
172
<constant>CL_KERNEL_ARG_ADDRESS_PRIVATE</constant>
177
If no address qualifier is specified, the default address
178
qualifier which is <constant>CL_KERNEL_ARG_ADDRESS_PRIVATE</constant> is returned.
184
<entry><constant>CL_KERNEL_ARG_ACCESS_QUALIFIER</constant></entry>
185
<entry>cl_kernel_arg_-
186
access_qualifier</entry>
189
Returns the access qualifier specified for the argument given by <varname>arg_indx</varname>.
190
This can be one of the following values:
193
<constant>CL_KERNEL_ARG_ACCESS_READ_ONLY</constant>
194
<constant>CL_KERNEL_ARG_ACCESS_WRITE_ONLY</constant>
195
<constant>CL_KERNEL_ARG_ACCESS_READ_WRITE</constant>
196
<constant>CL_KERNEL_ARG_ACCESS_NONE</constant>
201
If argument is not an image type,
202
<constant>CL_KERNEL_ARG_ACCESS_NONE</constant> is
203
returned. If argument is an image type, the access qualifier
204
specified or the default access qualifier is returned.
210
<entry><constant>CL_KERNEL_ARG_TYPE_NAME</constant></entry>
211
<entry>char[]</entry>
214
Returns the type name specified for the argument given
215
by <varname>arg_indx</varname>. The type name returned
216
will be the argument type name as it was declared with any
217
whitespace removed. If argument type name is an unsigned
218
scalar type (i.e. unsigned char, unsigned short, unsigned
219
int, unsigned long), uchar, ushort, uint and ulong will
220
be returned. The argument type name returned does not
221
include any type qualifiers.
227
<entry><constant>CL_KERNEL_ARG_TYPE_QUALIFIER</constant></entry>
228
<entry>cl_kernel_arg-
229
type_qualifier</entry>
232
Returns the type qualifier specified for the argument
233
given by <varname>arg_indx</varname>. The returned value
234
can be: <constant>CL_KERNEL_ARG_TYPE_CONST</constant>,
235
<constant>CL_KERNEL_ARG_TYPE_RESTRICT</constant>,
236
<constant>CL_KERNEL_ARG_TYPE_VOLATILE</constant>,
237
a combination of the above enums or
238
<constant>CL_KERNEL_ARG_TYPE_NONE</constant>.
242
NOTE: <constant>CL_KERNEL_ARG_TYPE_VOLATILE</constant>
243
is returned if the argument is a pointer and the pointer
244
is declared with the volatile qualifier.
250
<entry><constant>CL_KERNEL_ARG_NAME</constant></entry>
251
<entry>char[]</entry>
254
Returns the name specified for the argument given by <varname>arg_indx</varname>.
273
Returns the actual size in bytes of data copied to <varname>param_value</varname>.
274
If <varname>param_value_size_ret</varname> is NULL, it is ignored.
281
<!-- ================================ NOTES -->
282
<refsect1 id="notes"><title>Notes</title>
285
Kernel argument information is only available if the program
286
object associated with <varname>kernel</varname> is created with
287
<citerefentry><refentrytitle>clCreateProgramWithSource</refentrytitle></citerefentry>
288
and the program executable is built with the -cl-kernel-arg-info
289
option specified in <varname>options</varname> argument to
290
<citerefentry><refentrytitle>clBuildProgram</refentrytitle></citerefentry> or
291
<citerefentry><refentrytitle>clCompileProgram</refentrytitle></citerefentry>.
295
<!-- ================================ ERRORS -->
297
<refsect1 id="errors"><title>Errors</title>
299
Returns <errorname>CL_SUCCESS</errorname> if the function is executed successfully. Otherwise,
300
it returns one of the following errors:
303
<itemizedlist mark="disc">
305
<errorname>CL_INVALID_ARG_INDEX</errorname> if <varname>arg_indx</varname>
306
is not a valid argument index.
310
<errorname>CL_INVALID_VALUE</errorname> if <varname>param_name</varname>
311
is not valid, or if size in bytes specified by
312
<varname>param_value_size</varname> is < size of return type as
313
described in the table above and <varname>param_value</varname> is not NULL
317
<errorname>CL_KERNEL_ARG_INFO_NOT_AVAILABLE</errorname> if the argument
318
information is not available for kernel.
322
<errorname>CL_INVALID_KERNEL</errorname> if <varname>kernel</varname>
323
is not a valid kernel object.
329
<!-- ================================ EXAMPLE -->
330
<!-- DO NOT DELETE IN CASE AN EXAMPLE IS ADDED IN THE FUTURE -->
332
<refsect2 id="example1">
337
<informaltable frame="none">
338
<tgroup cols="1" align="left" colsep="0" rowsep="0">
339
<colspec colname="col1" colnum="1" />
343
Example goes here - it will be set in "code" type with white space preserved.
352
<!-- ================================ SPECIFICATION -->
353
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
355
<refsect1 id="specification"><title>Specification</title>
358
<imagedata fileref="pdficon_small1.gif" format="gif" />
361
<olink uri="clGetKernelArgInfo">OpenCL Specification</olink>
365
<!-- ================================ ALSO SEE -->
367
<refsect1 id="seealso"><title>Also see</title>
369
<citerefentry><refentrytitle>clCreateKernel</refentrytitle></citerefentry>,
370
<citerefentry><refentrytitle>clGetKernelInfo</refentrytitle></citerefentry>,
371
<citerefentry><refentrytitle>clCreateKernelsInProgram</refentrytitle></citerefentry>,
372
<citerefentry><refentrytitle>clRetainKernel</refentrytitle></citerefentry>,
373
<citerefentry><refentrytitle>clReleaseKernel</refentrytitle></citerefentry>,
374
<citerefentry><refentrytitle>clSetKernelArg</refentrytitle></citerefentry>,
375
<citerefentry><refentrytitle>clGetKernelWorkGroupInfo</refentrytitle></citerefentry>
379
<!-- ================================ COPYRIGHT -->
380
<!-- Content included from copyright.inc.xsl -->
382
<refsect3 id="Copyright"><title></title>
384
<imagedata fileref="KhronosLogo.jpg" format="jpg" />