~ubuntu-branches/ubuntu/trusty/khronos-opencl-man/trusty

« back to all changes in this revision

Viewing changes to clGetKernelArgInfo.xml

  • Committer: Package Import Robot
  • Author(s): Mathieu Malaterre
  • Date: 2013-05-21 18:06:15 UTC
  • Revision ID: package-import@ubuntu.com-20130521180615-6e0s2n3pai95ip2f
Tags: upstream-1.0~svn21772
ImportĀ upstreamĀ versionĀ 1.0~svn21772

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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">
 
4
 
 
5
<refentry>
 
6
    <refentryinfo>
 
7
        <keywordset>
 
8
            <keyword>
 
9
                clGetKernelArgInfo
 
10
            </keyword>
 
11
        </keywordset>
 
12
    </refentryinfo>
 
13
 
 
14
    <refmeta>
 
15
        <refentrytitle>
 
16
            clGetKernelArgInfo
 
17
        </refentrytitle>
 
18
 
 
19
        <refmiscinfo>
 
20
            <copyright>
 
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>
 
31
            </copyright>
 
32
        </refmiscinfo>
 
33
        <manvolnum>3</manvolnum>
 
34
    </refmeta>
 
35
 
 
36
<!-- ================================ SYNOPSIS -->
 
37
 
 
38
    <refnamediv id="clGetKernelArgInfo">
 
39
        <refname>
 
40
            clGetKernelArgInfo
 
41
        </refname>
 
42
 
 
43
        <refpurpose>
 
44
            Returns information about the arguments of a kernel.
 
45
        </refpurpose>
 
46
    </refnamediv>
 
47
 
 
48
    <refsynopsisdiv xmlns:xlink="http://www.w3.org/1999/xlink"><title></title>
 
49
        <funcsynopsis>
 
50
            <funcprototype>
 
51
                <funcdef>
 
52
                    <link xlink:href="scalarDataTypes.html">cl_int</link>
 
53
                    <function>clGetKernelArgInfo</function>
 
54
                </funcdef>
 
55
 
 
56
                <paramdef>
 
57
                    <link xlink:href="abstractDataTypes.html">cl_kernel</link>
 
58
                    <parameter>kernel</parameter>
 
59
                </paramdef>
 
60
 
 
61
                <paramdef>
 
62
                    <link xlink:href="scalarDataTypes.html">cl_uint</link>
 
63
                    <parameter>arg_indx</parameter>
 
64
                </paramdef>
 
65
 
 
66
                <paramdef>
 
67
                    <link xlink:href="enums.html#cl_kernel_arg_info">cl_kernel_arg_info</link>
 
68
                    <parameter>param_name</parameter>
 
69
                </paramdef>
 
70
 
 
71
                <paramdef>
 
72
                    <link xlink:href="scalarDataTypes.html">size_t</link>
 
73
                    <parameter>param_value_size</parameter>
 
74
                </paramdef>
 
75
 
 
76
                <paramdef>
 
77
                    <link xlink:href="scalarDataTypes.html">void</link>
 
78
                    <parameter>*param_value</parameter>
 
79
                </paramdef>
 
80
 
 
81
                <paramdef>
 
82
                    <link xlink:href="scalarDataTypes.html">size_t</link>
 
83
                    <parameter>*param_value_size_ret</parameter>
 
84
                </paramdef>
 
85
            </funcprototype>
 
86
        </funcsynopsis>
 
87
    </refsynopsisdiv>
 
88
 
 
89
<!-- ================================ PARAMETERS -->
 
90
 
 
91
    <refsect1 id="parameters">
 
92
        <title>Parameters</title>
 
93
        <variablelist>
 
94
            <varlistentry>
 
95
                <term> <varname> kernel </varname> </term>
 
96
                <listitem>
 
97
                    <para>
 
98
                        Specifies the kernel object being queried.
 
99
                    </para>
 
100
               </listitem>
 
101
            </varlistentry>
 
102
 
 
103
            <varlistentry>
 
104
                <term> <varname> arg_indx </varname> </term>
 
105
                <listitem>
 
106
                    <para>
 
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.
 
110
                    </para>
 
111
               </listitem>
 
112
            </varlistentry>
 
113
 
 
114
            <varlistentry>
 
115
                <term> <varname> param_name </varname> </term>
 
116
                <listitem>
 
117
                    <para>
 
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.
 
122
                    </para>
 
123
               </listitem>
 
124
            </varlistentry>
 
125
 
 
126
            <varlistentry>
 
127
                <term> <varname> param_value </varname> </term>
 
128
                <listitem>
 
129
                    <para>
 
130
                        A pointer to memory where the appropriate result being queried is returned.
 
131
                        If <varname>param_value</varname> is NULL, it is ignored.
 
132
                    </para>
 
133
                </listitem>
 
134
            </varlistentry>
 
135
 
 
136
            <varlistentry>
 
137
                <term> <varname> param_value_size </varname> </term>
 
138
                <listitem>
 
139
                    <para>
 
140
                        Used to specify the size in bytes of memory pointed to by <varname>param_value</varname>.
 
141
                        This size must be &gt; size of return type as described in the table below.
 
142
                    </para>
 
143
 
 
144
                    <!-- table 5.17 -->
 
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" />
 
150
                        <thead>
 
151
                            <row>
 
152
                                <entry>cl_kernel_arg_info</entry>
 
153
                                <entry>Return Type</entry>
 
154
                                <entry>Info. returned in <varname>param_value</varname></entry>
 
155
                            </row>
 
156
                        </thead>
 
157
 
 
158
                        <tbody>
 
159
                            <row>
 
160
                                <entry><constant>CL_KERNEL_ARG_ADDRESS_QUALIFIER</constant></entry>
 
161
                                <entry>cl_kernel_arg_-
 
162
                                    address_qualifier</entry>
 
163
                                <entry>
 
164
                                    <para>
 
165
                                        Returns the address qualifier specified for the argument given by <varname>arg_indx</varname>.
 
166
                                        This can be one of the following values:
 
167
 
 
168
                                        <literallayout>
 
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>
 
173
                                        </literallayout>
 
174
                                    </para>
 
175
 
 
176
                                    <para>
 
177
                                        If no address qualifier is specified, the default address
 
178
                                        qualifier which is <constant>CL_KERNEL_ARG_ADDRESS_PRIVATE</constant> is returned.
 
179
                                    </para>
 
180
                                </entry>
 
181
                            </row>
 
182
 
 
183
                            <row>
 
184
                                <entry><constant>CL_KERNEL_ARG_ACCESS_QUALIFIER</constant></entry>
 
185
                                <entry>cl_kernel_arg_-
 
186
                                    access_qualifier</entry>
 
187
                                <entry>
 
188
                                    <para>
 
189
                                        Returns the access qualifier specified for the argument given by <varname>arg_indx</varname>.
 
190
                                        This can be one of the following values:
 
191
 
 
192
                                        <literallayout>
 
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>
 
197
                                        </literallayout>
 
198
                                    </para>
 
199
 
 
200
                                    <para>
 
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.
 
205
                                    </para>
 
206
                                </entry>
 
207
                            </row>
 
208
 
 
209
                            <row>
 
210
                                <entry><constant>CL_KERNEL_ARG_TYPE_NAME</constant></entry>
 
211
                                <entry>char[]</entry>
 
212
                                <entry>
 
213
                                    <para>
 
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.
 
222
                                    </para>
 
223
                                </entry>
 
224
                            </row>
 
225
 
 
226
                            <row>
 
227
                                <entry><constant>CL_KERNEL_ARG_TYPE_QUALIFIER</constant></entry>
 
228
                                <entry>cl_kernel_arg-
 
229
type_qualifier</entry>
 
230
                                <entry>
 
231
                                    <para>
 
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>.
 
239
                                    </para> 
 
240
 
 
241
                                    <para>
 
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.
 
245
                                    </para>
 
246
                                </entry>
 
247
                            </row>
 
248
 
 
249
                            <row>
 
250
                                <entry><constant>CL_KERNEL_ARG_NAME</constant></entry>
 
251
                                <entry>char[]</entry>
 
252
                                <entry>
 
253
                                    <para>
 
254
                                        Returns the  name specified for the argument given by <varname>arg_indx</varname>.
 
255
                                    </para>
 
256
                                </entry>
 
257
                            </row>
 
258
                        </tbody>
 
259
                    </tgroup>
 
260
                    </informaltable>
 
261
               </listitem>
 
262
            </varlistentry>
 
263
 
 
264
            <varlistentry>
 
265
                <term>
 
266
                    <varname>
 
267
                        param_value_size_ret
 
268
                    </varname>
 
269
                </term>
 
270
 
 
271
                <listitem>
 
272
                    <para>
 
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.
 
275
                    </para>
 
276
                </listitem>
 
277
            </varlistentry>
 
278
        </variablelist>
 
279
    </refsect1>
 
280
 
 
281
<!-- ================================ NOTES  -->
 
282
    <refsect1 id="notes"><title>Notes</title>
 
283
 
 
284
        <para>
 
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>.
 
292
        </para>
 
293
    </refsect1>
 
294
 
 
295
<!-- ================================ ERRORS  -->
 
296
 
 
297
    <refsect1 id="errors"><title>Errors</title>
 
298
        <para>
 
299
            Returns <errorname>CL_SUCCESS</errorname> if the function is executed successfully. Otherwise,
 
300
            it returns one of the following errors:
 
301
        </para>
 
302
 
 
303
        <itemizedlist mark="disc">
 
304
            <listitem>
 
305
                <errorname>CL_INVALID_ARG_INDEX</errorname> if <varname>arg_indx</varname>
 
306
                is not a valid argument index.
 
307
            </listitem>
 
308
 
 
309
            <listitem>
 
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 &lt; size of return type as
 
313
                described in the table above and <varname>param_value</varname> is not NULL
 
314
            </listitem>
 
315
 
 
316
            <listitem>
 
317
                <errorname>CL_KERNEL_ARG_INFO_NOT_AVAILABLE</errorname> if the argument
 
318
                information is not available for kernel.
 
319
            </listitem>
 
320
 
 
321
            <listitem>
 
322
                <errorname>CL_INVALID_KERNEL</errorname> if <varname>kernel</varname>
 
323
                is not a valid kernel object.
 
324
            </listitem>
 
325
 
 
326
        </itemizedlist>
 
327
    </refsect1>
 
328
 
 
329
<!-- ================================ EXAMPLE  -->
 
330
<!-- DO NOT DELETE IN CASE AN EXAMPLE IS ADDED IN THE FUTURE -->
 
331
<!--
 
332
    <refsect2 id="example1">
 
333
        <title>
 
334
            Example
 
335
        </title>
 
336
 
 
337
        <informaltable frame="none">
 
338
            <tgroup cols="1" align="left" colsep="0" rowsep="0">
 
339
                <colspec colname="col1" colnum="1" />
 
340
                <tbody>
 
341
                    <row>
 
342
                        <entry>
 
343
                            Example goes here - it will be set in "code" type with white space preserved.
 
344
                        </entry>
 
345
                    </row>
 
346
                </tbody>
 
347
            </tgroup>
 
348
        </informaltable>
 
349
    </refsect2>
 
350
-->
 
351
 
 
352
<!-- ================================ SPECIFICATION  -->
 
353
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
 
354
-->
 
355
    <refsect1 id="specification"><title>Specification</title>
 
356
        <para>
 
357
            <imageobject>
 
358
                <imagedata fileref="pdficon_small1.gif" format="gif" />
 
359
            </imageobject>
 
360
 
 
361
            <olink uri="clGetKernelArgInfo">OpenCL Specification</olink>
 
362
        </para>
 
363
    </refsect1>
 
364
 
 
365
<!-- ================================ ALSO SEE  -->
 
366
 
 
367
    <refsect1 id="seealso"><title>Also see</title>
 
368
        <para>
 
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>
 
376
        </para>
 
377
    </refsect1>
 
378
 
 
379
<!-- ================================ COPYRIGHT  -->
 
380
<!-- Content included from copyright.inc.xsl -->
 
381
 
 
382
    <refsect3 id="Copyright"><title></title>
 
383
        <imageobject>
 
384
                <imagedata fileref="KhronosLogo.jpg" format="jpg" />
 
385
        </imageobject>
 
386
        <para />
 
387
    </refsect3>
 
388
 
 
389
<!-- 11-Nov-2011 -->
 
390
</refentry>
 
391