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>vload_halfn</keyword>
15
<refentrytitle>vload_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="vload_halfn">
37
<refname>vload_half<replaceable>n</replaceable></refname>
40
Read a half float vector from a pointer to memory.
44
<refsynopsisdiv xmlns:xlink="http://www.w3.org/1999/xlink"><title></title>
48
<link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link>
50
vload_half<replaceable>n</replaceable>
54
<paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>offset</parameter></paramdef>
55
<paramdef>const <link xlink:href="global.html">__global</link> <link xlink:href="scalarDataTypes.html">half</link><parameter>*p</parameter></paramdef>
62
<link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link>
64
vload_half<replaceable>n</replaceable>
68
<paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>offset</parameter></paramdef>
69
<paramdef>const <link xlink:href="local.html">__local</link> <link xlink:href="scalarDataTypes.html">half</link><parameter>*p</parameter></paramdef>
76
<link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link>
78
vload_half<replaceable>n</replaceable>
82
<paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>offset</parameter></paramdef>
83
<paramdef>const <link xlink:href="constant.html">__constant</link> <link xlink:href="scalarDataTypes.html">half</link><parameter>*p</parameter></paramdef>
90
<link xlink:href="vectorDataTypes.html">float<replaceable>n</replaceable></link>
92
vload_half<replaceable>n</replaceable>
96
<paramdef><link xlink:href="scalarDataTypes.html">size_t</link><parameter>offset</parameter></paramdef>
97
<paramdef>const <link xlink:href="private.html">__private</link> <link xlink:href="scalarDataTypes.html">half</link><parameter>*p</parameter></paramdef>
102
<!-- ================================ DESCRIPTION -->
104
<refsect1 id="description"><title>Description</title>
106
Read sizeof(<type>half<varname>n</varname></type>) bytes of data from address
107
(<varname>p</varname> + (<varname>offset</varname> * <varname>n</varname>)). The data
108
read is interpreted as a <type>half<replaceable>n</replaceable></type> value.
112
The <type>half<replaceable>n</replaceable></type> value read is
113
converted to a <type>float<replaceable>n</replaceable></type> value and the
114
<type>float<replaceable>n</replaceable></type> value is returned. The read address
115
computed as (<varname>p</varname> + (<varname>offset</varname> * <varname>n</varname>))
116
must be 16-bit aligned.
120
<!-- ================================ NOTES -->
121
<refsect1 id="notes"><title>Notes</title>
127
<citerefentry><refentrytitle>cl_khr_fp16</refentrytitle></citerefentry> extension,
128
the generic type <type>gentype<replaceable>n</replaceable></type> is extended to
129
include <type>half</type>, <type>half2</type>, <type>half3</type>, <type>half4</type>,
130
<type>half8</type>, and <type>half16</type>.
134
<function>vload3</function> and <function>vload_half3</function> read <varname>x</varname>,
135
<varname>y</varname>, <varname>z</varname> components from address (<varname>p</varname> +
136
(<varname>offset</varname> * 3)) into a 3-component vector.
140
<!-- ================================ EXAMPLE --> <!-- DO NOT DELETE IN CASE AN EXAMPLE IS
141
ADDED IN THE FUTURE --> <!--
142
<refsect2 id="example1">
147
<informaltable frame="none">
148
<tgroup cols="1" align="left" colsep="0" rowsep="0">
149
<colspec colname="col1" colnum="1" />
153
Example goes here - it will be set in "code" type with white space preserved.
162
<!-- ================================ SPECIFICATION -->
163
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
165
<refsect1 id="specification"><title>Specification</title>
168
<imagedata fileref="pdficon_small1.gif" format="gif" />
171
<olink uri="vectorDataLoadandStoreFunctions">OpenCL Specification</olink>
175
<!-- ================================ ALSO SEE -->
177
<refsect1 id="seealso"><title>Also see</title>
179
<citerefentry href="vectorDataLoadandStoreFunctions"><refentrytitle>Vector Data Load and Store Functions</refentrytitle></citerefentry>
183
<!-- ============================== COPYRIGHT -->
184
<!-- Content included from copyright.inc.xsl -->
186
<refsect3 id="Copyright"><title></title>
188
<imagedata fileref="KhronosLogo.jpg" format="jpg" />