Click an item in the table below for details about that function.
| vloadn |
Read vectors from a pointer to memory. |
| vstoren |
Write a vector to a pointer to memory. |
| vload_half |
Read a half float from a pointer to memory. |
| vload_halfn |
Read a half float vector from a pointer to memory. |
| vstore_half |
Convert float to half and write to a pointer to memory. |
| vstore_halfn |
Convert float vector to half vector and write to a pointer to memory. |
| vloada_halfn |
Read half float vector from a pointer to memory. |
| vstorea_halfn |
Convert float vector to half vector and write to a pointer to memory. |
Vector Data Load and Store Functions allow you to read and write vector types from a pointer to memory.
The generic type gentype is used to indicate the built-in data types char, uchar, short, ushort, int, uint, long, ulong, or float.
The generic type name gentypen is used to indicate the built-in data types char{2|4|8|16},
uchar{2|4|8|16}, short{2|4|8|16}, ushort{2|4|8|16},
int{2|4|8|16}, uint{2|4|8|16}, long{2|4|8|16}, ulong{2|4|8|16}, or float{2|4|8|16} as the type for the arguments unless otherwise stated. The suffix used in gentypen or the function name (i.e. vloadn, vstoren, etc.) represents the number of elements in the built-in vector type (n = 2, 4, 8, or 16).
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 p can be a
pointer to __global, __local, or __private memory for store functions. The
pointer argument p can be a pointer to __global, __local, __constant or __private memory for load functions.
Certain built-in vector data load and store functions are extended with cl_khr_fp64 to include appropriate versions of functions that take double, and double{2|4|8|16} as arguments and return values. They are also extended with with cl_khr_fp16 to include appropriate versions of functions that take half, and half{2|4|8|16} as arguments and return values.
Copyright © 2007-2009 The Khronos Group Inc.
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.