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="clGetSamplerInfo">
44
Returns information about the sampler object.
48
<refsynopsisdiv xmlns:xlink="http://www.w3.org/1999/xlink">
53
<link xlink:href="scalarDataTypes.html">cl_int</link>
54
<function>clGetSamplerInfo</function>
57
<paramdef><link xlink:href="abstractDataTypes.html">cl_sampler</link><parameter>sampler</parameter></paramdef>
58
<paramdef><link xlink:href="enums.html#cl_sampler_info">cl_sampler_info</link><parameter>param_name</parameter></paramdef>
59
<paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>param_value_size</parameter></paramdef>
60
<paramdef><link xlink:href="scalarDataTypes.html">void</link><parameter>*param_value</parameter></paramdef>
61
<paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>*param_value_size_ret</parameter></paramdef>
67
<!-- ================================ PARAMETERS -->
69
<refsect1 id="parameters">
70
<title>Parameters</title>
74
<term><varname>sampler</varname></term>
75
<listitem> <para>Specifies the sampler being queried.</para> </listitem>
79
<term><varname>param_name</varname></term>
82
Specifies the information to query. The list of supported
83
<varname>param_name</varname> types and the information returned in
84
<varname>param_value</varname> by <function>clGetSamplerInfo</function> is
85
described in the table below.
89
<informaltable frame="all">
90
<tgroup cols="2" align="left" colsep="1" rowsep="1">
91
<colspec colname="col1" colnum="1" />
92
<colspec colname="col2" colnum="2" />
95
<entry>cl_sampler_info</entry>
96
<entry>Return Type and Info. returned in <varname>param_value</varname></entry>
102
<entry><constant>CL_SAMPLER_REFERENCE_COUNT</constant></entry>
107
Return the <varname>sampler</varname> reference count. The reference
108
count returned should be considered immediately stale. It is unsuitable
109
for general use in applications. This feature is provided for identifying
116
<entry><constant>CL_SAMPLER_CONTEXT</constant></entry>
118
Return type: cl_context
121
Return the context specified when the sampler is created.
127
<entry><constant>CL_SAMPLER_NORMALIZED_COORDS</constant></entry>
132
Return the normalized coords value associated with
133
<varname>sampler</varname>.
139
<entry><constant>CL_SAMPLER_ADDRESSING_MODE</constant></entry>
141
Return type: cl_addressing_mode
144
Return the addressing mode value associated with
145
<varname>sampler</varname>.
151
<entry><constant>CL_SAMPLER_FILTER_MODE</constant></entry>
153
Return type: cl_filter_mode
156
Return the filter mode value associated with <varname>sampler</varname>.
167
<term> <varname>param_value </varname> </term>
170
A pointer to memory where the appropriate result being queried is returned. If
171
<varname>param_value</varname> is NULL, it is ignored.
177
<term> <varname> param_value_size </varname> </term>
180
Specifies the size in bytes of memory pointed to by
181
<varname>param_value</varname>. This size must be ≥ size of return type as
182
described in the table above.
188
<term> <varname> param_value_size_ret </varname> </term>
191
Returns the actual size in bytes of data copied to <varname>param_value</varname>.
192
If <varname>param_value_size_ret</varname> is NULL, it is ignored.
198
<!-- END PARAMETER TABLE -->
202
<!-- ================================ NOTES -->
203
<!-- <refsect1 id="notes"><title>Notes</title>
210
<!-- ================================ ERRORS -->
212
<refsect1 id="errors"><title>Errors</title>
214
Returns <errorname>CL_SUCCESS</errorname> if the function is executed
215
successfully. Otherwise, it returns one of the following errors:
218
<itemizedlist mark="disc">
220
<errorname>CL_INVALID_VALUE</errorname> if <varname>param_name</varname> is not
221
valid, or if size in bytes specified by <varname>param_value_size</varname>
222
is < size of return type as described in the table above and
223
<varname>param_value</varname> is not NULL
227
<errorname>CL_INVALID_SAMPLER</errorname> if <varname>sampler</varname> is a
228
not a valid sampler object.
232
<errorname>CL_OUT_OF_RESOURCES</errorname> if there is a failure to allocate
233
resources required by the OpenCL implementation on the device.
237
<errorname>CL_OUT_OF_HOST_MEMORY</errorname> if there is a failure to allocate
238
resources required by the OpenCL implementation on the host.
243
<!-- ================================ EXAMPLE -->
244
<!-- DO NOT DELETE IN CASE AN EXAMPLE IS ADDED IN THE FUTURE -->
246
<refsect2 id="example1">
251
<informaltable frame="none">
252
<tgroup cols="1" align="left" colsep="0" rowsep="0">
253
<colspec colname="col1" colnum="1" />
257
Example goes here - it will be set in "code" type with white space preserved.
266
<!-- ================================ SPECIFICATION -->
267
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
269
<refsect1 id="specification"><title>Specification</title>
272
<imagedata fileref="pdficon_small1.gif" format="gif" />
275
<olink uri="clGetSamplerInfo">OpenCL Specification</olink>
279
<!-- ================================ ALSO SEE -->
281
<refsect1 id="seealso"><title>Also see</title>
283
<citerefentry><refentrytitle>clCreateSampler</refentrytitle></citerefentry>,
284
<citerefentry><refentrytitle>clRetainSampler</refentrytitle></citerefentry>,
285
<citerefentry><refentrytitle>clReleaseSampler</refentrytitle></citerefentry>
289
<!-- ================================ COPYRIGHT -->
290
<!-- Content included from copyright.inc.xsl -->
292
<refsect3 id="Copyright"><title></title>
294
<imagedata fileref="KhronosLogo.jpg" format="jpg" />