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

« back to all changes in this revision

Viewing changes to clGetContextInfo.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>clGetContextInfo</keyword>
 
9
        </keywordset>
 
10
    </refentryinfo>
 
11
 
 
12
    <refmeta>
 
13
        <refentrytitle>clGetContextInfo</refentrytitle>
 
14
 
 
15
        <refmiscinfo>
 
16
            <copyright>
 
17
                <year>2007-2011</year>
 
18
                <holder>The Khronos Group Inc.
 
19
 Permission is hereby granted, free of charge, to any person obtaining a
 
20
copy of this software and/or associated documentation files (the
 
21
"Materials"), to deal in the Materials without restriction, including
 
22
without limitation the rights to use, copy, modify, merge, publish,
 
23
distribute, sublicense, and/or sell copies of the Materials, and to
 
24
permit persons to whom the Materials are furnished to do so, subject to
 
25
the condition that this copyright notice and permission notice shall be included
 
26
in all copies or substantial portions of the Materials.</holder>
 
27
            </copyright>
 
28
        </refmiscinfo>
 
29
        <manvolnum>3</manvolnum>
 
30
    </refmeta>
 
31
 
 
32
<!-- ================================ SYNOPSIS -->
 
33
 
 
34
    <refnamediv id="clGetDeviceIDs">
 
35
        <refname>clGetContextInfo</refname>
 
36
 
 
37
        <refpurpose>
 
38
            Query information about a context.
 
39
        </refpurpose>
 
40
    </refnamediv>
 
41
 
 
42
    <refsynopsisdiv xmlns:xlink="http://www.w3.org/1999/xlink"><title></title>
 
43
        <funcsynopsis>
 
44
            <funcprototype>
 
45
                <funcdef>
 
46
                    <link xlink:href="scalarDataTypes.html">cl_int</link>
 
47
                    <function>
 
48
                        clGetContextInfo
 
49
                    </function>
 
50
                </funcdef>
 
51
                <paramdef>
 
52
                    <link xlink:href="abstractDataTypes.html">cl_context</link>
 
53
                    <parameter>context</parameter>
 
54
                </paramdef>
 
55
                <paramdef>
 
56
                    <link xlink:href="enums.html#cl_context_info">cl_context_info</link>
 
57
                    <parameter>param_name</parameter>
 
58
                </paramdef>
 
59
                <paramdef>
 
60
                    <link xlink:href="scalarDataTypes.html">size_t</link>
 
61
                    <parameter>param_value_size</parameter>
 
62
                </paramdef>
 
63
                <paramdef>
 
64
                    <link xlink:href="scalarDataTypes.html">void</link>
 
65
                    <parameter>*param_value</parameter>
 
66
                </paramdef>
 
67
                <paramdef>
 
68
                    <link xlink:href="scalarDataTypes.html">size_t</link>
 
69
                    <parameter>*param_value_size_ret</parameter>
 
70
                </paramdef>
 
71
 
 
72
            </funcprototype>
 
73
        </funcsynopsis>
 
74
    </refsynopsisdiv>
 
75
 
 
76
<!-- ================================ PARAMETERS -->
 
77
 
 
78
    <refsect1 id="parameters">
 
79
        <title>Parameters</title>
 
80
        <variablelist>
 
81
 
 
82
            <varlistentry>
 
83
                <term> <varname>context </varname> </term>
 
84
                <listitem>
 
85
                    <para> <!-- parameter description -->
 
86
                        Specifies the OpenCL context being queried.
 
87
                    </para>
 
88
               </listitem>
 
89
            </varlistentry>
 
90
 
 
91
            <varlistentry>
 
92
                <term> <varname> param_name </varname> </term>
 
93
                <listitem>
 
94
                    <para> <!-- parameter description -->
 
95
                        An enumeration constant that specifies the information to query.
 
96
                        The valid values for <varname>param_name</varname> are:
 
97
                    </para>
 
98
 
 
99
                    <!-- Table 4.6 -->
 
100
                    <informaltable frame="all">
 
101
                      <tgroup cols="3" align="left" colsep="1" rowsep="1">
 
102
                        <colspec colname="col1" colnum="1" />
 
103
                        <colspec colname="col2" colnum="2" />
 
104
                        <colspec colname="col3" colnum="3" />
 
105
                        <thead>
 
106
                          <row>
 
107
                            <entry>cl_context_info</entry>
 
108
                            <entry>Return Type</entry>
 
109
                            <entry>Information returned in param_value</entry>
 
110
                          </row>
 
111
                        </thead>
 
112
 
 
113
                        <tbody>
 
114
                          <row>
 
115
                            <entry><constant>CL_CONTEXT_REFERENCE_COUNT</constant></entry>
 
116
                            <entry>cl_uint</entry>
 
117
                            <entry>
 
118
                              Return the <varname>context</varname> reference count. The reference
 
119
                              count returned should be considered immediately stale. It is
 
120
                              unsuitable for general use in applications. This feature is
 
121
                              provided for identifying memory leaks.
 
122
                            </entry>
 
123
                          </row>
 
124
 
 
125
                          <row>
 
126
                            <entry><constant>CL_CONTEXT_NUM_DEVICES</constant></entry>
 
127
                            <entry>cl_uint</entry>
 
128
                            <entry>
 
129
                              Return the number of devices in <varname>context</varname>.
 
130
                            </entry>
 
131
                          </row>
 
132
 
 
133
                          <row>
 
134
                            <entry><constant>CL_CONTEXT_DEVICES</constant></entry>
 
135
                            <entry>cl_device_id[]</entry>
 
136
                            <entry>
 
137
                              Return the list of devices in <varname>context</varname>.
 
138
                            </entry>
 
139
                          </row>
 
140
 
 
141
                          <row>
 
142
                            <entry><constant>CL_CONTEXT_PROPERTIES</constant></entry>
 
143
                            <entry>cl_context_-
 
144
properties[]</entry>
 
145
                            <entry>
 
146
                              Return the <varname>properties</varname> argument specified in
 
147
                              <citerefentry><refentrytitle>clCreateContext</refentrytitle></citerefentry>
 
148
                              or
 
149
                              <citerefentry><refentrytitle>clCreateContextFromType</refentrytitle></citerefentry>.
 
150
                              <para>If the <varname>properties</varname> argument specified in
 
151
                              <citerefentry><refentrytitle>clCreateContext</refentrytitle></citerefentry>
 
152
                              or
 
153
                              <citerefentry><refentrytitle>clCreateContextFromType</refentrytitle></citerefentry>
 
154
                              used to create <varname>context</varname> is not NULL,
 
155
                              the implementation must return the values specified in the
 
156
                              <varname>properties</varname> argument.  </para>
 
157
                              <para> If the <varname>properties</varname> argument specified in
 
158
                              <citerefentry><refentrytitle>clCreateContext</refentrytitle></citerefentry>
 
159
                              or
 
160
                              <citerefentry><refentrytitle>clCreateContextFromType</refentrytitle></citerefentry>
 
161
                              used to create <varname>context</varname> is NULL, the implementation
 
162
                              may return either a <varname>param_value_size_ret</varname>
 
163
                              of 0, i.e. there is no context property value to be returned
 
164
                              or can return a context property value of 0 (where 0 is used
 
165
                              to terminate the context properties list) in the memory that
 
166
                              <varname>param_value</varname> points to.  </para>
 
167
                            </entry>
 
168
                          </row>
 
169
 
 
170
                          <row>
 
171
                            <!-- ext. spec p. 69, section 9.9.5 says this constant and the
 
172
                                 description shown below is to be added to table 4.7, but
 
173
                                 table 4.7 does not exist. We think it's supposed to say table 4.6,
 
174
                                 which is associated with clGetContextInfo(). Ext spec p. 67
 
175
                                 mentions this constant is to be added to the list of param_name
 
176
                                 values for clGetContextInfo(), but does not provide a description
 
177
                                 for the constant. -->
 
178
                            <entry><constant>CL_CONTEXT_D3D10_PREFER_-
 
179
SHARED_RESOURCES_KHR</constant></entry>
 
180
                            <entry>cl_bool</entry>
 
181
                            <entry>
 
182
                              If the
 
183
                              <citerefentry><refentrytitle>cl_khr_d3d10_sharing</refentrytitle></citerefentry>
 
184
                              extension is enabled, returns <errorname>CL_TRUE</errorname>
 
185
                              if Direct3D 10 resources created as shared by
 
186
                              setting <varname>MiscFlags</varname> to include
 
187
                              <constant>D3D10_RESOURCE_MISC_SHARED</constant> will perform faster
 
188
                              when shared with OpenCL, compared with resources which have not
 
189
                              set this flag. Otherwise returns <constant>CL_FALSE</constant>.
 
190
                            </entry>
 
191
                          </row>
 
192
 
 
193
                          <row>
 
194
                            <!-- ext. spec p. 98, section 9.11.4; and p. 100, section 9.11.5. The
 
195
                                 reference on p. 98 says the following constant is to be added
 
196
                                 to param_name for clGetContextInfo(), but no description is provided
 
197
                                 there. On p. 100, this constant and the description shown below are
 
198
                                 to be added to table 4.7, but table 4.7 does not exist. We think
 
199
                                 that's probably a typo and should refer to table 4.6. -->
 
200
                            <entry><constant>CL_CONTEXT_D3D11_PREFER_-
 
201
SHARED_RESOURCES_KHR</constant></entry>
 
202
                            <entry>cl_bool</entry>
 
203
                            <entry>
 
204
                              If the cl_khr_d3d11_sharing extension is supported, Returns
 
205
                              <constant>CL_TRUE</constant> if Direct3D 11 resources created
 
206
                              as shared by setting <varname>MiscFlags</varname> to include
 
207
                              <constant>D3D11_RESOURCE_MISC_SHARED</constant> will perform faster
 
208
                              when shared with OpenCL, compared with resources which have not
 
209
                              set this flag. Otherwise returns <constant>CL_FALSE</constant>.
 
210
                            </entry>
 
211
                          </row>
 
212
                        </tbody>
 
213
                      </tgroup>
 
214
                    </informaltable>
 
215
                </listitem>
 
216
            </varlistentry>
 
217
 
 
218
            <!-- END PARAMETER TABLE  -->
 
219
 
 
220
            <varlistentry>
 
221
                <term>
 
222
                    <varname> <!-- parameter name -->
 
223
                        param_value
 
224
                    </varname>
 
225
                </term>
 
226
 
 
227
                <listitem>
 
228
                    <para> <!-- parameter description -->
 
229
                         A pointer to memory where the appropriate result being queried is returned.
 
230
                         If <varname>param_value</varname> is NULL, it is ignored.
 
231
                    </para>
 
232
                </listitem>
 
233
            </varlistentry>
 
234
 
 
235
            <varlistentry>
 
236
                <term>
 
237
                    <varname> <!-- parameter name -->
 
238
                        param_value_size
 
239
                    </varname>
 
240
                </term>
 
241
 
 
242
                <listitem>
 
243
                    <para>
 
244
                      <!-- parameter description --> Specifies the size in bytes of memory
 
245
                      pointed to by <varname>param_value</varname>.  This size must be greater
 
246
                      than or equal to the size of return type as described in the table above.
 
247
                    </para>
 
248
                </listitem>
 
249
            </varlistentry>
 
250
 
 
251
            <varlistentry>
 
252
                <term>
 
253
                    <varname> <!-- parameter name -->
 
254
                        param_value_size_ret
 
255
                    </varname>
 
256
                </term>
 
257
 
 
258
                <listitem>
 
259
                    <para>
 
260
                      <!-- parameter description --> Returns the actual size in bytes
 
261
                      of data being queried by <varname>param_value</varname>. If
 
262
                      <varname>param_value_size_ret</varname> is NULL, it is ignored.
 
263
                    </para>
 
264
                </listitem>
 
265
            </varlistentry>
 
266
        </variablelist>
 
267
    </refsect1>
 
268
 
 
269
<!-- ================================ NOTES  -->
 
270
 
 
271
    <!-- refsect1 id="notes"><title>Notes</title>
 
272
        <para>
 
273
            <function>
 
274
                clGetContextInfo
 
275
            </function>
 
276
            Notes go here
 
277
        </para>
 
278
 
 
279
        <para>
 
280
            The application can query specific capabilities of the OpenCL device(s) returned by
 
281
            <function>clGetDeviceIDs</function>. This can be used by the application to determine
 
282
            which device(s) to use.
 
283
        </para>
 
284
    </refsect1 -->
 
285
 
 
286
<!-- ================================ ERRORS  -->
 
287
 
 
288
    <refsect1 id="errors"><title>Errors</title>
 
289
        <para>
 
290
          Returns <errorname>CL_SUCCESS</errorname> if the function executed successfully,
 
291
          or one of the errors below:
 
292
        </para>
 
293
 
 
294
        <itemizedlist mark="disc">
 
295
            <listitem>
 
296
                <errorname>CL_INVALID_CONTEXT</errorname> if <varname>context</varname>
 
297
                is not a valid context.
 
298
            </listitem>
 
299
 
 
300
            <listitem>
 
301
              <errorname>CL_INVALID_VALUE</errorname> if <varname>param_name</varname>
 
302
              is not one of the supported values or if size in bytes specified by
 
303
              <varname>param_value_size</varname> is &lt; size of return type as specified in the
 
304
              table above and <varname>param_value</varname> is not a <errorname>NULL</errorname>
 
305
              value.
 
306
            </listitem>
 
307
 
 
308
            <listitem>
 
309
                <errorname>CL_OUT_OF_RESOURCES</errorname> if there is a failure to allocate
 
310
                resources required by the OpenCL implementation on the device.
 
311
            </listitem>
 
312
 
 
313
            <listitem>
 
314
                <errorname>CL_OUT_OF_HOST_MEMORY</errorname> if there is a failure to allocate
 
315
                resources required by the OpenCL implementation on the host.
 
316
            </listitem>
 
317
        </itemizedlist>
 
318
    </refsect1>
 
319
 
 
320
<!-- ================================ EXAMPLE  -->
 
321
<!-- DO NOT DELETE IN CASE AN EXAMPLE IS ADDED IN THE FUTURE -->
 
322
<!--
 
323
    <refsect2 id="example1">
 
324
        <title>
 
325
            Example
 
326
        </title>
 
327
 
 
328
        <informaltable frame="none">
 
329
            <tgroup cols="1" align="left" colsep="0" rowsep="0">
 
330
                <colspec colname="col1" colnum="1" />
 
331
                <tbody>
 
332
                    <row>
 
333
                        <entry>
 
334
                            Example goes here - it will be set in "code" type with white space preserved.
 
335
                        </entry>
 
336
                    </row>
 
337
                </tbody>
 
338
            </tgroup>
 
339
        </informaltable>
 
340
    </refsect2>
 
341
-->
 
342
 
 
343
<!-- ================================ SPECIFICATION  -->
 
344
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
 
345
-->
 
346
    <refsect1 id="specification"><title>Specification</title>
 
347
        <para>
 
348
            <imageobject>
 
349
                <imagedata fileref="pdficon_small1.gif" format="gif" />
 
350
            </imageobject>
 
351
 
 
352
            <olink uri="clGetContextInfo">OpenCL Specification</olink>
 
353
        </para>
 
354
    </refsect1>
 
355
 
 
356
<!-- ================================ ALSO SEE  -->
 
357
 
 
358
    <refsect1 id="seealso"><title>Also see</title>
 
359
        <para>
 
360
            <citerefentry>
 
361
                <refentrytitle>clGetDeviceInfo</refentrytitle>
 
362
            </citerefentry>
 
363
        </para>
 
364
    </refsect1>
 
365
 
 
366
<!-- ================================ COPYRIGHT  -->
 
367
<!-- Content included from copyright.inc.xsl -->
 
368
 
 
369
    <refsect3 id="Copyright"><title></title>
 
370
        <imageobject>
 
371
                <imagedata fileref="KhronosLogo.jpg" format="jpg" />
 
372
        </imageobject>
 
373
        <para />
 
374
    </refsect3>
 
375
 
 
376
<!-- 20-Oct-2011 -->
 
377
</refentry>
 
378