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

« back to all changes in this revision

Viewing changes to clGetKernelWorkGroupInfo.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
                clGetKernelWorkGroupInfo
 
10
            </keyword>
 
11
        </keywordset>
 
12
    </refentryinfo>
 
13
 
 
14
    <refmeta>
 
15
        <refentrytitle>
 
16
            clGetKernelWorkGroupInfo
 
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="clGetKernelWorkGroupInfo">
 
39
        <refname>
 
40
            clGetKernelWorkGroupInfo
 
41
        </refname>
 
42
 
 
43
        <refpurpose>
 
44
            Returns information about the kernel object that may be specific to a device.
 
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>clGetKernelWorkGroupInfo</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="abstractDataTypes.html">cl_device_id</link>
 
63
                    <parameter>device</parameter>
 
64
                </paramdef>
 
65
 
 
66
                <paramdef>
 
67
                    <link xlink:href="enums.html#cl_kernel_work_group_info">cl_kernel_work_group_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> device </varname> </term>
 
105
                <listitem>
 
106
                    <para>
 
107
                      Identifies a specific device in the list of devices associated with
 
108
                      <varname>kernel</varname>. The list of devices is the list of devices in
 
109
                      the OpenCL context that is associated with <varname>kernel</varname>. If
 
110
                      the list of devices associated with <varname>kernel</varname> is a single
 
111
                      device, <varname>device</varname> can be a NULL value.
 
112
                    </para>
 
113
               </listitem>
 
114
            </varlistentry>
 
115
 
 
116
            <varlistentry>
 
117
                <term> <varname> param_name </varname> </term>
 
118
                <listitem>
 
119
                    <para>
 
120
                      Specifies the information to query. The list of
 
121
                      supported <varname>param_name</varname> types and the
 
122
                      information returned in <varname>param_value</varname> by
 
123
                      <function>clGetKernelWorkGroupInfo</function> is described in the table
 
124
                      below.
 
125
                    </para>
 
126
                </listitem>
 
127
            </varlistentry>
 
128
 
 
129
            <varlistentry>
 
130
                <term> <varname> param_value </varname> </term>
 
131
                <listitem>
 
132
                    <para>
 
133
                        A pointer to memory where the appropriate result being queried is returned.
 
134
                        If <varname>param_value</varname> is NULL, it is ignored.
 
135
                    </para>
 
136
                </listitem>
 
137
            </varlistentry>
 
138
 
 
139
            <varlistentry>
 
140
                <term> <varname> param_value_size </varname> </term>
 
141
                <listitem>
 
142
                    <para>
 
143
                      Used to specify the size in bytes of memory pointed to by
 
144
                      <varname>param_value</varname>.  This size must be &ge; size of return
 
145
                      type as described in the table below.
 
146
                    </para>
 
147
 
 
148
                    <!-- table 5.16 -->
 
149
                    <informaltable frame="all">
 
150
                    <tgroup cols="3" align="left" colsep="1" rowsep="1">
 
151
                        <colspec colname="col1" colnum="1" />
 
152
                        <colspec colname="col2" colnum="2" />
 
153
                        <colspec colname="col3" colnum="3" />
 
154
                        <thead>
 
155
                            <row>
 
156
                                <entry>cl_kernel_work_group_info</entry>
 
157
                                <entry>Return Type</entry>
 
158
                                <entry>Info. returned in <varname>param_value</varname></entry>
 
159
                            </row>
 
160
                        </thead>
 
161
 
 
162
                        <tbody>
 
163
                            <row>
 
164
                                <entry><constant>CL_KERNEL_GLOBAL_WORK_SIZE</constant></entry>
 
165
                                <entry>size_t[3]</entry>
 
166
                                <entry>
 
167
 
 
168
                                    This provides a mechanism for the application to query the maximum global
 
169
                                    size that can be used to execute a kernel (i.e. <varname>global_work_size</varname>
 
170
                                    argument to <citerefentry><refentrytitle>clEnqueueNDRangeKernel</refentrytitle></citerefentry>)
 
171
                                    on a custom device given by <varname>device</varname> or a built-in kernel on an OpenCL device
 
172
                                    given by <varname>device</varname>.
 
173
 
 
174
                                    <para>
 
175
                                      If <varname>device</varname> is not a custom device
 
176
                                      or <varname>kernel</varname> is not a built-in kernel,
 
177
                                      <citerefentry><refentrytitle>clGetKernelArgInfo</refentrytitle></citerefentry>
 
178
                                      returns the error <constant>CL_INVALID_VALUE</constant>.
 
179
                                    </para>
 
180
                                </entry>
 
181
                            </row>
 
182
 
 
183
                            <row>
 
184
                                <entry><constant>CL_KERNEL_WORK_GROUP_SIZE</constant></entry>
 
185
                                <entry>size_t</entry>
 
186
                                <entry>
 
187
                                    This provides a mechanism for the application to query the maximum work-group size
 
188
                                    that can be used to execute a kernel on a specific device given by <varname>device</varname>. The
 
189
                                    OpenCL implementation uses the resource requirements of the kernel
 
190
                                    (register usage etc.) to determine what this work-group size should be.
 
191
                                </entry>
 
192
                            </row>
 
193
 
 
194
                            <row>
 
195
                                <entry><constant>CL_KERNEL_COMPILE_-
 
196
WORK_GROUP_SIZE</constant></entry>
 
197
                                <entry>size_t[3]</entry>
 
198
                                <entry>
 
199
                                    Returns the work-group size specified by the
 
200
                                    <constant>__attribute__((reqd_work_group_size(X, Y, Z)))</constant> qualifier.
 
201
                                    See <citerefentry href="functionQualifiers"><refentrytitle>Function Qualifiers</refentrytitle></citerefentry>.
 
202
                                    If the work-group size is not specified using the above attribute qualifier (0, 0, 0) is returned.
 
203
                                </entry>
 
204
                            </row>
 
205
 
 
206
                            <row>
 
207
                                <entry><constant>CL_KERNEL_LOCAL_MEM_SIZE</constant></entry>
 
208
                                <entry>cl_ulong</entry>
 
209
                                <entry>
 
210
                                    <para>
 
211
                                      Returns the amount of local memory in bytes being
 
212
                                      used by a kernel. This includes local memory that may
 
213
                                      be needed by an implementation to execute the kernel,
 
214
                                      variables declared inside the kernel with the <citerefentry
 
215
                                      href="local"><refentrytitle>__local</refentrytitle></citerefentry>
 
216
                                      address qualifier and local memory to
 
217
                                      be allocated for arguments to the kernel
 
218
                                      declared as pointers with the <citerefentry
 
219
                                      href="local"><refentrytitle>__local</refentrytitle></citerefentry>
 
220
                                      address qualifier and whose size is specified with
 
221
                                      <citerefentry><refentrytitle>clSetKernelArg</refentrytitle></citerefentry>.
 
222
                                    </para>
 
223
 
 
224
                                    <para>
 
225
                                      If the local memory size, for any pointer
 
226
                                      argument to the kernel declared with the <citerefentry
 
227
                                      href="local"><refentrytitle>__local</refentrytitle></citerefentry>
 
228
                                      address qualifier, is not specified, its size is assumed
 
229
                                      to be 0.
 
230
                                    </para>
 
231
                                </entry>
 
232
                            </row>
 
233
 
 
234
                            <row>
 
235
                                <entry><constant>CL_KERNEL_PREFERRED_WORK_-
 
236
GROUP_SIZE_MULTIPLE</constant></entry>
 
237
                                <entry>size_t</entry>
 
238
                                <entry>
 
239
                                    Returns the preferred multiple of workgroup size for launch. This is
 
240
                                    a performance hint. Specifying a workgroup size that is not a multiple
 
241
                                    of the value returned by this query as the value of the local work size argument
 
242
                                    to <citerefentry><refentrytitle>clEnqueueNDRangeKernel</refentrytitle></citerefentry>will
 
243
                                    not fail to enqueue the kernel for execution unless the work-group size specified is
 
244
                                    larger than the device maximum.
 
245
                                </entry>
 
246
                            </row>
 
247
 
 
248
                            <row>
 
249
                                <entry><constant>CL_KERNEL_PRIVATE_MEM_SIZE</constant></entry>
 
250
                                <entry>cl_ulong</entry>
 
251
                                <entry>
 
252
                                    Returns the minimum amount of private memory, in bytes, used by each workitem in the
 
253
                                    kernel. This value may include any private memory needed by an implementation to
 
254
                                    execute the kernel, including that used by the language built-ins and variable declared
 
255
                                    inside the kernel with the
 
256
                                    <citerefentry href="private"><refentrytitle>__private</refentrytitle></citerefentry> qualifier.
 
257
                                </entry>
 
258
                            </row>
 
259
                        </tbody>
 
260
                    </tgroup>
 
261
                    </informaltable>
 
262
               </listitem>
 
263
            </varlistentry>
 
264
 
 
265
            <varlistentry>
 
266
                <term> <varname> param_value_size_ret </varname> </term>
 
267
                <listitem>
 
268
                    <para>
 
269
                        Returns the actual size in bytes of data copied to <varname>param_value</varname>. If
 
270
                        <varname>param_value_size_ret</varname> is NULL, it is ignored.
 
271
                    </para>
 
272
                </listitem>
 
273
            </varlistentry>
 
274
 
 
275
        </variablelist>
 
276
    </refsect1>
 
277
 
 
278
<!-- ================================ NOTES  -->
 
279
    <!--<refsect1 id="notes"><title>Notes</title>
 
280
        <para>
 
281
 
 
282
        </para>
 
283
    </refsect1>-->
 
284
 
 
285
<!-- ================================ ERRORS  -->
 
286
 
 
287
    <refsect1 id="errors"><title>Errors</title>
 
288
        <para>
 
289
            Returns <errorname>CL_SUCCESS</errorname> if the function is executed successfully. Otherwise, it returns
 
290
            one of the following errors:
 
291
        </para>
 
292
 
 
293
        <itemizedlist mark="disc">
 
294
            <listitem>
 
295
              <errorname>CL_INVALID_DEVICE</errorname> if <varname>device</varname> is
 
296
              not in the list of devices associated with <varname>kernel</varname> or if
 
297
              <varname>device</varname> is NULL but there is more than one device associated
 
298
              with <varname>kernel</varname>.
 
299
            </listitem>
 
300
 
 
301
            <listitem>
 
302
              <errorname>CL_INVALID_VALUE</errorname> if <varname>param_name</varname> is not
 
303
              valid, or if size in bytes specified by <varname>param_value_size</varname>
 
304
              is &lt; size of return type as described in the table above and
 
305
              <varname>param_value</varname> is not NULL.
 
306
            </listitem>
 
307
 
 
308
            <listitem>
 
309
              <errorname>CL_INVALID_VALUE</errorname> if <varname>param_name</varname> is
 
310
              <constant>CL_KERNEL_GLOBAL_WORK_SIZE</constant> and <varname>device</varname>
 
311
              is not a custom device or <varname>kernel</varname> is not a built-in kernel.
 
312
            </listitem>
 
313
 
 
314
            <listitem>
 
315
              <errorname>CL_INVALID_KERNEL</errorname> if <varname>kernel</varname> is a not
 
316
              a valid kernel object.
 
317
            </listitem>
 
318
 
 
319
            <listitem>
 
320
              <errorname>CL_OUT_OF_RESOURCES</errorname> if there is a failure to allocate
 
321
              resources required by the OpenCL implementation on the device.
 
322
            </listitem>
 
323
 
 
324
            <listitem>
 
325
              <errorname>CL_OUT_OF_HOST_MEMORY</errorname> if there is a failure to allocate
 
326
              resources required by the OpenCL implementation on the host.
 
327
            </listitem>
 
328
        </itemizedlist>
 
329
    </refsect1>
 
330
 
 
331
<!-- ================================ EXAMPLE  -->
 
332
<!-- DO NOT DELETE IN CASE AN EXAMPLE IS ADDED IN THE FUTURE -->
 
333
<!--
 
334
    <refsect2 id="example1">
 
335
        <title>
 
336
            Example
 
337
        </title>
 
338
 
 
339
        <informaltable frame="none">
 
340
            <tgroup cols="1" align="left" colsep="0" rowsep="0">
 
341
                <colspec colname="col1" colnum="1" />
 
342
                <tbody>
 
343
                    <row>
 
344
                        <entry>
 
345
                            Example goes here - it will be set in "code" type with white space preserved.
 
346
                        </entry>
 
347
                    </row>
 
348
                </tbody>
 
349
            </tgroup>
 
350
        </informaltable>
 
351
    </refsect2>
 
352
-->
 
353
 
 
354
<!-- ================================ SPECIFICATION  -->
 
355
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
 
356
-->
 
357
    <refsect1 id="specification"><title>Specification</title>
 
358
        <para>
 
359
            <imageobject>
 
360
                <imagedata fileref="pdficon_small1.gif" format="gif" />
 
361
            </imageobject>
 
362
 
 
363
            <olink uri="clGetKernelWorkGroupInfo">OpenCL Specification</olink>
 
364
        </para>
 
365
    </refsect1>
 
366
 
 
367
<!-- ================================ ALSO SEE  -->
 
368
 
 
369
    <refsect1 id="seealso"><title>Also see</title>
 
370
        <para>
 
371
            <citerefentry><refentrytitle>clCreateKernel</refentrytitle></citerefentry>,
 
372
            <citerefentry><refentrytitle>clCreateKernelsInProgram</refentrytitle></citerefentry>,
 
373
            <citerefentry><refentrytitle>clReleaseKernel</refentrytitle></citerefentry>,
 
374
            <citerefentry><refentrytitle>clRetainKernel</refentrytitle></citerefentry>,
 
375
            <citerefentry><refentrytitle>clSetKernelArg</refentrytitle></citerefentry>,
 
376
            <citerefentry><refentrytitle>clGetKernelInfo</refentrytitle></citerefentry>
 
377
        </para>
 
378
    </refsect1>
 
379
 
 
380
<!-- ================================ COPYRIGHT  -->
 
381
<!-- Content included from copyright.inc.xsl -->
 
382
 
 
383
    <refsect3 id="Copyright"><title></title>
 
384
        <imageobject>
 
385
                <imagedata fileref="KhronosLogo.jpg" format="jpg" />
 
386
        </imageobject>
 
387
        <para />
 
388
    </refsect3>
 
389
 
 
390
<!-- 19-Oct-2011 -->
 
391
</refentry>
 
392