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
<!ENTITY vectorFunctionsInc SYSTEM "vectorFunctionsInc.xml">
10
<keyword>vstore_halfn</keyword>
15
<refentrytitle>vstore_halfn</refentrytitle>
19
<year>2007-2011</year>
20
<holder>The Khronos Group Inc.
21
Permission is hereby granted, free of charge, to any person obtaining a
22
copy of this software and/or associated documentation files (the
23
"Materials"), to deal in the Materials without restriction, including
24
without limitation the rights to use, copy, modify, merge, publish,
25
distribute, sublicense, and/or sell copies of the Materials, and to
26
permit persons to whom the Materials are furnished to do so, subject to
27
the condition that this copyright notice and permission notice shall be included
28
in all copies or substantial portions of the Materials.</holder>
31
<manvolnum>3</manvolnum>
34
<!-- ================================ SYNOPSIS -->
36
<refnamediv id="vstore_halfn">
37
<refname>vstore_half<replaceable>n</replaceable></refname>
40
Convert float vector to half vector and write to a pointer to memory.
44
<refsynopsisdiv xmlns:xlink="http://www.w3.org/1999/xlink"><title></title>
48
<link xlink:href="scalarDataTypes.html">void</link>
50
vstore_half<replaceable>n</replaceable>
53
<paramdef><link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link><parameter>data</parameter></paramdef>
54
<paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>offset</parameter></paramdef>
55
<paramdef><link xlink:href="global.html">__global</link> <link xlink:href="scalarDataTypes.html">half</link><parameter>*p</parameter></paramdef>
62
<link xlink:href="scalarDataTypes.html">void</link>
64
vstore_half<replaceable>n</replaceable>_rte
67
<paramdef><link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link><parameter>data</parameter></paramdef>
68
<paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>offset</parameter></paramdef>
69
<paramdef><link xlink:href="global.html">__global</link> <link xlink:href="scalarDataTypes.html">half</link><parameter>*p</parameter></paramdef>
76
<link xlink:href="scalarDataTypes.html">void</link>
78
vstore_half<replaceable>n</replaceable>_rtz
81
<paramdef><link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link><parameter>data</parameter></paramdef>
82
<paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>offset</parameter></paramdef>
83
<paramdef><link xlink:href="global.html">__global</link> <link xlink:href="scalarDataTypes.html">half</link><parameter>*p</parameter></paramdef>
90
<link xlink:href="scalarDataTypes.html">void</link>
92
vstore_half<replaceable>n</replaceable>_rtp
95
<paramdef><link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link><parameter>data</parameter></paramdef>
96
<paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>offset</parameter></paramdef>
97
<paramdef><link xlink:href="global.html">__global</link> <link xlink:href="scalarDataTypes.html">half</link><parameter>*p</parameter></paramdef>
104
<link xlink:href="scalarDataTypes.html">void</link>
106
vstore_half<replaceable>n</replaceable>_rtn
109
<paramdef><link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link><parameter>data</parameter></paramdef>
110
<paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>offset</parameter></paramdef>
111
<paramdef><link xlink:href="global.html">__global</link> <link xlink:href="scalarDataTypes.html">half</link><parameter>*p</parameter></paramdef>
116
<refsynopsisdiv xmlns:xlink="http://www.w3.org/1999/xlink"><title></title>
120
<link xlink:href="scalarDataTypes.html">void</link>
122
vstore_half<replaceable>n</replaceable>
125
<paramdef><link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link><parameter>data</parameter></paramdef>
126
<paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>offset</parameter></paramdef>
127
<paramdef><link xlink:href="local.html">__local</link> <link xlink:href="scalarDataTypes.html">half</link><parameter>*p</parameter></paramdef>
134
<link xlink:href="scalarDataTypes.html">void</link>
136
vstore_half<replaceable>n</replaceable>_rte
139
<paramdef><link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link><parameter>data</parameter></paramdef>
140
<paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>offset</parameter></paramdef>
141
<paramdef><link xlink:href="local.html">__local</link> <link xlink:href="scalarDataTypes.html">half</link><parameter>*p</parameter></paramdef>
148
<link xlink:href="scalarDataTypes.html">void</link>
150
vstore_half<replaceable>n</replaceable>_rtz
153
<paramdef><link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link><parameter>data</parameter></paramdef>
154
<paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>offset</parameter></paramdef>
155
<paramdef><link xlink:href="local.html">__local</link> <link xlink:href="scalarDataTypes.html">half</link><parameter>*p</parameter></paramdef>
162
<link xlink:href="scalarDataTypes.html">void</link>
164
vstore_half<replaceable>n</replaceable>_rtp
167
<paramdef><link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link><parameter>data</parameter></paramdef>
168
<paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>offset</parameter></paramdef>
169
<paramdef><link xlink:href="local.html">__local</link> <link xlink:href="scalarDataTypes.html">half</link><parameter>*p</parameter></paramdef>
176
<link xlink:href="scalarDataTypes.html">void</link>
178
vstore_half<replaceable>n</replaceable>_rtn
181
<paramdef><link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link><parameter>data</parameter></paramdef>
182
<paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>offset</parameter></paramdef>
183
<paramdef><link xlink:href="local.html">__local</link> <link xlink:href="scalarDataTypes.html">half</link><parameter>*p</parameter></paramdef>
188
<refsynopsisdiv xmlns:xlink="http://www.w3.org/1999/xlink"><title></title>
192
<link xlink:href="scalarDataTypes.html">void</link>
194
vstore_half<replaceable>n</replaceable>
197
<paramdef><link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link><parameter>data</parameter></paramdef>
198
<paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>offset</parameter></paramdef>
199
<paramdef><link xlink:href="private.html">__private</link> <link xlink:href="scalarDataTypes.html">half</link><parameter>*p</parameter></paramdef>
206
<link xlink:href="scalarDataTypes.html">void</link>
208
vstore_half<replaceable>n</replaceable>_rte
211
<paramdef><link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link><parameter>data</parameter></paramdef> <paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>offset</parameter></paramdef>
212
<paramdef><link xlink:href="private.html">__private</link> <link xlink:href="scalarDataTypes.html">half</link><parameter>*p</parameter></paramdef>
219
<link xlink:href="scalarDataTypes.html">void</link>
221
vstore_half<replaceable>n</replaceable>_rtz
224
<paramdef><link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link><parameter>data</parameter></paramdef>
225
<paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>offset</parameter></paramdef>
226
<paramdef><link xlink:href="private.html">__private</link> <link xlink:href="scalarDataTypes.html">half</link><parameter>*p</parameter></paramdef>
233
<link xlink:href="scalarDataTypes.html">void</link>
235
vstore_half<replaceable>n</replaceable>_rtp
238
<paramdef><link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link><parameter>data</parameter></paramdef>
239
<paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>offset</parameter></paramdef>
240
<paramdef><link xlink:href="private.html">__private</link> <link xlink:href="scalarDataTypes.html">half</link><parameter>*p</parameter></paramdef>
247
<link xlink:href="scalarDataTypes.html">void</link>
249
vstore_half<replaceable>n</replaceable>_rtn
252
<paramdef><link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link><parameter>data</parameter></paramdef>
253
<paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>offset</parameter></paramdef>
254
<paramdef><link xlink:href="private.html">__private</link> <link xlink:href="scalarDataTypes.html">half</link><parameter>*p</parameter></paramdef>
259
<refsect2 id="double">
261
<informaltable frame="none">
262
<tgroup cols="1" align="left" colsep="0" rowsep="0">
263
<colspec colname="col1" colnum="1" />
267
If the optional <type>double</type> is supported, you may use <type>double<replaceable>n</replaceable></type> instead of <type>float<replaceable>n</replaceable></type>.
275
<!-- ================================ DESCRIPTION -->
277
<refsect1 id="description"><title>Description</title>
279
The <type>float<replaceable>n</replaceable></type> (or
280
<type>double<replaceable>n</replaceable></type> if optional double
281
is supported) value given by <varname>data</varname> is converted to
282
a <type>half<replaceable>n</replaceable></type> value using the appropriate
283
rounding mode. The <type>half<replaceable>n</replaceable></type> value is then
284
written to address computed as (<varname>p</varname> + (<varname>offset</varname>
285
* <varname>n</varname>)). The address computed as (<varname>p</varname> +
286
(<varname>offset</varname> * <varname>n</varname>)) must be 16-bit aligned.
290
<function>vstore_half<replaceable>n</replaceable></function> uses the default rounding
291
mode. The default rounding mode is round to nearest even.
295
<!-- ================================ NOTES -->
297
<refsect1 id="notes"><title>Notes</title>
302
<function>vload3</function> and <function>vload_half3</function> read <varname>x</varname>,
303
<varname>y</varname>, <varname>z</varname> components from address (<varname>p</varname> +
304
(<varname>offset</varname> * 3)) into a 3-component vector. <function>vstore3</function>,
305
and <function>vstore_half3</function> write <varname>x</varname>, <varname>y</varname>,
306
<varname>z</varname> components from a 3-component vector to address (<varname>p</varname>
307
+ (<varname>offset</varname> * 3)).
311
In addition <function>vloada_half3</function> reads <varname>x</varname>,
312
<varname>y</varname>, <varname>z</varname> components from address
313
(<varname>p</varname> + (<varname>offset</varname> * 4)) into a 3- component vector and
314
<function>vstorea_half3</function> writes <varname>x</varname>, <varname>y</varname>,
315
<varname>z</varname> components from a 3-component vector to address (<varname>p</varname>
316
+ (<varname>offset</varname> * 4)).
320
<!-- ================================ EXAMPLE -->
321
<!-- DO NOT DELETE IN CASE AN EXAMPLE IS ADDED IN THE FUTURE -->
323
<refsect2 id="example1">
328
<informaltable frame="none">
329
<tgroup cols="1" align="left" colsep="0" rowsep="0">
330
<colspec colname="col1" colnum="1" />
334
Example goes here - it will be set in "code" type with white space preserved.
343
<!-- ================================ SPECIFICATION -->
344
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
346
<refsect1 id="specification"><title>Specification</title>
349
<imagedata fileref="pdficon_small1.gif" format="gif" />
352
<olink uri="vectorDataLoadandStoreFunctions">OpenCL Specification</olink>
356
<!-- ================================ ALSO SEE -->
358
<refsect1 id="seealso"><title>Also see</title>
360
<citerefentry href="vectorDataLoadandStoreFunctions"><refentrytitle>Vector Data Load and Store Functions</refentrytitle></citerefentry>
364
<!-- ============================== COPYRIGHT -->
365
<!-- Content included from copyright.inc.xsl -->
367
<refsect3 id="Copyright"><title></title>
369
<imagedata fileref="KhronosLogo.jpg" format="jpg" />