'\" t .\" Title: vstore_halfn .\" Author: The Khronos Group .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 01/14/2021 .\" Manual: OpenCL Manual .\" Source: The Khronos Group .\" Language: English .\" .TH "VSTORE_HALFN" "3clc" "01/14/2021" "The Khronos Group" "OpenCL Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" vstore_halfn \- Convert float vector to half vector and write to a pointer to memory\&. .SH "" .HP \w'void\ vstore_half\fIn\fR('u .BI "void vstore_half\fIn\fR(floatn\ " "data" ", size_t\ " "offset" ", __global\ half\ *" "p" ");" .HP \w'void\ vstore_half\fIn\fR_rte('u .BI "void vstore_half\fIn\fR_rte(floatn\ " "data" ", size_t\ " "offset" ", __global\ half\ *" "p" ");" .HP \w'void\ vstore_half\fIn\fR_rtz('u .BI "void vstore_half\fIn\fR_rtz(floatn\ " "data" ", size_t\ " "offset" ", __global\ half\ *" "p" ");" .HP \w'void\ vstore_half\fIn\fR_rtp('u .BI "void vstore_half\fIn\fR_rtp(floatn\ " "data" ", size_t\ " "offset" ", __global\ half\ *" "p" ");" .HP \w'void\ vstore_half\fIn\fR_rtn('u .BI "void vstore_half\fIn\fR_rtn(floatn\ " "data" ", size_t\ " "offset" ", __global\ half\ *" "p" ");" .SH "" .HP \w'void\ vstore_half\fIn\fR('u .BI "void vstore_half\fIn\fR(floatn\ " "data" ", size_t\ " "offset" ", __local\ half\ *" "p" ");" .HP \w'void\ vstore_half\fIn\fR_rte('u .BI "void vstore_half\fIn\fR_rte(floatn\ " "data" ", size_t\ " "offset" ", __local\ half\ *" "p" ");" .HP \w'void\ vstore_half\fIn\fR_rtz('u .BI "void vstore_half\fIn\fR_rtz(floatn\ " "data" ", size_t\ " "offset" ", __local\ half\ *" "p" ");" .HP \w'void\ vstore_half\fIn\fR_rtp('u .BI "void vstore_half\fIn\fR_rtp(floatn\ " "data" ", size_t\ " "offset" ", __local\ half\ *" "p" ");" .HP \w'void\ vstore_half\fIn\fR_rtn('u .BI "void vstore_half\fIn\fR_rtn(floatn\ " "data" ", size_t\ " "offset" ", __local\ half\ *" "p" ");" .SH "" .HP \w'void\ vstore_half\fIn\fR('u .BI "void vstore_half\fIn\fR(floatn\ " "data" ", size_t\ " "offset" ", __private\ half\ *" "p" ");" .HP \w'void\ vstore_half\fIn\fR_rte('u .BI "void vstore_half\fIn\fR_rte(floatn\ " "data" ", size_t\ " "offset" ", __private\ half\ *" "p" ");" .HP \w'void\ vstore_half\fIn\fR_rtz('u .BI "void vstore_half\fIn\fR_rtz(floatn\ " "data" ", size_t\ " "offset" ", __private\ half\ *" "p" ");" .HP \w'void\ vstore_half\fIn\fR_rtp('u .BI "void vstore_half\fIn\fR_rtp(floatn\ " "data" ", size_t\ " "offset" ", __private\ half\ *" "p" ");" .HP \w'void\ vstore_half\fIn\fR_rtn('u .BI "void vstore_half\fIn\fR_rtn(floatn\ " "data" ", size_t\ " "offset" ", __private\ half\ *" "p" ");" .SS "" .TS tab(:); l. T{ If the optional \fBdouble\fR is supported, you may use \fBdouble\fR\fB\fIn\fR\fR instead of \fBfloat\fR\fB\fIn\fR\fR\&. T} .TE .sp 1 .SH "DESCRIPTION" .PP The \fBfloat\fR\fB\fIn\fR\fR (or \fBdouble\fR\fB\fIn\fR\fR if optional double is supported) value given by \fIdata\fR is converted to a \fBhalf\fR\fB\fIn\fR\fR value using the appropriate rounding mode\&. The \fBhalf\fR\fB\fIn\fR\fR value is then written to address computed as (\fIp\fR + (\fIoffset\fR * \fIn\fR))\&. The address computed as (\fIp\fR + (\fIoffset\fR * \fIn\fR)) must be 16\-bit aligned\&. .PP \fBvstore_half\fR\fB\fIn\fR\fR uses the default rounding mode\&. The default rounding mode is round to nearest even\&. .SH "NOTES" .PP Vector Data Load and Store Functions allow you to read and write vector types from a pointer to memory\&. .PP The generic type \fBgentype\fR is used to indicate the built\-in data types \fBchar\fR, \fBuchar\fR, \fBshort\fR, \fBushort\fR, \fBint\fR, \fBuint\fR, \fBlong\fR, \fBulong\fR, \fBfloat\fR, or \fBdouble\fR\&. .PP The generic type name \fBgentype\fR\fB\fIn\fR\fR represents \fIn\fR\-element vectors of \fBgentype\fR elements\&. The suffix \fIn\fR is also used in the function names (i\&.e\&. \fBvload\fR\fB\fIn\fR\fR, \fBvstore\fR\fB\fIn\fR\fR, etc\&.), where \fIn\fR = 2, 3, 4, 8, or 16\&. .PP The results of vector data load and store functions are undefined if the address being read from or written to is not correctly aligned\&. The pointer argument \fIp\fR can be a pointer to \fBglobal\fR(3clc), \fBlocal\fR(3clc), or \fBprivate\fR(3clc) memory for store functions\&. The pointer argument \fIp\fR can be a pointer to __global, __local, \fBconstant\fR(3clc) or __private memory for load functions\&. .PP \fBvload3\fR and \fBvload_half3\fR read \fIx\fR, \fIy\fR, \fIz\fR components from address (\fIp\fR + (\fIoffset\fR * 3)) into a 3\-component vector\&. \fBvstore3\fR, and \fBvstore_half3\fR write \fIx\fR, \fIy\fR, \fIz\fR components from a 3\-component vector to address (\fIp\fR + (\fIoffset\fR * 3))\&. .PP In addition \fBvloada_half3\fR reads \fIx\fR, \fIy\fR, \fIz\fR components from address (\fIp\fR + (\fIoffset\fR * 4)) into a 3\- component vector and \fBvstorea_half3\fR writes \fIx\fR, \fIy\fR, \fIz\fR components from a 3\-component vector to address (\fIp\fR + (\fIoffset\fR * 4))\&. .SH "SPECIFICATION" .PP \m[blue]\fBOpenCL Specification\fR\m[]\&\s-2\u[1]\d\s+2 .SH "SEE ALSO" .PP \fBvectorDataLoadandStoreFunctions\fR(3clc) .SH "AUTHORS" .PP \fBThe Khronos Group\fR .SH "COPYRIGHT" .br Copyright \(co 2007-2011 The Khronos Group Inc. .br Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials. .sp .SH "NOTES" .IP " 1." 4 OpenCL Specification .RS 4 \%page 267, section 6.12.7 - Vector Data Load and Store Functions .RE