authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-12-17 01:24:46-05:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-12-17 01:24:46-05:00
loge5c188e59a827bd7049f80bf51c8c4e59e016af2
tree529b7ba2bff39a79532d54eba9a869fc44de3bdd
parent0c457fa7ebc1af94e800a23d228962f6d0a372a5
parent181330bbd44af65da037e681199fc54176f35a3d
signaturebadge-check Signed by PGP key B5690EEEBB952194

Merge pull request #22251 from alexrp/remove-cuda

`zig cc`: Remove broken CUDA C/C++ support.

26 files changed, 6 insertions(+), 27894 deletions(-)

lib/include/__clang_cuda_builtin_vars.h deleted-121
...@@ -1,121 +0,0 @@
1/*===---- cuda_builtin_vars.h - CUDA built-in variables ---------------------===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 *===-----------------------------------------------------------------------===
8 */
9
10#ifndef __CUDA_BUILTIN_VARS_H
11#define __CUDA_BUILTIN_VARS_H
12
13// Forward declares from vector_types.h.
14struct uint3;
15struct dim3;
16
17// The file implements built-in CUDA variables using __declspec(property).
18// https://msdn.microsoft.com/en-us/library/yhfk0thd.aspx
19// All read accesses of built-in variable fields get converted into calls to a
20// getter function which in turn calls the appropriate builtin to fetch the
21// value.
22//
23// Example:
24// int x = threadIdx.x;
25// IR output:
26// %0 = call i32 @llvm.nvvm.read.ptx.sreg.tid.x() #3
27// PTX output:
28// mov.u32 %r2, %tid.x;
29
30#define __CUDA_DEVICE_BUILTIN(FIELD, INTRINSIC) \
31 __declspec(property(get = __fetch_builtin_##FIELD)) unsigned int FIELD; \
32 static inline __attribute__((always_inline)) \
33 __attribute__((device)) unsigned int __fetch_builtin_##FIELD(void) { \
34 return INTRINSIC; \
35 }
36
37#if __cplusplus >= 201103L
38#define __DELETE =delete
39#else
40#define __DELETE
41#endif
42
43// Make sure nobody can create instances of the special variable types. nvcc
44// also disallows taking address of special variables, so we disable address-of
45// operator as well.
46#define __CUDA_DISALLOW_BUILTINVAR_ACCESS(TypeName) \
47 __attribute__((device)) TypeName() __DELETE; \
48 __attribute__((device)) TypeName(const TypeName &) __DELETE; \
49 __attribute__((device)) void operator=(const TypeName &) const __DELETE; \
50 __attribute__((device)) TypeName *operator&() const __DELETE
51
52struct __cuda_builtin_threadIdx_t {
53 __CUDA_DEVICE_BUILTIN(x,__nvvm_read_ptx_sreg_tid_x());
54 __CUDA_DEVICE_BUILTIN(y,__nvvm_read_ptx_sreg_tid_y());
55 __CUDA_DEVICE_BUILTIN(z,__nvvm_read_ptx_sreg_tid_z());
56 // threadIdx should be convertible to uint3 (in fact in nvcc, it *is* a
57 // uint3). This function is defined after we pull in vector_types.h.
58 __attribute__((device)) operator dim3() const;
59 __attribute__((device)) operator uint3() const;
60
61private:
62 __CUDA_DISALLOW_BUILTINVAR_ACCESS(__cuda_builtin_threadIdx_t);
63};
64
65struct __cuda_builtin_blockIdx_t {
66 __CUDA_DEVICE_BUILTIN(x,__nvvm_read_ptx_sreg_ctaid_x());
67 __CUDA_DEVICE_BUILTIN(y,__nvvm_read_ptx_sreg_ctaid_y());
68 __CUDA_DEVICE_BUILTIN(z,__nvvm_read_ptx_sreg_ctaid_z());
69 // blockIdx should be convertible to uint3 (in fact in nvcc, it *is* a
70 // uint3). This function is defined after we pull in vector_types.h.
71 __attribute__((device)) operator dim3() const;
72 __attribute__((device)) operator uint3() const;
73
74private:
75 __CUDA_DISALLOW_BUILTINVAR_ACCESS(__cuda_builtin_blockIdx_t);
76};
77
78struct __cuda_builtin_blockDim_t {
79 __CUDA_DEVICE_BUILTIN(x,__nvvm_read_ptx_sreg_ntid_x());
80 __CUDA_DEVICE_BUILTIN(y,__nvvm_read_ptx_sreg_ntid_y());
81 __CUDA_DEVICE_BUILTIN(z,__nvvm_read_ptx_sreg_ntid_z());
82 // blockDim should be convertible to dim3 (in fact in nvcc, it *is* a
83 // dim3). This function is defined after we pull in vector_types.h.
84 __attribute__((device)) operator dim3() const;
85 __attribute__((device)) operator uint3() const;
86
87private:
88 __CUDA_DISALLOW_BUILTINVAR_ACCESS(__cuda_builtin_blockDim_t);
89};
90
91struct __cuda_builtin_gridDim_t {
92 __CUDA_DEVICE_BUILTIN(x,__nvvm_read_ptx_sreg_nctaid_x());
93 __CUDA_DEVICE_BUILTIN(y,__nvvm_read_ptx_sreg_nctaid_y());
94 __CUDA_DEVICE_BUILTIN(z,__nvvm_read_ptx_sreg_nctaid_z());
95 // gridDim should be convertible to dim3 (in fact in nvcc, it *is* a
96 // dim3). This function is defined after we pull in vector_types.h.
97 __attribute__((device)) operator dim3() const;
98 __attribute__((device)) operator uint3() const;
99
100private:
101 __CUDA_DISALLOW_BUILTINVAR_ACCESS(__cuda_builtin_gridDim_t);
102};
103
104#define __CUDA_BUILTIN_VAR \
105 extern const __attribute__((device)) __attribute__((weak))
106__CUDA_BUILTIN_VAR __cuda_builtin_threadIdx_t threadIdx;
107__CUDA_BUILTIN_VAR __cuda_builtin_blockIdx_t blockIdx;
108__CUDA_BUILTIN_VAR __cuda_builtin_blockDim_t blockDim;
109__CUDA_BUILTIN_VAR __cuda_builtin_gridDim_t gridDim;
110
111// warpSize should translate to read of %WARP_SZ but there's currently no
112// builtin to do so. According to PTX v4.2 docs 'to date, all target
113// architectures have a WARP_SZ value of 32'.
114__attribute__((device)) const int warpSize = 32;
115
116#undef __CUDA_DEVICE_BUILTIN
117#undef __CUDA_BUILTIN_VAR
118#undef __CUDA_DISALLOW_BUILTINVAR_ACCESS
119#undef __DELETE
120
121#endif /* __CUDA_BUILTIN_VARS_H */
lib/include/__clang_cuda_cmath.h deleted-512
...@@ -1,512 +0,0 @@
1/*===---- __clang_cuda_cmath.h - Device-side CUDA cmath support ------------===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 *===-----------------------------------------------------------------------===
8 */
9#ifndef __CLANG_CUDA_CMATH_H__
10#define __CLANG_CUDA_CMATH_H__
11#ifndef __CUDA__
12#error "This file is for CUDA compilation only."
13#endif
14
15#ifndef __OPENMP_NVPTX__
16#include <limits>
17#endif
18
19// CUDA lets us use various std math functions on the device side. This file
20// works in concert with __clang_cuda_math_forward_declares.h to make this work.
21//
22// Specifically, the forward-declares header declares __device__ overloads for
23// these functions in the global namespace, then pulls them into namespace std
24// with 'using' statements. Then this file implements those functions, after
25// their implementations have been pulled in.
26//
27// It's important that we declare the functions in the global namespace and pull
28// them into namespace std with using statements, as opposed to simply declaring
29// these functions in namespace std, because our device functions need to
30// overload the standard library functions, which may be declared in the global
31// namespace or in std, depending on the degree of conformance of the stdlib
32// implementation. Declaring in the global namespace and pulling into namespace
33// std covers all of the known knowns.
34
35#ifdef __OPENMP_NVPTX__
36#define __DEVICE__ static constexpr __attribute__((always_inline, nothrow))
37#else
38#define __DEVICE__ static __device__ __inline__ __attribute__((always_inline))
39#endif
40
41__DEVICE__ long long abs(long long __n) { return ::llabs(__n); }
42__DEVICE__ long abs(long __n) { return ::labs(__n); }
43__DEVICE__ float abs(float __x) { return ::fabsf(__x); }
44__DEVICE__ double abs(double __x) { return ::fabs(__x); }
45__DEVICE__ float acos(float __x) { return ::acosf(__x); }
46__DEVICE__ float asin(float __x) { return ::asinf(__x); }
47__DEVICE__ float atan(float __x) { return ::atanf(__x); }
48__DEVICE__ float atan2(float __x, float __y) { return ::atan2f(__x, __y); }
49__DEVICE__ float ceil(float __x) { return ::ceilf(__x); }
50__DEVICE__ float cos(float __x) { return ::cosf(__x); }
51__DEVICE__ float cosh(float __x) { return ::coshf(__x); }
52__DEVICE__ float exp(float __x) { return ::expf(__x); }
53__DEVICE__ float fabs(float __x) { return ::fabsf(__x); }
54__DEVICE__ float floor(float __x) { return ::floorf(__x); }
55__DEVICE__ float fmod(float __x, float __y) { return ::fmodf(__x, __y); }
56__DEVICE__ int fpclassify(float __x) {
57 return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL,
58 FP_ZERO, __x);
59}
60__DEVICE__ int fpclassify(double __x) {
61 return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL,
62 FP_ZERO, __x);
63}
64__DEVICE__ float frexp(float __arg, int *__exp) {
65 return ::frexpf(__arg, __exp);
66}
67
68// For inscrutable reasons, the CUDA headers define these functions for us on
69// Windows.
70#if !defined(_MSC_VER) || defined(__OPENMP_NVPTX__)
71
72// For OpenMP we work around some old system headers that have non-conforming
73// `isinf(float)` and `isnan(float)` implementations that return an `int`. We do
74// this by providing two versions of these functions, differing only in the
75// return type. To avoid conflicting definitions we disable implicit base
76// function generation. That means we will end up with two specializations, one
77// per type, but only one has a base function defined by the system header.
78#if defined(__OPENMP_NVPTX__)
79#pragma omp begin declare variant match( \
80 implementation = {extension(disable_implicit_base)})
81
82// FIXME: We lack an extension to customize the mangling of the variants, e.g.,
83// add a suffix. This means we would clash with the names of the variants
84// (note that we do not create implicit base functions here). To avoid
85// this clash we add a new trait to some of them that is always true
86// (this is LLVM after all ;)). It will only influence the mangled name
87// of the variants inside the inner region and avoid the clash.
88#pragma omp begin declare variant match(implementation = {vendor(llvm)})
89
90__DEVICE__ int isinf(float __x) { return ::__isinff(__x); }
91__DEVICE__ int isinf(double __x) { return ::__isinf(__x); }
92__DEVICE__ int isfinite(float __x) { return ::__finitef(__x); }
93__DEVICE__ int isfinite(double __x) { return ::__isfinited(__x); }
94__DEVICE__ int isnan(float __x) { return ::__isnanf(__x); }
95__DEVICE__ int isnan(double __x) { return ::__isnan(__x); }
96
97#pragma omp end declare variant
98
99#endif
100
101__DEVICE__ bool isinf(float __x) { return ::__isinff(__x); }
102__DEVICE__ bool isinf(double __x) { return ::__isinf(__x); }
103__DEVICE__ bool isfinite(float __x) { return ::__finitef(__x); }
104// For inscrutable reasons, __finite(), the double-precision version of
105// __finitef, does not exist when compiling for MacOS. __isfinited is available
106// everywhere and is just as good.
107__DEVICE__ bool isfinite(double __x) { return ::__isfinited(__x); }
108__DEVICE__ bool isnan(float __x) { return ::__isnanf(__x); }
109__DEVICE__ bool isnan(double __x) { return ::__isnan(__x); }
110
111#if defined(__OPENMP_NVPTX__)
112#pragma omp end declare variant
113#endif
114
115#endif
116
117__DEVICE__ bool isgreater(float __x, float __y) {
118 return __builtin_isgreater(__x, __y);
119}
120__DEVICE__ bool isgreater(double __x, double __y) {
121 return __builtin_isgreater(__x, __y);
122}
123__DEVICE__ bool isgreaterequal(float __x, float __y) {
124 return __builtin_isgreaterequal(__x, __y);
125}
126__DEVICE__ bool isgreaterequal(double __x, double __y) {
127 return __builtin_isgreaterequal(__x, __y);
128}
129__DEVICE__ bool isless(float __x, float __y) {
130 return __builtin_isless(__x, __y);
131}
132__DEVICE__ bool isless(double __x, double __y) {
133 return __builtin_isless(__x, __y);
134}
135__DEVICE__ bool islessequal(float __x, float __y) {
136 return __builtin_islessequal(__x, __y);
137}
138__DEVICE__ bool islessequal(double __x, double __y) {
139 return __builtin_islessequal(__x, __y);
140}
141__DEVICE__ bool islessgreater(float __x, float __y) {
142 return __builtin_islessgreater(__x, __y);
143}
144__DEVICE__ bool islessgreater(double __x, double __y) {
145 return __builtin_islessgreater(__x, __y);
146}
147__DEVICE__ bool isnormal(float __x) { return __builtin_isnormal(__x); }
148__DEVICE__ bool isnormal(double __x) { return __builtin_isnormal(__x); }
149__DEVICE__ bool isunordered(float __x, float __y) {
150 return __builtin_isunordered(__x, __y);
151}
152__DEVICE__ bool isunordered(double __x, double __y) {
153 return __builtin_isunordered(__x, __y);
154}
155__DEVICE__ float ldexp(float __arg, int __exp) {
156 return ::ldexpf(__arg, __exp);
157}
158__DEVICE__ float log(float __x) { return ::logf(__x); }
159__DEVICE__ float log10(float __x) { return ::log10f(__x); }
160__DEVICE__ float modf(float __x, float *__iptr) { return ::modff(__x, __iptr); }
161__DEVICE__ float pow(float __base, float __exp) {
162 return ::powf(__base, __exp);
163}
164__DEVICE__ float pow(float __base, int __iexp) {
165 return ::powif(__base, __iexp);
166}
167__DEVICE__ double pow(double __base, int __iexp) {
168 return ::powi(__base, __iexp);
169}
170__DEVICE__ bool signbit(float __x) { return ::__signbitf(__x); }
171__DEVICE__ bool signbit(double __x) { return ::__signbitd(__x); }
172__DEVICE__ float sin(float __x) { return ::sinf(__x); }
173__DEVICE__ float sinh(float __x) { return ::sinhf(__x); }
174__DEVICE__ float sqrt(float __x) { return ::sqrtf(__x); }
175__DEVICE__ float tan(float __x) { return ::tanf(__x); }
176__DEVICE__ float tanh(float __x) { return ::tanhf(__x); }
177
178// There was a redefinition error for this this overload in CUDA mode.
179// We restrict it to OpenMP mode for now, that is where it is actually needed
180// anyway.
181#ifdef __OPENMP_NVPTX__
182__DEVICE__ float remquo(float __n, float __d, int *__q) {
183 return ::remquof(__n, __d, __q);
184}
185#endif
186
187// Notably missing above is nexttoward. We omit it because
188// libdevice doesn't provide an implementation, and we don't want to be in the
189// business of implementing tricky libm functions in this header.
190
191#ifndef __OPENMP_NVPTX__
192
193// Now we've defined everything we promised we'd define in
194// __clang_cuda_math_forward_declares.h. We need to do two additional things to
195// fix up our math functions.
196//
197// 1) Define __device__ overloads for e.g. sin(int). The CUDA headers define
198// only sin(float) and sin(double), which means that e.g. sin(0) is
199// ambiguous.
200//
201// 2) Pull the __device__ overloads of "foobarf" math functions into namespace
202// std. These are defined in the CUDA headers in the global namespace,
203// independent of everything else we've done here.
204
205// We can't use std::enable_if, because we want to be pre-C++11 compatible. But
206// we go ahead and unconditionally define functions that are only available when
207// compiling for C++11 to match the behavior of the CUDA headers.
208template<bool __B, class __T = void>
209struct __clang_cuda_enable_if {};
210
211template <class __T> struct __clang_cuda_enable_if<true, __T> {
212 typedef __T type;
213};
214
215// Defines an overload of __fn that accepts one integral argument, calls
216// __fn((double)x), and returns __retty.
217#define __CUDA_CLANG_FN_INTEGER_OVERLOAD_1(__retty, __fn) \
218 template <typename __T> \
219 __DEVICE__ \
220 typename __clang_cuda_enable_if<std::numeric_limits<__T>::is_integer, \
221 __retty>::type \
222 __fn(__T __x) { \
223 return ::__fn((double)__x); \
224 }
225
226// Defines an overload of __fn that accepts one two arithmetic arguments, calls
227// __fn((double)x, (double)y), and returns a double.
228//
229// Note this is different from OVERLOAD_1, which generates an overload that
230// accepts only *integral* arguments.
231#define __CUDA_CLANG_FN_INTEGER_OVERLOAD_2(__retty, __fn) \
232 template <typename __T1, typename __T2> \
233 __DEVICE__ typename __clang_cuda_enable_if< \
234 std::numeric_limits<__T1>::is_specialized && \
235 std::numeric_limits<__T2>::is_specialized, \
236 __retty>::type \
237 __fn(__T1 __x, __T2 __y) { \
238 return __fn((double)__x, (double)__y); \
239 }
240
241__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, acos)
242__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, acosh)
243__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, asin)
244__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, asinh)
245__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, atan)
246__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(double, atan2);
247__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, atanh)
248__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, cbrt)
249__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, ceil)
250__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(double, copysign);
251__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, cos)
252__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, cosh)
253__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, erf)
254__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, erfc)
255__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, exp)
256__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, exp2)
257__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, expm1)
258__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, fabs)
259__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(double, fdim);
260__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, floor)
261__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(double, fmax);
262__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(double, fmin);
263__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(double, fmod);
264__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(int, fpclassify)
265__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(double, hypot);
266__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(int, ilogb)
267__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(bool, isfinite)
268__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(bool, isgreater);
269__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(bool, isgreaterequal);
270__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(bool, isinf);
271__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(bool, isless);
272__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(bool, islessequal);
273__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(bool, islessgreater);
274__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(bool, isnan);
275__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(bool, isnormal)
276__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(bool, isunordered);
277__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, lgamma)
278__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, log)
279__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, log10)
280__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, log1p)
281__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, log2)
282__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, logb)
283__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(long long, llrint)
284__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(long long, llround)
285__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(long, lrint)
286__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(long, lround)
287__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, nearbyint);
288__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(double, nextafter);
289__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(double, pow);
290__CUDA_CLANG_FN_INTEGER_OVERLOAD_2(double, remainder);
291__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, rint);
292__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, round);
293__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(bool, signbit)
294__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, sin)
295__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, sinh)
296__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, sqrt)
297__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, tan)
298__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, tanh)
299__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, tgamma)
300__CUDA_CLANG_FN_INTEGER_OVERLOAD_1(double, trunc);
301
302#undef __CUDA_CLANG_FN_INTEGER_OVERLOAD_1
303#undef __CUDA_CLANG_FN_INTEGER_OVERLOAD_2
304
305// Overloads for functions that don't match the patterns expected by
306// __CUDA_CLANG_FN_INTEGER_OVERLOAD_{1,2}.
307template <typename __T1, typename __T2, typename __T3>
308__DEVICE__ typename __clang_cuda_enable_if<
309 std::numeric_limits<__T1>::is_specialized &&
310 std::numeric_limits<__T2>::is_specialized &&
311 std::numeric_limits<__T3>::is_specialized,
312 double>::type
313fma(__T1 __x, __T2 __y, __T3 __z) {
314 return std::fma((double)__x, (double)__y, (double)__z);
315}
316
317template <typename __T>
318__DEVICE__ typename __clang_cuda_enable_if<std::numeric_limits<__T>::is_integer,
319 double>::type
320frexp(__T __x, int *__exp) {
321 return std::frexp((double)__x, __exp);
322}
323
324template <typename __T>
325__DEVICE__ typename __clang_cuda_enable_if<std::numeric_limits<__T>::is_integer,
326 double>::type
327ldexp(__T __x, int __exp) {
328 return std::ldexp((double)__x, __exp);
329}
330
331template <typename __T1, typename __T2>
332__DEVICE__ typename __clang_cuda_enable_if<
333 std::numeric_limits<__T1>::is_specialized &&
334 std::numeric_limits<__T2>::is_specialized,
335 double>::type
336remquo(__T1 __x, __T2 __y, int *__quo) {
337 return std::remquo((double)__x, (double)__y, __quo);
338}
339
340template <typename __T>
341__DEVICE__ typename __clang_cuda_enable_if<std::numeric_limits<__T>::is_integer,
342 double>::type
343scalbln(__T __x, long __exp) {
344 return std::scalbln((double)__x, __exp);
345}
346
347template <typename __T>
348__DEVICE__ typename __clang_cuda_enable_if<std::numeric_limits<__T>::is_integer,
349 double>::type
350scalbn(__T __x, int __exp) {
351 return std::scalbn((double)__x, __exp);
352}
353
354// We need to define these overloads in exactly the namespace our standard
355// library uses (including the right inline namespace), otherwise they won't be
356// picked up by other functions in the standard library (e.g. functions in
357// <complex>). Thus the ugliness below.
358#ifdef _LIBCPP_BEGIN_NAMESPACE_STD
359_LIBCPP_BEGIN_NAMESPACE_STD
360#else
361namespace std {
362#ifdef _GLIBCXX_BEGIN_NAMESPACE_VERSION
363_GLIBCXX_BEGIN_NAMESPACE_VERSION
364#endif
365#endif
366
367// Pull the new overloads we defined above into namespace std.
368using ::acos;
369using ::acosh;
370using ::asin;
371using ::asinh;
372using ::atan;
373using ::atan2;
374using ::atanh;
375using ::cbrt;
376using ::ceil;
377using ::copysign;
378using ::cos;
379using ::cosh;
380using ::erf;
381using ::erfc;
382using ::exp;
383using ::exp2;
384using ::expm1;
385using ::fabs;
386using ::fdim;
387using ::floor;
388using ::fma;
389using ::fmax;
390using ::fmin;
391using ::fmod;
392using ::fpclassify;
393using ::frexp;
394using ::hypot;
395using ::ilogb;
396using ::isfinite;
397using ::isgreater;
398using ::isgreaterequal;
399using ::isless;
400using ::islessequal;
401using ::islessgreater;
402using ::isnormal;
403using ::isunordered;
404using ::ldexp;
405using ::lgamma;
406using ::llrint;
407using ::llround;
408using ::log;
409using ::log10;
410using ::log1p;
411using ::log2;
412using ::logb;
413using ::lrint;
414using ::lround;
415using ::nearbyint;
416using ::nextafter;
417using ::pow;
418using ::remainder;
419using ::remquo;
420using ::rint;
421using ::round;
422using ::scalbln;
423using ::scalbn;
424using ::signbit;
425using ::sin;
426using ::sinh;
427using ::sqrt;
428using ::tan;
429using ::tanh;
430using ::tgamma;
431using ::trunc;
432
433// Well this is fun: We need to pull these symbols in for libc++, but we can't
434// pull them in with libstdc++, because its ::isinf and ::isnan are different
435// than its std::isinf and std::isnan.
436#ifndef __GLIBCXX__
437using ::isinf;
438using ::isnan;
439#endif
440
441// Finally, pull the "foobarf" functions that CUDA defines in its headers into
442// namespace std.
443using ::acosf;
444using ::acoshf;
445using ::asinf;
446using ::asinhf;
447using ::atan2f;
448using ::atanf;
449using ::atanhf;
450using ::cbrtf;
451using ::ceilf;
452using ::copysignf;
453using ::cosf;
454using ::coshf;
455using ::erfcf;
456using ::erff;
457using ::exp2f;
458using ::expf;
459using ::expm1f;
460using ::fabsf;
461using ::fdimf;
462using ::floorf;
463using ::fmaf;
464using ::fmaxf;
465using ::fminf;
466using ::fmodf;
467using ::frexpf;
468using ::hypotf;
469using ::ilogbf;
470using ::ldexpf;
471using ::lgammaf;
472using ::llrintf;
473using ::llroundf;
474using ::log10f;
475using ::log1pf;
476using ::log2f;
477using ::logbf;
478using ::logf;
479using ::lrintf;
480using ::lroundf;
481using ::modff;
482using ::nearbyintf;
483using ::nextafterf;
484using ::powf;
485using ::remainderf;
486using ::remquof;
487using ::rintf;
488using ::roundf;
489using ::scalblnf;
490using ::scalbnf;
491using ::sinf;
492using ::sinhf;
493using ::sqrtf;
494using ::tanf;
495using ::tanhf;
496using ::tgammaf;
497using ::truncf;
498
499#ifdef _LIBCPP_END_NAMESPACE_STD
500_LIBCPP_END_NAMESPACE_STD
501#else
502#ifdef _GLIBCXX_BEGIN_NAMESPACE_VERSION
503_GLIBCXX_END_NAMESPACE_VERSION
504#endif
505} // namespace std
506#endif
507
508#endif // __OPENMP_NVPTX__
509
510#undef __DEVICE__
511
512#endif
lib/include/__clang_cuda_complex_builtins.h deleted-285
...@@ -1,285 +0,0 @@
1/*===-- __clang_cuda_complex_builtins - CUDA impls of runtime complex fns ---===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 *===-----------------------------------------------------------------------===
8 */
9
10#ifndef __CLANG_CUDA_COMPLEX_BUILTINS
11#define __CLANG_CUDA_COMPLEX_BUILTINS
12
13// This header defines __muldc3, __mulsc3, __divdc3, and __divsc3. These are
14// libgcc functions that clang assumes are available when compiling c99 complex
15// operations. (These implementations come from libc++, and have been modified
16// to work with CUDA and OpenMP target offloading [in C and C++ mode].)
17
18#pragma push_macro("__DEVICE__")
19#if defined(__OPENMP_NVPTX__) || defined(__OPENMP_AMDGCN__)
20#pragma omp declare target
21#define __DEVICE__ __attribute__((noinline, nothrow, cold, weak))
22#else
23#define __DEVICE__ __device__ inline
24#endif
25
26// To make the algorithms available for C and C++ in CUDA and OpenMP we select
27// different but equivalent function versions. TODO: For OpenMP we currently
28// select the native builtins as the overload support for templates is lacking.
29#if !defined(__OPENMP_NVPTX__) && !defined(__OPENMP_AMDGCN__)
30#define _ISNANd std::isnan
31#define _ISNANf std::isnan
32#define _ISINFd std::isinf
33#define _ISINFf std::isinf
34#define _ISFINITEd std::isfinite
35#define _ISFINITEf std::isfinite
36#define _COPYSIGNd std::copysign
37#define _COPYSIGNf std::copysign
38#define _SCALBNd std::scalbn
39#define _SCALBNf std::scalbn
40#define _ABSd std::abs
41#define _ABSf std::abs
42#define _LOGBd std::logb
43#define _LOGBf std::logb
44// Rather than pulling in std::max from algorithm everytime, use available ::max.
45#define _fmaxd max
46#define _fmaxf max
47#else
48#ifdef __AMDGCN__
49#define _ISNANd __ocml_isnan_f64
50#define _ISNANf __ocml_isnan_f32
51#define _ISINFd __ocml_isinf_f64
52#define _ISINFf __ocml_isinf_f32
53#define _ISFINITEd __ocml_isfinite_f64
54#define _ISFINITEf __ocml_isfinite_f32
55#define _COPYSIGNd __ocml_copysign_f64
56#define _COPYSIGNf __ocml_copysign_f32
57#define _SCALBNd __ocml_scalbn_f64
58#define _SCALBNf __ocml_scalbn_f32
59#define _ABSd __ocml_fabs_f64
60#define _ABSf __ocml_fabs_f32
61#define _LOGBd __ocml_logb_f64
62#define _LOGBf __ocml_logb_f32
63#define _fmaxd __ocml_fmax_f64
64#define _fmaxf __ocml_fmax_f32
65#else
66#define _ISNANd __nv_isnand
67#define _ISNANf __nv_isnanf
68#define _ISINFd __nv_isinfd
69#define _ISINFf __nv_isinff
70#define _ISFINITEd __nv_isfinited
71#define _ISFINITEf __nv_finitef
72#define _COPYSIGNd __nv_copysign
73#define _COPYSIGNf __nv_copysignf
74#define _SCALBNd __nv_scalbn
75#define _SCALBNf __nv_scalbnf
76#define _ABSd __nv_fabs
77#define _ABSf __nv_fabsf
78#define _LOGBd __nv_logb
79#define _LOGBf __nv_logbf
80#define _fmaxd __nv_fmax
81#define _fmaxf __nv_fmaxf
82#endif
83#endif
84
85#if defined(__cplusplus)
86extern "C" {
87#endif
88
89__DEVICE__ double _Complex __muldc3(double __a, double __b, double __c,
90 double __d) {
91 double __ac = __a * __c;
92 double __bd = __b * __d;
93 double __ad = __a * __d;
94 double __bc = __b * __c;
95 double _Complex z;
96 __real__(z) = __ac - __bd;
97 __imag__(z) = __ad + __bc;
98 if (_ISNANd(__real__(z)) && _ISNANd(__imag__(z))) {
99 int __recalc = 0;
100 if (_ISINFd(__a) || _ISINFd(__b)) {
101 __a = _COPYSIGNd(_ISINFd(__a) ? 1 : 0, __a);
102 __b = _COPYSIGNd(_ISINFd(__b) ? 1 : 0, __b);
103 if (_ISNANd(__c))
104 __c = _COPYSIGNd(0, __c);
105 if (_ISNANd(__d))
106 __d = _COPYSIGNd(0, __d);
107 __recalc = 1;
108 }
109 if (_ISINFd(__c) || _ISINFd(__d)) {
110 __c = _COPYSIGNd(_ISINFd(__c) ? 1 : 0, __c);
111 __d = _COPYSIGNd(_ISINFd(__d) ? 1 : 0, __d);
112 if (_ISNANd(__a))
113 __a = _COPYSIGNd(0, __a);
114 if (_ISNANd(__b))
115 __b = _COPYSIGNd(0, __b);
116 __recalc = 1;
117 }
118 if (!__recalc &&
119 (_ISINFd(__ac) || _ISINFd(__bd) || _ISINFd(__ad) || _ISINFd(__bc))) {
120 if (_ISNANd(__a))
121 __a = _COPYSIGNd(0, __a);
122 if (_ISNANd(__b))
123 __b = _COPYSIGNd(0, __b);
124 if (_ISNANd(__c))
125 __c = _COPYSIGNd(0, __c);
126 if (_ISNANd(__d))
127 __d = _COPYSIGNd(0, __d);
128 __recalc = 1;
129 }
130 if (__recalc) {
131 // Can't use std::numeric_limits<double>::infinity() -- that doesn't have
132 // a device overload (and isn't constexpr before C++11, naturally).
133 __real__(z) = __builtin_huge_val() * (__a * __c - __b * __d);
134 __imag__(z) = __builtin_huge_val() * (__a * __d + __b * __c);
135 }
136 }
137 return z;
138}
139
140__DEVICE__ float _Complex __mulsc3(float __a, float __b, float __c, float __d) {
141 float __ac = __a * __c;
142 float __bd = __b * __d;
143 float __ad = __a * __d;
144 float __bc = __b * __c;
145 float _Complex z;
146 __real__(z) = __ac - __bd;
147 __imag__(z) = __ad + __bc;
148 if (_ISNANf(__real__(z)) && _ISNANf(__imag__(z))) {
149 int __recalc = 0;
150 if (_ISINFf(__a) || _ISINFf(__b)) {
151 __a = _COPYSIGNf(_ISINFf(__a) ? 1 : 0, __a);
152 __b = _COPYSIGNf(_ISINFf(__b) ? 1 : 0, __b);
153 if (_ISNANf(__c))
154 __c = _COPYSIGNf(0, __c);
155 if (_ISNANf(__d))
156 __d = _COPYSIGNf(0, __d);
157 __recalc = 1;
158 }
159 if (_ISINFf(__c) || _ISINFf(__d)) {
160 __c = _COPYSIGNf(_ISINFf(__c) ? 1 : 0, __c);
161 __d = _COPYSIGNf(_ISINFf(__d) ? 1 : 0, __d);
162 if (_ISNANf(__a))
163 __a = _COPYSIGNf(0, __a);
164 if (_ISNANf(__b))
165 __b = _COPYSIGNf(0, __b);
166 __recalc = 1;
167 }
168 if (!__recalc &&
169 (_ISINFf(__ac) || _ISINFf(__bd) || _ISINFf(__ad) || _ISINFf(__bc))) {
170 if (_ISNANf(__a))
171 __a = _COPYSIGNf(0, __a);
172 if (_ISNANf(__b))
173 __b = _COPYSIGNf(0, __b);
174 if (_ISNANf(__c))
175 __c = _COPYSIGNf(0, __c);
176 if (_ISNANf(__d))
177 __d = _COPYSIGNf(0, __d);
178 __recalc = 1;
179 }
180 if (__recalc) {
181 __real__(z) = __builtin_huge_valf() * (__a * __c - __b * __d);
182 __imag__(z) = __builtin_huge_valf() * (__a * __d + __b * __c);
183 }
184 }
185 return z;
186}
187
188__DEVICE__ double _Complex __divdc3(double __a, double __b, double __c,
189 double __d) {
190 int __ilogbw = 0;
191 // Can't use std::max, because that's defined in <algorithm>, and we don't
192 // want to pull that in for every compile. The CUDA headers define
193 // ::max(float, float) and ::max(double, double), which is sufficient for us.
194 double __logbw = _LOGBd(_fmaxd(_ABSd(__c), _ABSd(__d)));
195 if (_ISFINITEd(__logbw)) {
196 __ilogbw = (int)__logbw;
197 __c = _SCALBNd(__c, -__ilogbw);
198 __d = _SCALBNd(__d, -__ilogbw);
199 }
200 double __denom = __c * __c + __d * __d;
201 double _Complex z;
202 __real__(z) = _SCALBNd((__a * __c + __b * __d) / __denom, -__ilogbw);
203 __imag__(z) = _SCALBNd((__b * __c - __a * __d) / __denom, -__ilogbw);
204 if (_ISNANd(__real__(z)) && _ISNANd(__imag__(z))) {
205 if ((__denom == 0.0) && (!_ISNANd(__a) || !_ISNANd(__b))) {
206 __real__(z) = _COPYSIGNd(__builtin_huge_val(), __c) * __a;
207 __imag__(z) = _COPYSIGNd(__builtin_huge_val(), __c) * __b;
208 } else if ((_ISINFd(__a) || _ISINFd(__b)) && _ISFINITEd(__c) &&
209 _ISFINITEd(__d)) {
210 __a = _COPYSIGNd(_ISINFd(__a) ? 1.0 : 0.0, __a);
211 __b = _COPYSIGNd(_ISINFd(__b) ? 1.0 : 0.0, __b);
212 __real__(z) = __builtin_huge_val() * (__a * __c + __b * __d);
213 __imag__(z) = __builtin_huge_val() * (__b * __c - __a * __d);
214 } else if (_ISINFd(__logbw) && __logbw > 0.0 && _ISFINITEd(__a) &&
215 _ISFINITEd(__b)) {
216 __c = _COPYSIGNd(_ISINFd(__c) ? 1.0 : 0.0, __c);
217 __d = _COPYSIGNd(_ISINFd(__d) ? 1.0 : 0.0, __d);
218 __real__(z) = 0.0 * (__a * __c + __b * __d);
219 __imag__(z) = 0.0 * (__b * __c - __a * __d);
220 }
221 }
222 return z;
223}
224
225__DEVICE__ float _Complex __divsc3(float __a, float __b, float __c, float __d) {
226 int __ilogbw = 0;
227 float __logbw = _LOGBf(_fmaxf(_ABSf(__c), _ABSf(__d)));
228 if (_ISFINITEf(__logbw)) {
229 __ilogbw = (int)__logbw;
230 __c = _SCALBNf(__c, -__ilogbw);
231 __d = _SCALBNf(__d, -__ilogbw);
232 }
233 float __denom = __c * __c + __d * __d;
234 float _Complex z;
235 __real__(z) = _SCALBNf((__a * __c + __b * __d) / __denom, -__ilogbw);
236 __imag__(z) = _SCALBNf((__b * __c - __a * __d) / __denom, -__ilogbw);
237 if (_ISNANf(__real__(z)) && _ISNANf(__imag__(z))) {
238 if ((__denom == 0) && (!_ISNANf(__a) || !_ISNANf(__b))) {
239 __real__(z) = _COPYSIGNf(__builtin_huge_valf(), __c) * __a;
240 __imag__(z) = _COPYSIGNf(__builtin_huge_valf(), __c) * __b;
241 } else if ((_ISINFf(__a) || _ISINFf(__b)) && _ISFINITEf(__c) &&
242 _ISFINITEf(__d)) {
243 __a = _COPYSIGNf(_ISINFf(__a) ? 1 : 0, __a);
244 __b = _COPYSIGNf(_ISINFf(__b) ? 1 : 0, __b);
245 __real__(z) = __builtin_huge_valf() * (__a * __c + __b * __d);
246 __imag__(z) = __builtin_huge_valf() * (__b * __c - __a * __d);
247 } else if (_ISINFf(__logbw) && __logbw > 0 && _ISFINITEf(__a) &&
248 _ISFINITEf(__b)) {
249 __c = _COPYSIGNf(_ISINFf(__c) ? 1 : 0, __c);
250 __d = _COPYSIGNf(_ISINFf(__d) ? 1 : 0, __d);
251 __real__(z) = 0 * (__a * __c + __b * __d);
252 __imag__(z) = 0 * (__b * __c - __a * __d);
253 }
254 }
255 return z;
256}
257
258#if defined(__cplusplus)
259} // extern "C"
260#endif
261
262#undef _ISNANd
263#undef _ISNANf
264#undef _ISINFd
265#undef _ISINFf
266#undef _COPYSIGNd
267#undef _COPYSIGNf
268#undef _ISFINITEd
269#undef _ISFINITEf
270#undef _SCALBNd
271#undef _SCALBNf
272#undef _ABSd
273#undef _ABSf
274#undef _LOGBd
275#undef _LOGBf
276#undef _fmaxd
277#undef _fmaxf
278
279#if defined(__OPENMP_NVPTX__) || defined(__OPENMP_AMDGCN__)
280#pragma omp end declare target
281#endif
282
283#pragma pop_macro("__DEVICE__")
284
285#endif // __CLANG_CUDA_COMPLEX_BUILTINS
lib/include/__clang_cuda_device_functions.h deleted-1558
...@@ -1,1558 +0,0 @@
1/*===---- __clang_cuda_device_functions.h - CUDA runtime support -----------===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 *===-----------------------------------------------------------------------===
8 */
9
10#ifndef __CLANG_CUDA_DEVICE_FUNCTIONS_H__
11#define __CLANG_CUDA_DEVICE_FUNCTIONS_H__
12
13#ifndef __OPENMP_NVPTX__
14#if CUDA_VERSION < 9000
15#error This file is intended to be used with CUDA-9+ only.
16#endif
17#endif
18
19// __DEVICE__ is a helper macro with common set of attributes for the wrappers
20// we implement in this file. We need static in order to avoid emitting unused
21// functions and __forceinline__ helps inlining these wrappers at -O1.
22#pragma push_macro("__DEVICE__")
23#ifdef __OPENMP_NVPTX__
24#define __DEVICE__ static __attribute__((always_inline, nothrow))
25#else
26#define __DEVICE__ static __device__ __forceinline__
27#endif
28
29__DEVICE__ int __all(int __a) { return __nvvm_vote_all(__a); }
30__DEVICE__ int __any(int __a) { return __nvvm_vote_any(__a); }
31__DEVICE__ unsigned int __ballot(int __a) { return __nvvm_vote_ballot(__a); }
32__DEVICE__ unsigned int __brev(unsigned int __a) { return __nv_brev(__a); }
33__DEVICE__ unsigned long long __brevll(unsigned long long __a) {
34 return __nv_brevll(__a);
35}
36#if defined(__cplusplus)
37__DEVICE__ void __brkpt() { __asm__ __volatile__("brkpt;"); }
38__DEVICE__ void __brkpt(int __a) { __brkpt(); }
39#else
40__DEVICE__ void __attribute__((overloadable)) __brkpt(void) {
41 __asm__ __volatile__("brkpt;");
42}
43__DEVICE__ void __attribute__((overloadable)) __brkpt(int __a) { __brkpt(); }
44#endif
45__DEVICE__ unsigned int __byte_perm(unsigned int __a, unsigned int __b,
46 unsigned int __c) {
47 return __nv_byte_perm(__a, __b, __c);
48}
49__DEVICE__ int __clz(int __a) { return __nv_clz(__a); }
50__DEVICE__ int __clzll(long long __a) { return __nv_clzll(__a); }
51__DEVICE__ float __cosf(float __a) { return __nv_fast_cosf(__a); }
52__DEVICE__ double __dAtomicAdd(double *__p, double __v) {
53 return __nvvm_atom_add_gen_d(__p, __v);
54}
55__DEVICE__ double __dAtomicAdd_block(double *__p, double __v) {
56 return __nvvm_atom_cta_add_gen_d(__p, __v);
57}
58__DEVICE__ double __dAtomicAdd_system(double *__p, double __v) {
59 return __nvvm_atom_sys_add_gen_d(__p, __v);
60}
61__DEVICE__ double __dadd_rd(double __a, double __b) {
62 return __nv_dadd_rd(__a, __b);
63}
64__DEVICE__ double __dadd_rn(double __a, double __b) {
65 return __nv_dadd_rn(__a, __b);
66}
67__DEVICE__ double __dadd_ru(double __a, double __b) {
68 return __nv_dadd_ru(__a, __b);
69}
70__DEVICE__ double __dadd_rz(double __a, double __b) {
71 return __nv_dadd_rz(__a, __b);
72}
73__DEVICE__ double __ddiv_rd(double __a, double __b) {
74 return __nv_ddiv_rd(__a, __b);
75}
76__DEVICE__ double __ddiv_rn(double __a, double __b) {
77 return __nv_ddiv_rn(__a, __b);
78}
79__DEVICE__ double __ddiv_ru(double __a, double __b) {
80 return __nv_ddiv_ru(__a, __b);
81}
82__DEVICE__ double __ddiv_rz(double __a, double __b) {
83 return __nv_ddiv_rz(__a, __b);
84}
85__DEVICE__ double __dmul_rd(double __a, double __b) {
86 return __nv_dmul_rd(__a, __b);
87}
88__DEVICE__ double __dmul_rn(double __a, double __b) {
89 return __nv_dmul_rn(__a, __b);
90}
91__DEVICE__ double __dmul_ru(double __a, double __b) {
92 return __nv_dmul_ru(__a, __b);
93}
94__DEVICE__ double __dmul_rz(double __a, double __b) {
95 return __nv_dmul_rz(__a, __b);
96}
97__DEVICE__ float __double2float_rd(double __a) {
98 return __nv_double2float_rd(__a);
99}
100__DEVICE__ float __double2float_rn(double __a) {
101 return __nv_double2float_rn(__a);
102}
103__DEVICE__ float __double2float_ru(double __a) {
104 return __nv_double2float_ru(__a);
105}
106__DEVICE__ float __double2float_rz(double __a) {
107 return __nv_double2float_rz(__a);
108}
109__DEVICE__ int __double2hiint(double __a) { return __nv_double2hiint(__a); }
110__DEVICE__ int __double2int_rd(double __a) { return __nv_double2int_rd(__a); }
111__DEVICE__ int __double2int_rn(double __a) { return __nv_double2int_rn(__a); }
112__DEVICE__ int __double2int_ru(double __a) { return __nv_double2int_ru(__a); }
113__DEVICE__ int __double2int_rz(double __a) { return __nv_double2int_rz(__a); }
114__DEVICE__ long long __double2ll_rd(double __a) {
115 return __nv_double2ll_rd(__a);
116}
117__DEVICE__ long long __double2ll_rn(double __a) {
118 return __nv_double2ll_rn(__a);
119}
120__DEVICE__ long long __double2ll_ru(double __a) {
121 return __nv_double2ll_ru(__a);
122}
123__DEVICE__ long long __double2ll_rz(double __a) {
124 return __nv_double2ll_rz(__a);
125}
126__DEVICE__ int __double2loint(double __a) { return __nv_double2loint(__a); }
127__DEVICE__ unsigned int __double2uint_rd(double __a) {
128 return __nv_double2uint_rd(__a);
129}
130__DEVICE__ unsigned int __double2uint_rn(double __a) {
131 return __nv_double2uint_rn(__a);
132}
133__DEVICE__ unsigned int __double2uint_ru(double __a) {
134 return __nv_double2uint_ru(__a);
135}
136__DEVICE__ unsigned int __double2uint_rz(double __a) {
137 return __nv_double2uint_rz(__a);
138}
139__DEVICE__ unsigned long long __double2ull_rd(double __a) {
140 return __nv_double2ull_rd(__a);
141}
142__DEVICE__ unsigned long long __double2ull_rn(double __a) {
143 return __nv_double2ull_rn(__a);
144}
145__DEVICE__ unsigned long long __double2ull_ru(double __a) {
146 return __nv_double2ull_ru(__a);
147}
148__DEVICE__ unsigned long long __double2ull_rz(double __a) {
149 return __nv_double2ull_rz(__a);
150}
151__DEVICE__ long long __double_as_longlong(double __a) {
152 return __nv_double_as_longlong(__a);
153}
154__DEVICE__ double __drcp_rd(double __a) { return __nv_drcp_rd(__a); }
155__DEVICE__ double __drcp_rn(double __a) { return __nv_drcp_rn(__a); }
156__DEVICE__ double __drcp_ru(double __a) { return __nv_drcp_ru(__a); }
157__DEVICE__ double __drcp_rz(double __a) { return __nv_drcp_rz(__a); }
158__DEVICE__ double __dsqrt_rd(double __a) { return __nv_dsqrt_rd(__a); }
159__DEVICE__ double __dsqrt_rn(double __a) { return __nv_dsqrt_rn(__a); }
160__DEVICE__ double __dsqrt_ru(double __a) { return __nv_dsqrt_ru(__a); }
161__DEVICE__ double __dsqrt_rz(double __a) { return __nv_dsqrt_rz(__a); }
162__DEVICE__ double __dsub_rd(double __a, double __b) {
163 return __nv_dsub_rd(__a, __b);
164}
165__DEVICE__ double __dsub_rn(double __a, double __b) {
166 return __nv_dsub_rn(__a, __b);
167}
168__DEVICE__ double __dsub_ru(double __a, double __b) {
169 return __nv_dsub_ru(__a, __b);
170}
171__DEVICE__ double __dsub_rz(double __a, double __b) {
172 return __nv_dsub_rz(__a, __b);
173}
174__DEVICE__ float __exp10f(float __a) { return __nv_fast_exp10f(__a); }
175__DEVICE__ float __expf(float __a) { return __nv_fast_expf(__a); }
176__DEVICE__ float __fAtomicAdd(float *__p, float __v) {
177 return __nvvm_atom_add_gen_f(__p, __v);
178}
179__DEVICE__ float __fAtomicAdd_block(float *__p, float __v) {
180 return __nvvm_atom_cta_add_gen_f(__p, __v);
181}
182__DEVICE__ float __fAtomicAdd_system(float *__p, float __v) {
183 return __nvvm_atom_sys_add_gen_f(__p, __v);
184}
185__DEVICE__ float __fAtomicExch(float *__p, float __v) {
186 return __nv_int_as_float(
187 __nvvm_atom_xchg_gen_i((int *)__p, __nv_float_as_int(__v)));
188}
189__DEVICE__ float __fAtomicExch_block(float *__p, float __v) {
190 return __nv_int_as_float(
191 __nvvm_atom_cta_xchg_gen_i((int *)__p, __nv_float_as_int(__v)));
192}
193__DEVICE__ float __fAtomicExch_system(float *__p, float __v) {
194 return __nv_int_as_float(
195 __nvvm_atom_sys_xchg_gen_i((int *)__p, __nv_float_as_int(__v)));
196}
197__DEVICE__ float __fadd_rd(float __a, float __b) {
198 return __nv_fadd_rd(__a, __b);
199}
200__DEVICE__ float __fadd_rn(float __a, float __b) {
201 return __nv_fadd_rn(__a, __b);
202}
203__DEVICE__ float __fadd_ru(float __a, float __b) {
204 return __nv_fadd_ru(__a, __b);
205}
206__DEVICE__ float __fadd_rz(float __a, float __b) {
207 return __nv_fadd_rz(__a, __b);
208}
209__DEVICE__ float __fdiv_rd(float __a, float __b) {
210 return __nv_fdiv_rd(__a, __b);
211}
212__DEVICE__ float __fdiv_rn(float __a, float __b) {
213 return __nv_fdiv_rn(__a, __b);
214}
215__DEVICE__ float __fdiv_ru(float __a, float __b) {
216 return __nv_fdiv_ru(__a, __b);
217}
218__DEVICE__ float __fdiv_rz(float __a, float __b) {
219 return __nv_fdiv_rz(__a, __b);
220}
221__DEVICE__ float __fdividef(float __a, float __b) {
222 return __nv_fast_fdividef(__a, __b);
223}
224__DEVICE__ int __ffs(int __a) { return __nv_ffs(__a); }
225__DEVICE__ int __ffsll(long long __a) { return __nv_ffsll(__a); }
226__DEVICE__ int __finite(double __a) { return __nv_isfinited(__a); }
227__DEVICE__ int __finitef(float __a) { return __nv_finitef(__a); }
228#ifdef _MSC_VER
229__DEVICE__ int __finitel(long double __a);
230#endif
231__DEVICE__ int __float2int_rd(float __a) { return __nv_float2int_rd(__a); }
232__DEVICE__ int __float2int_rn(float __a) { return __nv_float2int_rn(__a); }
233__DEVICE__ int __float2int_ru(float __a) { return __nv_float2int_ru(__a); }
234__DEVICE__ int __float2int_rz(float __a) { return __nv_float2int_rz(__a); }
235__DEVICE__ long long __float2ll_rd(float __a) { return __nv_float2ll_rd(__a); }
236__DEVICE__ long long __float2ll_rn(float __a) { return __nv_float2ll_rn(__a); }
237__DEVICE__ long long __float2ll_ru(float __a) { return __nv_float2ll_ru(__a); }
238__DEVICE__ long long __float2ll_rz(float __a) { return __nv_float2ll_rz(__a); }
239__DEVICE__ unsigned int __float2uint_rd(float __a) {
240 return __nv_float2uint_rd(__a);
241}
242__DEVICE__ unsigned int __float2uint_rn(float __a) {
243 return __nv_float2uint_rn(__a);
244}
245__DEVICE__ unsigned int __float2uint_ru(float __a) {
246 return __nv_float2uint_ru(__a);
247}
248__DEVICE__ unsigned int __float2uint_rz(float __a) {
249 return __nv_float2uint_rz(__a);
250}
251__DEVICE__ unsigned long long __float2ull_rd(float __a) {
252 return __nv_float2ull_rd(__a);
253}
254__DEVICE__ unsigned long long __float2ull_rn(float __a) {
255 return __nv_float2ull_rn(__a);
256}
257__DEVICE__ unsigned long long __float2ull_ru(float __a) {
258 return __nv_float2ull_ru(__a);
259}
260__DEVICE__ unsigned long long __float2ull_rz(float __a) {
261 return __nv_float2ull_rz(__a);
262}
263__DEVICE__ int __float_as_int(float __a) { return __nv_float_as_int(__a); }
264__DEVICE__ unsigned int __float_as_uint(float __a) {
265 return __nv_float_as_uint(__a);
266}
267__DEVICE__ double __fma_rd(double __a, double __b, double __c) {
268 return __nv_fma_rd(__a, __b, __c);
269}
270__DEVICE__ double __fma_rn(double __a, double __b, double __c) {
271 return __nv_fma_rn(__a, __b, __c);
272}
273__DEVICE__ double __fma_ru(double __a, double __b, double __c) {
274 return __nv_fma_ru(__a, __b, __c);
275}
276__DEVICE__ double __fma_rz(double __a, double __b, double __c) {
277 return __nv_fma_rz(__a, __b, __c);
278}
279__DEVICE__ float __fmaf_ieee_rd(float __a, float __b, float __c) {
280 return __nv_fmaf_ieee_rd(__a, __b, __c);
281}
282__DEVICE__ float __fmaf_ieee_rn(float __a, float __b, float __c) {
283 return __nv_fmaf_ieee_rn(__a, __b, __c);
284}
285__DEVICE__ float __fmaf_ieee_ru(float __a, float __b, float __c) {
286 return __nv_fmaf_ieee_ru(__a, __b, __c);
287}
288__DEVICE__ float __fmaf_ieee_rz(float __a, float __b, float __c) {
289 return __nv_fmaf_ieee_rz(__a, __b, __c);
290}
291__DEVICE__ float __fmaf_rd(float __a, float __b, float __c) {
292 return __nv_fmaf_rd(__a, __b, __c);
293}
294__DEVICE__ float __fmaf_rn(float __a, float __b, float __c) {
295 return __nv_fmaf_rn(__a, __b, __c);
296}
297__DEVICE__ float __fmaf_ru(float __a, float __b, float __c) {
298 return __nv_fmaf_ru(__a, __b, __c);
299}
300__DEVICE__ float __fmaf_rz(float __a, float __b, float __c) {
301 return __nv_fmaf_rz(__a, __b, __c);
302}
303__DEVICE__ float __fmul_rd(float __a, float __b) {
304 return __nv_fmul_rd(__a, __b);
305}
306__DEVICE__ float __fmul_rn(float __a, float __b) {
307 return __nv_fmul_rn(__a, __b);
308}
309__DEVICE__ float __fmul_ru(float __a, float __b) {
310 return __nv_fmul_ru(__a, __b);
311}
312__DEVICE__ float __fmul_rz(float __a, float __b) {
313 return __nv_fmul_rz(__a, __b);
314}
315__DEVICE__ float __frcp_rd(float __a) { return __nv_frcp_rd(__a); }
316__DEVICE__ float __frcp_rn(float __a) { return __nv_frcp_rn(__a); }
317__DEVICE__ float __frcp_ru(float __a) { return __nv_frcp_ru(__a); }
318__DEVICE__ float __frcp_rz(float __a) { return __nv_frcp_rz(__a); }
319__DEVICE__ float __frsqrt_rn(float __a) { return __nv_frsqrt_rn(__a); }
320__DEVICE__ float __fsqrt_rd(float __a) { return __nv_fsqrt_rd(__a); }
321__DEVICE__ float __fsqrt_rn(float __a) { return __nv_fsqrt_rn(__a); }
322__DEVICE__ float __fsqrt_ru(float __a) { return __nv_fsqrt_ru(__a); }
323__DEVICE__ float __fsqrt_rz(float __a) { return __nv_fsqrt_rz(__a); }
324__DEVICE__ float __fsub_rd(float __a, float __b) {
325 return __nv_fsub_rd(__a, __b);
326}
327__DEVICE__ float __fsub_rn(float __a, float __b) {
328 return __nv_fsub_rn(__a, __b);
329}
330__DEVICE__ float __fsub_ru(float __a, float __b) {
331 return __nv_fsub_ru(__a, __b);
332}
333__DEVICE__ float __fsub_rz(float __a, float __b) {
334 return __nv_fsub_rz(__a, __b);
335}
336__DEVICE__ int __hadd(int __a, int __b) { return __nv_hadd(__a, __b); }
337__DEVICE__ double __hiloint2double(int __a, int __b) {
338 return __nv_hiloint2double(__a, __b);
339}
340__DEVICE__ int __iAtomicAdd(int *__p, int __v) {
341 return __nvvm_atom_add_gen_i(__p, __v);
342}
343__DEVICE__ int __iAtomicAdd_block(int *__p, int __v) {
344 return __nvvm_atom_cta_add_gen_i(__p, __v);
345}
346__DEVICE__ int __iAtomicAdd_system(int *__p, int __v) {
347 return __nvvm_atom_sys_add_gen_i(__p, __v);
348}
349__DEVICE__ int __iAtomicAnd(int *__p, int __v) {
350 return __nvvm_atom_and_gen_i(__p, __v);
351}
352__DEVICE__ int __iAtomicAnd_block(int *__p, int __v) {
353 return __nvvm_atom_cta_and_gen_i(__p, __v);
354}
355__DEVICE__ int __iAtomicAnd_system(int *__p, int __v) {
356 return __nvvm_atom_sys_and_gen_i(__p, __v);
357}
358__DEVICE__ int __iAtomicCAS(int *__p, int __cmp, int __v) {
359 return __nvvm_atom_cas_gen_i(__p, __cmp, __v);
360}
361__DEVICE__ int __iAtomicCAS_block(int *__p, int __cmp, int __v) {
362 return __nvvm_atom_cta_cas_gen_i(__p, __cmp, __v);
363}
364__DEVICE__ int __iAtomicCAS_system(int *__p, int __cmp, int __v) {
365 return __nvvm_atom_sys_cas_gen_i(__p, __cmp, __v);
366}
367__DEVICE__ int __iAtomicExch(int *__p, int __v) {
368 return __nvvm_atom_xchg_gen_i(__p, __v);
369}
370__DEVICE__ int __iAtomicExch_block(int *__p, int __v) {
371 return __nvvm_atom_cta_xchg_gen_i(__p, __v);
372}
373__DEVICE__ int __iAtomicExch_system(int *__p, int __v) {
374 return __nvvm_atom_sys_xchg_gen_i(__p, __v);
375}
376__DEVICE__ int __iAtomicMax(int *__p, int __v) {
377 return __nvvm_atom_max_gen_i(__p, __v);
378}
379__DEVICE__ int __iAtomicMax_block(int *__p, int __v) {
380 return __nvvm_atom_cta_max_gen_i(__p, __v);
381}
382__DEVICE__ int __iAtomicMax_system(int *__p, int __v) {
383 return __nvvm_atom_sys_max_gen_i(__p, __v);
384}
385__DEVICE__ int __iAtomicMin(int *__p, int __v) {
386 return __nvvm_atom_min_gen_i(__p, __v);
387}
388__DEVICE__ int __iAtomicMin_block(int *__p, int __v) {
389 return __nvvm_atom_cta_min_gen_i(__p, __v);
390}
391__DEVICE__ int __iAtomicMin_system(int *__p, int __v) {
392 return __nvvm_atom_sys_min_gen_i(__p, __v);
393}
394__DEVICE__ int __iAtomicOr(int *__p, int __v) {
395 return __nvvm_atom_or_gen_i(__p, __v);
396}
397__DEVICE__ int __iAtomicOr_block(int *__p, int __v) {
398 return __nvvm_atom_cta_or_gen_i(__p, __v);
399}
400__DEVICE__ int __iAtomicOr_system(int *__p, int __v) {
401 return __nvvm_atom_sys_or_gen_i(__p, __v);
402}
403__DEVICE__ int __iAtomicXor(int *__p, int __v) {
404 return __nvvm_atom_xor_gen_i(__p, __v);
405}
406__DEVICE__ int __iAtomicXor_block(int *__p, int __v) {
407 return __nvvm_atom_cta_xor_gen_i(__p, __v);
408}
409__DEVICE__ int __iAtomicXor_system(int *__p, int __v) {
410 return __nvvm_atom_sys_xor_gen_i(__p, __v);
411}
412__DEVICE__ long long __illAtomicMax(long long *__p, long long __v) {
413 return __nvvm_atom_max_gen_ll(__p, __v);
414}
415__DEVICE__ long long __illAtomicMax_block(long long *__p, long long __v) {
416 return __nvvm_atom_cta_max_gen_ll(__p, __v);
417}
418__DEVICE__ long long __illAtomicMax_system(long long *__p, long long __v) {
419 return __nvvm_atom_sys_max_gen_ll(__p, __v);
420}
421__DEVICE__ long long __illAtomicMin(long long *__p, long long __v) {
422 return __nvvm_atom_min_gen_ll(__p, __v);
423}
424__DEVICE__ long long __illAtomicMin_block(long long *__p, long long __v) {
425 return __nvvm_atom_cta_min_gen_ll(__p, __v);
426}
427__DEVICE__ long long __illAtomicMin_system(long long *__p, long long __v) {
428 return __nvvm_atom_sys_min_gen_ll(__p, __v);
429}
430__DEVICE__ double __int2double_rn(int __a) { return __nv_int2double_rn(__a); }
431__DEVICE__ float __int2float_rd(int __a) { return __nv_int2float_rd(__a); }
432__DEVICE__ float __int2float_rn(int __a) { return __nv_int2float_rn(__a); }
433__DEVICE__ float __int2float_ru(int __a) { return __nv_int2float_ru(__a); }
434__DEVICE__ float __int2float_rz(int __a) { return __nv_int2float_rz(__a); }
435__DEVICE__ float __int_as_float(int __a) { return __nv_int_as_float(__a); }
436__DEVICE__ int __isfinited(double __a) { return __nv_isfinited(__a); }
437__DEVICE__ int __isinf(double __a) { return __nv_isinfd(__a); }
438__DEVICE__ int __isinff(float __a) { return __nv_isinff(__a); }
439#ifdef _MSC_VER
440__DEVICE__ int __isinfl(long double __a);
441#endif
442__DEVICE__ int __isnan(double __a) { return __nv_isnand(__a); }
443__DEVICE__ int __isnanf(float __a) { return __nv_isnanf(__a); }
444#ifdef _MSC_VER
445__DEVICE__ int __isnanl(long double __a);
446#endif
447__DEVICE__ double __ll2double_rd(long long __a) {
448 return __nv_ll2double_rd(__a);
449}
450__DEVICE__ double __ll2double_rn(long long __a) {
451 return __nv_ll2double_rn(__a);
452}
453__DEVICE__ double __ll2double_ru(long long __a) {
454 return __nv_ll2double_ru(__a);
455}
456__DEVICE__ double __ll2double_rz(long long __a) {
457 return __nv_ll2double_rz(__a);
458}
459__DEVICE__ float __ll2float_rd(long long __a) { return __nv_ll2float_rd(__a); }
460__DEVICE__ float __ll2float_rn(long long __a) { return __nv_ll2float_rn(__a); }
461__DEVICE__ float __ll2float_ru(long long __a) { return __nv_ll2float_ru(__a); }
462__DEVICE__ float __ll2float_rz(long long __a) { return __nv_ll2float_rz(__a); }
463__DEVICE__ long long __llAtomicAnd(long long *__p, long long __v) {
464 return __nvvm_atom_and_gen_ll(__p, __v);
465}
466__DEVICE__ long long __llAtomicAnd_block(long long *__p, long long __v) {
467 return __nvvm_atom_cta_and_gen_ll(__p, __v);
468}
469__DEVICE__ long long __llAtomicAnd_system(long long *__p, long long __v) {
470 return __nvvm_atom_sys_and_gen_ll(__p, __v);
471}
472__DEVICE__ long long __llAtomicOr(long long *__p, long long __v) {
473 return __nvvm_atom_or_gen_ll(__p, __v);
474}
475__DEVICE__ long long __llAtomicOr_block(long long *__p, long long __v) {
476 return __nvvm_atom_cta_or_gen_ll(__p, __v);
477}
478__DEVICE__ long long __llAtomicOr_system(long long *__p, long long __v) {
479 return __nvvm_atom_sys_or_gen_ll(__p, __v);
480}
481__DEVICE__ long long __llAtomicXor(long long *__p, long long __v) {
482 return __nvvm_atom_xor_gen_ll(__p, __v);
483}
484__DEVICE__ long long __llAtomicXor_block(long long *__p, long long __v) {
485 return __nvvm_atom_cta_xor_gen_ll(__p, __v);
486}
487__DEVICE__ long long __llAtomicXor_system(long long *__p, long long __v) {
488 return __nvvm_atom_sys_xor_gen_ll(__p, __v);
489}
490__DEVICE__ float __log10f(float __a) { return __nv_fast_log10f(__a); }
491__DEVICE__ float __log2f(float __a) { return __nv_fast_log2f(__a); }
492__DEVICE__ float __logf(float __a) { return __nv_fast_logf(__a); }
493__DEVICE__ double __longlong_as_double(long long __a) {
494 return __nv_longlong_as_double(__a);
495}
496__DEVICE__ int __mul24(int __a, int __b) { return __nv_mul24(__a, __b); }
497__DEVICE__ long long __mul64hi(long long __a, long long __b) {
498 return __nv_mul64hi(__a, __b);
499}
500__DEVICE__ int __mulhi(int __a, int __b) { return __nv_mulhi(__a, __b); }
501__DEVICE__ unsigned int __pm0(void) { return __nvvm_read_ptx_sreg_pm0(); }
502__DEVICE__ unsigned int __pm1(void) { return __nvvm_read_ptx_sreg_pm1(); }
503__DEVICE__ unsigned int __pm2(void) { return __nvvm_read_ptx_sreg_pm2(); }
504__DEVICE__ unsigned int __pm3(void) { return __nvvm_read_ptx_sreg_pm3(); }
505__DEVICE__ int __popc(unsigned int __a) { return __nv_popc(__a); }
506__DEVICE__ int __popcll(unsigned long long __a) { return __nv_popcll(__a); }
507__DEVICE__ float __powf(float __a, float __b) {
508 return __nv_fast_powf(__a, __b);
509}
510
511// Parameter must have a known integer value.
512#define __prof_trigger(__a) __asm__ __volatile__("pmevent \t%0;" ::"i"(__a))
513__DEVICE__ int __rhadd(int __a, int __b) { return __nv_rhadd(__a, __b); }
514__DEVICE__ unsigned int __sad(int __a, int __b, unsigned int __c) {
515 return __nv_sad(__a, __b, __c);
516}
517__DEVICE__ float __saturatef(float __a) { return __nv_saturatef(__a); }
518__DEVICE__ int __signbitd(double __a) { return __nv_signbitd(__a); }
519__DEVICE__ int __signbitf(float __a) { return __nv_signbitf(__a); }
520__DEVICE__ void __sincosf(float __a, float *__s, float *__c) {
521 return __nv_fast_sincosf(__a, __s, __c);
522}
523__DEVICE__ float __sinf(float __a) { return __nv_fast_sinf(__a); }
524__DEVICE__ int __syncthreads_and(int __a) { return __nvvm_bar0_and(__a); }
525__DEVICE__ int __syncthreads_count(int __a) { return __nvvm_bar0_popc(__a); }
526__DEVICE__ int __syncthreads_or(int __a) { return __nvvm_bar0_or(__a); }
527__DEVICE__ float __tanf(float __a) { return __nv_fast_tanf(__a); }
528__DEVICE__ void __threadfence(void) { __nvvm_membar_gl(); }
529__DEVICE__ void __threadfence_block(void) { __nvvm_membar_cta(); };
530__DEVICE__ void __threadfence_system(void) { __nvvm_membar_sys(); };
531__DEVICE__ void __trap(void) { __asm__ __volatile__("trap;"); }
532__DEVICE__ unsigned int __uAtomicAdd(unsigned int *__p, unsigned int __v) {
533 return __nvvm_atom_add_gen_i((int *)__p, __v);
534}
535__DEVICE__ unsigned int __uAtomicAdd_block(unsigned int *__p,
536 unsigned int __v) {
537 return __nvvm_atom_cta_add_gen_i((int *)__p, __v);
538}
539__DEVICE__ unsigned int __uAtomicAdd_system(unsigned int *__p,
540 unsigned int __v) {
541 return __nvvm_atom_sys_add_gen_i((int *)__p, __v);
542}
543__DEVICE__ unsigned int __uAtomicAnd(unsigned int *__p, unsigned int __v) {
544 return __nvvm_atom_and_gen_i((int *)__p, __v);
545}
546__DEVICE__ unsigned int __uAtomicAnd_block(unsigned int *__p,
547 unsigned int __v) {
548 return __nvvm_atom_cta_and_gen_i((int *)__p, __v);
549}
550__DEVICE__ unsigned int __uAtomicAnd_system(unsigned int *__p,
551 unsigned int __v) {
552 return __nvvm_atom_sys_and_gen_i((int *)__p, __v);
553}
554__DEVICE__ unsigned int __uAtomicCAS(unsigned int *__p, unsigned int __cmp,
555 unsigned int __v) {
556 return __nvvm_atom_cas_gen_i((int *)__p, __cmp, __v);
557}
558__DEVICE__ unsigned int
559__uAtomicCAS_block(unsigned int *__p, unsigned int __cmp, unsigned int __v) {
560 return __nvvm_atom_cta_cas_gen_i((int *)__p, __cmp, __v);
561}
562__DEVICE__ unsigned int
563__uAtomicCAS_system(unsigned int *__p, unsigned int __cmp, unsigned int __v) {
564 return __nvvm_atom_sys_cas_gen_i((int *)__p, __cmp, __v);
565}
566__DEVICE__ unsigned int __uAtomicDec(unsigned int *__p, unsigned int __v) {
567 return __nvvm_atom_dec_gen_ui(__p, __v);
568}
569__DEVICE__ unsigned int __uAtomicDec_block(unsigned int *__p,
570 unsigned int __v) {
571 return __nvvm_atom_cta_dec_gen_ui(__p, __v);
572}
573__DEVICE__ unsigned int __uAtomicDec_system(unsigned int *__p,
574 unsigned int __v) {
575 return __nvvm_atom_sys_dec_gen_ui(__p, __v);
576}
577__DEVICE__ unsigned int __uAtomicExch(unsigned int *__p, unsigned int __v) {
578 return __nvvm_atom_xchg_gen_i((int *)__p, __v);
579}
580__DEVICE__ unsigned int __uAtomicExch_block(unsigned int *__p,
581 unsigned int __v) {
582 return __nvvm_atom_cta_xchg_gen_i((int *)__p, __v);
583}
584__DEVICE__ unsigned int __uAtomicExch_system(unsigned int *__p,
585 unsigned int __v) {
586 return __nvvm_atom_sys_xchg_gen_i((int *)__p, __v);
587}
588__DEVICE__ unsigned int __uAtomicInc(unsigned int *__p, unsigned int __v) {
589 return __nvvm_atom_inc_gen_ui(__p, __v);
590}
591__DEVICE__ unsigned int __uAtomicInc_block(unsigned int *__p,
592 unsigned int __v) {
593 return __nvvm_atom_cta_inc_gen_ui(__p, __v);
594}
595__DEVICE__ unsigned int __uAtomicInc_system(unsigned int *__p,
596 unsigned int __v) {
597 return __nvvm_atom_sys_inc_gen_ui(__p, __v);
598}
599__DEVICE__ unsigned int __uAtomicMax(unsigned int *__p, unsigned int __v) {
600 return __nvvm_atom_max_gen_ui(__p, __v);
601}
602__DEVICE__ unsigned int __uAtomicMax_block(unsigned int *__p,
603 unsigned int __v) {
604 return __nvvm_atom_cta_max_gen_ui(__p, __v);
605}
606__DEVICE__ unsigned int __uAtomicMax_system(unsigned int *__p,
607 unsigned int __v) {
608 return __nvvm_atom_sys_max_gen_ui(__p, __v);
609}
610__DEVICE__ unsigned int __uAtomicMin(unsigned int *__p, unsigned int __v) {
611 return __nvvm_atom_min_gen_ui(__p, __v);
612}
613__DEVICE__ unsigned int __uAtomicMin_block(unsigned int *__p,
614 unsigned int __v) {
615 return __nvvm_atom_cta_min_gen_ui(__p, __v);
616}
617__DEVICE__ unsigned int __uAtomicMin_system(unsigned int *__p,
618 unsigned int __v) {
619 return __nvvm_atom_sys_min_gen_ui(__p, __v);
620}
621__DEVICE__ unsigned int __uAtomicOr(unsigned int *__p, unsigned int __v) {
622 return __nvvm_atom_or_gen_i((int *)__p, __v);
623}
624__DEVICE__ unsigned int __uAtomicOr_block(unsigned int *__p, unsigned int __v) {
625 return __nvvm_atom_cta_or_gen_i((int *)__p, __v);
626}
627__DEVICE__ unsigned int __uAtomicOr_system(unsigned int *__p,
628 unsigned int __v) {
629 return __nvvm_atom_sys_or_gen_i((int *)__p, __v);
630}
631__DEVICE__ unsigned int __uAtomicXor(unsigned int *__p, unsigned int __v) {
632 return __nvvm_atom_xor_gen_i((int *)__p, __v);
633}
634__DEVICE__ unsigned int __uAtomicXor_block(unsigned int *__p,
635 unsigned int __v) {
636 return __nvvm_atom_cta_xor_gen_i((int *)__p, __v);
637}
638__DEVICE__ unsigned int __uAtomicXor_system(unsigned int *__p,
639 unsigned int __v) {
640 return __nvvm_atom_sys_xor_gen_i((int *)__p, __v);
641}
642__DEVICE__ unsigned int __uhadd(unsigned int __a, unsigned int __b) {
643 return __nv_uhadd(__a, __b);
644}
645__DEVICE__ double __uint2double_rn(unsigned int __a) {
646 return __nv_uint2double_rn(__a);
647}
648__DEVICE__ float __uint2float_rd(unsigned int __a) {
649 return __nv_uint2float_rd(__a);
650}
651__DEVICE__ float __uint2float_rn(unsigned int __a) {
652 return __nv_uint2float_rn(__a);
653}
654__DEVICE__ float __uint2float_ru(unsigned int __a) {
655 return __nv_uint2float_ru(__a);
656}
657__DEVICE__ float __uint2float_rz(unsigned int __a) {
658 return __nv_uint2float_rz(__a);
659}
660__DEVICE__ float __uint_as_float(unsigned int __a) {
661 return __nv_uint_as_float(__a);
662} //
663__DEVICE__ double __ull2double_rd(unsigned long long __a) {
664 return __nv_ull2double_rd(__a);
665}
666__DEVICE__ double __ull2double_rn(unsigned long long __a) {
667 return __nv_ull2double_rn(__a);
668}
669__DEVICE__ double __ull2double_ru(unsigned long long __a) {
670 return __nv_ull2double_ru(__a);
671}
672__DEVICE__ double __ull2double_rz(unsigned long long __a) {
673 return __nv_ull2double_rz(__a);
674}
675__DEVICE__ float __ull2float_rd(unsigned long long __a) {
676 return __nv_ull2float_rd(__a);
677}
678__DEVICE__ float __ull2float_rn(unsigned long long __a) {
679 return __nv_ull2float_rn(__a);
680}
681__DEVICE__ float __ull2float_ru(unsigned long long __a) {
682 return __nv_ull2float_ru(__a);
683}
684__DEVICE__ float __ull2float_rz(unsigned long long __a) {
685 return __nv_ull2float_rz(__a);
686}
687__DEVICE__ unsigned long long __ullAtomicAdd(unsigned long long *__p,
688 unsigned long long __v) {
689 return __nvvm_atom_add_gen_ll((long long *)__p, __v);
690}
691__DEVICE__ unsigned long long __ullAtomicAdd_block(unsigned long long *__p,
692 unsigned long long __v) {
693 return __nvvm_atom_cta_add_gen_ll((long long *)__p, __v);
694}
695__DEVICE__ unsigned long long __ullAtomicAdd_system(unsigned long long *__p,
696 unsigned long long __v) {
697 return __nvvm_atom_sys_add_gen_ll((long long *)__p, __v);
698}
699__DEVICE__ unsigned long long __ullAtomicAnd(unsigned long long *__p,
700 unsigned long long __v) {
701 return __nvvm_atom_and_gen_ll((long long *)__p, __v);
702}
703__DEVICE__ unsigned long long __ullAtomicAnd_block(unsigned long long *__p,
704 unsigned long long __v) {
705 return __nvvm_atom_cta_and_gen_ll((long long *)__p, __v);
706}
707__DEVICE__ unsigned long long __ullAtomicAnd_system(unsigned long long *__p,
708 unsigned long long __v) {
709 return __nvvm_atom_sys_and_gen_ll((long long *)__p, __v);
710}
711__DEVICE__ unsigned long long __ullAtomicCAS(unsigned long long *__p,
712 unsigned long long __cmp,
713 unsigned long long __v) {
714 return __nvvm_atom_cas_gen_ll((long long *)__p, __cmp, __v);
715}
716__DEVICE__ unsigned long long __ullAtomicCAS_block(unsigned long long *__p,
717 unsigned long long __cmp,
718 unsigned long long __v) {
719 return __nvvm_atom_cta_cas_gen_ll((long long *)__p, __cmp, __v);
720}
721__DEVICE__ unsigned long long __ullAtomicCAS_system(unsigned long long *__p,
722 unsigned long long __cmp,
723 unsigned long long __v) {
724 return __nvvm_atom_sys_cas_gen_ll((long long *)__p, __cmp, __v);
725}
726__DEVICE__ unsigned long long __ullAtomicExch(unsigned long long *__p,
727 unsigned long long __v) {
728 return __nvvm_atom_xchg_gen_ll((long long *)__p, __v);
729}
730__DEVICE__ unsigned long long __ullAtomicExch_block(unsigned long long *__p,
731 unsigned long long __v) {
732 return __nvvm_atom_cta_xchg_gen_ll((long long *)__p, __v);
733}
734__DEVICE__ unsigned long long __ullAtomicExch_system(unsigned long long *__p,
735 unsigned long long __v) {
736 return __nvvm_atom_sys_xchg_gen_ll((long long *)__p, __v);
737}
738__DEVICE__ unsigned long long __ullAtomicMax(unsigned long long *__p,
739 unsigned long long __v) {
740 return __nvvm_atom_max_gen_ull(__p, __v);
741}
742__DEVICE__ unsigned long long __ullAtomicMax_block(unsigned long long *__p,
743 unsigned long long __v) {
744 return __nvvm_atom_cta_max_gen_ull(__p, __v);
745}
746__DEVICE__ unsigned long long __ullAtomicMax_system(unsigned long long *__p,
747 unsigned long long __v) {
748 return __nvvm_atom_sys_max_gen_ull(__p, __v);
749}
750__DEVICE__ unsigned long long __ullAtomicMin(unsigned long long *__p,
751 unsigned long long __v) {
752 return __nvvm_atom_min_gen_ull(__p, __v);
753}
754__DEVICE__ unsigned long long __ullAtomicMin_block(unsigned long long *__p,
755 unsigned long long __v) {
756 return __nvvm_atom_cta_min_gen_ull(__p, __v);
757}
758__DEVICE__ unsigned long long __ullAtomicMin_system(unsigned long long *__p,
759 unsigned long long __v) {
760 return __nvvm_atom_sys_min_gen_ull(__p, __v);
761}
762__DEVICE__ unsigned long long __ullAtomicOr(unsigned long long *__p,
763 unsigned long long __v) {
764 return __nvvm_atom_or_gen_ll((long long *)__p, __v);
765}
766__DEVICE__ unsigned long long __ullAtomicOr_block(unsigned long long *__p,
767 unsigned long long __v) {
768 return __nvvm_atom_cta_or_gen_ll((long long *)__p, __v);
769}
770__DEVICE__ unsigned long long __ullAtomicOr_system(unsigned long long *__p,
771 unsigned long long __v) {
772 return __nvvm_atom_sys_or_gen_ll((long long *)__p, __v);
773}
774__DEVICE__ unsigned long long __ullAtomicXor(unsigned long long *__p,
775 unsigned long long __v) {
776 return __nvvm_atom_xor_gen_ll((long long *)__p, __v);
777}
778__DEVICE__ unsigned long long __ullAtomicXor_block(unsigned long long *__p,
779 unsigned long long __v) {
780 return __nvvm_atom_cta_xor_gen_ll((long long *)__p, __v);
781}
782__DEVICE__ unsigned long long __ullAtomicXor_system(unsigned long long *__p,
783 unsigned long long __v) {
784 return __nvvm_atom_sys_xor_gen_ll((long long *)__p, __v);
785}
786__DEVICE__ unsigned int __umul24(unsigned int __a, unsigned int __b) {
787 return __nv_umul24(__a, __b);
788}
789__DEVICE__ unsigned long long __umul64hi(unsigned long long __a,
790 unsigned long long __b) {
791 return __nv_umul64hi(__a, __b);
792}
793__DEVICE__ unsigned int __umulhi(unsigned int __a, unsigned int __b) {
794 return __nv_umulhi(__a, __b);
795}
796__DEVICE__ unsigned int __urhadd(unsigned int __a, unsigned int __b) {
797 return __nv_urhadd(__a, __b);
798}
799__DEVICE__ unsigned int __usad(unsigned int __a, unsigned int __b,
800 unsigned int __c) {
801 return __nv_usad(__a, __b, __c);
802}
803
804#if CUDA_VERSION >= 9000 && CUDA_VERSION < 9020
805__DEVICE__ unsigned int __vabs2(unsigned int __a) { return __nv_vabs2(__a); }
806__DEVICE__ unsigned int __vabs4(unsigned int __a) { return __nv_vabs4(__a); }
807__DEVICE__ unsigned int __vabsdiffs2(unsigned int __a, unsigned int __b) {
808 return __nv_vabsdiffs2(__a, __b);
809}
810__DEVICE__ unsigned int __vabsdiffs4(unsigned int __a, unsigned int __b) {
811 return __nv_vabsdiffs4(__a, __b);
812}
813__DEVICE__ unsigned int __vabsdiffu2(unsigned int __a, unsigned int __b) {
814 return __nv_vabsdiffu2(__a, __b);
815}
816__DEVICE__ unsigned int __vabsdiffu4(unsigned int __a, unsigned int __b) {
817 return __nv_vabsdiffu4(__a, __b);
818}
819__DEVICE__ unsigned int __vabsss2(unsigned int __a) {
820 return __nv_vabsss2(__a);
821}
822__DEVICE__ unsigned int __vabsss4(unsigned int __a) {
823 return __nv_vabsss4(__a);
824}
825__DEVICE__ unsigned int __vadd2(unsigned int __a, unsigned int __b) {
826 return __nv_vadd2(__a, __b);
827}
828__DEVICE__ unsigned int __vadd4(unsigned int __a, unsigned int __b) {
829 return __nv_vadd4(__a, __b);
830}
831__DEVICE__ unsigned int __vaddss2(unsigned int __a, unsigned int __b) {
832 return __nv_vaddss2(__a, __b);
833}
834__DEVICE__ unsigned int __vaddss4(unsigned int __a, unsigned int __b) {
835 return __nv_vaddss4(__a, __b);
836}
837__DEVICE__ unsigned int __vaddus2(unsigned int __a, unsigned int __b) {
838 return __nv_vaddus2(__a, __b);
839}
840__DEVICE__ unsigned int __vaddus4(unsigned int __a, unsigned int __b) {
841 return __nv_vaddus4(__a, __b);
842}
843__DEVICE__ unsigned int __vavgs2(unsigned int __a, unsigned int __b) {
844 return __nv_vavgs2(__a, __b);
845}
846__DEVICE__ unsigned int __vavgs4(unsigned int __a, unsigned int __b) {
847 return __nv_vavgs4(__a, __b);
848}
849__DEVICE__ unsigned int __vavgu2(unsigned int __a, unsigned int __b) {
850 return __nv_vavgu2(__a, __b);
851}
852__DEVICE__ unsigned int __vavgu4(unsigned int __a, unsigned int __b) {
853 return __nv_vavgu4(__a, __b);
854}
855__DEVICE__ unsigned int __vcmpeq2(unsigned int __a, unsigned int __b) {
856 return __nv_vcmpeq2(__a, __b);
857}
858__DEVICE__ unsigned int __vcmpeq4(unsigned int __a, unsigned int __b) {
859 return __nv_vcmpeq4(__a, __b);
860}
861__DEVICE__ unsigned int __vcmpges2(unsigned int __a, unsigned int __b) {
862 return __nv_vcmpges2(__a, __b);
863}
864__DEVICE__ unsigned int __vcmpges4(unsigned int __a, unsigned int __b) {
865 return __nv_vcmpges4(__a, __b);
866}
867__DEVICE__ unsigned int __vcmpgeu2(unsigned int __a, unsigned int __b) {
868 return __nv_vcmpgeu2(__a, __b);
869}
870__DEVICE__ unsigned int __vcmpgeu4(unsigned int __a, unsigned int __b) {
871 return __nv_vcmpgeu4(__a, __b);
872}
873__DEVICE__ unsigned int __vcmpgts2(unsigned int __a, unsigned int __b) {
874 return __nv_vcmpgts2(__a, __b);
875}
876__DEVICE__ unsigned int __vcmpgts4(unsigned int __a, unsigned int __b) {
877 return __nv_vcmpgts4(__a, __b);
878}
879__DEVICE__ unsigned int __vcmpgtu2(unsigned int __a, unsigned int __b) {
880 return __nv_vcmpgtu2(__a, __b);
881}
882__DEVICE__ unsigned int __vcmpgtu4(unsigned int __a, unsigned int __b) {
883 return __nv_vcmpgtu4(__a, __b);
884}
885__DEVICE__ unsigned int __vcmples2(unsigned int __a, unsigned int __b) {
886 return __nv_vcmples2(__a, __b);
887}
888__DEVICE__ unsigned int __vcmples4(unsigned int __a, unsigned int __b) {
889 return __nv_vcmples4(__a, __b);
890}
891__DEVICE__ unsigned int __vcmpleu2(unsigned int __a, unsigned int __b) {
892 return __nv_vcmpleu2(__a, __b);
893}
894__DEVICE__ unsigned int __vcmpleu4(unsigned int __a, unsigned int __b) {
895 return __nv_vcmpleu4(__a, __b);
896}
897__DEVICE__ unsigned int __vcmplts2(unsigned int __a, unsigned int __b) {
898 return __nv_vcmplts2(__a, __b);
899}
900__DEVICE__ unsigned int __vcmplts4(unsigned int __a, unsigned int __b) {
901 return __nv_vcmplts4(__a, __b);
902}
903__DEVICE__ unsigned int __vcmpltu2(unsigned int __a, unsigned int __b) {
904 return __nv_vcmpltu2(__a, __b);
905}
906__DEVICE__ unsigned int __vcmpltu4(unsigned int __a, unsigned int __b) {
907 return __nv_vcmpltu4(__a, __b);
908}
909__DEVICE__ unsigned int __vcmpne2(unsigned int __a, unsigned int __b) {
910 return __nv_vcmpne2(__a, __b);
911}
912__DEVICE__ unsigned int __vcmpne4(unsigned int __a, unsigned int __b) {
913 return __nv_vcmpne4(__a, __b);
914}
915__DEVICE__ unsigned int __vhaddu2(unsigned int __a, unsigned int __b) {
916 return __nv_vhaddu2(__a, __b);
917}
918__DEVICE__ unsigned int __vhaddu4(unsigned int __a, unsigned int __b) {
919 return __nv_vhaddu4(__a, __b);
920}
921__DEVICE__ unsigned int __vmaxs2(unsigned int __a, unsigned int __b) {
922 return __nv_vmaxs2(__a, __b);
923}
924__DEVICE__ unsigned int __vmaxs4(unsigned int __a, unsigned int __b) {
925 return __nv_vmaxs4(__a, __b);
926}
927__DEVICE__ unsigned int __vmaxu2(unsigned int __a, unsigned int __b) {
928 return __nv_vmaxu2(__a, __b);
929}
930__DEVICE__ unsigned int __vmaxu4(unsigned int __a, unsigned int __b) {
931 return __nv_vmaxu4(__a, __b);
932}
933__DEVICE__ unsigned int __vmins2(unsigned int __a, unsigned int __b) {
934 return __nv_vmins2(__a, __b);
935}
936__DEVICE__ unsigned int __vmins4(unsigned int __a, unsigned int __b) {
937 return __nv_vmins4(__a, __b);
938}
939__DEVICE__ unsigned int __vminu2(unsigned int __a, unsigned int __b) {
940 return __nv_vminu2(__a, __b);
941}
942__DEVICE__ unsigned int __vminu4(unsigned int __a, unsigned int __b) {
943 return __nv_vminu4(__a, __b);
944}
945__DEVICE__ unsigned int __vneg2(unsigned int __a) { return __nv_vneg2(__a); }
946__DEVICE__ unsigned int __vneg4(unsigned int __a) { return __nv_vneg4(__a); }
947__DEVICE__ unsigned int __vnegss2(unsigned int __a) {
948 return __nv_vnegss2(__a);
949}
950__DEVICE__ unsigned int __vnegss4(unsigned int __a) {
951 return __nv_vnegss4(__a);
952}
953__DEVICE__ unsigned int __vsads2(unsigned int __a, unsigned int __b) {
954 return __nv_vsads2(__a, __b);
955}
956__DEVICE__ unsigned int __vsads4(unsigned int __a, unsigned int __b) {
957 return __nv_vsads4(__a, __b);
958}
959__DEVICE__ unsigned int __vsadu2(unsigned int __a, unsigned int __b) {
960 return __nv_vsadu2(__a, __b);
961}
962__DEVICE__ unsigned int __vsadu4(unsigned int __a, unsigned int __b) {
963 return __nv_vsadu4(__a, __b);
964}
965__DEVICE__ unsigned int __vseteq2(unsigned int __a, unsigned int __b) {
966 return __nv_vseteq2(__a, __b);
967}
968__DEVICE__ unsigned int __vseteq4(unsigned int __a, unsigned int __b) {
969 return __nv_vseteq4(__a, __b);
970}
971__DEVICE__ unsigned int __vsetges2(unsigned int __a, unsigned int __b) {
972 return __nv_vsetges2(__a, __b);
973}
974__DEVICE__ unsigned int __vsetges4(unsigned int __a, unsigned int __b) {
975 return __nv_vsetges4(__a, __b);
976}
977__DEVICE__ unsigned int __vsetgeu2(unsigned int __a, unsigned int __b) {
978 return __nv_vsetgeu2(__a, __b);
979}
980__DEVICE__ unsigned int __vsetgeu4(unsigned int __a, unsigned int __b) {
981 return __nv_vsetgeu4(__a, __b);
982}
983__DEVICE__ unsigned int __vsetgts2(unsigned int __a, unsigned int __b) {
984 return __nv_vsetgts2(__a, __b);
985}
986__DEVICE__ unsigned int __vsetgts4(unsigned int __a, unsigned int __b) {
987 return __nv_vsetgts4(__a, __b);
988}
989__DEVICE__ unsigned int __vsetgtu2(unsigned int __a, unsigned int __b) {
990 return __nv_vsetgtu2(__a, __b);
991}
992__DEVICE__ unsigned int __vsetgtu4(unsigned int __a, unsigned int __b) {
993 return __nv_vsetgtu4(__a, __b);
994}
995__DEVICE__ unsigned int __vsetles2(unsigned int __a, unsigned int __b) {
996 return __nv_vsetles2(__a, __b);
997}
998__DEVICE__ unsigned int __vsetles4(unsigned int __a, unsigned int __b) {
999 return __nv_vsetles4(__a, __b);
1000}
1001__DEVICE__ unsigned int __vsetleu2(unsigned int __a, unsigned int __b) {
1002 return __nv_vsetleu2(__a, __b);
1003}
1004__DEVICE__ unsigned int __vsetleu4(unsigned int __a, unsigned int __b) {
1005 return __nv_vsetleu4(__a, __b);
1006}
1007__DEVICE__ unsigned int __vsetlts2(unsigned int __a, unsigned int __b) {
1008 return __nv_vsetlts2(__a, __b);
1009}
1010__DEVICE__ unsigned int __vsetlts4(unsigned int __a, unsigned int __b) {
1011 return __nv_vsetlts4(__a, __b);
1012}
1013__DEVICE__ unsigned int __vsetltu2(unsigned int __a, unsigned int __b) {
1014 return __nv_vsetltu2(__a, __b);
1015}
1016__DEVICE__ unsigned int __vsetltu4(unsigned int __a, unsigned int __b) {
1017 return __nv_vsetltu4(__a, __b);
1018}
1019__DEVICE__ unsigned int __vsetne2(unsigned int __a, unsigned int __b) {
1020 return __nv_vsetne2(__a, __b);
1021}
1022__DEVICE__ unsigned int __vsetne4(unsigned int __a, unsigned int __b) {
1023 return __nv_vsetne4(__a, __b);
1024}
1025__DEVICE__ unsigned int __vsub2(unsigned int __a, unsigned int __b) {
1026 return __nv_vsub2(__a, __b);
1027}
1028__DEVICE__ unsigned int __vsub4(unsigned int __a, unsigned int __b) {
1029 return __nv_vsub4(__a, __b);
1030}
1031__DEVICE__ unsigned int __vsubss2(unsigned int __a, unsigned int __b) {
1032 return __nv_vsubss2(__a, __b);
1033}
1034__DEVICE__ unsigned int __vsubss4(unsigned int __a, unsigned int __b) {
1035 return __nv_vsubss4(__a, __b);
1036}
1037__DEVICE__ unsigned int __vsubus2(unsigned int __a, unsigned int __b) {
1038 return __nv_vsubus2(__a, __b);
1039}
1040__DEVICE__ unsigned int __vsubus4(unsigned int __a, unsigned int __b) {
1041 return __nv_vsubus4(__a, __b);
1042}
1043#else // CUDA_VERSION >= 9020
1044// CUDA no longer provides inline assembly (or bitcode) implementation of these
1045// functions, so we have to reimplment them. The implementation is naive and is
1046// not optimized for performance.
1047
1048// Helper function to convert N-bit boolean subfields into all-0 or all-1.
1049// E.g. __bool2mask(0x01000100,8) -> 0xff00ff00
1050// __bool2mask(0x00010000,16) -> 0xffff0000
1051__DEVICE__ unsigned int __bool2mask(unsigned int __a, int shift) {
1052 return (__a << shift) - __a;
1053}
1054__DEVICE__ unsigned int __vabs2(unsigned int __a) {
1055 unsigned int r;
1056 __asm__("vabsdiff2.s32.s32.s32 %0,%1,%2,%3;"
1057 : "=r"(r)
1058 : "r"(__a), "r"(0), "r"(0));
1059 return r;
1060}
1061__DEVICE__ unsigned int __vabs4(unsigned int __a) {
1062 unsigned int r;
1063 __asm__("vabsdiff4.s32.s32.s32 %0,%1,%2,%3;"
1064 : "=r"(r)
1065 : "r"(__a), "r"(0), "r"(0));
1066 return r;
1067}
1068__DEVICE__ unsigned int __vabsdiffs2(unsigned int __a, unsigned int __b) {
1069 unsigned int r;
1070 __asm__("vabsdiff2.s32.s32.s32 %0,%1,%2,%3;"
1071 : "=r"(r)
1072 : "r"(__a), "r"(__b), "r"(0));
1073 return r;
1074}
1075
1076__DEVICE__ unsigned int __vabsdiffs4(unsigned int __a, unsigned int __b) {
1077 unsigned int r;
1078 __asm__("vabsdiff4.s32.s32.s32 %0,%1,%2,%3;"
1079 : "=r"(r)
1080 : "r"(__a), "r"(__b), "r"(0));
1081 return r;
1082}
1083__DEVICE__ unsigned int __vabsdiffu2(unsigned int __a, unsigned int __b) {
1084 unsigned int r;
1085 __asm__("vabsdiff2.u32.u32.u32 %0,%1,%2,%3;"
1086 : "=r"(r)
1087 : "r"(__a), "r"(__b), "r"(0));
1088 return r;
1089}
1090__DEVICE__ unsigned int __vabsdiffu4(unsigned int __a, unsigned int __b) {
1091 unsigned int r;
1092 __asm__("vabsdiff4.u32.u32.u32 %0,%1,%2,%3;"
1093 : "=r"(r)
1094 : "r"(__a), "r"(__b), "r"(0));
1095 return r;
1096}
1097__DEVICE__ unsigned int __vabsss2(unsigned int __a) {
1098 unsigned int r;
1099 __asm__("vabsdiff2.s32.s32.s32.sat %0,%1,%2,%3;"
1100 : "=r"(r)
1101 : "r"(__a), "r"(0), "r"(0));
1102 return r;
1103}
1104__DEVICE__ unsigned int __vabsss4(unsigned int __a) {
1105 unsigned int r;
1106 __asm__("vabsdiff4.s32.s32.s32.sat %0,%1,%2,%3;"
1107 : "=r"(r)
1108 : "r"(__a), "r"(0), "r"(0));
1109 return r;
1110}
1111__DEVICE__ unsigned int __vadd2(unsigned int __a, unsigned int __b) {
1112 unsigned int r;
1113 __asm__("vadd2.u32.u32.u32 %0,%1,%2,%3;"
1114 : "=r"(r)
1115 : "r"(__a), "r"(__b), "r"(0));
1116 return r;
1117}
1118__DEVICE__ unsigned int __vadd4(unsigned int __a, unsigned int __b) {
1119 unsigned int r;
1120 __asm__("vadd4.u32.u32.u32 %0,%1,%2,%3;"
1121 : "=r"(r)
1122 : "r"(__a), "r"(__b), "r"(0));
1123 return r;
1124}
1125__DEVICE__ unsigned int __vaddss2(unsigned int __a, unsigned int __b) {
1126 unsigned int r;
1127 __asm__("vadd2.s32.s32.s32.sat %0,%1,%2,%3;"
1128 : "=r"(r)
1129 : "r"(__a), "r"(__b), "r"(0));
1130 return r;
1131}
1132__DEVICE__ unsigned int __vaddss4(unsigned int __a, unsigned int __b) {
1133 unsigned int r;
1134 __asm__("vadd4.s32.s32.s32.sat %0,%1,%2,%3;"
1135 : "=r"(r)
1136 : "r"(__a), "r"(__b), "r"(0));
1137 return r;
1138}
1139__DEVICE__ unsigned int __vaddus2(unsigned int __a, unsigned int __b) {
1140 unsigned int r;
1141 __asm__("vadd2.u32.u32.u32.sat %0,%1,%2,%3;"
1142 : "=r"(r)
1143 : "r"(__a), "r"(__b), "r"(0));
1144 return r;
1145}
1146__DEVICE__ unsigned int __vaddus4(unsigned int __a, unsigned int __b) {
1147 unsigned int r;
1148 __asm__("vadd4.u32.u32.u32.sat %0,%1,%2,%3;"
1149 : "=r"(r)
1150 : "r"(__a), "r"(__b), "r"(0));
1151 return r;
1152}
1153__DEVICE__ unsigned int __vavgs2(unsigned int __a, unsigned int __b) {
1154 unsigned int r;
1155 __asm__("vavrg2.s32.s32.s32 %0,%1,%2,%3;"
1156 : "=r"(r)
1157 : "r"(__a), "r"(__b), "r"(0));
1158 return r;
1159}
1160__DEVICE__ unsigned int __vavgs4(unsigned int __a, unsigned int __b) {
1161 unsigned int r;
1162 __asm__("vavrg4.s32.s32.s32 %0,%1,%2,%3;"
1163 : "=r"(r)
1164 : "r"(__a), "r"(__b), "r"(0));
1165 return r;
1166}
1167__DEVICE__ unsigned int __vavgu2(unsigned int __a, unsigned int __b) {
1168 unsigned int r;
1169 __asm__("vavrg2.u32.u32.u32 %0,%1,%2,%3;"
1170 : "=r"(r)
1171 : "r"(__a), "r"(__b), "r"(0));
1172 return r;
1173}
1174__DEVICE__ unsigned int __vavgu4(unsigned int __a, unsigned int __b) {
1175 unsigned int r;
1176 __asm__("vavrg4.u32.u32.u32 %0,%1,%2,%3;"
1177 : "=r"(r)
1178 : "r"(__a), "r"(__b), "r"(0));
1179 return r;
1180}
1181__DEVICE__ unsigned int __vseteq2(unsigned int __a, unsigned int __b) {
1182 unsigned int r;
1183 __asm__("vset2.u32.u32.eq %0,%1,%2,%3;"
1184 : "=r"(r)
1185 : "r"(__a), "r"(__b), "r"(0));
1186 return r;
1187}
1188__DEVICE__ unsigned int __vcmpeq2(unsigned int __a, unsigned int __b) {
1189 return __bool2mask(__vseteq2(__a, __b), 16);
1190}
1191__DEVICE__ unsigned int __vseteq4(unsigned int __a, unsigned int __b) {
1192 unsigned int r;
1193 __asm__("vset4.u32.u32.eq %0,%1,%2,%3;"
1194 : "=r"(r)
1195 : "r"(__a), "r"(__b), "r"(0));
1196 return r;
1197}
1198__DEVICE__ unsigned int __vcmpeq4(unsigned int __a, unsigned int __b) {
1199 return __bool2mask(__vseteq4(__a, __b), 8);
1200}
1201__DEVICE__ unsigned int __vsetges2(unsigned int __a, unsigned int __b) {
1202 unsigned int r;
1203 __asm__("vset2.s32.s32.ge %0,%1,%2,%3;"
1204 : "=r"(r)
1205 : "r"(__a), "r"(__b), "r"(0));
1206 return r;
1207}
1208__DEVICE__ unsigned int __vcmpges2(unsigned int __a, unsigned int __b) {
1209 return __bool2mask(__vsetges2(__a, __b), 16);
1210}
1211__DEVICE__ unsigned int __vsetges4(unsigned int __a, unsigned int __b) {
1212 unsigned int r;
1213 __asm__("vset4.s32.s32.ge %0,%1,%2,%3;"
1214 : "=r"(r)
1215 : "r"(__a), "r"(__b), "r"(0));
1216 return r;
1217}
1218__DEVICE__ unsigned int __vcmpges4(unsigned int __a, unsigned int __b) {
1219 return __bool2mask(__vsetges4(__a, __b), 8);
1220}
1221__DEVICE__ unsigned int __vsetgeu2(unsigned int __a, unsigned int __b) {
1222 unsigned int r;
1223 __asm__("vset2.u32.u32.ge %0,%1,%2,%3;"
1224 : "=r"(r)
1225 : "r"(__a), "r"(__b), "r"(0));
1226 return r;
1227}
1228__DEVICE__ unsigned int __vcmpgeu2(unsigned int __a, unsigned int __b) {
1229 return __bool2mask(__vsetgeu2(__a, __b), 16);
1230}
1231__DEVICE__ unsigned int __vsetgeu4(unsigned int __a, unsigned int __b) {
1232 unsigned int r;
1233 __asm__("vset4.u32.u32.ge %0,%1,%2,%3;"
1234 : "=r"(r)
1235 : "r"(__a), "r"(__b), "r"(0));
1236 return r;
1237}
1238__DEVICE__ unsigned int __vcmpgeu4(unsigned int __a, unsigned int __b) {
1239 return __bool2mask(__vsetgeu4(__a, __b), 8);
1240}
1241__DEVICE__ unsigned int __vsetgts2(unsigned int __a, unsigned int __b) {
1242 unsigned int r;
1243 __asm__("vset2.s32.s32.gt %0,%1,%2,%3;"
1244 : "=r"(r)
1245 : "r"(__a), "r"(__b), "r"(0));
1246 return r;
1247}
1248__DEVICE__ unsigned int __vcmpgts2(unsigned int __a, unsigned int __b) {
1249 return __bool2mask(__vsetgts2(__a, __b), 16);
1250}
1251__DEVICE__ unsigned int __vsetgts4(unsigned int __a, unsigned int __b) {
1252 unsigned int r;
1253 __asm__("vset4.s32.s32.gt %0,%1,%2,%3;"
1254 : "=r"(r)
1255 : "r"(__a), "r"(__b), "r"(0));
1256 return r;
1257}
1258__DEVICE__ unsigned int __vcmpgts4(unsigned int __a, unsigned int __b) {
1259 return __bool2mask(__vsetgts4(__a, __b), 8);
1260}
1261__DEVICE__ unsigned int __vsetgtu2(unsigned int __a, unsigned int __b) {
1262 unsigned int r;
1263 __asm__("vset2.u32.u32.gt %0,%1,%2,%3;"
1264 : "=r"(r)
1265 : "r"(__a), "r"(__b), "r"(0));
1266 return r;
1267}
1268__DEVICE__ unsigned int __vcmpgtu2(unsigned int __a, unsigned int __b) {
1269 return __bool2mask(__vsetgtu2(__a, __b), 16);
1270}
1271__DEVICE__ unsigned int __vsetgtu4(unsigned int __a, unsigned int __b) {
1272 unsigned int r;
1273 __asm__("vset4.u32.u32.gt %0,%1,%2,%3;"
1274 : "=r"(r)
1275 : "r"(__a), "r"(__b), "r"(0));
1276 return r;
1277}
1278__DEVICE__ unsigned int __vcmpgtu4(unsigned int __a, unsigned int __b) {
1279 return __bool2mask(__vsetgtu4(__a, __b), 8);
1280}
1281__DEVICE__ unsigned int __vsetles2(unsigned int __a, unsigned int __b) {
1282 unsigned int r;
1283 __asm__("vset2.s32.s32.le %0,%1,%2,%3;"
1284 : "=r"(r)
1285 : "r"(__a), "r"(__b), "r"(0));
1286 return r;
1287}
1288__DEVICE__ unsigned int __vcmples2(unsigned int __a, unsigned int __b) {
1289 return __bool2mask(__vsetles2(__a, __b), 16);
1290}
1291__DEVICE__ unsigned int __vsetles4(unsigned int __a, unsigned int __b) {
1292 unsigned int r;
1293 __asm__("vset4.s32.s32.le %0,%1,%2,%3;"
1294 : "=r"(r)
1295 : "r"(__a), "r"(__b), "r"(0));
1296 return r;
1297}
1298__DEVICE__ unsigned int __vcmples4(unsigned int __a, unsigned int __b) {
1299 return __bool2mask(__vsetles4(__a, __b), 8);
1300}
1301__DEVICE__ unsigned int __vsetleu2(unsigned int __a, unsigned int __b) {
1302 unsigned int r;
1303 __asm__("vset2.u32.u32.le %0,%1,%2,%3;"
1304 : "=r"(r)
1305 : "r"(__a), "r"(__b), "r"(0));
1306 return r;
1307}
1308__DEVICE__ unsigned int __vcmpleu2(unsigned int __a, unsigned int __b) {
1309 return __bool2mask(__vsetleu2(__a, __b), 16);
1310}
1311__DEVICE__ unsigned int __vsetleu4(unsigned int __a, unsigned int __b) {
1312 unsigned int r;
1313 __asm__("vset4.u32.u32.le %0,%1,%2,%3;"
1314 : "=r"(r)
1315 : "r"(__a), "r"(__b), "r"(0));
1316 return r;
1317}
1318__DEVICE__ unsigned int __vcmpleu4(unsigned int __a, unsigned int __b) {
1319 return __bool2mask(__vsetleu4(__a, __b), 8);
1320}
1321__DEVICE__ unsigned int __vsetlts2(unsigned int __a, unsigned int __b) {
1322 unsigned int r;
1323 __asm__("vset2.s32.s32.lt %0,%1,%2,%3;"
1324 : "=r"(r)
1325 : "r"(__a), "r"(__b), "r"(0));
1326 return r;
1327}
1328__DEVICE__ unsigned int __vcmplts2(unsigned int __a, unsigned int __b) {
1329 return __bool2mask(__vsetlts2(__a, __b), 16);
1330}
1331__DEVICE__ unsigned int __vsetlts4(unsigned int __a, unsigned int __b) {
1332 unsigned int r;
1333 __asm__("vset4.s32.s32.lt %0,%1,%2,%3;"
1334 : "=r"(r)
1335 : "r"(__a), "r"(__b), "r"(0));
1336 return r;
1337}
1338__DEVICE__ unsigned int __vcmplts4(unsigned int __a, unsigned int __b) {
1339 return __bool2mask(__vsetlts4(__a, __b), 8);
1340}
1341__DEVICE__ unsigned int __vsetltu2(unsigned int __a, unsigned int __b) {
1342 unsigned int r;
1343 __asm__("vset2.u32.u32.lt %0,%1,%2,%3;"
1344 : "=r"(r)
1345 : "r"(__a), "r"(__b), "r"(0));
1346 return r;
1347}
1348__DEVICE__ unsigned int __vcmpltu2(unsigned int __a, unsigned int __b) {
1349 return __bool2mask(__vsetltu2(__a, __b), 16);
1350}
1351__DEVICE__ unsigned int __vsetltu4(unsigned int __a, unsigned int __b) {
1352 unsigned int r;
1353 __asm__("vset4.u32.u32.lt %0,%1,%2,%3;"
1354 : "=r"(r)
1355 : "r"(__a), "r"(__b), "r"(0));
1356 return r;
1357}
1358__DEVICE__ unsigned int __vcmpltu4(unsigned int __a, unsigned int __b) {
1359 return __bool2mask(__vsetltu4(__a, __b), 8);
1360}
1361__DEVICE__ unsigned int __vsetne2(unsigned int __a, unsigned int __b) {
1362 unsigned int r;
1363 __asm__("vset2.u32.u32.ne %0,%1,%2,%3;"
1364 : "=r"(r)
1365 : "r"(__a), "r"(__b), "r"(0));
1366 return r;
1367}
1368__DEVICE__ unsigned int __vcmpne2(unsigned int __a, unsigned int __b) {
1369 return __bool2mask(__vsetne2(__a, __b), 16);
1370}
1371__DEVICE__ unsigned int __vsetne4(unsigned int __a, unsigned int __b) {
1372 unsigned int r;
1373 __asm__("vset4.u32.u32.ne %0,%1,%2,%3;"
1374 : "=r"(r)
1375 : "r"(__a), "r"(__b), "r"(0));
1376 return r;
1377}
1378__DEVICE__ unsigned int __vcmpne4(unsigned int __a, unsigned int __b) {
1379 return __bool2mask(__vsetne4(__a, __b), 8);
1380}
1381
1382// Based on ITEM 23 in AIM-239: http://dspace.mit.edu/handle/1721.1/6086
1383// (a & b) + (a | b) = a + b = (a ^ b) + 2 * (a & b) =>
1384// (a + b) / 2 = ((a ^ b) >> 1) + (a & b)
1385// To operate on multiple sub-elements we need to make sure to mask out bits
1386// that crossed over into adjacent elements during the shift.
1387__DEVICE__ unsigned int __vhaddu2(unsigned int __a, unsigned int __b) {
1388 return (((__a ^ __b) >> 1) & ~0x80008000u) + (__a & __b);
1389}
1390__DEVICE__ unsigned int __vhaddu4(unsigned int __a, unsigned int __b) {
1391 return (((__a ^ __b) >> 1) & ~0x80808080u) + (__a & __b);
1392}
1393
1394__DEVICE__ unsigned int __vmaxs2(unsigned int __a, unsigned int __b) {
1395 unsigned int r;
1396 if ((__a & 0x8000) && (__b & 0x8000)) {
1397 // Work around a bug in ptxas which produces invalid result if low element
1398 // is negative.
1399 unsigned mask = __vcmpgts2(__a, __b);
1400 r = (__a & mask) | (__b & ~mask);
1401 } else {
1402 __asm__("vmax2.s32.s32.s32 %0,%1,%2,%3;"
1403 : "=r"(r)
1404 : "r"(__a), "r"(__b), "r"(0));
1405 }
1406 return r;
1407}
1408__DEVICE__ unsigned int __vmaxs4(unsigned int __a, unsigned int __b) {
1409 unsigned int r;
1410 __asm__("vmax4.s32.s32.s32 %0,%1,%2,%3;"
1411 : "=r"(r)
1412 : "r"(__a), "r"(__b), "r"(0));
1413 return r;
1414}
1415__DEVICE__ unsigned int __vmaxu2(unsigned int __a, unsigned int __b) {
1416 unsigned int r;
1417 __asm__("vmax2.u32.u32.u32 %0,%1,%2,%3;"
1418 : "=r"(r)
1419 : "r"(__a), "r"(__b), "r"(0));
1420 return r;
1421}
1422__DEVICE__ unsigned int __vmaxu4(unsigned int __a, unsigned int __b) {
1423 unsigned int r;
1424 __asm__("vmax4.u32.u32.u32 %0,%1,%2,%3;"
1425 : "=r"(r)
1426 : "r"(__a), "r"(__b), "r"(0));
1427 return r;
1428}
1429__DEVICE__ unsigned int __vmins2(unsigned int __a, unsigned int __b) {
1430 unsigned int r;
1431 __asm__("vmin2.s32.s32.s32 %0,%1,%2,%3;"
1432 : "=r"(r)
1433 : "r"(__a), "r"(__b), "r"(0));
1434 return r;
1435}
1436__DEVICE__ unsigned int __vmins4(unsigned int __a, unsigned int __b) {
1437 unsigned int r;
1438 __asm__("vmin4.s32.s32.s32 %0,%1,%2,%3;"
1439 : "=r"(r)
1440 : "r"(__a), "r"(__b), "r"(0));
1441 return r;
1442}
1443__DEVICE__ unsigned int __vminu2(unsigned int __a, unsigned int __b) {
1444 unsigned int r;
1445 __asm__("vmin2.u32.u32.u32 %0,%1,%2,%3;"
1446 : "=r"(r)
1447 : "r"(__a), "r"(__b), "r"(0));
1448 return r;
1449}
1450__DEVICE__ unsigned int __vminu4(unsigned int __a, unsigned int __b) {
1451 unsigned int r;
1452 __asm__("vmin4.u32.u32.u32 %0,%1,%2,%3;"
1453 : "=r"(r)
1454 : "r"(__a), "r"(__b), "r"(0));
1455 return r;
1456}
1457__DEVICE__ unsigned int __vsads2(unsigned int __a, unsigned int __b) {
1458 unsigned int r;
1459 __asm__("vabsdiff2.s32.s32.s32.add %0,%1,%2,%3;"
1460 : "=r"(r)
1461 : "r"(__a), "r"(__b), "r"(0));
1462 return r;
1463}
1464__DEVICE__ unsigned int __vsads4(unsigned int __a, unsigned int __b) {
1465 unsigned int r;
1466 __asm__("vabsdiff4.s32.s32.s32.add %0,%1,%2,%3;"
1467 : "=r"(r)
1468 : "r"(__a), "r"(__b), "r"(0));
1469 return r;
1470}
1471__DEVICE__ unsigned int __vsadu2(unsigned int __a, unsigned int __b) {
1472 unsigned int r;
1473 __asm__("vabsdiff2.u32.u32.u32.add %0,%1,%2,%3;"
1474 : "=r"(r)
1475 : "r"(__a), "r"(__b), "r"(0));
1476 return r;
1477}
1478__DEVICE__ unsigned int __vsadu4(unsigned int __a, unsigned int __b) {
1479 unsigned int r;
1480 __asm__("vabsdiff4.u32.u32.u32.add %0,%1,%2,%3;"
1481 : "=r"(r)
1482 : "r"(__a), "r"(__b), "r"(0));
1483 return r;
1484}
1485
1486__DEVICE__ unsigned int __vsub2(unsigned int __a, unsigned int __b) {
1487 unsigned int r;
1488 __asm__("vsub2.u32.u32.u32 %0,%1,%2,%3;"
1489 : "=r"(r)
1490 : "r"(__a), "r"(__b), "r"(0));
1491 return r;
1492}
1493__DEVICE__ unsigned int __vneg2(unsigned int __a) { return __vsub2(0, __a); }
1494
1495__DEVICE__ unsigned int __vsub4(unsigned int __a, unsigned int __b) {
1496 unsigned int r;
1497 __asm__("vsub4.u32.u32.u32 %0,%1,%2,%3;"
1498 : "=r"(r)
1499 : "r"(__a), "r"(__b), "r"(0));
1500 return r;
1501}
1502__DEVICE__ unsigned int __vneg4(unsigned int __a) { return __vsub4(0, __a); }
1503__DEVICE__ unsigned int __vsubss2(unsigned int __a, unsigned int __b) {
1504 unsigned int r;
1505 __asm__("vsub2.s32.s32.s32.sat %0,%1,%2,%3;"
1506 : "=r"(r)
1507 : "r"(__a), "r"(__b), "r"(0));
1508 return r;
1509}
1510__DEVICE__ unsigned int __vnegss2(unsigned int __a) {
1511 return __vsubss2(0, __a);
1512}
1513__DEVICE__ unsigned int __vsubss4(unsigned int __a, unsigned int __b) {
1514 unsigned int r;
1515 __asm__("vsub4.s32.s32.s32.sat %0,%1,%2,%3;"
1516 : "=r"(r)
1517 : "r"(__a), "r"(__b), "r"(0));
1518 return r;
1519}
1520__DEVICE__ unsigned int __vnegss4(unsigned int __a) {
1521 return __vsubss4(0, __a);
1522}
1523__DEVICE__ unsigned int __vsubus2(unsigned int __a, unsigned int __b) {
1524 unsigned int r;
1525 __asm__("vsub2.u32.u32.u32.sat %0,%1,%2,%3;"
1526 : "=r"(r)
1527 : "r"(__a), "r"(__b), "r"(0));
1528 return r;
1529}
1530__DEVICE__ unsigned int __vsubus4(unsigned int __a, unsigned int __b) {
1531 unsigned int r;
1532 __asm__("vsub4.u32.u32.u32.sat %0,%1,%2,%3;"
1533 : "=r"(r)
1534 : "r"(__a), "r"(__b), "r"(0));
1535 return r;
1536}
1537#endif // CUDA_VERSION >= 9020
1538
1539// For OpenMP we require the user to include <time.h> as we need to know what
1540// clock_t is on the system.
1541#ifndef __OPENMP_NVPTX__
1542__DEVICE__ /* clock_t= */ int clock() { return __nvvm_read_ptx_sreg_clock(); }
1543#endif
1544__DEVICE__ long long clock64() { return __nvvm_read_ptx_sreg_clock64(); }
1545
1546// These functions shouldn't be declared when including this header
1547// for math function resolution purposes.
1548#ifndef __OPENMP_NVPTX__
1549__DEVICE__ void *memcpy(void *__a, const void *__b, size_t __c) {
1550 return __builtin_memcpy(__a, __b, __c);
1551}
1552__DEVICE__ void *memset(void *__a, int __b, size_t __c) {
1553 return __builtin_memset(__a, __b, __c);
1554}
1555#endif
1556
1557#pragma pop_macro("__DEVICE__")
1558#endif // __CLANG_CUDA_DEVICE_FUNCTIONS_H__
lib/include/__clang_cuda_intrinsics.h deleted-707
...@@ -1,707 +0,0 @@
1/*===--- __clang_cuda_intrinsics.h - Device-side CUDA intrinsic wrappers ---===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 *===-----------------------------------------------------------------------===
8 */
9#ifndef __CLANG_CUDA_INTRINSICS_H__
10#define __CLANG_CUDA_INTRINSICS_H__
11#ifndef __CUDA__
12#error "This file is for CUDA compilation only."
13#endif
14
15// sm_30 intrinsics: __shfl_{up,down,xor}.
16
17#define __SM_30_INTRINSICS_H__
18#define __SM_30_INTRINSICS_HPP__
19
20#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 300
21
22#pragma push_macro("__MAKE_SHUFFLES")
23#define __MAKE_SHUFFLES(__FnName, __IntIntrinsic, __FloatIntrinsic, __Mask, \
24 __Type) \
25 inline __device__ int __FnName(int __val, __Type __offset, \
26 int __width = warpSize) { \
27 return __IntIntrinsic(__val, __offset, \
28 ((warpSize - __width) << 8) | (__Mask)); \
29 } \
30 inline __device__ float __FnName(float __val, __Type __offset, \
31 int __width = warpSize) { \
32 return __FloatIntrinsic(__val, __offset, \
33 ((warpSize - __width) << 8) | (__Mask)); \
34 } \
35 inline __device__ unsigned int __FnName(unsigned int __val, __Type __offset, \
36 int __width = warpSize) { \
37 return static_cast<unsigned int>( \
38 ::__FnName(static_cast<int>(__val), __offset, __width)); \
39 } \
40 inline __device__ long long __FnName(long long __val, __Type __offset, \
41 int __width = warpSize) { \
42 struct __Bits { \
43 int __a, __b; \
44 }; \
45 _Static_assert(sizeof(__val) == sizeof(__Bits)); \
46 _Static_assert(sizeof(__Bits) == 2 * sizeof(int)); \
47 __Bits __tmp; \
48 memcpy(&__tmp, &__val, sizeof(__val)); \
49 __tmp.__a = ::__FnName(__tmp.__a, __offset, __width); \
50 __tmp.__b = ::__FnName(__tmp.__b, __offset, __width); \
51 long long __ret; \
52 memcpy(&__ret, &__tmp, sizeof(__tmp)); \
53 return __ret; \
54 } \
55 inline __device__ long __FnName(long __val, __Type __offset, \
56 int __width = warpSize) { \
57 _Static_assert(sizeof(long) == sizeof(long long) || \
58 sizeof(long) == sizeof(int)); \
59 if (sizeof(long) == sizeof(long long)) { \
60 return static_cast<long>( \
61 ::__FnName(static_cast<long long>(__val), __offset, __width)); \
62 } else if (sizeof(long) == sizeof(int)) { \
63 return static_cast<long>( \
64 ::__FnName(static_cast<int>(__val), __offset, __width)); \
65 } \
66 } \
67 inline __device__ unsigned long __FnName( \
68 unsigned long __val, __Type __offset, int __width = warpSize) { \
69 return static_cast<unsigned long>( \
70 ::__FnName(static_cast<long>(__val), __offset, __width)); \
71 } \
72 inline __device__ unsigned long long __FnName( \
73 unsigned long long __val, __Type __offset, int __width = warpSize) { \
74 return static_cast<unsigned long long>( \
75 ::__FnName(static_cast<long long>(__val), __offset, __width)); \
76 } \
77 inline __device__ double __FnName(double __val, __Type __offset, \
78 int __width = warpSize) { \
79 long long __tmp; \
80 _Static_assert(sizeof(__tmp) == sizeof(__val)); \
81 memcpy(&__tmp, &__val, sizeof(__val)); \
82 __tmp = ::__FnName(__tmp, __offset, __width); \
83 double __ret; \
84 memcpy(&__ret, &__tmp, sizeof(__ret)); \
85 return __ret; \
86 }
87
88__MAKE_SHUFFLES(__shfl, __nvvm_shfl_idx_i32, __nvvm_shfl_idx_f32, 0x1f, int);
89// We use 0 rather than 31 as our mask, because shfl.up applies to lanes >=
90// maxLane.
91__MAKE_SHUFFLES(__shfl_up, __nvvm_shfl_up_i32, __nvvm_shfl_up_f32, 0,
92 unsigned int);
93__MAKE_SHUFFLES(__shfl_down, __nvvm_shfl_down_i32, __nvvm_shfl_down_f32, 0x1f,
94 unsigned int);
95__MAKE_SHUFFLES(__shfl_xor, __nvvm_shfl_bfly_i32, __nvvm_shfl_bfly_f32, 0x1f,
96 int);
97#pragma pop_macro("__MAKE_SHUFFLES")
98
99#endif // !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 300
100
101#if CUDA_VERSION >= 9000
102#if (!defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 300)
103// __shfl_sync_* variants available in CUDA-9
104#pragma push_macro("__MAKE_SYNC_SHUFFLES")
105#define __MAKE_SYNC_SHUFFLES(__FnName, __IntIntrinsic, __FloatIntrinsic, \
106 __Mask, __Type) \
107 inline __device__ int __FnName(unsigned int __mask, int __val, \
108 __Type __offset, int __width = warpSize) { \
109 return __IntIntrinsic(__mask, __val, __offset, \
110 ((warpSize - __width) << 8) | (__Mask)); \
111 } \
112 inline __device__ float __FnName(unsigned int __mask, float __val, \
113 __Type __offset, int __width = warpSize) { \
114 return __FloatIntrinsic(__mask, __val, __offset, \
115 ((warpSize - __width) << 8) | (__Mask)); \
116 } \
117 inline __device__ unsigned int __FnName(unsigned int __mask, \
118 unsigned int __val, __Type __offset, \
119 int __width = warpSize) { \
120 return static_cast<unsigned int>( \
121 ::__FnName(__mask, static_cast<int>(__val), __offset, __width)); \
122 } \
123 inline __device__ long long __FnName(unsigned int __mask, long long __val, \
124 __Type __offset, \
125 int __width = warpSize) { \
126 struct __Bits { \
127 int __a, __b; \
128 }; \
129 _Static_assert(sizeof(__val) == sizeof(__Bits)); \
130 _Static_assert(sizeof(__Bits) == 2 * sizeof(int)); \
131 __Bits __tmp; \
132 memcpy(&__tmp, &__val, sizeof(__val)); \
133 __tmp.__a = ::__FnName(__mask, __tmp.__a, __offset, __width); \
134 __tmp.__b = ::__FnName(__mask, __tmp.__b, __offset, __width); \
135 long long __ret; \
136 memcpy(&__ret, &__tmp, sizeof(__tmp)); \
137 return __ret; \
138 } \
139 inline __device__ unsigned long long __FnName( \
140 unsigned int __mask, unsigned long long __val, __Type __offset, \
141 int __width = warpSize) { \
142 return static_cast<unsigned long long>( \
143 ::__FnName(__mask, static_cast<long long>(__val), __offset, __width)); \
144 } \
145 inline __device__ long __FnName(unsigned int __mask, long __val, \
146 __Type __offset, int __width = warpSize) { \
147 _Static_assert(sizeof(long) == sizeof(long long) || \
148 sizeof(long) == sizeof(int)); \
149 if (sizeof(long) == sizeof(long long)) { \
150 return static_cast<long>(::__FnName( \
151 __mask, static_cast<long long>(__val), __offset, __width)); \
152 } else if (sizeof(long) == sizeof(int)) { \
153 return static_cast<long>( \
154 ::__FnName(__mask, static_cast<int>(__val), __offset, __width)); \
155 } \
156 } \
157 inline __device__ unsigned long __FnName( \
158 unsigned int __mask, unsigned long __val, __Type __offset, \
159 int __width = warpSize) { \
160 return static_cast<unsigned long>( \
161 ::__FnName(__mask, static_cast<long>(__val), __offset, __width)); \
162 } \
163 inline __device__ double __FnName(unsigned int __mask, double __val, \
164 __Type __offset, int __width = warpSize) { \
165 long long __tmp; \
166 _Static_assert(sizeof(__tmp) == sizeof(__val)); \
167 memcpy(&__tmp, &__val, sizeof(__val)); \
168 __tmp = ::__FnName(__mask, __tmp, __offset, __width); \
169 double __ret; \
170 memcpy(&__ret, &__tmp, sizeof(__ret)); \
171 return __ret; \
172 }
173__MAKE_SYNC_SHUFFLES(__shfl_sync, __nvvm_shfl_sync_idx_i32,
174 __nvvm_shfl_sync_idx_f32, 0x1f, int);
175// We use 0 rather than 31 as our mask, because shfl.up applies to lanes >=
176// maxLane.
177__MAKE_SYNC_SHUFFLES(__shfl_up_sync, __nvvm_shfl_sync_up_i32,
178 __nvvm_shfl_sync_up_f32, 0, unsigned int);
179__MAKE_SYNC_SHUFFLES(__shfl_down_sync, __nvvm_shfl_sync_down_i32,
180 __nvvm_shfl_sync_down_f32, 0x1f, unsigned int);
181__MAKE_SYNC_SHUFFLES(__shfl_xor_sync, __nvvm_shfl_sync_bfly_i32,
182 __nvvm_shfl_sync_bfly_f32, 0x1f, int);
183#pragma pop_macro("__MAKE_SYNC_SHUFFLES")
184
185inline __device__ void __syncwarp(unsigned int mask = 0xffffffff) {
186 return __nvvm_bar_warp_sync(mask);
187}
188
189inline __device__ void __barrier_sync(unsigned int id) {
190 __nvvm_barrier_sync(id);
191}
192
193inline __device__ void __barrier_sync_count(unsigned int id,
194 unsigned int count) {
195 __nvvm_barrier_sync_cnt(id, count);
196}
197
198inline __device__ int __all_sync(unsigned int mask, int pred) {
199 return __nvvm_vote_all_sync(mask, pred);
200}
201
202inline __device__ int __any_sync(unsigned int mask, int pred) {
203 return __nvvm_vote_any_sync(mask, pred);
204}
205
206inline __device__ int __uni_sync(unsigned int mask, int pred) {
207 return __nvvm_vote_uni_sync(mask, pred);
208}
209
210inline __device__ unsigned int __ballot_sync(unsigned int mask, int pred) {
211 return __nvvm_vote_ballot_sync(mask, pred);
212}
213
214inline __device__ unsigned int __activemask() {
215#if CUDA_VERSION < 9020
216 return __nvvm_vote_ballot(1);
217#else
218 return __nvvm_activemask();
219#endif
220}
221
222inline __device__ unsigned int __fns(unsigned mask, unsigned base, int offset) {
223 return __nvvm_fns(mask, base, offset);
224}
225
226#endif // !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 300
227
228// Define __match* builtins CUDA-9 headers expect to see.
229#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 700
230inline __device__ unsigned int __match32_any_sync(unsigned int mask,
231 unsigned int value) {
232 return __nvvm_match_any_sync_i32(mask, value);
233}
234
235inline __device__ unsigned int
236__match64_any_sync(unsigned int mask, unsigned long long value) {
237 return __nvvm_match_any_sync_i64(mask, value);
238}
239
240inline __device__ unsigned int
241__match32_all_sync(unsigned int mask, unsigned int value, int *pred) {
242 return __nvvm_match_all_sync_i32p(mask, value, pred);
243}
244
245inline __device__ unsigned int
246__match64_all_sync(unsigned int mask, unsigned long long value, int *pred) {
247 return __nvvm_match_all_sync_i64p(mask, value, pred);
248}
249#include "crt/sm_70_rt.hpp"
250
251#endif // !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 700
252#endif // __CUDA_VERSION >= 9000
253
254// sm_32 intrinsics: __ldg and __funnelshift_{l,lc,r,rc}.
255
256// Prevent the vanilla sm_32 intrinsics header from being included.
257#define __SM_32_INTRINSICS_H__
258#define __SM_32_INTRINSICS_HPP__
259
260#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 320
261
262inline __device__ char __ldg(const char *ptr) { return __nvvm_ldg_c(ptr); }
263inline __device__ short __ldg(const short *ptr) { return __nvvm_ldg_s(ptr); }
264inline __device__ int __ldg(const int *ptr) { return __nvvm_ldg_i(ptr); }
265inline __device__ long __ldg(const long *ptr) { return __nvvm_ldg_l(ptr); }
266inline __device__ long long __ldg(const long long *ptr) {
267 return __nvvm_ldg_ll(ptr);
268}
269inline __device__ unsigned char __ldg(const unsigned char *ptr) {
270 return __nvvm_ldg_uc(ptr);
271}
272inline __device__ signed char __ldg(const signed char *ptr) {
273 return __nvvm_ldg_uc((const unsigned char *)ptr);
274}
275inline __device__ unsigned short __ldg(const unsigned short *ptr) {
276 return __nvvm_ldg_us(ptr);
277}
278inline __device__ unsigned int __ldg(const unsigned int *ptr) {
279 return __nvvm_ldg_ui(ptr);
280}
281inline __device__ unsigned long __ldg(const unsigned long *ptr) {
282 return __nvvm_ldg_ul(ptr);
283}
284inline __device__ unsigned long long __ldg(const unsigned long long *ptr) {
285 return __nvvm_ldg_ull(ptr);
286}
287inline __device__ float __ldg(const float *ptr) { return __nvvm_ldg_f(ptr); }
288inline __device__ double __ldg(const double *ptr) { return __nvvm_ldg_d(ptr); }
289
290inline __device__ char2 __ldg(const char2 *ptr) {
291 typedef char c2 __attribute__((ext_vector_type(2)));
292 // We can assume that ptr is aligned at least to char2's alignment, but the
293 // load will assume that ptr is aligned to char2's alignment. This is only
294 // safe if alignof(c2) <= alignof(char2).
295 c2 rv = __nvvm_ldg_c2(reinterpret_cast<const c2 *>(ptr));
296 char2 ret;
297 ret.x = rv[0];
298 ret.y = rv[1];
299 return ret;
300}
301inline __device__ char4 __ldg(const char4 *ptr) {
302 typedef char c4 __attribute__((ext_vector_type(4)));
303 c4 rv = __nvvm_ldg_c4(reinterpret_cast<const c4 *>(ptr));
304 char4 ret;
305 ret.x = rv[0];
306 ret.y = rv[1];
307 ret.z = rv[2];
308 ret.w = rv[3];
309 return ret;
310}
311inline __device__ short2 __ldg(const short2 *ptr) {
312 typedef short s2 __attribute__((ext_vector_type(2)));
313 s2 rv = __nvvm_ldg_s2(reinterpret_cast<const s2 *>(ptr));
314 short2 ret;
315 ret.x = rv[0];
316 ret.y = rv[1];
317 return ret;
318}
319inline __device__ short4 __ldg(const short4 *ptr) {
320 typedef short s4 __attribute__((ext_vector_type(4)));
321 s4 rv = __nvvm_ldg_s4(reinterpret_cast<const s4 *>(ptr));
322 short4 ret;
323 ret.x = rv[0];
324 ret.y = rv[1];
325 ret.z = rv[2];
326 ret.w = rv[3];
327 return ret;
328}
329inline __device__ int2 __ldg(const int2 *ptr) {
330 typedef int i2 __attribute__((ext_vector_type(2)));
331 i2 rv = __nvvm_ldg_i2(reinterpret_cast<const i2 *>(ptr));
332 int2 ret;
333 ret.x = rv[0];
334 ret.y = rv[1];
335 return ret;
336}
337inline __device__ int4 __ldg(const int4 *ptr) {
338 typedef int i4 __attribute__((ext_vector_type(4)));
339 i4 rv = __nvvm_ldg_i4(reinterpret_cast<const i4 *>(ptr));
340 int4 ret;
341 ret.x = rv[0];
342 ret.y = rv[1];
343 ret.z = rv[2];
344 ret.w = rv[3];
345 return ret;
346}
347inline __device__ longlong2 __ldg(const longlong2 *ptr) {
348 typedef long long ll2 __attribute__((ext_vector_type(2)));
349 ll2 rv = __nvvm_ldg_ll2(reinterpret_cast<const ll2 *>(ptr));
350 longlong2 ret;
351 ret.x = rv[0];
352 ret.y = rv[1];
353 return ret;
354}
355
356inline __device__ uchar2 __ldg(const uchar2 *ptr) {
357 typedef unsigned char uc2 __attribute__((ext_vector_type(2)));
358 uc2 rv = __nvvm_ldg_uc2(reinterpret_cast<const uc2 *>(ptr));
359 uchar2 ret;
360 ret.x = rv[0];
361 ret.y = rv[1];
362 return ret;
363}
364inline __device__ uchar4 __ldg(const uchar4 *ptr) {
365 typedef unsigned char uc4 __attribute__((ext_vector_type(4)));
366 uc4 rv = __nvvm_ldg_uc4(reinterpret_cast<const uc4 *>(ptr));
367 uchar4 ret;
368 ret.x = rv[0];
369 ret.y = rv[1];
370 ret.z = rv[2];
371 ret.w = rv[3];
372 return ret;
373}
374inline __device__ ushort2 __ldg(const ushort2 *ptr) {
375 typedef unsigned short us2 __attribute__((ext_vector_type(2)));
376 us2 rv = __nvvm_ldg_us2(reinterpret_cast<const us2 *>(ptr));
377 ushort2 ret;
378 ret.x = rv[0];
379 ret.y = rv[1];
380 return ret;
381}
382inline __device__ ushort4 __ldg(const ushort4 *ptr) {
383 typedef unsigned short us4 __attribute__((ext_vector_type(4)));
384 us4 rv = __nvvm_ldg_us4(reinterpret_cast<const us4 *>(ptr));
385 ushort4 ret;
386 ret.x = rv[0];
387 ret.y = rv[1];
388 ret.z = rv[2];
389 ret.w = rv[3];
390 return ret;
391}
392inline __device__ uint2 __ldg(const uint2 *ptr) {
393 typedef unsigned int ui2 __attribute__((ext_vector_type(2)));
394 ui2 rv = __nvvm_ldg_ui2(reinterpret_cast<const ui2 *>(ptr));
395 uint2 ret;
396 ret.x = rv[0];
397 ret.y = rv[1];
398 return ret;
399}
400inline __device__ uint4 __ldg(const uint4 *ptr) {
401 typedef unsigned int ui4 __attribute__((ext_vector_type(4)));
402 ui4 rv = __nvvm_ldg_ui4(reinterpret_cast<const ui4 *>(ptr));
403 uint4 ret;
404 ret.x = rv[0];
405 ret.y = rv[1];
406 ret.z = rv[2];
407 ret.w = rv[3];
408 return ret;
409}
410inline __device__ ulonglong2 __ldg(const ulonglong2 *ptr) {
411 typedef unsigned long long ull2 __attribute__((ext_vector_type(2)));
412 ull2 rv = __nvvm_ldg_ull2(reinterpret_cast<const ull2 *>(ptr));
413 ulonglong2 ret;
414 ret.x = rv[0];
415 ret.y = rv[1];
416 return ret;
417}
418
419inline __device__ float2 __ldg(const float2 *ptr) {
420 typedef float f2 __attribute__((ext_vector_type(2)));
421 f2 rv = __nvvm_ldg_f2(reinterpret_cast<const f2 *>(ptr));
422 float2 ret;
423 ret.x = rv[0];
424 ret.y = rv[1];
425 return ret;
426}
427inline __device__ float4 __ldg(const float4 *ptr) {
428 typedef float f4 __attribute__((ext_vector_type(4)));
429 f4 rv = __nvvm_ldg_f4(reinterpret_cast<const f4 *>(ptr));
430 float4 ret;
431 ret.x = rv[0];
432 ret.y = rv[1];
433 ret.z = rv[2];
434 ret.w = rv[3];
435 return ret;
436}
437inline __device__ double2 __ldg(const double2 *ptr) {
438 typedef double d2 __attribute__((ext_vector_type(2)));
439 d2 rv = __nvvm_ldg_d2(reinterpret_cast<const d2 *>(ptr));
440 double2 ret;
441 ret.x = rv[0];
442 ret.y = rv[1];
443 return ret;
444}
445
446// TODO: Implement these as intrinsics, so the backend can work its magic on
447// these. Alternatively, we could implement these as plain C and try to get
448// llvm to recognize the relevant patterns.
449inline __device__ unsigned __funnelshift_l(unsigned low32, unsigned high32,
450 unsigned shiftWidth) {
451 unsigned result;
452 asm("shf.l.wrap.b32 %0, %1, %2, %3;"
453 : "=r"(result)
454 : "r"(low32), "r"(high32), "r"(shiftWidth));
455 return result;
456}
457inline __device__ unsigned __funnelshift_lc(unsigned low32, unsigned high32,
458 unsigned shiftWidth) {
459 unsigned result;
460 asm("shf.l.clamp.b32 %0, %1, %2, %3;"
461 : "=r"(result)
462 : "r"(low32), "r"(high32), "r"(shiftWidth));
463 return result;
464}
465inline __device__ unsigned __funnelshift_r(unsigned low32, unsigned high32,
466 unsigned shiftWidth) {
467 unsigned result;
468 asm("shf.r.wrap.b32 %0, %1, %2, %3;"
469 : "=r"(result)
470 : "r"(low32), "r"(high32), "r"(shiftWidth));
471 return result;
472}
473inline __device__ unsigned __funnelshift_rc(unsigned low32, unsigned high32,
474 unsigned shiftWidth) {
475 unsigned ret;
476 asm("shf.r.clamp.b32 %0, %1, %2, %3;"
477 : "=r"(ret)
478 : "r"(low32), "r"(high32), "r"(shiftWidth));
479 return ret;
480}
481
482#endif // !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 320
483
484#if CUDA_VERSION >= 11000
485extern "C" {
486__device__ inline size_t __nv_cvta_generic_to_global_impl(const void *__ptr) {
487 return (size_t)(void __attribute__((address_space(1))) *)__ptr;
488}
489__device__ inline size_t __nv_cvta_generic_to_shared_impl(const void *__ptr) {
490 return (size_t)(void __attribute__((address_space(3))) *)__ptr;
491}
492__device__ inline size_t __nv_cvta_generic_to_constant_impl(const void *__ptr) {
493 return (size_t)(void __attribute__((address_space(4))) *)__ptr;
494}
495__device__ inline size_t __nv_cvta_generic_to_local_impl(const void *__ptr) {
496 return (size_t)(void __attribute__((address_space(5))) *)__ptr;
497}
498__device__ inline void *__nv_cvta_global_to_generic_impl(size_t __ptr) {
499 return (void *)(void __attribute__((address_space(1))) *)__ptr;
500}
501__device__ inline void *__nv_cvta_shared_to_generic_impl(size_t __ptr) {
502 return (void *)(void __attribute__((address_space(3))) *)__ptr;
503}
504__device__ inline void *__nv_cvta_constant_to_generic_impl(size_t __ptr) {
505 return (void *)(void __attribute__((address_space(4))) *)__ptr;
506}
507__device__ inline void *__nv_cvta_local_to_generic_impl(size_t __ptr) {
508 return (void *)(void __attribute__((address_space(5))) *)__ptr;
509}
510__device__ inline cuuint32_t __nvvm_get_smem_pointer(void *__ptr) {
511 return __nv_cvta_generic_to_shared_impl(__ptr);
512}
513} // extern "C"
514
515#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 800
516__device__ inline unsigned __reduce_add_sync(unsigned __mask,
517 unsigned __value) {
518 return __nvvm_redux_sync_add(__mask, __value);
519}
520__device__ inline unsigned __reduce_min_sync(unsigned __mask,
521 unsigned __value) {
522 return __nvvm_redux_sync_umin(__mask, __value);
523}
524__device__ inline unsigned __reduce_max_sync(unsigned __mask,
525 unsigned __value) {
526 return __nvvm_redux_sync_umax(__mask, __value);
527}
528__device__ inline int __reduce_min_sync(unsigned __mask, int __value) {
529 return __nvvm_redux_sync_min(__mask, __value);
530}
531__device__ inline int __reduce_max_sync(unsigned __mask, int __value) {
532 return __nvvm_redux_sync_max(__mask, __value);
533}
534__device__ inline unsigned __reduce_or_sync(unsigned __mask, unsigned __value) {
535 return __nvvm_redux_sync_or(__mask, __value);
536}
537__device__ inline unsigned __reduce_and_sync(unsigned __mask,
538 unsigned __value) {
539 return __nvvm_redux_sync_and(__mask, __value);
540}
541__device__ inline unsigned __reduce_xor_sync(unsigned __mask,
542 unsigned __value) {
543 return __nvvm_redux_sync_xor(__mask, __value);
544}
545
546__device__ inline void __nv_memcpy_async_shared_global_4(void *__dst,
547 const void *__src,
548 unsigned __src_size) {
549 __nvvm_cp_async_ca_shared_global_4(
550 (void __attribute__((address_space(3))) *)__dst,
551 (const void __attribute__((address_space(1))) *)__src, __src_size);
552}
553__device__ inline void __nv_memcpy_async_shared_global_8(void *__dst,
554 const void *__src,
555 unsigned __src_size) {
556 __nvvm_cp_async_ca_shared_global_8(
557 (void __attribute__((address_space(3))) *)__dst,
558 (const void __attribute__((address_space(1))) *)__src, __src_size);
559}
560__device__ inline void __nv_memcpy_async_shared_global_16(void *__dst,
561 const void *__src,
562 unsigned __src_size) {
563 __nvvm_cp_async_ca_shared_global_16(
564 (void __attribute__((address_space(3))) *)__dst,
565 (const void __attribute__((address_space(1))) *)__src, __src_size);
566}
567
568__device__ inline void *
569__nv_associate_access_property(const void *__ptr, unsigned long long __prop) {
570 // TODO: it appears to provide compiler with some sort of a hint. We do not
571 // know what exactly it is supposed to do. However, CUDA headers suggest that
572 // just passing through __ptr should not affect correctness. They do so on
573 // pre-sm80 GPUs where this builtin is not available.
574 return (void*)__ptr;
575}
576#endif // !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 800
577
578#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 900
579__device__ inline unsigned __isCtaShared(const void *ptr) {
580 return __isShared(ptr);
581}
582
583__device__ inline unsigned __isClusterShared(const void *__ptr) {
584 return __nvvm_isspacep_shared_cluster(__ptr);
585}
586
587__device__ inline void *__cluster_map_shared_rank(const void *__ptr,
588 unsigned __rank) {
589 return __nvvm_mapa((void *)__ptr, __rank);
590}
591
592__device__ inline unsigned __cluster_query_shared_rank(const void *__ptr) {
593 return __nvvm_getctarank((void *)__ptr);
594}
595
596__device__ inline uint2
597__cluster_map_shared_multicast(const void *__ptr,
598 unsigned int __cluster_cta_mask) {
599 return make_uint2((unsigned)__cvta_generic_to_shared(__ptr),
600 __cluster_cta_mask);
601}
602
603__device__ inline unsigned __clusterDimIsSpecified() {
604 return __nvvm_is_explicit_cluster();
605}
606
607__device__ inline dim3 __clusterDim() {
608 return dim3(__nvvm_read_ptx_sreg_cluster_nctaid_x(),
609 __nvvm_read_ptx_sreg_cluster_nctaid_y(),
610 __nvvm_read_ptx_sreg_cluster_nctaid_z());
611}
612
613__device__ inline dim3 __clusterRelativeBlockIdx() {
614 return dim3(__nvvm_read_ptx_sreg_cluster_ctaid_x(),
615 __nvvm_read_ptx_sreg_cluster_ctaid_y(),
616 __nvvm_read_ptx_sreg_cluster_ctaid_z());
617}
618
619__device__ inline dim3 __clusterGridDimInClusters() {
620 return dim3(__nvvm_read_ptx_sreg_nclusterid_x(),
621 __nvvm_read_ptx_sreg_nclusterid_y(),
622 __nvvm_read_ptx_sreg_nclusterid_z());
623}
624
625__device__ inline dim3 __clusterIdx() {
626 return dim3(__nvvm_read_ptx_sreg_clusterid_x(),
627 __nvvm_read_ptx_sreg_clusterid_y(),
628 __nvvm_read_ptx_sreg_clusterid_z());
629}
630
631__device__ inline unsigned __clusterRelativeBlockRank() {
632 return __nvvm_read_ptx_sreg_cluster_ctarank();
633}
634
635__device__ inline unsigned __clusterSizeInBlocks() {
636 return __nvvm_read_ptx_sreg_cluster_nctarank();
637}
638
639__device__ inline void __cluster_barrier_arrive() {
640 __nvvm_barrier_cluster_arrive();
641}
642
643__device__ inline void __cluster_barrier_arrive_relaxed() {
644 __nvvm_barrier_cluster_arrive_relaxed();
645}
646
647__device__ inline void __cluster_barrier_wait() {
648 __nvvm_barrier_cluster_wait();
649}
650
651__device__ inline void __threadfence_cluster() { __nvvm_fence_sc_cluster(); }
652
653__device__ inline float2 atomicAdd(float2 *__ptr, float2 __val) {
654 float2 __ret;
655 __asm__("atom.add.v2.f32 {%0, %1}, [%2], {%3, %4};"
656 : "=f"(__ret.x), "=f"(__ret.y)
657 : "l"(__ptr), "f"(__val.x), "f"(__val.y));
658 return __ret;
659}
660
661__device__ inline float2 atomicAdd_block(float2 *__ptr, float2 __val) {
662 float2 __ret;
663 __asm__("atom.cta.add.v2.f32 {%0, %1}, [%2], {%3, %4};"
664 : "=f"(__ret.x), "=f"(__ret.y)
665 : "l"(__ptr), "f"(__val.x), "f"(__val.y));
666 return __ret;
667}
668
669__device__ inline float2 atomicAdd_system(float2 *__ptr, float2 __val) {
670 float2 __ret;
671 __asm__("atom.sys.add.v2.f32 {%0, %1}, [%2], {%3, %4};"
672 : "=f"(__ret.x), "=f"(__ret.y)
673 : "l"(__ptr), "f"(__val.x), "f"(__val.y));
674 return __ret;
675}
676
677__device__ inline float4 atomicAdd(float4 *__ptr, float4 __val) {
678 float4 __ret;
679 __asm__("atom.add.v4.f32 {%0, %1, %2, %3}, [%4], {%5, %6, %7, %8};"
680 : "=f"(__ret.x), "=f"(__ret.y), "=f"(__ret.z), "=f"(__ret.w)
681 : "l"(__ptr), "f"(__val.x), "f"(__val.y), "f"(__val.z), "f"(__val.w));
682 return __ret;
683}
684
685__device__ inline float4 atomicAdd_block(float4 *__ptr, float4 __val) {
686 float4 __ret;
687 __asm__(
688 "atom.cta.add.v4.f32 {%0, %1, %2, %3}, [%4], {%5, %6, %7, %8};"
689 : "=f"(__ret.x), "=f"(__ret.y), "=f"(__ret.z), "=f"(__ret.w)
690 : "l"(__ptr), "f"(__val.x), "f"(__val.y), "f"(__val.z), "f"(__val.w));
691 return __ret;
692}
693
694__device__ inline float4 atomicAdd_system(float4 *__ptr, float4 __val) {
695 float4 __ret;
696 __asm__(
697 "atom.sys.add.v4.f32 {%0, %1, %2, %3}, [%4], {%5, %6, %7, %8};"
698 : "=f"(__ret.x), "=f"(__ret.y), "=f"(__ret.z), "=f"(__ret.w)
699 : "l"(__ptr), "f"(__val.x), "f"(__val.y), "f"(__val.z), "f"(__val.w)
700 :);
701 return __ret;
702}
703
704#endif // !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 900
705#endif // CUDA_VERSION >= 11000
706
707#endif // defined(__CLANG_CUDA_INTRINSICS_H__)
lib/include/__clang_cuda_libdevice_declares.h deleted-468
...@@ -1,468 +0,0 @@
1/*===-- __clang_cuda_libdevice_declares.h - decls for libdevice functions --===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 *===-----------------------------------------------------------------------===
8 */
9
10#ifndef __CLANG_CUDA_LIBDEVICE_DECLARES_H__
11#define __CLANG_CUDA_LIBDEVICE_DECLARES_H__
12
13#if defined(__cplusplus)
14extern "C" {
15#endif
16
17#if defined(__OPENMP_NVPTX__)
18#define __DEVICE__
19#pragma omp begin assumes ext_spmd_amenable no_openmp
20#elif defined(__CUDA__)
21#define __DEVICE__ __device__
22#endif
23
24__DEVICE__ int __nv_abs(int __a);
25__DEVICE__ double __nv_acos(double __a);
26__DEVICE__ float __nv_acosf(float __a);
27__DEVICE__ double __nv_acosh(double __a);
28__DEVICE__ float __nv_acoshf(float __a);
29__DEVICE__ double __nv_asin(double __a);
30__DEVICE__ float __nv_asinf(float __a);
31__DEVICE__ double __nv_asinh(double __a);
32__DEVICE__ float __nv_asinhf(float __a);
33__DEVICE__ double __nv_atan2(double __a, double __b);
34__DEVICE__ float __nv_atan2f(float __a, float __b);
35__DEVICE__ double __nv_atan(double __a);
36__DEVICE__ float __nv_atanf(float __a);
37__DEVICE__ double __nv_atanh(double __a);
38__DEVICE__ float __nv_atanhf(float __a);
39__DEVICE__ int __nv_brev(int __a);
40__DEVICE__ long long __nv_brevll(long long __a);
41__DEVICE__ int __nv_byte_perm(int __a, int __b, int __c);
42__DEVICE__ double __nv_cbrt(double __a);
43__DEVICE__ float __nv_cbrtf(float __a);
44__DEVICE__ double __nv_ceil(double __a);
45__DEVICE__ float __nv_ceilf(float __a);
46__DEVICE__ int __nv_clz(int __a);
47__DEVICE__ int __nv_clzll(long long __a);
48__DEVICE__ double __nv_copysign(double __a, double __b);
49__DEVICE__ float __nv_copysignf(float __a, float __b);
50__DEVICE__ double __nv_cos(double __a);
51__DEVICE__ float __nv_cosf(float __a);
52__DEVICE__ double __nv_cosh(double __a);
53__DEVICE__ float __nv_coshf(float __a);
54__DEVICE__ double __nv_cospi(double __a);
55__DEVICE__ float __nv_cospif(float __a);
56__DEVICE__ double __nv_cyl_bessel_i0(double __a);
57__DEVICE__ float __nv_cyl_bessel_i0f(float __a);
58__DEVICE__ double __nv_cyl_bessel_i1(double __a);
59__DEVICE__ float __nv_cyl_bessel_i1f(float __a);
60__DEVICE__ double __nv_dadd_rd(double __a, double __b);
61__DEVICE__ double __nv_dadd_rn(double __a, double __b);
62__DEVICE__ double __nv_dadd_ru(double __a, double __b);
63__DEVICE__ double __nv_dadd_rz(double __a, double __b);
64__DEVICE__ double __nv_ddiv_rd(double __a, double __b);
65__DEVICE__ double __nv_ddiv_rn(double __a, double __b);
66__DEVICE__ double __nv_ddiv_ru(double __a, double __b);
67__DEVICE__ double __nv_ddiv_rz(double __a, double __b);
68__DEVICE__ double __nv_dmul_rd(double __a, double __b);
69__DEVICE__ double __nv_dmul_rn(double __a, double __b);
70__DEVICE__ double __nv_dmul_ru(double __a, double __b);
71__DEVICE__ double __nv_dmul_rz(double __a, double __b);
72__DEVICE__ float __nv_double2float_rd(double __a);
73__DEVICE__ float __nv_double2float_rn(double __a);
74__DEVICE__ float __nv_double2float_ru(double __a);
75__DEVICE__ float __nv_double2float_rz(double __a);
76__DEVICE__ int __nv_double2hiint(double __a);
77__DEVICE__ int __nv_double2int_rd(double __a);
78__DEVICE__ int __nv_double2int_rn(double __a);
79__DEVICE__ int __nv_double2int_ru(double __a);
80__DEVICE__ int __nv_double2int_rz(double __a);
81__DEVICE__ long long __nv_double2ll_rd(double __a);
82__DEVICE__ long long __nv_double2ll_rn(double __a);
83__DEVICE__ long long __nv_double2ll_ru(double __a);
84__DEVICE__ long long __nv_double2ll_rz(double __a);
85__DEVICE__ int __nv_double2loint(double __a);
86__DEVICE__ unsigned int __nv_double2uint_rd(double __a);
87__DEVICE__ unsigned int __nv_double2uint_rn(double __a);
88__DEVICE__ unsigned int __nv_double2uint_ru(double __a);
89__DEVICE__ unsigned int __nv_double2uint_rz(double __a);
90__DEVICE__ unsigned long long __nv_double2ull_rd(double __a);
91__DEVICE__ unsigned long long __nv_double2ull_rn(double __a);
92__DEVICE__ unsigned long long __nv_double2ull_ru(double __a);
93__DEVICE__ unsigned long long __nv_double2ull_rz(double __a);
94__DEVICE__ unsigned long long __nv_double_as_longlong(double __a);
95__DEVICE__ double __nv_drcp_rd(double __a);
96__DEVICE__ double __nv_drcp_rn(double __a);
97__DEVICE__ double __nv_drcp_ru(double __a);
98__DEVICE__ double __nv_drcp_rz(double __a);
99__DEVICE__ double __nv_dsqrt_rd(double __a);
100__DEVICE__ double __nv_dsqrt_rn(double __a);
101__DEVICE__ double __nv_dsqrt_ru(double __a);
102__DEVICE__ double __nv_dsqrt_rz(double __a);
103__DEVICE__ double __nv_dsub_rd(double __a, double __b);
104__DEVICE__ double __nv_dsub_rn(double __a, double __b);
105__DEVICE__ double __nv_dsub_ru(double __a, double __b);
106__DEVICE__ double __nv_dsub_rz(double __a, double __b);
107__DEVICE__ double __nv_erfc(double __a);
108__DEVICE__ float __nv_erfcf(float __a);
109__DEVICE__ double __nv_erfcinv(double __a);
110__DEVICE__ float __nv_erfcinvf(float __a);
111__DEVICE__ double __nv_erfcx(double __a);
112__DEVICE__ float __nv_erfcxf(float __a);
113__DEVICE__ double __nv_erf(double __a);
114__DEVICE__ float __nv_erff(float __a);
115__DEVICE__ double __nv_erfinv(double __a);
116__DEVICE__ float __nv_erfinvf(float __a);
117__DEVICE__ double __nv_exp10(double __a);
118__DEVICE__ float __nv_exp10f(float __a);
119__DEVICE__ double __nv_exp2(double __a);
120__DEVICE__ float __nv_exp2f(float __a);
121__DEVICE__ double __nv_exp(double __a);
122__DEVICE__ float __nv_expf(float __a);
123__DEVICE__ double __nv_expm1(double __a);
124__DEVICE__ float __nv_expm1f(float __a);
125__DEVICE__ double __nv_fabs(double __a);
126__DEVICE__ float __nv_fabsf(float __a);
127__DEVICE__ float __nv_fadd_rd(float __a, float __b);
128__DEVICE__ float __nv_fadd_rn(float __a, float __b);
129__DEVICE__ float __nv_fadd_ru(float __a, float __b);
130__DEVICE__ float __nv_fadd_rz(float __a, float __b);
131__DEVICE__ float __nv_fast_cosf(float __a);
132__DEVICE__ float __nv_fast_exp10f(float __a);
133__DEVICE__ float __nv_fast_expf(float __a);
134__DEVICE__ float __nv_fast_fdividef(float __a, float __b);
135__DEVICE__ float __nv_fast_log10f(float __a);
136__DEVICE__ float __nv_fast_log2f(float __a);
137__DEVICE__ float __nv_fast_logf(float __a);
138__DEVICE__ float __nv_fast_powf(float __a, float __b);
139__DEVICE__ void __nv_fast_sincosf(float __a, float *__s, float *__c);
140__DEVICE__ float __nv_fast_sinf(float __a);
141__DEVICE__ float __nv_fast_tanf(float __a);
142__DEVICE__ double __nv_fdim(double __a, double __b);
143__DEVICE__ float __nv_fdimf(float __a, float __b);
144__DEVICE__ float __nv_fdiv_rd(float __a, float __b);
145__DEVICE__ float __nv_fdiv_rn(float __a, float __b);
146__DEVICE__ float __nv_fdiv_ru(float __a, float __b);
147__DEVICE__ float __nv_fdiv_rz(float __a, float __b);
148__DEVICE__ int __nv_ffs(int __a);
149__DEVICE__ int __nv_ffsll(long long __a);
150__DEVICE__ int __nv_finitef(float __a);
151__DEVICE__ unsigned short __nv_float2half_rn(float __a);
152__DEVICE__ int __nv_float2int_rd(float __a);
153__DEVICE__ int __nv_float2int_rn(float __a);
154__DEVICE__ int __nv_float2int_ru(float __a);
155__DEVICE__ int __nv_float2int_rz(float __a);
156__DEVICE__ long long __nv_float2ll_rd(float __a);
157__DEVICE__ long long __nv_float2ll_rn(float __a);
158__DEVICE__ long long __nv_float2ll_ru(float __a);
159__DEVICE__ long long __nv_float2ll_rz(float __a);
160__DEVICE__ unsigned int __nv_float2uint_rd(float __a);
161__DEVICE__ unsigned int __nv_float2uint_rn(float __a);
162__DEVICE__ unsigned int __nv_float2uint_ru(float __a);
163__DEVICE__ unsigned int __nv_float2uint_rz(float __a);
164__DEVICE__ unsigned long long __nv_float2ull_rd(float __a);
165__DEVICE__ unsigned long long __nv_float2ull_rn(float __a);
166__DEVICE__ unsigned long long __nv_float2ull_ru(float __a);
167__DEVICE__ unsigned long long __nv_float2ull_rz(float __a);
168__DEVICE__ int __nv_float_as_int(float __a);
169__DEVICE__ unsigned int __nv_float_as_uint(float __a);
170__DEVICE__ double __nv_floor(double __a);
171__DEVICE__ float __nv_floorf(float __a);
172__DEVICE__ double __nv_fma(double __a, double __b, double __c);
173__DEVICE__ float __nv_fmaf(float __a, float __b, float __c);
174__DEVICE__ float __nv_fmaf_ieee_rd(float __a, float __b, float __c);
175__DEVICE__ float __nv_fmaf_ieee_rn(float __a, float __b, float __c);
176__DEVICE__ float __nv_fmaf_ieee_ru(float __a, float __b, float __c);
177__DEVICE__ float __nv_fmaf_ieee_rz(float __a, float __b, float __c);
178__DEVICE__ float __nv_fmaf_rd(float __a, float __b, float __c);
179__DEVICE__ float __nv_fmaf_rn(float __a, float __b, float __c);
180__DEVICE__ float __nv_fmaf_ru(float __a, float __b, float __c);
181__DEVICE__ float __nv_fmaf_rz(float __a, float __b, float __c);
182__DEVICE__ double __nv_fma_rd(double __a, double __b, double __c);
183__DEVICE__ double __nv_fma_rn(double __a, double __b, double __c);
184__DEVICE__ double __nv_fma_ru(double __a, double __b, double __c);
185__DEVICE__ double __nv_fma_rz(double __a, double __b, double __c);
186__DEVICE__ double __nv_fmax(double __a, double __b);
187__DEVICE__ float __nv_fmaxf(float __a, float __b);
188__DEVICE__ double __nv_fmin(double __a, double __b);
189__DEVICE__ float __nv_fminf(float __a, float __b);
190__DEVICE__ double __nv_fmod(double __a, double __b);
191__DEVICE__ float __nv_fmodf(float __a, float __b);
192__DEVICE__ float __nv_fmul_rd(float __a, float __b);
193__DEVICE__ float __nv_fmul_rn(float __a, float __b);
194__DEVICE__ float __nv_fmul_ru(float __a, float __b);
195__DEVICE__ float __nv_fmul_rz(float __a, float __b);
196__DEVICE__ float __nv_frcp_rd(float __a);
197__DEVICE__ float __nv_frcp_rn(float __a);
198__DEVICE__ float __nv_frcp_ru(float __a);
199__DEVICE__ float __nv_frcp_rz(float __a);
200__DEVICE__ double __nv_frexp(double __a, int *__b);
201__DEVICE__ float __nv_frexpf(float __a, int *__b);
202__DEVICE__ float __nv_frsqrt_rn(float __a);
203__DEVICE__ float __nv_fsqrt_rd(float __a);
204__DEVICE__ float __nv_fsqrt_rn(float __a);
205__DEVICE__ float __nv_fsqrt_ru(float __a);
206__DEVICE__ float __nv_fsqrt_rz(float __a);
207__DEVICE__ float __nv_fsub_rd(float __a, float __b);
208__DEVICE__ float __nv_fsub_rn(float __a, float __b);
209__DEVICE__ float __nv_fsub_ru(float __a, float __b);
210__DEVICE__ float __nv_fsub_rz(float __a, float __b);
211__DEVICE__ int __nv_hadd(int __a, int __b);
212__DEVICE__ float __nv_half2float(unsigned short __h);
213__DEVICE__ double __nv_hiloint2double(int __a, int __b);
214__DEVICE__ double __nv_hypot(double __a, double __b);
215__DEVICE__ float __nv_hypotf(float __a, float __b);
216__DEVICE__ int __nv_ilogb(double __a);
217__DEVICE__ int __nv_ilogbf(float __a);
218__DEVICE__ double __nv_int2double_rn(int __a);
219__DEVICE__ float __nv_int2float_rd(int __a);
220__DEVICE__ float __nv_int2float_rn(int __a);
221__DEVICE__ float __nv_int2float_ru(int __a);
222__DEVICE__ float __nv_int2float_rz(int __a);
223__DEVICE__ float __nv_int_as_float(int __a);
224__DEVICE__ int __nv_isfinited(double __a);
225__DEVICE__ int __nv_isinfd(double __a);
226__DEVICE__ int __nv_isinff(float __a);
227__DEVICE__ int __nv_isnand(double __a);
228__DEVICE__ int __nv_isnanf(float __a);
229__DEVICE__ double __nv_j0(double __a);
230__DEVICE__ float __nv_j0f(float __a);
231__DEVICE__ double __nv_j1(double __a);
232__DEVICE__ float __nv_j1f(float __a);
233__DEVICE__ float __nv_jnf(int __a, float __b);
234__DEVICE__ double __nv_jn(int __a, double __b);
235__DEVICE__ double __nv_ldexp(double __a, int __b);
236__DEVICE__ float __nv_ldexpf(float __a, int __b);
237__DEVICE__ double __nv_lgamma(double __a);
238__DEVICE__ float __nv_lgammaf(float __a);
239__DEVICE__ double __nv_ll2double_rd(long long __a);
240__DEVICE__ double __nv_ll2double_rn(long long __a);
241__DEVICE__ double __nv_ll2double_ru(long long __a);
242__DEVICE__ double __nv_ll2double_rz(long long __a);
243__DEVICE__ float __nv_ll2float_rd(long long __a);
244__DEVICE__ float __nv_ll2float_rn(long long __a);
245__DEVICE__ float __nv_ll2float_ru(long long __a);
246__DEVICE__ float __nv_ll2float_rz(long long __a);
247__DEVICE__ long long __nv_llabs(long long __a);
248__DEVICE__ long long __nv_llmax(long long __a, long long __b);
249__DEVICE__ long long __nv_llmin(long long __a, long long __b);
250__DEVICE__ long long __nv_llrint(double __a);
251__DEVICE__ long long __nv_llrintf(float __a);
252__DEVICE__ long long __nv_llround(double __a);
253__DEVICE__ long long __nv_llroundf(float __a);
254__DEVICE__ double __nv_log10(double __a);
255__DEVICE__ float __nv_log10f(float __a);
256__DEVICE__ double __nv_log1p(double __a);
257__DEVICE__ float __nv_log1pf(float __a);
258__DEVICE__ double __nv_log2(double __a);
259__DEVICE__ float __nv_log2f(float __a);
260__DEVICE__ double __nv_logb(double __a);
261__DEVICE__ float __nv_logbf(float __a);
262__DEVICE__ double __nv_log(double __a);
263__DEVICE__ float __nv_logf(float __a);
264__DEVICE__ double __nv_longlong_as_double(long long __a);
265__DEVICE__ int __nv_max(int __a, int __b);
266__DEVICE__ int __nv_min(int __a, int __b);
267__DEVICE__ double __nv_modf(double __a, double *__b);
268__DEVICE__ float __nv_modff(float __a, float *__b);
269__DEVICE__ int __nv_mul24(int __a, int __b);
270__DEVICE__ long long __nv_mul64hi(long long __a, long long __b);
271__DEVICE__ int __nv_mulhi(int __a, int __b);
272__DEVICE__ double __nv_nan(const signed char *__a);
273__DEVICE__ float __nv_nanf(const signed char *__a);
274__DEVICE__ double __nv_nearbyint(double __a);
275__DEVICE__ float __nv_nearbyintf(float __a);
276__DEVICE__ double __nv_nextafter(double __a, double __b);
277__DEVICE__ float __nv_nextafterf(float __a, float __b);
278__DEVICE__ double __nv_norm3d(double __a, double __b, double __c);
279__DEVICE__ float __nv_norm3df(float __a, float __b, float __c);
280__DEVICE__ double __nv_norm4d(double __a, double __b, double __c, double __d);
281__DEVICE__ float __nv_norm4df(float __a, float __b, float __c, float __d);
282__DEVICE__ double __nv_normcdf(double __a);
283__DEVICE__ float __nv_normcdff(float __a);
284__DEVICE__ double __nv_normcdfinv(double __a);
285__DEVICE__ float __nv_normcdfinvf(float __a);
286__DEVICE__ float __nv_normf(int __a, const float *__b);
287__DEVICE__ double __nv_norm(int __a, const double *__b);
288__DEVICE__ int __nv_popc(unsigned int __a);
289__DEVICE__ int __nv_popcll(unsigned long long __a);
290__DEVICE__ double __nv_pow(double __a, double __b);
291__DEVICE__ float __nv_powf(float __a, float __b);
292__DEVICE__ double __nv_powi(double __a, int __b);
293__DEVICE__ float __nv_powif(float __a, int __b);
294__DEVICE__ double __nv_rcbrt(double __a);
295__DEVICE__ float __nv_rcbrtf(float __a);
296__DEVICE__ double __nv_rcp64h(double __a);
297__DEVICE__ double __nv_remainder(double __a, double __b);
298__DEVICE__ float __nv_remainderf(float __a, float __b);
299__DEVICE__ double __nv_remquo(double __a, double __b, int *__c);
300__DEVICE__ float __nv_remquof(float __a, float __b, int *__c);
301__DEVICE__ int __nv_rhadd(int __a, int __b);
302__DEVICE__ double __nv_rhypot(double __a, double __b);
303__DEVICE__ float __nv_rhypotf(float __a, float __b);
304__DEVICE__ double __nv_rint(double __a);
305__DEVICE__ float __nv_rintf(float __a);
306__DEVICE__ double __nv_rnorm3d(double __a, double __b, double __c);
307__DEVICE__ float __nv_rnorm3df(float __a, float __b, float __c);
308__DEVICE__ double __nv_rnorm4d(double __a, double __b, double __c, double __d);
309__DEVICE__ float __nv_rnorm4df(float __a, float __b, float __c, float __d);
310__DEVICE__ float __nv_rnormf(int __a, const float *__b);
311__DEVICE__ double __nv_rnorm(int __a, const double *__b);
312__DEVICE__ double __nv_round(double __a);
313__DEVICE__ float __nv_roundf(float __a);
314__DEVICE__ double __nv_rsqrt(double __a);
315__DEVICE__ float __nv_rsqrtf(float __a);
316__DEVICE__ int __nv_sad(int __a, int __b, int __c);
317__DEVICE__ float __nv_saturatef(float __a);
318__DEVICE__ double __nv_scalbn(double __a, int __b);
319__DEVICE__ float __nv_scalbnf(float __a, int __b);
320__DEVICE__ int __nv_signbitd(double __a);
321__DEVICE__ int __nv_signbitf(float __a);
322__DEVICE__ void __nv_sincos(double __a, double *__b, double *__c);
323__DEVICE__ void __nv_sincosf(float __a, float *__b, float *__c);
324__DEVICE__ void __nv_sincospi(double __a, double *__b, double *__c);
325__DEVICE__ void __nv_sincospif(float __a, float *__b, float *__c);
326__DEVICE__ double __nv_sin(double __a);
327__DEVICE__ float __nv_sinf(float __a);
328__DEVICE__ double __nv_sinh(double __a);
329__DEVICE__ float __nv_sinhf(float __a);
330__DEVICE__ double __nv_sinpi(double __a);
331__DEVICE__ float __nv_sinpif(float __a);
332__DEVICE__ double __nv_sqrt(double __a);
333__DEVICE__ float __nv_sqrtf(float __a);
334__DEVICE__ double __nv_tan(double __a);
335__DEVICE__ float __nv_tanf(float __a);
336__DEVICE__ double __nv_tanh(double __a);
337__DEVICE__ float __nv_tanhf(float __a);
338__DEVICE__ double __nv_tgamma(double __a);
339__DEVICE__ float __nv_tgammaf(float __a);
340__DEVICE__ double __nv_trunc(double __a);
341__DEVICE__ float __nv_truncf(float __a);
342__DEVICE__ int __nv_uhadd(unsigned int __a, unsigned int __b);
343__DEVICE__ double __nv_uint2double_rn(unsigned int __i);
344__DEVICE__ float __nv_uint2float_rd(unsigned int __a);
345__DEVICE__ float __nv_uint2float_rn(unsigned int __a);
346__DEVICE__ float __nv_uint2float_ru(unsigned int __a);
347__DEVICE__ float __nv_uint2float_rz(unsigned int __a);
348__DEVICE__ float __nv_uint_as_float(unsigned int __a);
349__DEVICE__ double __nv_ull2double_rd(unsigned long long __a);
350__DEVICE__ double __nv_ull2double_rn(unsigned long long __a);
351__DEVICE__ double __nv_ull2double_ru(unsigned long long __a);
352__DEVICE__ double __nv_ull2double_rz(unsigned long long __a);
353__DEVICE__ float __nv_ull2float_rd(unsigned long long __a);
354__DEVICE__ float __nv_ull2float_rn(unsigned long long __a);
355__DEVICE__ float __nv_ull2float_ru(unsigned long long __a);
356__DEVICE__ float __nv_ull2float_rz(unsigned long long __a);
357__DEVICE__ unsigned long long __nv_ullmax(unsigned long long __a,
358 unsigned long long __b);
359__DEVICE__ unsigned long long __nv_ullmin(unsigned long long __a,
360 unsigned long long __b);
361__DEVICE__ unsigned int __nv_umax(unsigned int __a, unsigned int __b);
362__DEVICE__ unsigned int __nv_umin(unsigned int __a, unsigned int __b);
363__DEVICE__ unsigned int __nv_umul24(unsigned int __a, unsigned int __b);
364__DEVICE__ unsigned long long __nv_umul64hi(unsigned long long __a,
365 unsigned long long __b);
366__DEVICE__ unsigned int __nv_umulhi(unsigned int __a, unsigned int __b);
367__DEVICE__ unsigned int __nv_urhadd(unsigned int __a, unsigned int __b);
368__DEVICE__ unsigned int __nv_usad(unsigned int __a, unsigned int __b,
369 unsigned int __c);
370#if CUDA_VERSION >= 9000 && CUDA_VERSION < 9020
371__DEVICE__ int __nv_vabs2(int __a);
372__DEVICE__ int __nv_vabs4(int __a);
373__DEVICE__ int __nv_vabsdiffs2(int __a, int __b);
374__DEVICE__ int __nv_vabsdiffs4(int __a, int __b);
375__DEVICE__ int __nv_vabsdiffu2(int __a, int __b);
376__DEVICE__ int __nv_vabsdiffu4(int __a, int __b);
377__DEVICE__ int __nv_vabsss2(int __a);
378__DEVICE__ int __nv_vabsss4(int __a);
379__DEVICE__ int __nv_vadd2(int __a, int __b);
380__DEVICE__ int __nv_vadd4(int __a, int __b);
381__DEVICE__ int __nv_vaddss2(int __a, int __b);
382__DEVICE__ int __nv_vaddss4(int __a, int __b);
383__DEVICE__ int __nv_vaddus2(int __a, int __b);
384__DEVICE__ int __nv_vaddus4(int __a, int __b);
385__DEVICE__ int __nv_vavgs2(int __a, int __b);
386__DEVICE__ int __nv_vavgs4(int __a, int __b);
387__DEVICE__ int __nv_vavgu2(int __a, int __b);
388__DEVICE__ int __nv_vavgu4(int __a, int __b);
389__DEVICE__ int __nv_vcmpeq2(int __a, int __b);
390__DEVICE__ int __nv_vcmpeq4(int __a, int __b);
391__DEVICE__ int __nv_vcmpges2(int __a, int __b);
392__DEVICE__ int __nv_vcmpges4(int __a, int __b);
393__DEVICE__ int __nv_vcmpgeu2(int __a, int __b);
394__DEVICE__ int __nv_vcmpgeu4(int __a, int __b);
395__DEVICE__ int __nv_vcmpgts2(int __a, int __b);
396__DEVICE__ int __nv_vcmpgts4(int __a, int __b);
397__DEVICE__ int __nv_vcmpgtu2(int __a, int __b);
398__DEVICE__ int __nv_vcmpgtu4(int __a, int __b);
399__DEVICE__ int __nv_vcmples2(int __a, int __b);
400__DEVICE__ int __nv_vcmples4(int __a, int __b);
401__DEVICE__ int __nv_vcmpleu2(int __a, int __b);
402__DEVICE__ int __nv_vcmpleu4(int __a, int __b);
403__DEVICE__ int __nv_vcmplts2(int __a, int __b);
404__DEVICE__ int __nv_vcmplts4(int __a, int __b);
405__DEVICE__ int __nv_vcmpltu2(int __a, int __b);
406__DEVICE__ int __nv_vcmpltu4(int __a, int __b);
407__DEVICE__ int __nv_vcmpne2(int __a, int __b);
408__DEVICE__ int __nv_vcmpne4(int __a, int __b);
409__DEVICE__ int __nv_vhaddu2(int __a, int __b);
410__DEVICE__ int __nv_vhaddu4(int __a, int __b);
411__DEVICE__ int __nv_vmaxs2(int __a, int __b);
412__DEVICE__ int __nv_vmaxs4(int __a, int __b);
413__DEVICE__ int __nv_vmaxu2(int __a, int __b);
414__DEVICE__ int __nv_vmaxu4(int __a, int __b);
415__DEVICE__ int __nv_vmins2(int __a, int __b);
416__DEVICE__ int __nv_vmins4(int __a, int __b);
417__DEVICE__ int __nv_vminu2(int __a, int __b);
418__DEVICE__ int __nv_vminu4(int __a, int __b);
419__DEVICE__ int __nv_vneg2(int __a);
420__DEVICE__ int __nv_vneg4(int __a);
421__DEVICE__ int __nv_vnegss2(int __a);
422__DEVICE__ int __nv_vnegss4(int __a);
423__DEVICE__ int __nv_vsads2(int __a, int __b);
424__DEVICE__ int __nv_vsads4(int __a, int __b);
425__DEVICE__ int __nv_vsadu2(int __a, int __b);
426__DEVICE__ int __nv_vsadu4(int __a, int __b);
427__DEVICE__ int __nv_vseteq2(int __a, int __b);
428__DEVICE__ int __nv_vseteq4(int __a, int __b);
429__DEVICE__ int __nv_vsetges2(int __a, int __b);
430__DEVICE__ int __nv_vsetges4(int __a, int __b);
431__DEVICE__ int __nv_vsetgeu2(int __a, int __b);
432__DEVICE__ int __nv_vsetgeu4(int __a, int __b);
433__DEVICE__ int __nv_vsetgts2(int __a, int __b);
434__DEVICE__ int __nv_vsetgts4(int __a, int __b);
435__DEVICE__ int __nv_vsetgtu2(int __a, int __b);
436__DEVICE__ int __nv_vsetgtu4(int __a, int __b);
437__DEVICE__ int __nv_vsetles2(int __a, int __b);
438__DEVICE__ int __nv_vsetles4(int __a, int __b);
439__DEVICE__ int __nv_vsetleu2(int __a, int __b);
440__DEVICE__ int __nv_vsetleu4(int __a, int __b);
441__DEVICE__ int __nv_vsetlts2(int __a, int __b);
442__DEVICE__ int __nv_vsetlts4(int __a, int __b);
443__DEVICE__ int __nv_vsetltu2(int __a, int __b);
444__DEVICE__ int __nv_vsetltu4(int __a, int __b);
445__DEVICE__ int __nv_vsetne2(int __a, int __b);
446__DEVICE__ int __nv_vsetne4(int __a, int __b);
447__DEVICE__ int __nv_vsub2(int __a, int __b);
448__DEVICE__ int __nv_vsub4(int __a, int __b);
449__DEVICE__ int __nv_vsubss2(int __a, int __b);
450__DEVICE__ int __nv_vsubss4(int __a, int __b);
451__DEVICE__ int __nv_vsubus2(int __a, int __b);
452__DEVICE__ int __nv_vsubus4(int __a, int __b);
453#endif // CUDA_VERSION
454__DEVICE__ double __nv_y0(double __a);
455__DEVICE__ float __nv_y0f(float __a);
456__DEVICE__ double __nv_y1(double __a);
457__DEVICE__ float __nv_y1f(float __a);
458__DEVICE__ float __nv_ynf(int __a, float __b);
459__DEVICE__ double __nv_yn(int __a, double __b);
460
461#if defined(__OPENMP_NVPTX__)
462#pragma omp end assumes ext_spmd_amenable no_openmp
463#endif
464
465#if defined(__cplusplus)
466} // extern "C"
467#endif
468#endif // __CLANG_CUDA_LIBDEVICE_DECLARES_H__
lib/include/__clang_cuda_math.h deleted-348
...@@ -1,348 +0,0 @@
1/*===---- __clang_cuda_math.h - Device-side CUDA math support --------------===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 *===-----------------------------------------------------------------------===
8 */
9#ifndef __CLANG_CUDA_MATH_H__
10#define __CLANG_CUDA_MATH_H__
11#ifndef __CUDA__
12#error "This file is for CUDA compilation only."
13#endif
14
15#ifndef __OPENMP_NVPTX__
16#if CUDA_VERSION < 9000
17#error This file is intended to be used with CUDA-9+ only.
18#endif
19#endif
20
21// __DEVICE__ is a helper macro with common set of attributes for the wrappers
22// we implement in this file. We need static in order to avoid emitting unused
23// functions and __forceinline__ helps inlining these wrappers at -O1.
24#pragma push_macro("__DEVICE__")
25#ifdef __OPENMP_NVPTX__
26#if defined(__cplusplus)
27#define __DEVICE__ static constexpr __attribute__((always_inline, nothrow))
28#else
29#define __DEVICE__ static __attribute__((always_inline, nothrow))
30#endif
31#else
32#define __DEVICE__ static __device__ __forceinline__
33#endif
34
35// Specialized version of __DEVICE__ for functions with void return type. Needed
36// because the OpenMP overlay requires constexpr functions here but prior to
37// c++14 void return functions could not be constexpr.
38#pragma push_macro("__DEVICE_VOID__")
39#if defined(__OPENMP_NVPTX__) && defined(__cplusplus) && __cplusplus < 201402L
40#define __DEVICE_VOID__ static __attribute__((always_inline, nothrow))
41#else
42#define __DEVICE_VOID__ __DEVICE__
43#endif
44
45// libdevice provides fast low precision and slow full-recision implementations
46// for some functions. Which one gets selected depends on
47// __CLANG_CUDA_APPROX_TRANSCENDENTALS__ which gets defined by clang if
48// -ffast-math or -fgpu-approx-transcendentals are in effect.
49#pragma push_macro("__FAST_OR_SLOW")
50#if defined(__CLANG_GPU_APPROX_TRANSCENDENTALS__)
51#define __FAST_OR_SLOW(fast, slow) fast
52#else
53#define __FAST_OR_SLOW(fast, slow) slow
54#endif
55
56__DEVICE__ int abs(int __a) { return __nv_abs(__a); }
57__DEVICE__ double fabs(double __a) { return __nv_fabs(__a); }
58__DEVICE__ double acos(double __a) { return __nv_acos(__a); }
59__DEVICE__ float acosf(float __a) { return __nv_acosf(__a); }
60__DEVICE__ double acosh(double __a) { return __nv_acosh(__a); }
61__DEVICE__ float acoshf(float __a) { return __nv_acoshf(__a); }
62__DEVICE__ double asin(double __a) { return __nv_asin(__a); }
63__DEVICE__ float asinf(float __a) { return __nv_asinf(__a); }
64__DEVICE__ double asinh(double __a) { return __nv_asinh(__a); }
65__DEVICE__ float asinhf(float __a) { return __nv_asinhf(__a); }
66__DEVICE__ double atan(double __a) { return __nv_atan(__a); }
67__DEVICE__ double atan2(double __a, double __b) { return __nv_atan2(__a, __b); }
68__DEVICE__ float atan2f(float __a, float __b) { return __nv_atan2f(__a, __b); }
69__DEVICE__ float atanf(float __a) { return __nv_atanf(__a); }
70__DEVICE__ double atanh(double __a) { return __nv_atanh(__a); }
71__DEVICE__ float atanhf(float __a) { return __nv_atanhf(__a); }
72__DEVICE__ double cbrt(double __a) { return __nv_cbrt(__a); }
73__DEVICE__ float cbrtf(float __a) { return __nv_cbrtf(__a); }
74__DEVICE__ double ceil(double __a) { return __nv_ceil(__a); }
75__DEVICE__ float ceilf(float __a) { return __nv_ceilf(__a); }
76__DEVICE__ double copysign(double __a, double __b) {
77 return __nv_copysign(__a, __b);
78}
79__DEVICE__ float copysignf(float __a, float __b) {
80 return __nv_copysignf(__a, __b);
81}
82__DEVICE__ double cos(double __a) { return __nv_cos(__a); }
83__DEVICE__ float cosf(float __a) {
84 return __FAST_OR_SLOW(__nv_fast_cosf, __nv_cosf)(__a);
85}
86__DEVICE__ double cosh(double __a) { return __nv_cosh(__a); }
87__DEVICE__ float coshf(float __a) { return __nv_coshf(__a); }
88__DEVICE__ double cospi(double __a) { return __nv_cospi(__a); }
89__DEVICE__ float cospif(float __a) { return __nv_cospif(__a); }
90__DEVICE__ double cyl_bessel_i0(double __a) { return __nv_cyl_bessel_i0(__a); }
91__DEVICE__ float cyl_bessel_i0f(float __a) { return __nv_cyl_bessel_i0f(__a); }
92__DEVICE__ double cyl_bessel_i1(double __a) { return __nv_cyl_bessel_i1(__a); }
93__DEVICE__ float cyl_bessel_i1f(float __a) { return __nv_cyl_bessel_i1f(__a); }
94__DEVICE__ double erf(double __a) { return __nv_erf(__a); }
95__DEVICE__ double erfc(double __a) { return __nv_erfc(__a); }
96__DEVICE__ float erfcf(float __a) { return __nv_erfcf(__a); }
97__DEVICE__ double erfcinv(double __a) { return __nv_erfcinv(__a); }
98__DEVICE__ float erfcinvf(float __a) { return __nv_erfcinvf(__a); }
99__DEVICE__ double erfcx(double __a) { return __nv_erfcx(__a); }
100__DEVICE__ float erfcxf(float __a) { return __nv_erfcxf(__a); }
101__DEVICE__ float erff(float __a) { return __nv_erff(__a); }
102__DEVICE__ double erfinv(double __a) { return __nv_erfinv(__a); }
103__DEVICE__ float erfinvf(float __a) { return __nv_erfinvf(__a); }
104__DEVICE__ double exp(double __a) { return __nv_exp(__a); }
105__DEVICE__ double exp10(double __a) { return __nv_exp10(__a); }
106__DEVICE__ float exp10f(float __a) { return __nv_exp10f(__a); }
107__DEVICE__ double exp2(double __a) { return __nv_exp2(__a); }
108__DEVICE__ float exp2f(float __a) { return __nv_exp2f(__a); }
109__DEVICE__ float expf(float __a) { return __nv_expf(__a); }
110__DEVICE__ double expm1(double __a) { return __nv_expm1(__a); }
111__DEVICE__ float expm1f(float __a) { return __nv_expm1f(__a); }
112__DEVICE__ float fabsf(float __a) { return __nv_fabsf(__a); }
113__DEVICE__ double fdim(double __a, double __b) { return __nv_fdim(__a, __b); }
114__DEVICE__ float fdimf(float __a, float __b) { return __nv_fdimf(__a, __b); }
115__DEVICE__ double fdivide(double __a, double __b) { return __a / __b; }
116__DEVICE__ float fdividef(float __a, float __b) {
117#if __FAST_MATH__ && !__CUDA_PREC_DIV
118 return __nv_fast_fdividef(__a, __b);
119#else
120 return __a / __b;
121#endif
122}
123__DEVICE__ double floor(double __f) { return __nv_floor(__f); }
124__DEVICE__ float floorf(float __f) { return __nv_floorf(__f); }
125__DEVICE__ double fma(double __a, double __b, double __c) {
126 return __nv_fma(__a, __b, __c);
127}
128__DEVICE__ float fmaf(float __a, float __b, float __c) {
129 return __nv_fmaf(__a, __b, __c);
130}
131__DEVICE__ double fmax(double __a, double __b) { return __nv_fmax(__a, __b); }
132__DEVICE__ float fmaxf(float __a, float __b) { return __nv_fmaxf(__a, __b); }
133__DEVICE__ double fmin(double __a, double __b) { return __nv_fmin(__a, __b); }
134__DEVICE__ float fminf(float __a, float __b) { return __nv_fminf(__a, __b); }
135__DEVICE__ double fmod(double __a, double __b) { return __nv_fmod(__a, __b); }
136__DEVICE__ float fmodf(float __a, float __b) { return __nv_fmodf(__a, __b); }
137__DEVICE__ double frexp(double __a, int *__b) { return __nv_frexp(__a, __b); }
138__DEVICE__ float frexpf(float __a, int *__b) { return __nv_frexpf(__a, __b); }
139__DEVICE__ double hypot(double __a, double __b) { return __nv_hypot(__a, __b); }
140__DEVICE__ float hypotf(float __a, float __b) { return __nv_hypotf(__a, __b); }
141__DEVICE__ int ilogb(double __a) { return __nv_ilogb(__a); }
142__DEVICE__ int ilogbf(float __a) { return __nv_ilogbf(__a); }
143__DEVICE__ double j0(double __a) { return __nv_j0(__a); }
144__DEVICE__ float j0f(float __a) { return __nv_j0f(__a); }
145__DEVICE__ double j1(double __a) { return __nv_j1(__a); }
146__DEVICE__ float j1f(float __a) { return __nv_j1f(__a); }
147__DEVICE__ double jn(int __n, double __a) { return __nv_jn(__n, __a); }
148__DEVICE__ float jnf(int __n, float __a) { return __nv_jnf(__n, __a); }
149#if defined(__LP64__) || defined(_WIN64)
150__DEVICE__ long labs(long __a) { return __nv_llabs(__a); };
151#else
152__DEVICE__ long labs(long __a) { return __nv_abs(__a); };
153#endif
154__DEVICE__ double ldexp(double __a, int __b) { return __nv_ldexp(__a, __b); }
155__DEVICE__ float ldexpf(float __a, int __b) { return __nv_ldexpf(__a, __b); }
156__DEVICE__ double lgamma(double __a) { return __nv_lgamma(__a); }
157__DEVICE__ float lgammaf(float __a) { return __nv_lgammaf(__a); }
158__DEVICE__ long long llabs(long long __a) { return __nv_llabs(__a); }
159__DEVICE__ long long llmax(long long __a, long long __b) {
160 return __nv_llmax(__a, __b);
161}
162__DEVICE__ long long llmin(long long __a, long long __b) {
163 return __nv_llmin(__a, __b);
164}
165__DEVICE__ long long llrint(double __a) { return __nv_llrint(__a); }
166__DEVICE__ long long llrintf(float __a) { return __nv_llrintf(__a); }
167__DEVICE__ long long llround(double __a) { return __nv_llround(__a); }
168__DEVICE__ long long llroundf(float __a) { return __nv_llroundf(__a); }
169__DEVICE__ double round(double __a) { return __nv_round(__a); }
170__DEVICE__ float roundf(float __a) { return __nv_roundf(__a); }
171__DEVICE__ double log(double __a) { return __nv_log(__a); }
172__DEVICE__ double log10(double __a) { return __nv_log10(__a); }
173__DEVICE__ float log10f(float __a) { return __nv_log10f(__a); }
174__DEVICE__ double log1p(double __a) { return __nv_log1p(__a); }
175__DEVICE__ float log1pf(float __a) { return __nv_log1pf(__a); }
176__DEVICE__ double log2(double __a) { return __nv_log2(__a); }
177__DEVICE__ float log2f(float __a) {
178 return __FAST_OR_SLOW(__nv_fast_log2f, __nv_log2f)(__a);
179}
180__DEVICE__ double logb(double __a) { return __nv_logb(__a); }
181__DEVICE__ float logbf(float __a) { return __nv_logbf(__a); }
182__DEVICE__ float logf(float __a) {
183 return __FAST_OR_SLOW(__nv_fast_logf, __nv_logf)(__a);
184}
185#if defined(__LP64__) || defined(_WIN64)
186__DEVICE__ long lrint(double __a) { return llrint(__a); }
187__DEVICE__ long lrintf(float __a) { return __float2ll_rn(__a); }
188__DEVICE__ long lround(double __a) { return llround(__a); }
189__DEVICE__ long lroundf(float __a) { return llroundf(__a); }
190#else
191__DEVICE__ long lrint(double __a) { return (long)rint(__a); }
192__DEVICE__ long lrintf(float __a) { return __float2int_rn(__a); }
193__DEVICE__ long lround(double __a) { return round(__a); }
194__DEVICE__ long lroundf(float __a) { return roundf(__a); }
195#endif
196__DEVICE__ int max(int __a, int __b) { return __nv_max(__a, __b); }
197__DEVICE__ int min(int __a, int __b) { return __nv_min(__a, __b); }
198__DEVICE__ double modf(double __a, double *__b) { return __nv_modf(__a, __b); }
199__DEVICE__ float modff(float __a, float *__b) { return __nv_modff(__a, __b); }
200__DEVICE__ double nearbyint(double __a) { return __builtin_nearbyint(__a); }
201__DEVICE__ float nearbyintf(float __a) { return __builtin_nearbyintf(__a); }
202__DEVICE__ double nextafter(double __a, double __b) {
203 return __nv_nextafter(__a, __b);
204}
205__DEVICE__ float nextafterf(float __a, float __b) {
206 return __nv_nextafterf(__a, __b);
207}
208__DEVICE__ double norm(int __dim, const double *__t) {
209 return __nv_norm(__dim, __t);
210}
211__DEVICE__ double norm3d(double __a, double __b, double __c) {
212 return __nv_norm3d(__a, __b, __c);
213}
214__DEVICE__ float norm3df(float __a, float __b, float __c) {
215 return __nv_norm3df(__a, __b, __c);
216}
217__DEVICE__ double norm4d(double __a, double __b, double __c, double __d) {
218 return __nv_norm4d(__a, __b, __c, __d);
219}
220__DEVICE__ float norm4df(float __a, float __b, float __c, float __d) {
221 return __nv_norm4df(__a, __b, __c, __d);
222}
223__DEVICE__ double normcdf(double __a) { return __nv_normcdf(__a); }
224__DEVICE__ float normcdff(float __a) { return __nv_normcdff(__a); }
225__DEVICE__ double normcdfinv(double __a) { return __nv_normcdfinv(__a); }
226__DEVICE__ float normcdfinvf(float __a) { return __nv_normcdfinvf(__a); }
227__DEVICE__ float normf(int __dim, const float *__t) {
228 return __nv_normf(__dim, __t);
229}
230__DEVICE__ double pow(double __a, double __b) { return __nv_pow(__a, __b); }
231__DEVICE__ float powf(float __a, float __b) { return __nv_powf(__a, __b); }
232__DEVICE__ double powi(double __a, int __b) { return __nv_powi(__a, __b); }
233__DEVICE__ float powif(float __a, int __b) { return __nv_powif(__a, __b); }
234__DEVICE__ double rcbrt(double __a) { return __nv_rcbrt(__a); }
235__DEVICE__ float rcbrtf(float __a) { return __nv_rcbrtf(__a); }
236__DEVICE__ double remainder(double __a, double __b) {
237 return __nv_remainder(__a, __b);
238}
239__DEVICE__ float remainderf(float __a, float __b) {
240 return __nv_remainderf(__a, __b);
241}
242__DEVICE__ double remquo(double __a, double __b, int *__c) {
243 return __nv_remquo(__a, __b, __c);
244}
245__DEVICE__ float remquof(float __a, float __b, int *__c) {
246 return __nv_remquof(__a, __b, __c);
247}
248__DEVICE__ double rhypot(double __a, double __b) {
249 return __nv_rhypot(__a, __b);
250}
251__DEVICE__ float rhypotf(float __a, float __b) {
252 return __nv_rhypotf(__a, __b);
253}
254// __nv_rint* in libdevice is buggy and produces incorrect results.
255__DEVICE__ double rint(double __a) { return __builtin_rint(__a); }
256__DEVICE__ float rintf(float __a) { return __builtin_rintf(__a); }
257__DEVICE__ double rnorm(int __a, const double *__b) {
258 return __nv_rnorm(__a, __b);
259}
260__DEVICE__ double rnorm3d(double __a, double __b, double __c) {
261 return __nv_rnorm3d(__a, __b, __c);
262}
263__DEVICE__ float rnorm3df(float __a, float __b, float __c) {
264 return __nv_rnorm3df(__a, __b, __c);
265}
266__DEVICE__ double rnorm4d(double __a, double __b, double __c, double __d) {
267 return __nv_rnorm4d(__a, __b, __c, __d);
268}
269__DEVICE__ float rnorm4df(float __a, float __b, float __c, float __d) {
270 return __nv_rnorm4df(__a, __b, __c, __d);
271}
272__DEVICE__ float rnormf(int __dim, const float *__t) {
273 return __nv_rnormf(__dim, __t);
274}
275__DEVICE__ double rsqrt(double __a) { return __nv_rsqrt(__a); }
276__DEVICE__ float rsqrtf(float __a) { return __nv_rsqrtf(__a); }
277__DEVICE__ double scalbn(double __a, int __b) { return __nv_scalbn(__a, __b); }
278__DEVICE__ float scalbnf(float __a, int __b) { return __nv_scalbnf(__a, __b); }
279__DEVICE__ double scalbln(double __a, long __b) {
280 if (__b > INT_MAX)
281 return __a > 0 ? HUGE_VAL : -HUGE_VAL;
282 if (__b < INT_MIN)
283 return __a > 0 ? 0.0 : -0.0;
284 return scalbn(__a, (int)__b);
285}
286__DEVICE__ float scalblnf(float __a, long __b) {
287 if (__b > INT_MAX)
288 return __a > 0 ? HUGE_VALF : -HUGE_VALF;
289 if (__b < INT_MIN)
290 return __a > 0 ? 0.f : -0.f;
291 return scalbnf(__a, (int)__b);
292}
293__DEVICE__ double sin(double __a) { return __nv_sin(__a); }
294__DEVICE_VOID__ void sincos(double __a, double *__s, double *__c) {
295 return __nv_sincos(__a, __s, __c);
296}
297__DEVICE_VOID__ void sincosf(float __a, float *__s, float *__c) {
298 return __FAST_OR_SLOW(__nv_fast_sincosf, __nv_sincosf)(__a, __s, __c);
299}
300__DEVICE_VOID__ void sincospi(double __a, double *__s, double *__c) {
301 return __nv_sincospi(__a, __s, __c);
302}
303__DEVICE_VOID__ void sincospif(float __a, float *__s, float *__c) {
304 return __nv_sincospif(__a, __s, __c);
305}
306__DEVICE__ float sinf(float __a) {
307 return __FAST_OR_SLOW(__nv_fast_sinf, __nv_sinf)(__a);
308}
309__DEVICE__ double sinh(double __a) { return __nv_sinh(__a); }
310__DEVICE__ float sinhf(float __a) { return __nv_sinhf(__a); }
311__DEVICE__ double sinpi(double __a) { return __nv_sinpi(__a); }
312__DEVICE__ float sinpif(float __a) { return __nv_sinpif(__a); }
313__DEVICE__ double sqrt(double __a) { return __nv_sqrt(__a); }
314__DEVICE__ float sqrtf(float __a) { return __nv_sqrtf(__a); }
315__DEVICE__ double tan(double __a) { return __nv_tan(__a); }
316__DEVICE__ float tanf(float __a) { return __nv_tanf(__a); }
317__DEVICE__ double tanh(double __a) { return __nv_tanh(__a); }
318__DEVICE__ float tanhf(float __a) { return __nv_tanhf(__a); }
319__DEVICE__ double tgamma(double __a) { return __nv_tgamma(__a); }
320__DEVICE__ float tgammaf(float __a) { return __nv_tgammaf(__a); }
321__DEVICE__ double trunc(double __a) { return __nv_trunc(__a); }
322__DEVICE__ float truncf(float __a) { return __nv_truncf(__a); }
323__DEVICE__ unsigned long long ullmax(unsigned long long __a,
324 unsigned long long __b) {
325 return __nv_ullmax(__a, __b);
326}
327__DEVICE__ unsigned long long ullmin(unsigned long long __a,
328 unsigned long long __b) {
329 return __nv_ullmin(__a, __b);
330}
331__DEVICE__ unsigned int umax(unsigned int __a, unsigned int __b) {
332 return __nv_umax(__a, __b);
333}
334__DEVICE__ unsigned int umin(unsigned int __a, unsigned int __b) {
335 return __nv_umin(__a, __b);
336}
337__DEVICE__ double y0(double __a) { return __nv_y0(__a); }
338__DEVICE__ float y0f(float __a) { return __nv_y0f(__a); }
339__DEVICE__ double y1(double __a) { return __nv_y1(__a); }
340__DEVICE__ float y1f(float __a) { return __nv_y1f(__a); }
341__DEVICE__ double yn(int __a, double __b) { return __nv_yn(__a, __b); }
342__DEVICE__ float ynf(int __a, float __b) { return __nv_ynf(__a, __b); }
343
344#pragma pop_macro("__DEVICE__")
345#pragma pop_macro("__DEVICE_VOID__")
346#pragma pop_macro("__FAST_OR_SLOW")
347
348#endif // __CLANG_CUDA_MATH_H__
lib/include/__clang_cuda_math_forward_declares.h deleted-284
...@@ -1,284 +0,0 @@
1/*===- __clang_math_forward_declares.h - Prototypes of __device__ math fns --===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 *===-----------------------------------------------------------------------===
8 */
9#ifndef __CLANG__CUDA_MATH_FORWARD_DECLARES_H__
10#define __CLANG__CUDA_MATH_FORWARD_DECLARES_H__
11#if !defined(__CUDA__) && !__HIP__
12#error "This file is for CUDA/HIP compilation only."
13#endif
14
15// This file forward-declares of some math functions we (or the CUDA headers)
16// will define later. We need to do this, and do it before cmath is included,
17// because the standard library may have constexpr math functions. In the
18// absence of a prior __device__ decl, those constexpr functions may become
19// implicitly host+device. host+device functions can't be overloaded, so that
20// would preclude the use of our own __device__ overloads for these functions.
21
22#pragma push_macro("__DEVICE__")
23#define __DEVICE__ \
24 static __inline__ __attribute__((always_inline)) __attribute__((device))
25
26__DEVICE__ long abs(long);
27__DEVICE__ long long abs(long long);
28__DEVICE__ double abs(double);
29__DEVICE__ float abs(float);
30__DEVICE__ int abs(int);
31__DEVICE__ double acos(double);
32__DEVICE__ float acos(float);
33__DEVICE__ double acosh(double);
34__DEVICE__ float acosh(float);
35__DEVICE__ double asin(double);
36__DEVICE__ float asin(float);
37__DEVICE__ double asinh(double);
38__DEVICE__ float asinh(float);
39__DEVICE__ double atan2(double, double);
40__DEVICE__ float atan2(float, float);
41__DEVICE__ double atan(double);
42__DEVICE__ float atan(float);
43__DEVICE__ double atanh(double);
44__DEVICE__ float atanh(float);
45__DEVICE__ double cbrt(double);
46__DEVICE__ float cbrt(float);
47__DEVICE__ double ceil(double);
48__DEVICE__ float ceil(float);
49__DEVICE__ double copysign(double, double);
50__DEVICE__ float copysign(float, float);
51__DEVICE__ double cos(double);
52__DEVICE__ float cos(float);
53__DEVICE__ double cosh(double);
54__DEVICE__ float cosh(float);
55__DEVICE__ double erfc(double);
56__DEVICE__ float erfc(float);
57__DEVICE__ double erf(double);
58__DEVICE__ float erf(float);
59__DEVICE__ double exp2(double);
60__DEVICE__ float exp2(float);
61__DEVICE__ double exp(double);
62__DEVICE__ float exp(float);
63__DEVICE__ double expm1(double);
64__DEVICE__ float expm1(float);
65__DEVICE__ double fabs(double);
66__DEVICE__ float fabs(float);
67__DEVICE__ double fdim(double, double);
68__DEVICE__ float fdim(float, float);
69__DEVICE__ double floor(double);
70__DEVICE__ float floor(float);
71__DEVICE__ double fma(double, double, double);
72__DEVICE__ float fma(float, float, float);
73__DEVICE__ double fmax(double, double);
74__DEVICE__ float fmax(float, float);
75__DEVICE__ double fmin(double, double);
76__DEVICE__ float fmin(float, float);
77__DEVICE__ double fmod(double, double);
78__DEVICE__ float fmod(float, float);
79__DEVICE__ int fpclassify(double);
80__DEVICE__ int fpclassify(float);
81__DEVICE__ double frexp(double, int *);
82__DEVICE__ float frexp(float, int *);
83__DEVICE__ double hypot(double, double);
84__DEVICE__ float hypot(float, float);
85__DEVICE__ int ilogb(double);
86__DEVICE__ int ilogb(float);
87#ifdef _MSC_VER
88__DEVICE__ bool isfinite(long double);
89#endif
90__DEVICE__ bool isfinite(double);
91__DEVICE__ bool isfinite(float);
92__DEVICE__ bool isgreater(double, double);
93__DEVICE__ bool isgreaterequal(double, double);
94__DEVICE__ bool isgreaterequal(float, float);
95__DEVICE__ bool isgreater(float, float);
96#ifdef _MSC_VER
97__DEVICE__ bool isinf(long double);
98#endif
99__DEVICE__ bool isinf(double);
100__DEVICE__ bool isinf(float);
101__DEVICE__ bool isless(double, double);
102__DEVICE__ bool islessequal(double, double);
103__DEVICE__ bool islessequal(float, float);
104__DEVICE__ bool isless(float, float);
105__DEVICE__ bool islessgreater(double, double);
106__DEVICE__ bool islessgreater(float, float);
107#ifdef _MSC_VER
108__DEVICE__ bool isnan(long double);
109#endif
110__DEVICE__ bool isnan(double);
111__DEVICE__ bool isnan(float);
112__DEVICE__ bool isnormal(double);
113__DEVICE__ bool isnormal(float);
114__DEVICE__ bool isunordered(double, double);
115__DEVICE__ bool isunordered(float, float);
116__DEVICE__ long labs(long);
117__DEVICE__ double ldexp(double, int);
118__DEVICE__ float ldexp(float, int);
119__DEVICE__ double lgamma(double);
120__DEVICE__ float lgamma(float);
121__DEVICE__ long long llabs(long long);
122__DEVICE__ long long llrint(double);
123__DEVICE__ long long llrint(float);
124__DEVICE__ double log10(double);
125__DEVICE__ float log10(float);
126__DEVICE__ double log1p(double);
127__DEVICE__ float log1p(float);
128__DEVICE__ double log2(double);
129__DEVICE__ float log2(float);
130__DEVICE__ double logb(double);
131__DEVICE__ float logb(float);
132__DEVICE__ double log(double);
133__DEVICE__ float log(float);
134__DEVICE__ long lrint(double);
135__DEVICE__ long lrint(float);
136__DEVICE__ long lround(double);
137__DEVICE__ long lround(float);
138__DEVICE__ long long llround(float); // No llround(double).
139__DEVICE__ double modf(double, double *);
140__DEVICE__ float modf(float, float *);
141__DEVICE__ double nan(const char *);
142__DEVICE__ float nanf(const char *);
143__DEVICE__ double nearbyint(double);
144__DEVICE__ float nearbyint(float);
145__DEVICE__ double nextafter(double, double);
146__DEVICE__ float nextafter(float, float);
147__DEVICE__ double pow(double, double);
148__DEVICE__ double pow(double, int);
149__DEVICE__ float pow(float, float);
150__DEVICE__ float pow(float, int);
151__DEVICE__ double remainder(double, double);
152__DEVICE__ float remainder(float, float);
153__DEVICE__ double remquo(double, double, int *);
154__DEVICE__ float remquo(float, float, int *);
155__DEVICE__ double rint(double);
156__DEVICE__ float rint(float);
157__DEVICE__ double round(double);
158__DEVICE__ float round(float);
159__DEVICE__ double scalbln(double, long);
160__DEVICE__ float scalbln(float, long);
161__DEVICE__ double scalbn(double, int);
162__DEVICE__ float scalbn(float, int);
163#ifdef _MSC_VER
164__DEVICE__ bool signbit(long double);
165#endif
166__DEVICE__ bool signbit(double);
167__DEVICE__ bool signbit(float);
168__DEVICE__ double sin(double);
169__DEVICE__ float sin(float);
170__DEVICE__ double sinh(double);
171__DEVICE__ float sinh(float);
172__DEVICE__ double sqrt(double);
173__DEVICE__ float sqrt(float);
174__DEVICE__ double tan(double);
175__DEVICE__ float tan(float);
176__DEVICE__ double tanh(double);
177__DEVICE__ float tanh(float);
178__DEVICE__ double tgamma(double);
179__DEVICE__ float tgamma(float);
180__DEVICE__ double trunc(double);
181__DEVICE__ float trunc(float);
182
183// Notably missing above is nexttoward, which we don't define on
184// the device side because libdevice doesn't give us an implementation, and we
185// don't want to be in the business of writing one ourselves.
186
187// We need to define these overloads in exactly the namespace our standard
188// library uses (including the right inline namespace), otherwise they won't be
189// picked up by other functions in the standard library (e.g. functions in
190// <complex>). Thus the ugliness below.
191#ifdef _LIBCPP_BEGIN_NAMESPACE_STD
192_LIBCPP_BEGIN_NAMESPACE_STD
193#else
194namespace std {
195#ifdef _GLIBCXX_BEGIN_NAMESPACE_VERSION
196_GLIBCXX_BEGIN_NAMESPACE_VERSION
197#endif
198#endif
199
200using ::abs;
201using ::acos;
202using ::acosh;
203using ::asin;
204using ::asinh;
205using ::atan;
206using ::atan2;
207using ::atanh;
208using ::cbrt;
209using ::ceil;
210using ::copysign;
211using ::cos;
212using ::cosh;
213using ::erf;
214using ::erfc;
215using ::exp;
216using ::exp2;
217using ::expm1;
218using ::fabs;
219using ::fdim;
220using ::floor;
221using ::fma;
222using ::fmax;
223using ::fmin;
224using ::fmod;
225using ::fpclassify;
226using ::frexp;
227using ::hypot;
228using ::ilogb;
229using ::isfinite;
230using ::isgreater;
231using ::isgreaterequal;
232using ::isinf;
233using ::isless;
234using ::islessequal;
235using ::islessgreater;
236using ::isnan;
237using ::isnormal;
238using ::isunordered;
239using ::labs;
240using ::ldexp;
241using ::lgamma;
242using ::llabs;
243using ::llrint;
244using ::log;
245using ::log10;
246using ::log1p;
247using ::log2;
248using ::logb;
249using ::lrint;
250using ::lround;
251using ::llround;
252using ::modf;
253using ::nan;
254using ::nanf;
255using ::nearbyint;
256using ::nextafter;
257using ::pow;
258using ::remainder;
259using ::remquo;
260using ::rint;
261using ::round;
262using ::scalbln;
263using ::scalbn;
264using ::signbit;
265using ::sin;
266using ::sinh;
267using ::sqrt;
268using ::tan;
269using ::tanh;
270using ::tgamma;
271using ::trunc;
272
273#ifdef _LIBCPP_END_NAMESPACE_STD
274_LIBCPP_END_NAMESPACE_STD
275#else
276#ifdef _GLIBCXX_BEGIN_NAMESPACE_VERSION
277_GLIBCXX_END_NAMESPACE_VERSION
278#endif
279} // namespace std
280#endif
281
282#pragma pop_macro("__DEVICE__")
283
284#endif
lib/include/__clang_cuda_runtime_wrapper.h deleted-503
...@@ -1,503 +0,0 @@
1/*===---- __clang_cuda_runtime_wrapper.h - CUDA runtime support -------------===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 *===-----------------------------------------------------------------------===
8 */
9
10/*
11 * WARNING: This header is intended to be directly -include'd by
12 * the compiler and is not supposed to be included by users.
13 *
14 * CUDA headers are implemented in a way that currently makes it
15 * impossible for user code to #include directly when compiling with
16 * Clang. They present different view of CUDA-supplied functions
17 * depending on where in NVCC's compilation pipeline the headers are
18 * included. Neither of these modes provides function definitions with
19 * correct attributes, so we use preprocessor to force the headers
20 * into a form that Clang can use.
21 *
22 * Similarly to NVCC which -include's cuda_runtime.h, Clang -include's
23 * this file during every CUDA compilation.
24 */
25
26#ifndef __CLANG_CUDA_RUNTIME_WRAPPER_H__
27#define __CLANG_CUDA_RUNTIME_WRAPPER_H__
28
29#if defined(__CUDA__) && defined(__clang__)
30
31// Include some forward declares that must come before cmath.
32#include <__clang_cuda_math_forward_declares.h>
33
34// Define __CUDACC__ early as libstdc++ standard headers with GNU extensions
35// enabled depend on it to avoid using __float128, which is unsupported in
36// CUDA.
37#define __CUDACC__
38
39// Include some standard headers to avoid CUDA headers including them
40// while some required macros (like __THROW) are in a weird state.
41#include <cmath>
42#include <cstdlib>
43#include <stdlib.h>
44#include <string.h>
45#undef __CUDACC__
46
47// Preserve common macros that will be changed below by us or by CUDA
48// headers.
49#pragma push_macro("__THROW")
50#pragma push_macro("__CUDA_ARCH__")
51
52// WARNING: Preprocessor hacks below are based on specific details of
53// CUDA-7.x headers and are not expected to work with any other
54// version of CUDA headers.
55#include "cuda.h"
56#if !defined(CUDA_VERSION)
57#error "cuda.h did not define CUDA_VERSION"
58#elif CUDA_VERSION < 7000
59#error "Unsupported CUDA version!"
60#endif
61
62#pragma push_macro("__CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__")
63#if CUDA_VERSION >= 10000
64#define __CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__
65#endif
66
67// Make largest subset of device functions available during host
68// compilation.
69#ifndef __CUDA_ARCH__
70#define __CUDA_ARCH__ 9999
71#endif
72
73#include "__clang_cuda_builtin_vars.h"
74
75// No need for device_launch_parameters.h as __clang_cuda_builtin_vars.h above
76// has taken care of builtin variables declared in the file.
77#define __DEVICE_LAUNCH_PARAMETERS_H__
78
79// {math,device}_functions.h only have declarations of the
80// functions. We don't need them as we're going to pull in their
81// definitions from .hpp files.
82#define __DEVICE_FUNCTIONS_H__
83#define __MATH_FUNCTIONS_H__
84#define __COMMON_FUNCTIONS_H__
85// device_functions_decls is replaced by __clang_cuda_device_functions.h
86// included below.
87#define __DEVICE_FUNCTIONS_DECLS_H__
88
89#undef __CUDACC__
90#if CUDA_VERSION < 9000
91#define __CUDABE__
92#else
93#define __CUDACC__
94#define __CUDA_LIBDEVICE__
95#endif
96// Disables definitions of device-side runtime support stubs in
97// cuda_device_runtime_api.h
98#include "host_defines.h"
99#undef __CUDACC__
100#include "driver_types.h"
101#include "host_config.h"
102
103// Temporarily replace "nv_weak" with weak, so __attribute__((nv_weak)) in
104// cuda_device_runtime_api.h ends up being __attribute__((weak)) which is the
105// functional equivalent of what we need.
106#pragma push_macro("nv_weak")
107#define nv_weak weak
108#undef __CUDABE__
109#undef __CUDA_LIBDEVICE__
110#define __CUDACC__
111#include "cuda_runtime.h"
112
113#pragma pop_macro("nv_weak")
114#undef __CUDACC__
115#define __CUDABE__
116
117// CUDA headers use __nvvm_memcpy and __nvvm_memset which Clang does
118// not have at the moment. Emulate them with a builtin memcpy/memset.
119#define __nvvm_memcpy(s, d, n, a) __builtin_memcpy(s, d, n)
120#define __nvvm_memset(d, c, n, a) __builtin_memset(d, c, n)
121
122#if CUDA_VERSION < 9000
123#include "crt/device_runtime.h"
124#endif
125#include "crt/host_runtime.h"
126// device_runtime.h defines __cxa_* macros that will conflict with
127// cxxabi.h.
128// FIXME: redefine these as __device__ functions.
129#undef __cxa_vec_ctor
130#undef __cxa_vec_cctor
131#undef __cxa_vec_dtor
132#undef __cxa_vec_new
133#undef __cxa_vec_new2
134#undef __cxa_vec_new3
135#undef __cxa_vec_delete2
136#undef __cxa_vec_delete
137#undef __cxa_vec_delete3
138#undef __cxa_pure_virtual
139
140// math_functions.hpp expects this host function be defined on MacOS, but it
141// ends up not being there because of the games we play here. Just define it
142// ourselves; it's simple enough.
143#ifdef __APPLE__
144inline __host__ double __signbitd(double x) {
145 return std::signbit(x);
146}
147#endif
148
149// CUDA 9.1 no longer provides declarations for libdevice functions, so we need
150// to provide our own.
151#include <__clang_cuda_libdevice_declares.h>
152
153// Wrappers for many device-side standard library functions, incl. math
154// functions, became compiler builtins in CUDA-9 and have been removed from the
155// CUDA headers. Clang now provides its own implementation of the wrappers.
156#if CUDA_VERSION >= 9000
157#include <__clang_cuda_device_functions.h>
158#include <__clang_cuda_math.h>
159#endif
160
161// __THROW is redefined to be empty by device_functions_decls.h in CUDA. Clang's
162// counterpart does not do it, so we need to make it empty here to keep
163// following CUDA includes happy.
164#undef __THROW
165#define __THROW
166
167// CUDA 8.0.41 relies on __USE_FAST_MATH__ and __CUDA_PREC_DIV's values.
168// Previous versions used to check whether they are defined or not.
169// CU_DEVICE_INVALID macro is only defined in 8.0.41, so we use it
170// here to detect the switch.
171
172#if defined(CU_DEVICE_INVALID)
173#if !defined(__USE_FAST_MATH__)
174#define __USE_FAST_MATH__ 0
175#endif
176
177#if !defined(__CUDA_PREC_DIV)
178#define __CUDA_PREC_DIV 0
179#endif
180#endif
181
182// Temporarily poison __host__ macro to ensure it's not used by any of
183// the headers we're about to include.
184#pragma push_macro("__host__")
185#define __host__ UNEXPECTED_HOST_ATTRIBUTE
186
187// device_functions.hpp and math_functions*.hpp use 'static
188// __forceinline__' (with no __device__) for definitions of device
189// functions. Temporarily redefine __forceinline__ to include
190// __device__.
191#pragma push_macro("__forceinline__")
192#define __forceinline__ __device__ __inline__ __attribute__((always_inline))
193#if CUDA_VERSION < 9000
194#include "device_functions.hpp"
195#endif
196
197// math_function.hpp uses the __USE_FAST_MATH__ macro to determine whether we
198// get the slow-but-accurate or fast-but-inaccurate versions of functions like
199// sin and exp. This is controlled in clang by -fgpu-approx-transcendentals.
200//
201// device_functions.hpp uses __USE_FAST_MATH__ for a different purpose (fast vs.
202// slow divides), so we need to scope our define carefully here.
203#pragma push_macro("__USE_FAST_MATH__")
204#if defined(__CLANG_GPU_APPROX_TRANSCENDENTALS__)
205#define __USE_FAST_MATH__ 1
206#endif
207
208#if CUDA_VERSION >= 9000
209#include "crt/math_functions.hpp"
210#else
211#include "math_functions.hpp"
212#endif
213
214#pragma pop_macro("__USE_FAST_MATH__")
215
216#if CUDA_VERSION < 9000
217#include "math_functions_dbl_ptx3.hpp"
218#endif
219#pragma pop_macro("__forceinline__")
220
221// Pull in host-only functions that are only available when neither
222// __CUDACC__ nor __CUDABE__ are defined.
223#undef __MATH_FUNCTIONS_HPP__
224#undef __CUDABE__
225#if CUDA_VERSION < 9000
226#include "math_functions.hpp"
227#endif
228// Alas, additional overloads for these functions are hard to get to.
229// Considering that we only need these overloads for a few functions,
230// we can provide them here.
231static inline float rsqrt(float __a) { return rsqrtf(__a); }
232static inline float rcbrt(float __a) { return rcbrtf(__a); }
233static inline float sinpi(float __a) { return sinpif(__a); }
234static inline float cospi(float __a) { return cospif(__a); }
235static inline void sincospi(float __a, float *__b, float *__c) {
236 return sincospif(__a, __b, __c);
237}
238static inline float erfcinv(float __a) { return erfcinvf(__a); }
239static inline float normcdfinv(float __a) { return normcdfinvf(__a); }
240static inline float normcdf(float __a) { return normcdff(__a); }
241static inline float erfcx(float __a) { return erfcxf(__a); }
242
243#if CUDA_VERSION < 9000
244// For some reason single-argument variant is not always declared by
245// CUDA headers. Alas, device_functions.hpp included below needs it.
246static inline __device__ void __brkpt(int __c) { __brkpt(); }
247#endif
248
249// Now include *.hpp with definitions of various GPU functions. Alas,
250// a lot of thins get declared/defined with __host__ attribute which
251// we don't want and we have to define it out. We also have to include
252// {device,math}_functions.hpp again in order to extract the other
253// branch of #if/else inside.
254#define __host__
255#undef __CUDABE__
256#define __CUDACC__
257#if CUDA_VERSION >= 9000
258// Some atomic functions became compiler builtins in CUDA-9 , so we need their
259// declarations.
260#include "device_atomic_functions.h"
261#endif
262#undef __DEVICE_FUNCTIONS_HPP__
263#include "device_atomic_functions.hpp"
264#if CUDA_VERSION >= 9000
265#include "crt/device_functions.hpp"
266#include "crt/device_double_functions.hpp"
267#else
268#include "device_functions.hpp"
269#define __CUDABE__
270#include "device_double_functions.h"
271#undef __CUDABE__
272#endif
273#include "sm_20_atomic_functions.hpp"
274// Predicate functions used in `__builtin_assume` need to have no side effect.
275// However, sm_20_intrinsics.hpp doesn't define them with neither pure nor
276// const attribute. Rename definitions from sm_20_intrinsics.hpp and re-define
277// them as pure ones.
278#pragma push_macro("__isGlobal")
279#pragma push_macro("__isShared")
280#pragma push_macro("__isConstant")
281#pragma push_macro("__isLocal")
282#define __isGlobal __ignored_cuda___isGlobal
283#define __isShared __ignored_cuda___isShared
284#define __isConstant __ignored_cuda___isConstant
285#define __isLocal __ignored_cuda___isLocal
286#include "sm_20_intrinsics.hpp"
287#pragma pop_macro("__isGlobal")
288#pragma pop_macro("__isShared")
289#pragma pop_macro("__isConstant")
290#pragma pop_macro("__isLocal")
291#pragma push_macro("__DEVICE__")
292#define __DEVICE__ static __device__ __forceinline__ __attribute__((const))
293__DEVICE__ unsigned int __isGlobal(const void *p) {
294 return __nvvm_isspacep_global(p);
295}
296__DEVICE__ unsigned int __isShared(const void *p) {
297 return __nvvm_isspacep_shared(p);
298}
299__DEVICE__ unsigned int __isConstant(const void *p) {
300 return __nvvm_isspacep_const(p);
301}
302__DEVICE__ unsigned int __isLocal(const void *p) {
303 return __nvvm_isspacep_local(p);
304}
305#pragma pop_macro("__DEVICE__")
306#include "sm_32_atomic_functions.hpp"
307
308// Don't include sm_30_intrinsics.h and sm_32_intrinsics.h. These define the
309// __shfl and __ldg intrinsics using inline (volatile) asm, but we want to
310// define them using builtins so that the optimizer can reason about and across
311// these instructions. In particular, using intrinsics for ldg gets us the
312// [addr+imm] addressing mode, which, although it doesn't actually exist in the
313// hardware, seems to generate faster machine code because ptxas can more easily
314// reason about our code.
315
316#if CUDA_VERSION >= 8000
317#pragma push_macro("__CUDA_ARCH__")
318#undef __CUDA_ARCH__
319#include "sm_60_atomic_functions.hpp"
320#include "sm_61_intrinsics.hpp"
321#pragma pop_macro("__CUDA_ARCH__")
322#endif
323
324#undef __MATH_FUNCTIONS_HPP__
325
326// math_functions.hpp defines ::signbit as a __host__ __device__ function. This
327// conflicts with libstdc++'s constexpr ::signbit, so we have to rename
328// math_function.hpp's ::signbit. It's guarded by #undef signbit, but that's
329// conditional on __GNUC__. :)
330#pragma push_macro("signbit")
331#pragma push_macro("__GNUC__")
332#undef __GNUC__
333#define signbit __ignored_cuda_signbit
334
335// CUDA-9 omits device-side definitions of some math functions if it sees
336// include guard from math.h wrapper from libstdc++. We have to undo the header
337// guard temporarily to get the definitions we need.
338#pragma push_macro("_GLIBCXX_MATH_H")
339#pragma push_macro("_LIBCPP_VERSION")
340#if CUDA_VERSION >= 9000
341#undef _GLIBCXX_MATH_H
342// We also need to undo another guard that checks for libc++ 3.8+
343#ifdef _LIBCPP_VERSION
344#define _LIBCPP_VERSION 3700
345#endif
346#endif
347
348#if CUDA_VERSION >= 9000
349#include "crt/math_functions.hpp"
350#else
351#include "math_functions.hpp"
352#endif
353#pragma pop_macro("_GLIBCXX_MATH_H")
354#pragma pop_macro("_LIBCPP_VERSION")
355#pragma pop_macro("__GNUC__")
356#pragma pop_macro("signbit")
357
358#pragma pop_macro("__host__")
359
360// __clang_cuda_texture_intrinsics.h must be included first in order to provide
361// implementation for __nv_tex_surf_handler that CUDA's headers depend on.
362// The implementation requires c++11 and only works with CUDA-9 or newer.
363#if __cplusplus >= 201103L && CUDA_VERSION >= 9000
364// clang-format off
365#include <__clang_cuda_texture_intrinsics.h>
366// clang-format on
367#else
368#if CUDA_VERSION >= 9000
369// Provide a hint that texture support needs C++11.
370template <typename T> struct __nv_tex_needs_cxx11 {
371 const static bool value = false;
372};
373template <class T>
374__host__ __device__ void __nv_tex_surf_handler(const char *name, T *ptr,
375 cudaTextureObject_t obj,
376 float x) {
377 _Static_assert(__nv_tex_needs_cxx11<T>::value,
378 "Texture support requires C++11");
379}
380#else
381// Textures in CUDA-8 and older are not supported by clang.There's no
382// convenient way to intercept texture use in these versions, so we can't
383// produce a meaningful error. The source code that attempts to use textures
384// will continue to fail as it does now.
385#endif // CUDA_VERSION
386#endif // __cplusplus >= 201103L && CUDA_VERSION >= 9000
387#include "texture_fetch_functions.h"
388#include "texture_indirect_functions.h"
389
390// Restore state of __CUDA_ARCH__ and __THROW we had on entry.
391#pragma pop_macro("__CUDA_ARCH__")
392#pragma pop_macro("__THROW")
393
394// Set up compiler macros expected to be seen during compilation.
395#undef __CUDABE__
396#define __CUDACC__
397
398extern "C" {
399// Device-side CUDA system calls.
400// http://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/index.html#system-calls
401// We need these declarations and wrappers for device-side
402// malloc/free/printf calls to work without relying on
403// -fcuda-disable-target-call-checks option.
404__device__ int vprintf(const char *, const char *);
405__device__ void free(void *) __attribute((nothrow));
406__device__ void *malloc(size_t) __attribute((nothrow)) __attribute__((malloc));
407
408// __assertfail() used to have a `noreturn` attribute. Unfortunately that
409// contributed to triggering the longstanding bug in ptxas when assert was used
410// in sufficiently convoluted code. See
411// https://bugs.llvm.org/show_bug.cgi?id=27738 for the details.
412__device__ void __assertfail(const char *__message, const char *__file,
413 unsigned __line, const char *__function,
414 size_t __charSize);
415
416// In order for standard assert() macro on linux to work we need to
417// provide device-side __assert_fail()
418__device__ static inline void __assert_fail(const char *__message,
419 const char *__file, unsigned __line,
420 const char *__function) {
421 __assertfail(__message, __file, __line, __function, sizeof(char));
422}
423
424// Clang will convert printf into vprintf, but we still need
425// device-side declaration for it.
426__device__ int printf(const char *, ...);
427} // extern "C"
428
429// We also need device-side std::malloc and std::free.
430namespace std {
431__device__ static inline void free(void *__ptr) { ::free(__ptr); }
432__device__ static inline void *malloc(size_t __size) {
433 return ::malloc(__size);
434}
435} // namespace std
436
437// Out-of-line implementations from __clang_cuda_builtin_vars.h. These need to
438// come after we've pulled in the definition of uint3 and dim3.
439
440__device__ inline __cuda_builtin_threadIdx_t::operator dim3() const {
441 return dim3(x, y, z);
442}
443
444__device__ inline __cuda_builtin_threadIdx_t::operator uint3() const {
445 return {x, y, z};
446}
447
448__device__ inline __cuda_builtin_blockIdx_t::operator dim3() const {
449 return dim3(x, y, z);
450}
451
452__device__ inline __cuda_builtin_blockIdx_t::operator uint3() const {
453 return {x, y, z};
454}
455
456__device__ inline __cuda_builtin_blockDim_t::operator dim3() const {
457 return dim3(x, y, z);
458}
459
460__device__ inline __cuda_builtin_blockDim_t::operator uint3() const {
461 return {x, y, z};
462}
463
464__device__ inline __cuda_builtin_gridDim_t::operator dim3() const {
465 return dim3(x, y, z);
466}
467
468__device__ inline __cuda_builtin_gridDim_t::operator uint3() const {
469 return {x, y, z};
470}
471
472#include <__clang_cuda_cmath.h>
473#include <__clang_cuda_intrinsics.h>
474#include <__clang_cuda_complex_builtins.h>
475
476// curand_mtgp32_kernel helpfully redeclares blockDim and threadIdx in host
477// mode, giving them their "proper" types of dim3 and uint3. This is
478// incompatible with the types we give in __clang_cuda_builtin_vars.h. As as
479// hack, force-include the header (nvcc doesn't include it by default) but
480// redefine dim3 and uint3 to our builtin types. (Thankfully dim3 and uint3 are
481// only used here for the redeclarations of blockDim and threadIdx.)
482#pragma push_macro("dim3")
483#pragma push_macro("uint3")
484#define dim3 __cuda_builtin_blockDim_t
485#define uint3 __cuda_builtin_threadIdx_t
486#include "curand_mtgp32_kernel.h"
487#pragma pop_macro("dim3")
488#pragma pop_macro("uint3")
489#pragma pop_macro("__USE_FAST_MATH__")
490#pragma pop_macro("__CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__")
491
492// CUDA runtime uses this undocumented function to access kernel launch
493// configuration. The declaration is in crt/device_functions.h but that file
494// includes a lot of other stuff we don't want. Instead, we'll provide our own
495// declaration for it here.
496#if CUDA_VERSION >= 9020
497extern "C" unsigned __cudaPushCallConfiguration(dim3 gridDim, dim3 blockDim,
498 size_t sharedMem = 0,
499 void *stream = 0);
500#endif
501
502#endif // __CUDA__
503#endif // __CLANG_CUDA_RUNTIME_WRAPPER_H__
lib/include/__clang_cuda_texture_intrinsics.h deleted-742
...@@ -1,742 +0,0 @@
1/*===--- __clang_cuda_texture_intrinsics.h - Device-side texture support ---===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 *===-----------------------------------------------------------------------===
8 *
9 * This header provides in-header implmentations for NVCC's built-in
10 * __nv_tex_surf_handler() which is used by CUDA's texture-related headers. The
11 * built-in is unusual as it's actually a set of function overloads that use the
12 * first string literal argument as one of the overload parameters.
13 */
14#ifndef __CLANG_CUDA_TEXTURE_INTRINSICS_H__
15#define __CLANG_CUDA_TEXTURE_INTRINSICS_H__
16#ifndef __CUDA__
17#error "This file is for CUDA compilation only."
18#endif
19
20// __nv_tex_surf_handler() provided by this header as a macro.
21#define __nv_tex_surf_handler(__op, __ptr, ...) \
22 ::__cuda_tex::__tex_fetch< \
23 ::__cuda_tex::__Tag<::__cuda_tex::__tex_op_hash(__op)>>(__ptr, \
24 __VA_ARGS__)
25
26#pragma push_macro("__ASM_OUT")
27#pragma push_macro("__ASM_OUTP")
28#pragma push_macro("__Args")
29#pragma push_macro("__ID")
30#pragma push_macro("__IDV")
31#pragma push_macro("__IMPL_2DGATHER")
32#pragma push_macro("__IMPL_ALIAS")
33#pragma push_macro("__IMPL_ALIASI")
34#pragma push_macro("__IMPL_F1")
35#pragma push_macro("__IMPL_F3")
36#pragma push_macro("__IMPL_F3N")
37#pragma push_macro("__IMPL_F3S")
38#pragma push_macro("__IMPL_S")
39#pragma push_macro("__IMPL_S3")
40#pragma push_macro("__IMPL_S3I")
41#pragma push_macro("__IMPL_S3N")
42#pragma push_macro("__IMPL_S3NI")
43#pragma push_macro("__IMPL_S3S")
44#pragma push_macro("__IMPL_S3SI")
45#pragma push_macro("__IMPL_SI")
46#pragma push_macro("__L")
47#pragma push_macro("__STRIP_PARENS")
48
49// Put all functions into anonymous namespace so they have internal linkage.
50// The device-only function here must be internal in order to avoid ODR
51// violations in case they are used from the files compiled with
52// -fgpu-rdc. E.g. a library and an app using it may be built with a different
53// version of this header file.
54namespace {
55
56// Put the implmentation into its own namespace so we don't pollute the TU.
57namespace __cuda_tex {
58
59// First, we need a perfect hash function and a few constexpr helper functions
60// for converting a string literal into a numeric value which can be used to
61// parametrize a template. We can not use string literals for that as that would
62// require C++20.
63//
64// The hash function was generated with 'gperf' and then manually converted into
65// its constexpr equivalent.
66//
67// NOTE: the perfect hashing scheme comes with inherent self-test. If the hash
68// function has a collision for any of the texture operations, the compilation
69// will fail due to an attempt to redefine a tag with the same value. If the
70// header compiles, then the hash function is good enough for the job.
71
72constexpr int __tex_len(const char *s) {
73 return (s[0] == 0) ? 0
74 : (s[1] == 0) ? 1
75 : (s[2] == 0) ? 2
76 : (s[3] == 0) ? 3
77 : (s[4] == 0) ? 4
78 : (s[5] == 0) ? 5
79 : (s[6] == 0) ? 6
80 : (s[7] == 0) ? 7
81 : (s[8] == 0) ? 8
82 : (s[9] == 0) ? 9
83 : (s[10] == 0) ? 10
84 : (s[11] == 0) ? 11
85 : (s[12] == 0) ? 12
86 : (s[13] == 0) ? 13
87 : (s[14] == 0) ? 14
88 : (s[15] == 0) ? 15
89 : (s[16] == 0) ? 16
90 : (s[17] == 0) ? 17
91 : (s[18] == 0) ? 18
92 : (s[19] == 0) ? 19
93 : (s[20] == 0) ? 20
94 : (s[21] == 0) ? 21
95 : (s[22] == 0) ? 22
96 : (s[23] == 0) ? 23
97 : (s[24] == 0) ? 24
98 : (s[25] == 0) ? 25
99 : (s[26] == 0) ? 26
100 : (s[27] == 0) ? 27
101 : (s[28] == 0) ? 28
102 : (s[29] == 0) ? 29
103 : (s[30] == 0) ? 30
104 : (s[31] == 0) ? 31
105 : 32;
106}
107
108constexpr int __tex_hash_map(int c) {
109 return (c == 49) ? 10
110 : (c == 50) ? 0
111 : (c == 51) ? 100
112 : (c == 52) ? 30
113 : (c == 67) ? 10
114 : (c == 68) ? 0
115 : (c == 69) ? 25
116 : (c == 72) ? 70
117 : (c == 77) ? 0
118 : (c == 96) ? 44
119 : (c == 99) ? 10
120 : (c == 100) ? 5
121 : (c == 101) ? 60
122 : (c == 102) ? 40
123 : (c == 103) ? 70
124 : (c == 104) ? 25
125 : (c == 112) ? 0
126 : (c == 114) ? 45
127 : (c == 117) ? 5
128 : (c == 118) ? 85
129 : (c == 120) ? 20
130 : 225;
131}
132
133constexpr int __tex_op_hash(const char *str) {
134 return __tex_len(str) + __tex_hash_map(str[7] + 1) + __tex_hash_map(str[6]) +
135 __tex_hash_map(str[5]) + __tex_hash_map(str[__tex_len(str) - 1]);
136}
137
138// Tag type to identify particular texture operation.
139template <int N> struct __Tag;
140#define __ID(__op) __Tag<__tex_op_hash(__op)>
141// Tags for variants of particular operation. E.g. tex2Dgather can translate
142// into 4 different instructions.
143#define __IDV(__op, __variant) \
144 __Tag<10000 + __tex_op_hash(__op) * 100 + __variant>
145
146// Helper classes for figuring out key data types for derived types.
147// E.g. char2 has __base_t = char, __fetch_t = char4
148template <class> struct __TypeInfoT;
149// Type info for the fundamental types.
150template <> struct __TypeInfoT<float> {
151 using __base_t = float;
152 using __fetch_t = float4;
153};
154template <> struct __TypeInfoT<char> {
155 using __base_t = char;
156 using __fetch_t = int4;
157};
158template <> struct __TypeInfoT<signed char> {
159 using __base_t = signed char;
160 using __fetch_t = int4;
161};
162template <> struct __TypeInfoT<unsigned char> {
163 using __base_t = unsigned char;
164 using __fetch_t = uint4;
165};
166template <> struct __TypeInfoT<short> {
167 using __base_t = short;
168 using __fetch_t = int4;
169};
170template <> struct __TypeInfoT<unsigned short> {
171 using __base_t = unsigned short;
172 using __fetch_t = uint4;
173};
174template <> struct __TypeInfoT<int> {
175 using __base_t = int;
176 using __fetch_t = int4;
177};
178template <> struct __TypeInfoT<unsigned int> {
179 using __base_t = unsigned int;
180 using __fetch_t = uint4;
181};
182
183// Derived base/fetch types for N-element vectors.
184template <class __T> struct __TypeInfoT {
185 using __base_t = decltype(__T::x);
186 using __fetch_t = typename __TypeInfoT<__base_t>::__fetch_t;
187};
188
189// Classes that implement specific texture ops.
190template <class __op> struct __tex_fetch_v4;
191
192// Helper macros to strip parens from a macro argument.
193#define __Args(...) __VA_ARGS__
194#define __STRIP_PARENS(__X) __X
195#define __L(__X) __STRIP_PARENS(__Args __X)
196
197// Construct inline assembly output args.
198// Results are stored in a temp var __r.
199// isResident bool is pointed to by __ir
200// Asm args for return values. It's a 4-element vector
201#define __ASM_OUT(__t) \
202 ("=" __t(__r.x), "=" __t(__r.y), "=" __t(__r.z), "=" __t(__r.w))
203// .. possibly combined with a predicate.
204#define __ASM_OUTP(__t) (__L(__ASM_OUT(__t)), "=h"(*__ir))
205
206// Implements a single variant of texture fetch instruction.
207#define __IMPL_F1(__rt, __dt, __args, __asm_op, __asm_outs, __asm_args) \
208 template <> \
209 __device__ __rt __run<__dt>(cudaTextureObject_t __obj, __L(__args)) { \
210 __rt __r; \
211 asm(__asm_op : __L(__asm_outs) : "l"(__obj), __L(__asm_args)); \
212 return __r; \
213 }
214
215// Implements texture fetch instructions for int4/uint4/float4 data types.
216#define __IMPL_F3(__args, __asm_op, __ctype, __asm_op_args, __asm_args) \
217 __IMPL_F1(int4, int4, __args, __asm_op ".s32." __ctype "\t" __asm_op_args, \
218 __ASM_OUT("r"), __asm_args) \
219 __IMPL_F1(uint4, uint4, __args, __asm_op ".u32." __ctype "\t" __asm_op_args, \
220 __ASM_OUT("r"), __asm_args) \
221 __IMPL_F1(float4, float4, __args, \
222 __asm_op ".f32." __ctype "\t" __asm_op_args, __ASM_OUT("f"), \
223 __asm_args)
224// Implements 'sparse' texture fetch instructions for int4/uint4/float4 data
225// types. Similar to above, but returns a boolean 'isPresent' value in addition
226// to texture data,
227#define __IMPL_F3S(__args, __asm_op, __ctype, __asm_op_args, __asm_args) \
228 __IMPL_F1(int4, int4, __args, __asm_op ".s32." __ctype "\t" __asm_op_args, \
229 __ASM_OUTP("r"), __asm_args) \
230 __IMPL_F1(uint4, uint4, __args, __asm_op ".u32." __ctype "\t" __asm_op_args, \
231 __ASM_OUTP("r"), __asm_args) \
232 __IMPL_F1(float4, float4, __args, \
233 __asm_op ".f32." __ctype "\t" __asm_op_args, __ASM_OUTP("f"), \
234 __asm_args)
235
236// Similar to F3, but for integer data which is returned as normalized floats.
237// Only instantiates fetch functions for int4/uint4.
238#define __IMPL_F3N(__args, __asm_op, __ctype, __asm_op_args, __asm_args) \
239 __IMPL_F1(float4, int4, __args, __asm_op ".s32." __ctype "\t" __asm_op_args, \
240 __ASM_OUT("r"), __asm_args) \
241 __IMPL_F1(float4, uint4, __args, \
242 __asm_op ".u32." __ctype "\t" __asm_op_args, __ASM_OUT("r"), \
243 __asm_args)
244
245// Instantiates __tex_fetch_v4 with regular fetch functions.
246#define __IMPL_S3I(__op, __args, __asm_op, __ctype, __asm_op_args, __asm_args) \
247 template <> struct __tex_fetch_v4<__op> { \
248 template <class T> \
249 __device__ static T __run(cudaTextureObject_t __obj, __L(__args)); \
250 __IMPL_F3(__args, __asm_op, __ctype, __asm_op_args, __asm_args) \
251 }
252
253// Same, but for sparse ops. Only available on sm_60+
254#if !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 600)
255#define __IMPL_S3SI(__op, __args, __asm_op, __ctype, __asm_op_args, \
256 __asm_args) \
257 template <> struct __tex_fetch_v4<__op> { \
258 template <class T> \
259 __device__ static T __run(cudaTextureObject_t __obj, __L(__args)); \
260 __IMPL_F3S(__args, __asm_op, __ctype, __asm_op_args, __asm_args) \
261 }
262#else
263#define __IMPL_S3SI(__op, __args, __asm_op, __ctype, __asm_op_args, __asm_args)
264#endif
265
266// Same, but for normalized float ops.
267#define __IMPL_S3NI(__op, __args, __asm_op, __ctype, __asm_op_args, \
268 __asm_args) \
269 template <> struct __tex_fetch_v4<__op> { \
270 template <class T> \
271 __device__ static float4 __run(cudaTextureObject_t __obj, __L(__args)); \
272 __IMPL_F3N(__args, __asm_op, __ctype, __asm_op_args, __asm_args) \
273 }
274
275// Regular and normalized float ops share a lot of similarities. This macro
276// instantiates both variants -- normal for __op and normalized for __opn.
277#define __IMPL_SI(__op, __opn, __args, __asm_op, __ctype, __asm_op_args, \
278 __asm_args) \
279 __IMPL_S3I(__op, __args, __asm_op, __ctype, __asm_op_args, __asm_args); \
280 __IMPL_S3NI(__opn, __args, __asm_op, __ctype, __asm_op_args, __asm_args)
281
282// Convenience macros which converts string literal __op into a __Tag,
283#define __IMPL_S3(__op, __args, __asm_op, __ctype, __asm_op_args, __asm_args) \
284 __IMPL_S3I(__ID(__op), __args, __asm_op, __ctype, __asm_op_args, __asm_args)
285#define __IMPL_S3S(__op, __args, __asm_op, __ctype, __asm_op_args, __asm_args) \
286 __IMPL_S3SI(__ID(__op), __args, __asm_op, __ctype, __asm_op_args, __asm_args)
287#define __IMPL_S3N(__op, __args, __asm_op, __ctype, __asm_op_args, __asm_args) \
288 __IMPL_S3NI(__ID(__op), __args, __asm_op, __ctype, __asm_op_args, __asm_args)
289#define __IMPL_S(__op, __opn, __args, __asm_op, __ctype, __asm_op_args, \
290 __asm_args) \
291 __IMPL_SI(__ID(__op), __ID(__opn), __args, __asm_op, __ctype, __asm_op_args, \
292 __asm_args)
293
294// CUDA headers have some 'legacy' texture oprerations that duplicate
295// functionality. So, we just inherit it, instead of refining a copy.
296#define __IMPL_ALIASI(__op, __opn) \
297 template <> struct __tex_fetch_v4<__op> : __tex_fetch_v4<__opn> {}
298#define __IMPL_ALIAS(__op, __opn) __IMPL_ALIASI(__ID(__op), __ID(__opn))
299
300// Now we can instantiate everything we need for each specific texture fetch
301// variant.
302__IMPL_S("__tex1D_v2", "__tex1D_rmnf_v2", (float __x), "tex.1d.v4", "f32",
303 "{%0, %1, %2, %3}, [%4, {%5}];", ("f"(__x)));
304__IMPL_S("__tex1Dfetch_v2", "__tex1Dfetch_rmnf_v2", (int __x), "tex.1d.v4",
305 "s32", "{%0, %1, %2, %3}, [%4, {%5}];", ("r"(__x)));
306__IMPL_ALIAS("__itex1D", "__tex1D_v2");
307__IMPL_ALIAS("__itex1Dfetch", "__tex1Dfetch_v2");
308
309__IMPL_S("__tex1DGrad_v2", "__tex1DGrad_rmnf_v2",
310 (float __x, float __dPdx, float __dPdy), "tex.grad.1d.v4", "f32",
311 "{%0, %1, %2, %3}, [%4, {%5}], {%6}, {%7};",
312 ("f"(__x), "f"(__dPdx), "f"(__dPdy)));
313__IMPL_ALIAS("__itex1DGrad", "__tex1DGrad_v2");
314
315__IMPL_S("__tex1DLayered_v2", "__tex1DLayered_rmnf_v2",
316 (float __x, int __layer), "tex.a1d.v4", "f32",
317 "{%0, %1, %2, %3}, [%4, {%5, %6}];", ("r"(__layer), "f"(__x)));
318__IMPL_ALIAS("__itex1DLayered", "__tex1DLayered_v2");
319
320__IMPL_S("__tex1DLayeredGrad_v2", "__tex1DLayeredGrad_rmnf_v2",
321 (float __x, int __layer, float __dPdx, float __dPdy),
322 "tex.grad.a1d.v4", "f32",
323 "{%0, %1, %2, %3}, [%4, {%5, %6}], {%7}, {%8};",
324 ("r"(__layer), "f"(__x), "f"(__dPdx), "f"(__dPdy)));
325__IMPL_ALIAS("__itex1DLayeredGrad", "__tex1DLayeredGrad_v2");
326
327__IMPL_S("__tex1DLayeredLod_v2", "__tex1DLayeredLod_rmnf_v2",
328 (float __x, int __layer, float __level), "tex.level.a1d.v4", "f32",
329 "{%0, %1, %2, %3}, [%4, {%5, %6}], %7;",
330 ("r"(__layer), "f"(__x), "f"(__level)));
331__IMPL_ALIAS("__itex1DLayeredLod", "__tex1DLayeredLod_v2");
332
333__IMPL_S("__tex1DLod_v2", "__tex1DLod_rmnf_v2", (float __x, float __level),
334 "tex.level.1d.v4", "f32", "{%0, %1, %2, %3}, [%4, {%5}], %6;",
335 ("f"(__x), "f"(__level)));
336__IMPL_ALIAS("__itex1DLod", "__tex1DLod_v2");
337
338// 2D
339__IMPL_S("__tex2D_v2", "__tex2D_rmnf_v2", (float __x, float __y), "tex.2d.v4",
340 "f32", "{%0, %1, %2, %3}, [%4, {%5, %6}];", ("f"(__x), "f"(__y)));
341__IMPL_ALIAS("__itex2D", "__tex2D_v2");
342
343__IMPL_S3S("__itex2D_sparse", (float __x, float __y, unsigned char *__ir),
344 "{.reg .pred %%p0;\n\t"
345 "tex.2d.v4",
346 "f32",
347 "{%0, %1, %2, %3}|%%p0, [%5, {%6, %7}];\n\t"
348 " selp.u16 %4, 1, 0, %%p0; }",
349 ("f"(__x), "f"(__y)));
350
351__IMPL_S("__tex2DGrad_v2", "__tex2DGrad_rmnf_v2",
352 (float __x, float __y, const float2 *__dPdx, const float2 *__dPdy),
353 "tex.grad.2d.v4", "f32",
354 "{%0, %1, %2, %3}, [%4, {%5, %6}], {%7, %8}, {%9, %10};",
355 ("f"(__x), "f"(__y), "f"(__dPdx->x), "f"(__dPdx->y), "f"(__dPdy->x),
356 "f"(__dPdy->y)));
357__IMPL_ALIAS("__itex2DGrad_v2", "__tex2DGrad_v2");
358
359__IMPL_S3S("__itex2DGrad_sparse",
360 (float __x, float __y, const float2 *__dPdx, const float2 *__dPdy,
361 unsigned char *__ir),
362 "{.reg .pred %%p0;\n\t"
363 "tex.grad.2d.v4",
364 "f32",
365 "{%0, %1, %2, %3}|%%p0, [%5, {%6, %7}], {%8, %9}, {%10, %11};\n\t"
366 "selp.u16 %4, 1, 0, %%p0; }",
367 ("f"(__x), "f"(__y), "f"(__dPdx->x), "f"(__dPdx->y), "f"(__dPdy->x),
368 "f"(__dPdy->y)));
369
370__IMPL_S("__tex2DLayered_v2", "__tex2DLayered_rmnf_v2",
371 (float __x, float __y, int __layer), "tex.a2d.v4", "f32",
372 "{%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];",
373 ("r"(__layer), "f"(__x), "f"(__y)));
374__IMPL_ALIAS("__itex2DLayered", "__tex2DLayered_v2");
375
376__IMPL_S3S("__itex2DLayered_sparse",
377 (float __x, float __y, int __layer, unsigned char *__ir),
378 "{.reg .pred %%p0;\n\t"
379 "tex.a2d.v4",
380 "f32",
381 "{%0, %1, %2, %3}|%%p0, [%5, {%6, %7, %8, %8}];\n\t"
382 "selp.u16 %4, 1, 0, %%p0; }",
383 ("r"(__layer), "f"(__x), "f"(__y)));
384
385__IMPL_S("__tex2DLayeredGrad_v2", "__tex2DLayeredGrad_rmnf_v2",
386 (float __x, float __y, int __layer, const float2 *__dPdx,
387 const float2 *__dPdy),
388 "tex.grad.a2d.v4", "f32",
389 "{%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], {%8, %9}, {%10, %11};",
390 ("r"(__layer), "f"(__x), "f"(__y), "f"(__dPdx->x), "f"(__dPdx->y),
391 "f"(__dPdy->x), "f"(__dPdy->y)));
392__IMPL_ALIAS("__itex2DLayeredGrad_v2", "__tex2DLayeredGrad_v2");
393
394__IMPL_S3S(
395 "__itex2DLayeredGrad_sparse",
396 (float __x, float __y, int __layer, const float2 *__dPdx,
397 const float2 *__dPdy, unsigned char *__ir),
398 "{.reg .pred %%p0;\n\t"
399 "tex.grad.a2d.v4",
400 "f32",
401 "{%0, %1, %2, %3}|%%p0, [%5, {%6, %7, %8, %8}], {%9, %10}, {%11, %12};\n\t"
402 "selp.u16 %4, 1, 0, %%p0; }",
403 ("r"(__layer), "f"(__x), "f"(__y), "f"(__dPdx->x), "f"(__dPdx->y),
404 "f"(__dPdy->x), "f"(__dPdy->y)));
405
406__IMPL_S("__tex2DLayeredLod_v2", "__tex2DLayeredLod_rmnf_v2",
407 (float __x, float __y, int __layer, float __level), "tex.level.a2d.v4",
408 "f32", "{%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;",
409 ("r"(__layer), "f"(__x), "f"(__y), "f"(__level)));
410__IMPL_ALIAS("__itex2DLayeredLod", "__tex2DLayeredLod_v2");
411
412__IMPL_S3S("__itex2DLayeredLod_sparse",
413 (float __x, float __y, int __layer, float __level,
414 unsigned char *__ir),
415 "{.reg .pred %%p0;\n\t"
416 "tex.level.a2d.v4",
417 "f32",
418 "{%0, %1, %2, %3}|%%p0, [%5, {%6, %7, %8, %8}], %9;\n\t"
419 "selp.u16 %4, 1, 0, %%p0; }",
420 ("r"(__layer), "f"(__x), "f"(__y), "f"(__level)));
421
422__IMPL_S("__tex2DLod_v2", "__tex2DLod_rmnf_v2",
423 (float __x, float __y, float __level), "tex.level.2d.v4", "f32",
424 "{%0, %1, %2, %3}, [%4, {%5, %6}], %7;",
425 ("f"(__x), "f"(__y), "f"(__level)));
426__IMPL_ALIAS("__itex2DLod", "__tex2DLod_v2");
427
428__IMPL_S3S("__itex2DLod_sparse",
429 (float __x, float __y, float __level, unsigned char *__ir),
430 "{.reg .pred %%p0;\n\t"
431 "tex.level.2d.v4",
432 "f32",
433 "{%0, %1, %2, %3}|%%p0, [%5, {%6, %7}], %8;\n\t"
434 "selp.u16 %4, 1, 0, %%p0; }",
435 ("f"(__x), "f"(__y), "f"(__level)));
436
437// 2D gather is special. Unlike other variants that translate into exactly one
438// asm instruction, it uses one of the four different instructions selected by
439// __comp. We implement each instruction variant separately, and dispatch the
440// right one from the manually implemented 'umbrella' fetch.
441#define __IMPL_2DGATHER(variant, instr) \
442 __IMPL_SI(__IDV("__tex2Dgather_v2", variant), \
443 __IDV("__tex2Dgather_rmnf_v2", variant), \
444 (float __x, float __y, int __comp), instr, "f32", \
445 "{%0, %1, %2, %3}, [%4, {%5, %6}];", ("f"(__x), "f"(__y))); \
446 __IMPL_ALIASI(__IDV("__itex2Dgather", variant), \
447 __IDV("__tex2Dgather_v2", variant)); \
448 __IMPL_S3SI(__IDV("__itex2Dgather_sparse", variant), \
449 (float __x, float __y, unsigned char *__ir, int __comp), \
450 "{.reg .pred %%p0;\n\t" instr, "f32", \
451 "{%0, %1, %2, %3}|%%p0, [%5, {%6, %7}];\n\t" \
452 "selp.u16 %4, 1, 0, %%p0; }", \
453 ("f"(__x), "f"(__y)));
454__IMPL_2DGATHER(0, "tld4.r.2d.v4");
455__IMPL_2DGATHER(1, "tld4.g.2d.v4");
456__IMPL_2DGATHER(2, "tld4.b.2d.v4");
457__IMPL_2DGATHER(3, "tld4.a.2d.v4");
458
459// Umbrella dispatcher -- calls into specific 2Dgather variant.
460template <> struct __tex_fetch_v4<__ID("__tex2Dgather_v2")> {
461 template <class __T>
462 __device__ static __T __run(cudaTextureObject_t __obj, float __x, float __y,
463 int __comp) {
464 switch (__comp) {
465 case 0:
466 return __tex_fetch_v4<__IDV("__tex2Dgather_v2", 0)>::__run<__T>(
467 __obj, __x, __y, __comp);
468 case 1:
469 return __tex_fetch_v4<__IDV("__tex2Dgather_v2", 1)>::__run<__T>(
470 __obj, __x, __y, __comp);
471 case 2:
472 return __tex_fetch_v4<__IDV("__tex2Dgather_v2", 2)>::__run<__T>(
473 __obj, __x, __y, __comp);
474 case 3:
475 return __tex_fetch_v4<__IDV("__tex2Dgather_v2", 3)>::__run<__T>(
476 __obj, __x, __y, __comp);
477 }
478 }
479};
480__IMPL_ALIAS("__itex2Dgather", "__tex2Dgather_v2");
481
482template <> struct __tex_fetch_v4<__ID("__tex2Dgather_rmnf_v2")> {
483 template <class __T>
484 __device__ static float4 __run(cudaTextureObject_t __obj, float __x,
485 float __y, int __comp) {
486 switch (__comp) {
487 case 0:
488 return __tex_fetch_v4<__IDV("__tex2Dgather_rmnf_v2", 0)>::__run<__T>(
489 __obj, __x, __y, __comp);
490 case 1:
491 return __tex_fetch_v4<__IDV("__tex2Dgather_rmnf_v2", 1)>::__run<__T>(
492 __obj, __x, __y, __comp);
493 case 2:
494 return __tex_fetch_v4<__IDV("__tex2Dgather_rmnf_v2", 2)>::__run<__T>(
495 __obj, __x, __y, __comp);
496 case 3:
497 return __tex_fetch_v4<__IDV("__tex2Dgather_rmnf_v2", 3)>::__run<__T>(
498 __obj, __x, __y, __comp);
499 }
500 }
501};
502
503#if !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 600)
504template <> struct __tex_fetch_v4<__ID("__itex2Dgather_sparse")> {
505 template <class __T>
506 __device__ static __T __run(cudaTextureObject_t __obj, float __x, float __y,
507 unsigned char *__ir, int __comp) {
508 switch (__comp) {
509 case 0:
510 return __tex_fetch_v4<__IDV("__itex2Dgather_sparse", 0)>::__run<__T>(
511 __obj, __x, __y, __ir, __comp);
512 case 1:
513 return __tex_fetch_v4<__IDV("__itex2Dgather_sparse", 1)>::__run<__T>(
514 __obj, __x, __y, __ir, __comp);
515 case 2:
516 return __tex_fetch_v4<__IDV("__itex2Dgather_sparse", 2)>::__run<__T>(
517 __obj, __x, __y, __ir, __comp);
518 case 3:
519 return __tex_fetch_v4<__IDV("__itex2Dgather_sparse", 3)>::__run<__T>(
520 __obj, __x, __y, __ir, __comp);
521 }
522 }
523};
524#endif
525
526// 3D
527__IMPL_S("__tex3D_v2", "__tex3D_rmnf_v2", (float __x, float __y, float __z),
528 "tex.3d.v4", "f32", "{%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];",
529 ("f"(__x), "f"(__y), "f"(__z)));
530__IMPL_ALIAS("__itex3D", "__tex3D_v2");
531
532__IMPL_S3S("__itex3D_sparse",
533 (float __x, float __y, float __z, unsigned char *__ir),
534 "{.reg .pred %%p0;\n\t"
535 "tex.3d.v4",
536 "f32",
537 "{%0, %1, %2, %3}|%%p0, [%5, {%6, %7, %8, %8}];\n\t"
538 "selp.u16 %4, 1, 0, %%p0; }",
539 ("f"(__x), "f"(__y), "f"(__z)));
540
541__IMPL_S("__tex3DGrad_v2", "__tex3DGrad_rmnf_v2",
542 (float __x, float __y, float __z, const float4 *__dPdx,
543 const float4 *__dPdy),
544 "tex.grad.3d.v4", "f32",
545 "{%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], "
546 "{%8, %9, %10, %10}, {%11, %12, %13, %13};",
547 ("f"(__x), "f"(__y), "f"(__z), "f"(__dPdx->x), "f"(__dPdx->y),
548 "f"(__dPdx->z), "f"(__dPdy->x), "f"(__dPdy->y), "f"(__dPdy->z)));
549__IMPL_ALIAS("__itex3DGrad_v2", "__tex3DGrad_v2");
550
551__IMPL_S3S("__itex3DGrad_sparse",
552 (float __x, float __y, float __z, const float4 *__dPdx,
553 const float4 *__dPdy, unsigned char *__ir),
554 "{.reg .pred %%p0;\n\t"
555 "tex.grad.3d.v4",
556 "f32",
557 "{%0, %1, %2, %3}|%%p0, [%5, {%6, %7, %8, %8}], "
558 "{%9, %10, %11, %11}, {%12, %13, %14, %14};\n\t"
559 "selp.u16 %4, 1, 0, %%p0; }",
560 ("f"(__x), "f"(__y), "f"(__z), "f"(__dPdx->x), "f"(__dPdx->y),
561 "f"(__dPdx->z), "f"(__dPdy->x), "f"(__dPdy->y), "f"(__dPdy->z)));
562
563__IMPL_S("__tex3DLod_v2", "__tex3DLod_rmnf_v2",
564 (float __x, float __y, float __z, float __level), "tex.level.3d.v4",
565 "f32", "{%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;",
566 ("f"(__x), "f"(__y), "f"(__z), "f"(__level)));
567__IMPL_ALIAS("__itex3DLod", "__tex3DLod_v2");
568
569__IMPL_S3S("__itex3DLod_sparse",
570 (float __x, float __y, float __z, float __level,
571 unsigned char *__ir),
572 "{.reg .pred %%p0;\n\t"
573 "tex.level.3d.v4",
574 "f32",
575 "{%0, %1, %2, %3}|%%p0, [%5, {%6, %7, %8, %8}], %9;\n\t"
576 "selp.u16 %4, 1, 0, %%p0; }",
577 ("f"(__x), "f"(__y), "f"(__z), "f"(__level)));
578
579// Cubemap
580__IMPL_S("__texCubemap_v2", "__texCubemap_rmnf_v2",
581 (float __x, float __y, float __z), "tex.cube.v4", "f32",
582 "{%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}];",
583 ("f"(__x), "f"(__y), "f"(__z)));
584__IMPL_ALIAS("__itexCubemap", "__texCubemap_v2");
585
586__IMPL_S3S("__itexCubemap_sparse",
587 (float __x, float __y, float __z, unsigned char *__ir),
588 "{.reg .pred %%p0;\n\t"
589 "tex.cube.v4",
590 "f32",
591 "{%0, %1, %2, %3}|%%p0, [%5, {%6, %7, %8, %8}];\n\t"
592 "selp.u16 %4, 1, 0, %%p0; }",
593 ("f"(__x), "f"(__y), "f"(__z)));
594
595__IMPL_S("__texCubemapGrad_v2", "__texCubemapGrad_rmnf_v2",
596 (float __x, float __y, float __z, const float4 *__dPdx,
597 const float4 *__dPdy),
598 "tex.grad.cube.v4", "f32",
599 "{%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], "
600 "{%8, %9, %10, %10}, {%11, %12, %13, %13};",
601 ("f"(__x), "f"(__y), "f"(__z), "f"(__dPdx->x), "f"(__dPdx->y),
602 "f"(__dPdx->z), "f"(__dPdy->x), "f"(__dPdy->y), "f"(__dPdy->z)));
603__IMPL_ALIAS("__itexCubemapGrad_v2", "__texCubemapGrad_v2");
604
605__IMPL_S("__texCubemapLayered_v2", "__texCubemapLayered_rmnf_v2",
606 (float __x, float __y, float __z, int __layer), "tex.acube.v4", "f32",
607 "{%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}];",
608 ("r"(__layer), "f"(__x), "f"(__y), "f"(__z)));
609__IMPL_ALIAS("__itexCubemapLayered", "__texCubemapLayered_v2");
610
611__IMPL_S("__texCubemapLayeredGrad_v2", "__texCubemapLayeredGrad_rmnf_v2",
612 (float __x, float __y, float __z, int __layer, const float4 *__dPdx,
613 const float4 *__dPdy),
614 "tex.grad.acube.v4", "f32",
615 "{%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], "
616 "{%9, %10, %11, %11}, {%12, %13, %14, %14};",
617 ("r"(__layer), "f"(__x), "f"(__y), "f"(__z), "f"(__dPdx->x),
618 "f"(__dPdx->y), "f"(__dPdx->z), "f"(__dPdy->x), "f"(__dPdy->y),
619 "f"(__dPdy->z)));
620__IMPL_ALIAS("__itexCubemapLayeredGrad_v2", "__texCubemapLayeredGrad_v2");
621
622__IMPL_S("__texCubemapLayeredLod_v2", "__texCubemapLayeredLod_rmnf_v2",
623 (float __x, float __y, float __z, int __layer, float __level),
624 "tex.level.acube.v4", "f32",
625 "{%0, %1, %2, %3}, [%4, {%5, %6, %7, %8}], %9;",
626 ("r"(__layer), "f"(__x), "f"(__y), "f"(__z), "f"(__level)));
627__IMPL_ALIAS("__itexCubemapLayeredLod", "__texCubemapLayeredLod_v2");
628
629__IMPL_S("__texCubemapLod_v2", "__texCubemapLod_rmnf_v2",
630 (float __x, float __y, float __z, float __level), "tex.level.cube.v4",
631 "f32", "{%0, %1, %2, %3}, [%4, {%5, %6, %7, %7}], %8;",
632 ("f"(__x), "f"(__y), "f"(__z), "f"(__level)));
633__IMPL_ALIAS("__itexCubemapLod", "__texCubemapLod_v2");
634
635// Helper class for extracting slice of data from V4 fetch results.
636template <class __DestT, class __SrcT> struct __convert {
637 template <int __NElements = sizeof(__DestT) /
638 sizeof(typename __TypeInfoT<__DestT>::__base_t)>
639 __device__ static __DestT __run(__SrcT __v);
640 template <> __device__ static __DestT __run<1>(__SrcT __v) { return {__v.x}; }
641 template <> __device__ static __DestT __run<2>(__SrcT __v) {
642 return {__v.x, __v.y};
643 }
644 template <> __device__ static __DestT __run<3>(__SrcT __v) {
645 return {__v.x, __v.y, __v.z};
646 }
647 template <> __device__ static __DestT __run<4>(__SrcT __v) {
648 return {__v.x, __v.y, __v.z, __v.w};
649 }
650};
651
652// These are the top-level function overloads the __nv_tex_surf_handler expands
653// to. Each overload deals with one of the several ways __nv_tex_surf_handler
654// is called by CUDA headers. In the end, each of the overloads does the same
655// job -- it figures out which `__tex_fetch_v4::run` variant should be used to
656// fetch texture data and which `__convert::run` is needed to convert it into
657// appropriate return type.
658
659// __nv_tex_surf_handler("__tex...", &ret, cudaTextureObject_t handle, args...);
660// Data type and return type are based on ret.
661template <class __op, class __T, class... __Args>
662__device__ static void __tex_fetch(__T *__ptr, cudaTextureObject_t __handle,
663 __Args... __args) {
664 using __FetchT = typename __TypeInfoT<__T>::__fetch_t;
665 *__ptr = __convert<__T, __FetchT>::__run(
666 __tex_fetch_v4<__op>::template __run<__FetchT>(__handle, __args...));
667}
668
669#if CUDA_VERSION < 12000
670// texture<> objects get magically converted into a texture reference. However,
671// there's no way to convert them to cudaTextureObject_t on C++ level. So, we
672// cheat a bit and use inline assembly to do it. It costs us an extra register
673// and a move, but that is easy for ptxas to optimize away.
674template <class __T>
675__device__ cudaTextureObject_t __tex_handle_to_obj(__T __handle) {
676 cudaTextureObject_t __obj;
677 asm("mov.b64 %0, %1; " : "=l"(__obj) : "l"(__handle));
678 return __obj;
679}
680
681// __nv_tex_surf_handler ("__tex...", &ret, textureReference, args...);
682// Data type and return type is based on ret.
683template <class __op, class __T, class __HandleT, class... __Args>
684__device__ static void __tex_fetch(__T *__ptr, __HandleT __handle,
685 __Args... __args) {
686 using __FetchT = typename __TypeInfoT<__T>::__fetch_t;
687 *__ptr = __convert<__T, __FetchT>::__run(
688 __tex_fetch_v4<__op>::template __run<__FetchT>(
689 __tex_handle_to_obj(__handle), __args...));
690}
691
692// __nv_tex_surf_handler ("__tex...", &type_dummy, &ret, texture<...>, args...);
693// cudaReadModeNormalizedFloat fetches always return float4.
694template <class __op, class __DataT, class __RetT, int __TexT, class... __Args>
695__device__ static void
696__tex_fetch(__DataT *, __RetT *__ptr,
697 texture<__DataT, __TexT, cudaReadModeNormalizedFloat> __handle,
698 __Args... __args) {
699 using __FetchT = typename __TypeInfoT<__DataT>::__fetch_t;
700 *__ptr = __convert<__RetT, float4>::__run(
701 __tex_fetch_v4<__op>::template __run<__FetchT>(
702 __tex_handle_to_obj(__handle), __args...));
703}
704
705// __nv_tex_surf_handler ("__tex...", &type_dummy, &ret, texture<...>, args...);
706// For cudaReadModeElementType fetch return type is based on type_dummy.
707template <class __op, class __DataT, class __RetT, int __TexT, class... __Args>
708__device__ static void
709__tex_fetch(__DataT *, __RetT *__ptr,
710 texture<__DataT, __TexT, cudaReadModeElementType> __handle,
711 __Args... __args) {
712 using __FetchT = typename __TypeInfoT<__DataT>::__fetch_t;
713 *__ptr = __convert<__RetT, __FetchT>::__run(
714 __tex_fetch_v4<__op>::template __run<__FetchT>(
715 __tex_handle_to_obj(__handle), __args...));
716}
717#endif // CUDA_VERSION
718} // namespace __cuda_tex
719} // namespace
720#pragma pop_macro("__ASM_OUT")
721#pragma pop_macro("__ASM_OUTP")
722#pragma pop_macro("__Args")
723#pragma pop_macro("__ID")
724#pragma pop_macro("__IDV")
725#pragma pop_macro("__IMPL_2DGATHER")
726#pragma pop_macro("__IMPL_ALIAS")
727#pragma pop_macro("__IMPL_ALIASI")
728#pragma pop_macro("__IMPL_F1")
729#pragma pop_macro("__IMPL_F3")
730#pragma pop_macro("__IMPL_F3N")
731#pragma pop_macro("__IMPL_F3S")
732#pragma pop_macro("__IMPL_S")
733#pragma pop_macro("__IMPL_S3")
734#pragma pop_macro("__IMPL_S3I")
735#pragma pop_macro("__IMPL_S3N")
736#pragma pop_macro("__IMPL_S3NI")
737#pragma pop_macro("__IMPL_S3S")
738#pragma pop_macro("__IMPL_S3SI")
739#pragma pop_macro("__IMPL_SI")
740#pragma pop_macro("__L")
741#pragma pop_macro("__STRIP_PARENS")
742#endif // __CLANG_CUDA_TEXTURE_INTRINSICS_H__
lib/include/__clang_hip_cmath.h deleted-842
...@@ -1,842 +0,0 @@
1/*===---- __clang_hip_cmath.h - HIP cmath decls -----------------------------===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 *===-----------------------------------------------------------------------===
8 */
9
10#ifndef __CLANG_HIP_CMATH_H__
11#define __CLANG_HIP_CMATH_H__
12
13#if !defined(__HIP__) && !defined(__OPENMP_AMDGCN__)
14#error "This file is for HIP and OpenMP AMDGCN device compilation only."
15#endif
16
17#if !defined(__HIPCC_RTC__)
18#if defined(__cplusplus)
19#include <limits>
20#include <type_traits>
21#include <utility>
22#endif
23#include <limits.h>
24#include <stdint.h>
25#endif // !defined(__HIPCC_RTC__)
26
27#pragma push_macro("__DEVICE__")
28#pragma push_macro("__CONSTEXPR__")
29#ifdef __OPENMP_AMDGCN__
30#define __DEVICE__ static __attribute__((always_inline, nothrow))
31#define __CONSTEXPR__ constexpr
32#else
33#define __DEVICE__ static __device__ inline __attribute__((always_inline))
34#define __CONSTEXPR__
35#endif // __OPENMP_AMDGCN__
36
37// Start with functions that cannot be defined by DEF macros below.
38#if defined(__cplusplus)
39#if defined __OPENMP_AMDGCN__
40__DEVICE__ __CONSTEXPR__ float fabs(float __x) { return ::fabsf(__x); }
41__DEVICE__ __CONSTEXPR__ float sin(float __x) { return ::sinf(__x); }
42__DEVICE__ __CONSTEXPR__ float cos(float __x) { return ::cosf(__x); }
43#endif
44__DEVICE__ __CONSTEXPR__ double abs(double __x) { return ::fabs(__x); }
45__DEVICE__ __CONSTEXPR__ float abs(float __x) { return ::fabsf(__x); }
46__DEVICE__ __CONSTEXPR__ long long abs(long long __n) { return ::llabs(__n); }
47__DEVICE__ __CONSTEXPR__ long abs(long __n) { return ::labs(__n); }
48__DEVICE__ __CONSTEXPR__ float fma(float __x, float __y, float __z) {
49 return ::fmaf(__x, __y, __z);
50}
51#if !defined(__HIPCC_RTC__)
52// The value returned by fpclassify is platform dependent, therefore it is not
53// supported by hipRTC.
54__DEVICE__ __CONSTEXPR__ int fpclassify(float __x) {
55 return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL,
56 FP_ZERO, __x);
57}
58__DEVICE__ __CONSTEXPR__ int fpclassify(double __x) {
59 return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL,
60 FP_ZERO, __x);
61}
62#endif // !defined(__HIPCC_RTC__)
63
64__DEVICE__ __CONSTEXPR__ float frexp(float __arg, int *__exp) {
65 return ::frexpf(__arg, __exp);
66}
67
68#if defined(__OPENMP_AMDGCN__)
69// For OpenMP we work around some old system headers that have non-conforming
70// `isinf(float)` and `isnan(float)` implementations that return an `int`. We do
71// this by providing two versions of these functions, differing only in the
72// return type. To avoid conflicting definitions we disable implicit base
73// function generation. That means we will end up with two specializations, one
74// per type, but only one has a base function defined by the system header.
75#pragma omp begin declare variant match( \
76 implementation = {extension(disable_implicit_base)})
77
78// FIXME: We lack an extension to customize the mangling of the variants, e.g.,
79// add a suffix. This means we would clash with the names of the variants
80// (note that we do not create implicit base functions here). To avoid
81// this clash we add a new trait to some of them that is always true
82// (this is LLVM after all ;)). It will only influence the mangled name
83// of the variants inside the inner region and avoid the clash.
84#pragma omp begin declare variant match(implementation = {vendor(llvm)})
85
86__DEVICE__ __CONSTEXPR__ int isinf(float __x) { return ::__isinff(__x); }
87__DEVICE__ __CONSTEXPR__ int isinf(double __x) { return ::__isinf(__x); }
88__DEVICE__ __CONSTEXPR__ int isfinite(float __x) { return ::__finitef(__x); }
89__DEVICE__ __CONSTEXPR__ int isfinite(double __x) { return ::__finite(__x); }
90__DEVICE__ __CONSTEXPR__ int isnan(float __x) { return ::__isnanf(__x); }
91__DEVICE__ __CONSTEXPR__ int isnan(double __x) { return ::__isnan(__x); }
92
93#pragma omp end declare variant
94#endif // defined(__OPENMP_AMDGCN__)
95
96__DEVICE__ __CONSTEXPR__ bool isinf(float __x) { return ::__isinff(__x); }
97__DEVICE__ __CONSTEXPR__ bool isinf(double __x) { return ::__isinf(__x); }
98__DEVICE__ __CONSTEXPR__ bool isfinite(float __x) { return ::__finitef(__x); }
99__DEVICE__ __CONSTEXPR__ bool isfinite(double __x) { return ::__finite(__x); }
100__DEVICE__ __CONSTEXPR__ bool isnan(float __x) { return ::__isnanf(__x); }
101__DEVICE__ __CONSTEXPR__ bool isnan(double __x) { return ::__isnan(__x); }
102
103#if defined(__OPENMP_AMDGCN__)
104#pragma omp end declare variant
105#endif // defined(__OPENMP_AMDGCN__)
106
107__DEVICE__ __CONSTEXPR__ bool isgreater(float __x, float __y) {
108 return __builtin_isgreater(__x, __y);
109}
110__DEVICE__ __CONSTEXPR__ bool isgreater(double __x, double __y) {
111 return __builtin_isgreater(__x, __y);
112}
113__DEVICE__ __CONSTEXPR__ bool isgreaterequal(float __x, float __y) {
114 return __builtin_isgreaterequal(__x, __y);
115}
116__DEVICE__ __CONSTEXPR__ bool isgreaterequal(double __x, double __y) {
117 return __builtin_isgreaterequal(__x, __y);
118}
119__DEVICE__ __CONSTEXPR__ bool isless(float __x, float __y) {
120 return __builtin_isless(__x, __y);
121}
122__DEVICE__ __CONSTEXPR__ bool isless(double __x, double __y) {
123 return __builtin_isless(__x, __y);
124}
125__DEVICE__ __CONSTEXPR__ bool islessequal(float __x, float __y) {
126 return __builtin_islessequal(__x, __y);
127}
128__DEVICE__ __CONSTEXPR__ bool islessequal(double __x, double __y) {
129 return __builtin_islessequal(__x, __y);
130}
131__DEVICE__ __CONSTEXPR__ bool islessgreater(float __x, float __y) {
132 return __builtin_islessgreater(__x, __y);
133}
134__DEVICE__ __CONSTEXPR__ bool islessgreater(double __x, double __y) {
135 return __builtin_islessgreater(__x, __y);
136}
137__DEVICE__ __CONSTEXPR__ bool isnormal(float __x) {
138 return __builtin_isnormal(__x);
139}
140__DEVICE__ __CONSTEXPR__ bool isnormal(double __x) {
141 return __builtin_isnormal(__x);
142}
143__DEVICE__ __CONSTEXPR__ bool isunordered(float __x, float __y) {
144 return __builtin_isunordered(__x, __y);
145}
146__DEVICE__ __CONSTEXPR__ bool isunordered(double __x, double __y) {
147 return __builtin_isunordered(__x, __y);
148}
149__DEVICE__ __CONSTEXPR__ float modf(float __x, float *__iptr) {
150 return ::modff(__x, __iptr);
151}
152__DEVICE__ __CONSTEXPR__ float pow(float __base, int __iexp) {
153 return ::powif(__base, __iexp);
154}
155__DEVICE__ __CONSTEXPR__ double pow(double __base, int __iexp) {
156 return ::powi(__base, __iexp);
157}
158__DEVICE__ __CONSTEXPR__ float remquo(float __x, float __y, int *__quo) {
159 return ::remquof(__x, __y, __quo);
160}
161__DEVICE__ __CONSTEXPR__ float scalbln(float __x, long int __n) {
162 return ::scalblnf(__x, __n);
163}
164__DEVICE__ __CONSTEXPR__ bool signbit(float __x) { return ::__signbitf(__x); }
165__DEVICE__ __CONSTEXPR__ bool signbit(double __x) { return ::__signbit(__x); }
166
167// Notably missing above is nexttoward. We omit it because
168// ocml doesn't provide an implementation, and we don't want to be in the
169// business of implementing tricky libm functions in this header.
170
171// Other functions.
172__DEVICE__ __CONSTEXPR__ _Float16 fma(_Float16 __x, _Float16 __y,
173 _Float16 __z) {
174 return __builtin_fmaf16(__x, __y, __z);
175}
176__DEVICE__ __CONSTEXPR__ _Float16 pow(_Float16 __base, int __iexp) {
177 return __ocml_pown_f16(__base, __iexp);
178}
179
180#ifndef __OPENMP_AMDGCN__
181// BEGIN DEF_FUN and HIP_OVERLOAD
182
183// BEGIN DEF_FUN
184
185#pragma push_macro("__DEF_FUN1")
186#pragma push_macro("__DEF_FUN2")
187#pragma push_macro("__DEF_FUN2_FI")
188
189// Define cmath functions with float argument and returns __retty.
190#define __DEF_FUN1(__retty, __func) \
191 __DEVICE__ __CONSTEXPR__ __retty __func(float __x) { return __func##f(__x); }
192
193// Define cmath functions with two float arguments and returns __retty.
194#define __DEF_FUN2(__retty, __func) \
195 __DEVICE__ __CONSTEXPR__ __retty __func(float __x, float __y) { \
196 return __func##f(__x, __y); \
197 }
198
199// Define cmath functions with a float and an int argument and returns __retty.
200#define __DEF_FUN2_FI(__retty, __func) \
201 __DEVICE__ __CONSTEXPR__ __retty __func(float __x, int __y) { \
202 return __func##f(__x, __y); \
203 }
204
205__DEF_FUN1(float, acos)
206__DEF_FUN1(float, acosh)
207__DEF_FUN1(float, asin)
208__DEF_FUN1(float, asinh)
209__DEF_FUN1(float, atan)
210__DEF_FUN2(float, atan2)
211__DEF_FUN1(float, atanh)
212__DEF_FUN1(float, cbrt)
213__DEF_FUN1(float, ceil)
214__DEF_FUN2(float, copysign)
215__DEF_FUN1(float, cos)
216__DEF_FUN1(float, cosh)
217__DEF_FUN1(float, erf)
218__DEF_FUN1(float, erfc)
219__DEF_FUN1(float, exp)
220__DEF_FUN1(float, exp2)
221__DEF_FUN1(float, expm1)
222__DEF_FUN1(float, fabs)
223__DEF_FUN2(float, fdim)
224__DEF_FUN1(float, floor)
225__DEF_FUN2(float, fmax)
226__DEF_FUN2(float, fmin)
227__DEF_FUN2(float, fmod)
228__DEF_FUN2(float, hypot)
229__DEF_FUN1(int, ilogb)
230__DEF_FUN2_FI(float, ldexp)
231__DEF_FUN1(float, lgamma)
232__DEF_FUN1(float, log)
233__DEF_FUN1(float, log10)
234__DEF_FUN1(float, log1p)
235__DEF_FUN1(float, log2)
236__DEF_FUN1(float, logb)
237__DEF_FUN1(long long, llrint)
238__DEF_FUN1(long long, llround)
239__DEF_FUN1(long, lrint)
240__DEF_FUN1(long, lround)
241__DEF_FUN1(float, nearbyint)
242__DEF_FUN2(float, nextafter)
243__DEF_FUN2(float, pow)
244__DEF_FUN2(float, remainder)
245__DEF_FUN1(float, rint)
246__DEF_FUN1(float, round)
247__DEF_FUN2_FI(float, scalbn)
248__DEF_FUN1(float, sin)
249__DEF_FUN1(float, sinh)
250__DEF_FUN1(float, sqrt)
251__DEF_FUN1(float, tan)
252__DEF_FUN1(float, tanh)
253__DEF_FUN1(float, tgamma)
254__DEF_FUN1(float, trunc)
255
256#pragma pop_macro("__DEF_FUN1")
257#pragma pop_macro("__DEF_FUN2")
258#pragma pop_macro("__DEF_FUN2_FI")
259
260// END DEF_FUN
261
262// BEGIN HIP_OVERLOAD
263
264#pragma push_macro("__HIP_OVERLOAD1")
265#pragma push_macro("__HIP_OVERLOAD2")
266
267// __hip_enable_if::type is a type function which returns __T if __B is true.
268template <bool __B, class __T = void> struct __hip_enable_if {};
269
270template <class __T> struct __hip_enable_if<true, __T> { typedef __T type; };
271
272namespace __hip {
273template <class _Tp> struct is_integral {
274 enum { value = 0 };
275};
276template <> struct is_integral<bool> {
277 enum { value = 1 };
278};
279template <> struct is_integral<char> {
280 enum { value = 1 };
281};
282template <> struct is_integral<signed char> {
283 enum { value = 1 };
284};
285template <> struct is_integral<unsigned char> {
286 enum { value = 1 };
287};
288template <> struct is_integral<wchar_t> {
289 enum { value = 1 };
290};
291template <> struct is_integral<short> {
292 enum { value = 1 };
293};
294template <> struct is_integral<unsigned short> {
295 enum { value = 1 };
296};
297template <> struct is_integral<int> {
298 enum { value = 1 };
299};
300template <> struct is_integral<unsigned int> {
301 enum { value = 1 };
302};
303template <> struct is_integral<long> {
304 enum { value = 1 };
305};
306template <> struct is_integral<unsigned long> {
307 enum { value = 1 };
308};
309template <> struct is_integral<long long> {
310 enum { value = 1 };
311};
312template <> struct is_integral<unsigned long long> {
313 enum { value = 1 };
314};
315
316// ToDo: specializes is_arithmetic<_Float16>
317template <class _Tp> struct is_arithmetic {
318 enum { value = 0 };
319};
320template <> struct is_arithmetic<bool> {
321 enum { value = 1 };
322};
323template <> struct is_arithmetic<char> {
324 enum { value = 1 };
325};
326template <> struct is_arithmetic<signed char> {
327 enum { value = 1 };
328};
329template <> struct is_arithmetic<unsigned char> {
330 enum { value = 1 };
331};
332template <> struct is_arithmetic<wchar_t> {
333 enum { value = 1 };
334};
335template <> struct is_arithmetic<short> {
336 enum { value = 1 };
337};
338template <> struct is_arithmetic<unsigned short> {
339 enum { value = 1 };
340};
341template <> struct is_arithmetic<int> {
342 enum { value = 1 };
343};
344template <> struct is_arithmetic<unsigned int> {
345 enum { value = 1 };
346};
347template <> struct is_arithmetic<long> {
348 enum { value = 1 };
349};
350template <> struct is_arithmetic<unsigned long> {
351 enum { value = 1 };
352};
353template <> struct is_arithmetic<long long> {
354 enum { value = 1 };
355};
356template <> struct is_arithmetic<unsigned long long> {
357 enum { value = 1 };
358};
359template <> struct is_arithmetic<float> {
360 enum { value = 1 };
361};
362template <> struct is_arithmetic<double> {
363 enum { value = 1 };
364};
365
366struct true_type {
367 static const __constant__ bool value = true;
368};
369struct false_type {
370 static const __constant__ bool value = false;
371};
372
373template <typename __T, typename __U> struct is_same : public false_type {};
374template <typename __T> struct is_same<__T, __T> : public true_type {};
375
376template <typename __T> struct add_rvalue_reference { typedef __T &&type; };
377
378template <typename __T> typename add_rvalue_reference<__T>::type declval();
379
380// decltype is only available in C++11 and above.
381#if __cplusplus >= 201103L
382// __hip_promote
383template <class _Tp> struct __numeric_type {
384 static void __test(...);
385 static _Float16 __test(_Float16);
386 static float __test(float);
387 static double __test(char);
388 static double __test(int);
389 static double __test(unsigned);
390 static double __test(long);
391 static double __test(unsigned long);
392 static double __test(long long);
393 static double __test(unsigned long long);
394 static double __test(double);
395 // No support for long double, use double instead.
396 static double __test(long double);
397
398 typedef decltype(__test(declval<_Tp>())) type;
399 static const bool value = !is_same<type, void>::value;
400};
401
402template <> struct __numeric_type<void> { static const bool value = true; };
403
404template <class _A1, class _A2 = void, class _A3 = void,
405 bool = __numeric_type<_A1>::value &&__numeric_type<_A2>::value
406 &&__numeric_type<_A3>::value>
407class __promote_imp {
408public:
409 static const bool value = false;
410};
411
412template <class _A1, class _A2, class _A3>
413class __promote_imp<_A1, _A2, _A3, true> {
414private:
415 typedef typename __promote_imp<_A1>::type __type1;
416 typedef typename __promote_imp<_A2>::type __type2;
417 typedef typename __promote_imp<_A3>::type __type3;
418
419public:
420 typedef decltype(__type1() + __type2() + __type3()) type;
421 static const bool value = true;
422};
423
424template <class _A1, class _A2> class __promote_imp<_A1, _A2, void, true> {
425private:
426 typedef typename __promote_imp<_A1>::type __type1;
427 typedef typename __promote_imp<_A2>::type __type2;
428
429public:
430 typedef decltype(__type1() + __type2()) type;
431 static const bool value = true;
432};
433
434template <class _A1> class __promote_imp<_A1, void, void, true> {
435public:
436 typedef typename __numeric_type<_A1>::type type;
437 static const bool value = true;
438};
439
440template <class _A1, class _A2 = void, class _A3 = void>
441class __promote : public __promote_imp<_A1, _A2, _A3> {};
442#endif //__cplusplus >= 201103L
443} // namespace __hip
444
445// __HIP_OVERLOAD1 is used to resolve function calls with integer argument to
446// avoid compilation error due to ambibuity. e.g. floor(5) is resolved with
447// floor(double).
448#define __HIP_OVERLOAD1(__retty, __fn) \
449 template <typename __T> \
450 __DEVICE__ __CONSTEXPR__ \
451 typename __hip_enable_if<__hip::is_integral<__T>::value, __retty>::type \
452 __fn(__T __x) { \
453 return ::__fn((double)__x); \
454 }
455
456// __HIP_OVERLOAD2 is used to resolve function calls with mixed float/double
457// or integer argument to avoid compilation error due to ambibuity. e.g.
458// max(5.0f, 6.0) is resolved with max(double, double).
459#if __cplusplus >= 201103L
460#define __HIP_OVERLOAD2(__retty, __fn) \
461 template <typename __T1, typename __T2> \
462 __DEVICE__ __CONSTEXPR__ typename __hip_enable_if< \
463 __hip::is_arithmetic<__T1>::value && __hip::is_arithmetic<__T2>::value, \
464 typename __hip::__promote<__T1, __T2>::type>::type \
465 __fn(__T1 __x, __T2 __y) { \
466 typedef typename __hip::__promote<__T1, __T2>::type __result_type; \
467 return __fn((__result_type)__x, (__result_type)__y); \
468 }
469#else
470#define __HIP_OVERLOAD2(__retty, __fn) \
471 template <typename __T1, typename __T2> \
472 __DEVICE__ __CONSTEXPR__ \
473 typename __hip_enable_if<__hip::is_arithmetic<__T1>::value && \
474 __hip::is_arithmetic<__T2>::value, \
475 __retty>::type \
476 __fn(__T1 __x, __T2 __y) { \
477 return __fn((double)__x, (double)__y); \
478 }
479#endif
480
481__HIP_OVERLOAD1(double, acos)
482__HIP_OVERLOAD1(double, acosh)
483__HIP_OVERLOAD1(double, asin)
484__HIP_OVERLOAD1(double, asinh)
485__HIP_OVERLOAD1(double, atan)
486__HIP_OVERLOAD2(double, atan2)
487__HIP_OVERLOAD1(double, atanh)
488__HIP_OVERLOAD1(double, cbrt)
489__HIP_OVERLOAD1(double, ceil)
490__HIP_OVERLOAD2(double, copysign)
491__HIP_OVERLOAD1(double, cos)
492__HIP_OVERLOAD1(double, cosh)
493__HIP_OVERLOAD1(double, erf)
494__HIP_OVERLOAD1(double, erfc)
495__HIP_OVERLOAD1(double, exp)
496__HIP_OVERLOAD1(double, exp2)
497__HIP_OVERLOAD1(double, expm1)
498__HIP_OVERLOAD1(double, fabs)
499__HIP_OVERLOAD2(double, fdim)
500__HIP_OVERLOAD1(double, floor)
501__HIP_OVERLOAD2(double, fmax)
502__HIP_OVERLOAD2(double, fmin)
503__HIP_OVERLOAD2(double, fmod)
504#if !defined(__HIPCC_RTC__)
505__HIP_OVERLOAD1(int, fpclassify)
506#endif // !defined(__HIPCC_RTC__)
507__HIP_OVERLOAD2(double, hypot)
508__HIP_OVERLOAD1(int, ilogb)
509__HIP_OVERLOAD1(bool, isfinite)
510__HIP_OVERLOAD2(bool, isgreater)
511__HIP_OVERLOAD2(bool, isgreaterequal)
512__HIP_OVERLOAD1(bool, isinf)
513__HIP_OVERLOAD2(bool, isless)
514__HIP_OVERLOAD2(bool, islessequal)
515__HIP_OVERLOAD2(bool, islessgreater)
516__HIP_OVERLOAD1(bool, isnan)
517__HIP_OVERLOAD1(bool, isnormal)
518__HIP_OVERLOAD2(bool, isunordered)
519__HIP_OVERLOAD1(double, lgamma)
520__HIP_OVERLOAD1(double, log)
521__HIP_OVERLOAD1(double, log10)
522__HIP_OVERLOAD1(double, log1p)
523__HIP_OVERLOAD1(double, log2)
524__HIP_OVERLOAD1(double, logb)
525__HIP_OVERLOAD1(long long, llrint)
526__HIP_OVERLOAD1(long long, llround)
527__HIP_OVERLOAD1(long, lrint)
528__HIP_OVERLOAD1(long, lround)
529__HIP_OVERLOAD1(double, nearbyint)
530__HIP_OVERLOAD2(double, nextafter)
531__HIP_OVERLOAD2(double, pow)
532__HIP_OVERLOAD2(double, remainder)
533__HIP_OVERLOAD1(double, rint)
534__HIP_OVERLOAD1(double, round)
535__HIP_OVERLOAD1(bool, signbit)
536__HIP_OVERLOAD1(double, sin)
537__HIP_OVERLOAD1(double, sinh)
538__HIP_OVERLOAD1(double, sqrt)
539__HIP_OVERLOAD1(double, tan)
540__HIP_OVERLOAD1(double, tanh)
541__HIP_OVERLOAD1(double, tgamma)
542__HIP_OVERLOAD1(double, trunc)
543
544// Overload these but don't add them to std, they are not part of cmath.
545__HIP_OVERLOAD2(double, max)
546__HIP_OVERLOAD2(double, min)
547
548// Additional Overloads that don't quite match HIP_OVERLOAD.
549#if __cplusplus >= 201103L
550template <typename __T1, typename __T2, typename __T3>
551__DEVICE__ __CONSTEXPR__ typename __hip_enable_if<
552 __hip::is_arithmetic<__T1>::value && __hip::is_arithmetic<__T2>::value &&
553 __hip::is_arithmetic<__T3>::value,
554 typename __hip::__promote<__T1, __T2, __T3>::type>::type
555fma(__T1 __x, __T2 __y, __T3 __z) {
556 typedef typename __hip::__promote<__T1, __T2, __T3>::type __result_type;
557 return ::fma((__result_type)__x, (__result_type)__y, (__result_type)__z);
558}
559#else
560template <typename __T1, typename __T2, typename __T3>
561__DEVICE__ __CONSTEXPR__
562 typename __hip_enable_if<__hip::is_arithmetic<__T1>::value &&
563 __hip::is_arithmetic<__T2>::value &&
564 __hip::is_arithmetic<__T3>::value,
565 double>::type
566 fma(__T1 __x, __T2 __y, __T3 __z) {
567 return ::fma((double)__x, (double)__y, (double)__z);
568}
569#endif
570
571template <typename __T>
572__DEVICE__ __CONSTEXPR__
573 typename __hip_enable_if<__hip::is_integral<__T>::value, double>::type
574 frexp(__T __x, int *__exp) {
575 return ::frexp((double)__x, __exp);
576}
577
578template <typename __T>
579__DEVICE__ __CONSTEXPR__
580 typename __hip_enable_if<__hip::is_integral<__T>::value, double>::type
581 ldexp(__T __x, int __exp) {
582 return ::ldexp((double)__x, __exp);
583}
584
585template <typename __T>
586__DEVICE__ __CONSTEXPR__
587 typename __hip_enable_if<__hip::is_integral<__T>::value, double>::type
588 modf(__T __x, double *__exp) {
589 return ::modf((double)__x, __exp);
590}
591
592#if __cplusplus >= 201103L
593template <typename __T1, typename __T2>
594__DEVICE__ __CONSTEXPR__
595 typename __hip_enable_if<__hip::is_arithmetic<__T1>::value &&
596 __hip::is_arithmetic<__T2>::value,
597 typename __hip::__promote<__T1, __T2>::type>::type
598 remquo(__T1 __x, __T2 __y, int *__quo) {
599 typedef typename __hip::__promote<__T1, __T2>::type __result_type;
600 return ::remquo((__result_type)__x, (__result_type)__y, __quo);
601}
602#else
603template <typename __T1, typename __T2>
604__DEVICE__ __CONSTEXPR__
605 typename __hip_enable_if<__hip::is_arithmetic<__T1>::value &&
606 __hip::is_arithmetic<__T2>::value,
607 double>::type
608 remquo(__T1 __x, __T2 __y, int *__quo) {
609 return ::remquo((double)__x, (double)__y, __quo);
610}
611#endif
612
613template <typename __T>
614__DEVICE__ __CONSTEXPR__
615 typename __hip_enable_if<__hip::is_integral<__T>::value, double>::type
616 scalbln(__T __x, long int __exp) {
617 return ::scalbln((double)__x, __exp);
618}
619
620template <typename __T>
621__DEVICE__ __CONSTEXPR__
622 typename __hip_enable_if<__hip::is_integral<__T>::value, double>::type
623 scalbn(__T __x, int __exp) {
624 return ::scalbn((double)__x, __exp);
625}
626
627#pragma pop_macro("__HIP_OVERLOAD1")
628#pragma pop_macro("__HIP_OVERLOAD2")
629
630// END HIP_OVERLOAD
631
632// END DEF_FUN and HIP_OVERLOAD
633
634#endif // ifndef __OPENMP_AMDGCN__
635#endif // defined(__cplusplus)
636
637#ifndef __OPENMP_AMDGCN__
638// Define these overloads inside the namespace our standard library uses.
639#if !defined(__HIPCC_RTC__)
640#ifdef _LIBCPP_BEGIN_NAMESPACE_STD
641_LIBCPP_BEGIN_NAMESPACE_STD
642#else
643namespace std {
644#ifdef _GLIBCXX_BEGIN_NAMESPACE_VERSION
645_GLIBCXX_BEGIN_NAMESPACE_VERSION
646#endif // _GLIBCXX_BEGIN_NAMESPACE_VERSION
647#endif // _LIBCPP_BEGIN_NAMESPACE_STD
648
649// Pull the new overloads we defined above into namespace std.
650// using ::abs; - This may be considered for C++.
651using ::acos;
652using ::acosh;
653using ::asin;
654using ::asinh;
655using ::atan;
656using ::atan2;
657using ::atanh;
658using ::cbrt;
659using ::ceil;
660using ::copysign;
661using ::cos;
662using ::cosh;
663using ::erf;
664using ::erfc;
665using ::exp;
666using ::exp2;
667using ::expm1;
668using ::fabs;
669using ::fdim;
670using ::floor;
671using ::fma;
672using ::fmax;
673using ::fmin;
674using ::fmod;
675using ::fpclassify;
676using ::frexp;
677using ::hypot;
678using ::ilogb;
679using ::isfinite;
680using ::isgreater;
681using ::isgreaterequal;
682using ::isless;
683using ::islessequal;
684using ::islessgreater;
685using ::isnormal;
686using ::isunordered;
687using ::ldexp;
688using ::lgamma;
689using ::llrint;
690using ::llround;
691using ::log;
692using ::log10;
693using ::log1p;
694using ::log2;
695using ::logb;
696using ::lrint;
697using ::lround;
698using ::modf;
699// using ::nan; - This may be considered for C++.
700// using ::nanf; - This may be considered for C++.
701// using ::nanl; - This is not yet defined.
702using ::nearbyint;
703using ::nextafter;
704// using ::nexttoward; - Omit this since we do not have a definition.
705using ::pow;
706using ::remainder;
707using ::remquo;
708using ::rint;
709using ::round;
710using ::scalbln;
711using ::scalbn;
712using ::signbit;
713using ::sin;
714using ::sinh;
715using ::sqrt;
716using ::tan;
717using ::tanh;
718using ::tgamma;
719using ::trunc;
720
721// Well this is fun: We need to pull these symbols in for libc++, but we can't
722// pull them in with libstdc++, because its ::isinf and ::isnan are different
723// than its std::isinf and std::isnan.
724#ifndef __GLIBCXX__
725using ::isinf;
726using ::isnan;
727#endif
728
729// Finally, pull the "foobarf" functions that HIP defines into std.
730using ::acosf;
731using ::acoshf;
732using ::asinf;
733using ::asinhf;
734using ::atan2f;
735using ::atanf;
736using ::atanhf;
737using ::cbrtf;
738using ::ceilf;
739using ::copysignf;
740using ::cosf;
741using ::coshf;
742using ::erfcf;
743using ::erff;
744using ::exp2f;
745using ::expf;
746using ::expm1f;
747using ::fabsf;
748using ::fdimf;
749using ::floorf;
750using ::fmaf;
751using ::fmaxf;
752using ::fminf;
753using ::fmodf;
754using ::frexpf;
755using ::hypotf;
756using ::ilogbf;
757using ::ldexpf;
758using ::lgammaf;
759using ::llrintf;
760using ::llroundf;
761using ::log10f;
762using ::log1pf;
763using ::log2f;
764using ::logbf;
765using ::logf;
766using ::lrintf;
767using ::lroundf;
768using ::modff;
769using ::nearbyintf;
770using ::nextafterf;
771// using ::nexttowardf; - Omit this since we do not have a definition.
772using ::powf;
773using ::remainderf;
774using ::remquof;
775using ::rintf;
776using ::roundf;
777using ::scalblnf;
778using ::scalbnf;
779using ::sinf;
780using ::sinhf;
781using ::sqrtf;
782using ::tanf;
783using ::tanhf;
784using ::tgammaf;
785using ::truncf;
786
787#ifdef _LIBCPP_END_NAMESPACE_STD
788_LIBCPP_END_NAMESPACE_STD
789#else
790#ifdef _GLIBCXX_BEGIN_NAMESPACE_VERSION
791_GLIBCXX_END_NAMESPACE_VERSION
792#endif // _GLIBCXX_BEGIN_NAMESPACE_VERSION
793} // namespace std
794#endif // _LIBCPP_END_NAMESPACE_STD
795#endif // !defined(__HIPCC_RTC__)
796
797// Define device-side math functions from <ymath.h> on MSVC.
798#if !defined(__HIPCC_RTC__)
799#if defined(_MSC_VER)
800
801// Before VS2019, `<ymath.h>` is also included in `<limits>` and other headers.
802// But, from VS2019, it's only included in `<complex>`. Need to include
803// `<ymath.h>` here to ensure C functions declared there won't be markded as
804// `__host__` and `__device__` through `<complex>` wrapper.
805#include <ymath.h>
806
807#if defined(__cplusplus)
808extern "C" {
809#endif // defined(__cplusplus)
810__DEVICE__ __CONSTEXPR__ __attribute__((overloadable)) double _Cosh(double x,
811 double y) {
812 return cosh(x) * y;
813}
814__DEVICE__ __CONSTEXPR__ __attribute__((overloadable)) float _FCosh(float x,
815 float y) {
816 return coshf(x) * y;
817}
818__DEVICE__ __CONSTEXPR__ __attribute__((overloadable)) short _Dtest(double *p) {
819 return fpclassify(*p);
820}
821__DEVICE__ __CONSTEXPR__ __attribute__((overloadable)) short _FDtest(float *p) {
822 return fpclassify(*p);
823}
824__DEVICE__ __CONSTEXPR__ __attribute__((overloadable)) double _Sinh(double x,
825 double y) {
826 return sinh(x) * y;
827}
828__DEVICE__ __CONSTEXPR__ __attribute__((overloadable)) float _FSinh(float x,
829 float y) {
830 return sinhf(x) * y;
831}
832#if defined(__cplusplus)
833}
834#endif // defined(__cplusplus)
835#endif // defined(_MSC_VER)
836#endif // !defined(__HIPCC_RTC__)
837#endif // ifndef __OPENMP_AMDGCN__
838
839#pragma pop_macro("__DEVICE__")
840#pragma pop_macro("__CONSTEXPR__")
841
842#endif // __CLANG_HIP_CMATH_H__
lib/include/__clang_hip_libdevice_declares.h deleted-353
...@@ -1,353 +0,0 @@
1/*===---- __clang_hip_libdevice_declares.h - HIP device library decls -------===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 *===-----------------------------------------------------------------------===
8 */
9
10#ifndef __CLANG_HIP_LIBDEVICE_DECLARES_H__
11#define __CLANG_HIP_LIBDEVICE_DECLARES_H__
12
13#if !defined(__HIPCC_RTC__) && __has_include("hip/hip_version.h")
14#include "hip/hip_version.h"
15#endif // __has_include("hip/hip_version.h")
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21// BEGIN FLOAT
22__device__ __attribute__((const)) float __ocml_acos_f32(float);
23__device__ __attribute__((pure)) float __ocml_acosh_f32(float);
24__device__ __attribute__((const)) float __ocml_asin_f32(float);
25__device__ __attribute__((pure)) float __ocml_asinh_f32(float);
26__device__ __attribute__((const)) float __ocml_atan2_f32(float, float);
27__device__ __attribute__((const)) float __ocml_atan_f32(float);
28__device__ __attribute__((pure)) float __ocml_atanh_f32(float);
29__device__ __attribute__((pure)) float __ocml_cbrt_f32(float);
30__device__ __attribute__((const)) float __ocml_ceil_f32(float);
31__device__ __attribute__((const)) __device__ float __ocml_copysign_f32(float,
32 float);
33__device__ float __ocml_cos_f32(float);
34__device__ float __ocml_native_cos_f32(float);
35__device__ __attribute__((pure)) __device__ float __ocml_cosh_f32(float);
36__device__ float __ocml_cospi_f32(float);
37__device__ float __ocml_i0_f32(float);
38__device__ float __ocml_i1_f32(float);
39__device__ __attribute__((pure)) float __ocml_erfc_f32(float);
40__device__ __attribute__((pure)) float __ocml_erfcinv_f32(float);
41__device__ __attribute__((pure)) float __ocml_erfcx_f32(float);
42__device__ __attribute__((pure)) float __ocml_erf_f32(float);
43__device__ __attribute__((pure)) float __ocml_erfinv_f32(float);
44__device__ __attribute__((pure)) float __ocml_exp10_f32(float);
45__device__ __attribute__((pure)) float __ocml_native_exp10_f32(float);
46__device__ __attribute__((pure)) float __ocml_exp2_f32(float);
47__device__ __attribute__((pure)) float __ocml_exp_f32(float);
48__device__ __attribute__((pure)) float __ocml_native_exp_f32(float);
49__device__ __attribute__((pure)) float __ocml_expm1_f32(float);
50__device__ __attribute__((const)) float __ocml_fabs_f32(float);
51__device__ __attribute__((const)) float __ocml_fdim_f32(float, float);
52__device__ __attribute__((const)) float __ocml_floor_f32(float);
53__device__ __attribute__((const)) float __ocml_fma_f32(float, float, float);
54__device__ __attribute__((const)) float __ocml_fmax_f32(float, float);
55__device__ __attribute__((const)) float __ocml_fmin_f32(float, float);
56__device__ __attribute__((const)) __device__ float __ocml_fmod_f32(float,
57 float);
58__device__ float __ocml_frexp_f32(float,
59 __attribute__((address_space(5))) int *);
60__device__ __attribute__((const)) float __ocml_hypot_f32(float, float);
61__device__ __attribute__((const)) int __ocml_ilogb_f32(float);
62__device__ __attribute__((const)) int __ocml_isfinite_f32(float);
63__device__ __attribute__((const)) int __ocml_isinf_f32(float);
64__device__ __attribute__((const)) int __ocml_isnan_f32(float);
65__device__ float __ocml_j0_f32(float);
66__device__ float __ocml_j1_f32(float);
67__device__ __attribute__((const)) float __ocml_ldexp_f32(float, int);
68__device__ float __ocml_lgamma_f32(float);
69__device__ __attribute__((pure)) float __ocml_log10_f32(float);
70__device__ __attribute__((pure)) float __ocml_native_log10_f32(float);
71__device__ __attribute__((pure)) float __ocml_log1p_f32(float);
72__device__ __attribute__((pure)) float __ocml_log2_f32(float);
73__device__ __attribute__((pure)) float __ocml_native_log2_f32(float);
74__device__ __attribute__((const)) float __ocml_logb_f32(float);
75__device__ __attribute__((pure)) float __ocml_log_f32(float);
76__device__ __attribute__((pure)) float __ocml_native_log_f32(float);
77__device__ float __ocml_modf_f32(float,
78 __attribute__((address_space(5))) float *);
79__device__ __attribute__((const)) float __ocml_nearbyint_f32(float);
80__device__ __attribute__((const)) float __ocml_nextafter_f32(float, float);
81__device__ __attribute__((const)) float __ocml_len3_f32(float, float, float);
82__device__ __attribute__((const)) float __ocml_len4_f32(float, float, float,
83 float);
84__device__ __attribute__((pure)) float __ocml_ncdf_f32(float);
85__device__ __attribute__((pure)) float __ocml_ncdfinv_f32(float);
86__device__ __attribute__((pure)) float __ocml_pow_f32(float, float);
87__device__ __attribute__((pure)) float __ocml_pown_f32(float, int);
88__device__ __attribute__((pure)) float __ocml_rcbrt_f32(float);
89__device__ __attribute__((const)) float __ocml_remainder_f32(float, float);
90__device__ float __ocml_remquo_f32(float, float,
91 __attribute__((address_space(5))) int *);
92__device__ __attribute__((const)) float __ocml_rhypot_f32(float, float);
93__device__ __attribute__((const)) float __ocml_rint_f32(float);
94__device__ __attribute__((const)) float __ocml_rlen3_f32(float, float, float);
95__device__ __attribute__((const)) float __ocml_rlen4_f32(float, float, float,
96 float);
97__device__ __attribute__((const)) float __ocml_round_f32(float);
98__device__ __attribute__((pure)) float __ocml_rsqrt_f32(float);
99__device__ __attribute__((const)) float __ocml_scalb_f32(float, float);
100__device__ __attribute__((const)) float __ocml_scalbn_f32(float, int);
101__device__ __attribute__((const)) int __ocml_signbit_f32(float);
102__device__ float __ocml_sincos_f32(float,
103 __attribute__((address_space(5))) float *);
104__device__ float __ocml_sincospi_f32(float,
105 __attribute__((address_space(5))) float *);
106__device__ float __ocml_sin_f32(float);
107__device__ float __ocml_native_sin_f32(float);
108__device__ __attribute__((pure)) float __ocml_sinh_f32(float);
109__device__ float __ocml_sinpi_f32(float);
110__device__ __attribute__((const)) float __ocml_sqrt_f32(float);
111__device__ __attribute__((const)) float __ocml_native_sqrt_f32(float);
112__device__ float __ocml_tan_f32(float);
113__device__ __attribute__((pure)) float __ocml_tanh_f32(float);
114__device__ float __ocml_tgamma_f32(float);
115__device__ __attribute__((const)) float __ocml_trunc_f32(float);
116__device__ float __ocml_y0_f32(float);
117__device__ float __ocml_y1_f32(float);
118
119// BEGIN INTRINSICS
120__device__ __attribute__((const)) float __ocml_add_rte_f32(float, float);
121__device__ __attribute__((const)) float __ocml_add_rtn_f32(float, float);
122__device__ __attribute__((const)) float __ocml_add_rtp_f32(float, float);
123__device__ __attribute__((const)) float __ocml_add_rtz_f32(float, float);
124__device__ __attribute__((const)) float __ocml_sub_rte_f32(float, float);
125__device__ __attribute__((const)) float __ocml_sub_rtn_f32(float, float);
126__device__ __attribute__((const)) float __ocml_sub_rtp_f32(float, float);
127__device__ __attribute__((const)) float __ocml_sub_rtz_f32(float, float);
128__device__ __attribute__((const)) float __ocml_mul_rte_f32(float, float);
129__device__ __attribute__((const)) float __ocml_mul_rtn_f32(float, float);
130__device__ __attribute__((const)) float __ocml_mul_rtp_f32(float, float);
131__device__ __attribute__((const)) float __ocml_mul_rtz_f32(float, float);
132__device__ __attribute__((const)) float __ocml_div_rte_f32(float, float);
133__device__ __attribute__((const)) float __ocml_div_rtn_f32(float, float);
134__device__ __attribute__((const)) float __ocml_div_rtp_f32(float, float);
135__device__ __attribute__((const)) float __ocml_div_rtz_f32(float, float);
136__device__ __attribute__((const)) float __ocml_sqrt_rte_f32(float);
137__device__ __attribute__((const)) float __ocml_sqrt_rtn_f32(float);
138__device__ __attribute__((const)) float __ocml_sqrt_rtp_f32(float);
139__device__ __attribute__((const)) float __ocml_sqrt_rtz_f32(float);
140__device__ __attribute__((const)) float __ocml_fma_rte_f32(float, float, float);
141__device__ __attribute__((const)) float __ocml_fma_rtn_f32(float, float, float);
142__device__ __attribute__((const)) float __ocml_fma_rtp_f32(float, float, float);
143__device__ __attribute__((const)) float __ocml_fma_rtz_f32(float, float, float);
144// END INTRINSICS
145// END FLOAT
146
147// BEGIN DOUBLE
148__device__ __attribute__((const)) double __ocml_acos_f64(double);
149__device__ __attribute__((pure)) double __ocml_acosh_f64(double);
150__device__ __attribute__((const)) double __ocml_asin_f64(double);
151__device__ __attribute__((pure)) double __ocml_asinh_f64(double);
152__device__ __attribute__((const)) double __ocml_atan2_f64(double, double);
153__device__ __attribute__((const)) double __ocml_atan_f64(double);
154__device__ __attribute__((pure)) double __ocml_atanh_f64(double);
155__device__ __attribute__((pure)) double __ocml_cbrt_f64(double);
156__device__ __attribute__((const)) double __ocml_ceil_f64(double);
157__device__ __attribute__((const)) double __ocml_copysign_f64(double, double);
158__device__ double __ocml_cos_f64(double);
159__device__ __attribute__((pure)) double __ocml_cosh_f64(double);
160__device__ double __ocml_cospi_f64(double);
161__device__ double __ocml_i0_f64(double);
162__device__ double __ocml_i1_f64(double);
163__device__ __attribute__((pure)) double __ocml_erfc_f64(double);
164__device__ __attribute__((pure)) double __ocml_erfcinv_f64(double);
165__device__ __attribute__((pure)) double __ocml_erfcx_f64(double);
166__device__ __attribute__((pure)) double __ocml_erf_f64(double);
167__device__ __attribute__((pure)) double __ocml_erfinv_f64(double);
168__device__ __attribute__((pure)) double __ocml_exp10_f64(double);
169__device__ __attribute__((pure)) double __ocml_exp2_f64(double);
170__device__ __attribute__((pure)) double __ocml_exp_f64(double);
171__device__ __attribute__((pure)) double __ocml_expm1_f64(double);
172__device__ __attribute__((const)) double __ocml_fabs_f64(double);
173__device__ __attribute__((const)) double __ocml_fdim_f64(double, double);
174__device__ __attribute__((const)) double __ocml_floor_f64(double);
175__device__ __attribute__((const)) double __ocml_fma_f64(double, double, double);
176__device__ __attribute__((const)) double __ocml_fmax_f64(double, double);
177__device__ __attribute__((const)) double __ocml_fmin_f64(double, double);
178__device__ __attribute__((const)) double __ocml_fmod_f64(double, double);
179__device__ double __ocml_frexp_f64(double,
180 __attribute__((address_space(5))) int *);
181__device__ __attribute__((const)) double __ocml_hypot_f64(double, double);
182__device__ __attribute__((const)) int __ocml_ilogb_f64(double);
183__device__ __attribute__((const)) int __ocml_isfinite_f64(double);
184__device__ __attribute__((const)) int __ocml_isinf_f64(double);
185__device__ __attribute__((const)) int __ocml_isnan_f64(double);
186__device__ double __ocml_j0_f64(double);
187__device__ double __ocml_j1_f64(double);
188__device__ __attribute__((const)) double __ocml_ldexp_f64(double, int);
189__device__ double __ocml_lgamma_f64(double);
190__device__ __attribute__((pure)) double __ocml_log10_f64(double);
191__device__ __attribute__((pure)) double __ocml_log1p_f64(double);
192__device__ __attribute__((pure)) double __ocml_log2_f64(double);
193__device__ __attribute__((const)) double __ocml_logb_f64(double);
194__device__ __attribute__((pure)) double __ocml_log_f64(double);
195__device__ double __ocml_modf_f64(double,
196 __attribute__((address_space(5))) double *);
197__device__ __attribute__((const)) double __ocml_nearbyint_f64(double);
198__device__ __attribute__((const)) double __ocml_nextafter_f64(double, double);
199__device__ __attribute__((const)) double __ocml_len3_f64(double, double,
200 double);
201__device__ __attribute__((const)) double __ocml_len4_f64(double, double, double,
202 double);
203__device__ __attribute__((pure)) double __ocml_ncdf_f64(double);
204__device__ __attribute__((pure)) double __ocml_ncdfinv_f64(double);
205__device__ __attribute__((pure)) double __ocml_pow_f64(double, double);
206__device__ __attribute__((pure)) double __ocml_pown_f64(double, int);
207__device__ __attribute__((pure)) double __ocml_rcbrt_f64(double);
208__device__ __attribute__((const)) double __ocml_remainder_f64(double, double);
209__device__ double __ocml_remquo_f64(double, double,
210 __attribute__((address_space(5))) int *);
211__device__ __attribute__((const)) double __ocml_rhypot_f64(double, double);
212__device__ __attribute__((const)) double __ocml_rint_f64(double);
213__device__ __attribute__((const)) double __ocml_rlen3_f64(double, double,
214 double);
215__device__ __attribute__((const)) double __ocml_rlen4_f64(double, double,
216 double, double);
217__device__ __attribute__((const)) double __ocml_round_f64(double);
218__device__ __attribute__((pure)) double __ocml_rsqrt_f64(double);
219__device__ __attribute__((const)) double __ocml_scalb_f64(double, double);
220__device__ __attribute__((const)) double __ocml_scalbn_f64(double, int);
221__device__ __attribute__((const)) int __ocml_signbit_f64(double);
222__device__ double __ocml_sincos_f64(double,
223 __attribute__((address_space(5))) double *);
224__device__ double
225__ocml_sincospi_f64(double, __attribute__((address_space(5))) double *);
226__device__ double __ocml_sin_f64(double);
227__device__ __attribute__((pure)) double __ocml_sinh_f64(double);
228__device__ double __ocml_sinpi_f64(double);
229__device__ __attribute__((const)) double __ocml_sqrt_f64(double);
230__device__ double __ocml_tan_f64(double);
231__device__ __attribute__((pure)) double __ocml_tanh_f64(double);
232__device__ double __ocml_tgamma_f64(double);
233__device__ __attribute__((const)) double __ocml_trunc_f64(double);
234__device__ double __ocml_y0_f64(double);
235__device__ double __ocml_y1_f64(double);
236
237// BEGIN INTRINSICS
238__device__ __attribute__((const)) double __ocml_add_rte_f64(double, double);
239__device__ __attribute__((const)) double __ocml_add_rtn_f64(double, double);
240__device__ __attribute__((const)) double __ocml_add_rtp_f64(double, double);
241__device__ __attribute__((const)) double __ocml_add_rtz_f64(double, double);
242__device__ __attribute__((const)) double __ocml_sub_rte_f64(double, double);
243__device__ __attribute__((const)) double __ocml_sub_rtn_f64(double, double);
244__device__ __attribute__((const)) double __ocml_sub_rtp_f64(double, double);
245__device__ __attribute__((const)) double __ocml_sub_rtz_f64(double, double);
246__device__ __attribute__((const)) double __ocml_mul_rte_f64(double, double);
247__device__ __attribute__((const)) double __ocml_mul_rtn_f64(double, double);
248__device__ __attribute__((const)) double __ocml_mul_rtp_f64(double, double);
249__device__ __attribute__((const)) double __ocml_mul_rtz_f64(double, double);
250__device__ __attribute__((const)) double __ocml_div_rte_f64(double, double);
251__device__ __attribute__((const)) double __ocml_div_rtn_f64(double, double);
252__device__ __attribute__((const)) double __ocml_div_rtp_f64(double, double);
253__device__ __attribute__((const)) double __ocml_div_rtz_f64(double, double);
254__device__ __attribute__((const)) double __ocml_sqrt_rte_f64(double);
255__device__ __attribute__((const)) double __ocml_sqrt_rtn_f64(double);
256__device__ __attribute__((const)) double __ocml_sqrt_rtp_f64(double);
257__device__ __attribute__((const)) double __ocml_sqrt_rtz_f64(double);
258__device__ __attribute__((const)) double __ocml_fma_rte_f64(double, double,
259 double);
260__device__ __attribute__((const)) double __ocml_fma_rtn_f64(double, double,
261 double);
262__device__ __attribute__((const)) double __ocml_fma_rtp_f64(double, double,
263 double);
264__device__ __attribute__((const)) double __ocml_fma_rtz_f64(double, double,
265 double);
266
267__device__ __attribute__((const)) _Float16 __ocml_ceil_f16(_Float16);
268__device__ _Float16 __ocml_cos_f16(_Float16);
269__device__ __attribute__((const)) _Float16 __ocml_cvtrtn_f16_f32(float);
270__device__ __attribute__((const)) _Float16 __ocml_cvtrtp_f16_f32(float);
271__device__ __attribute__((const)) _Float16 __ocml_cvtrtz_f16_f32(float);
272__device__ __attribute__((pure)) _Float16 __ocml_exp_f16(_Float16);
273__device__ __attribute__((pure)) _Float16 __ocml_exp10_f16(_Float16);
274__device__ __attribute__((pure)) _Float16 __ocml_exp2_f16(_Float16);
275__device__ __attribute__((const)) _Float16 __ocml_floor_f16(_Float16);
276__device__ __attribute__((const)) _Float16 __ocml_fma_f16(_Float16, _Float16,
277 _Float16);
278__device__ __attribute__((const)) _Float16 __ocml_fmax_f16(_Float16, _Float16);
279__device__ __attribute__((const)) _Float16 __ocml_fmin_f16(_Float16, _Float16);
280__device__ __attribute__((const)) _Float16 __ocml_fabs_f16(_Float16);
281__device__ __attribute__((const)) int __ocml_isinf_f16(_Float16);
282__device__ __attribute__((const)) int __ocml_isnan_f16(_Float16);
283__device__ __attribute__((pure)) _Float16 __ocml_log_f16(_Float16);
284__device__ __attribute__((pure)) _Float16 __ocml_log10_f16(_Float16);
285__device__ __attribute__((pure)) _Float16 __ocml_log2_f16(_Float16);
286__device__ __attribute__((const)) _Float16 __ocml_rint_f16(_Float16);
287__device__ __attribute__((const)) _Float16 __ocml_rsqrt_f16(_Float16);
288__device__ _Float16 __ocml_sin_f16(_Float16);
289__device__ __attribute__((const)) _Float16 __ocml_sqrt_f16(_Float16);
290__device__ __attribute__((const)) _Float16 __ocml_trunc_f16(_Float16);
291__device__ __attribute__((pure)) _Float16 __ocml_pown_f16(_Float16, int);
292
293typedef _Float16 __2f16 __attribute__((ext_vector_type(2)));
294typedef short __2i16 __attribute__((ext_vector_type(2)));
295
296// We need to match C99's bool and get an i1 in the IR.
297#ifdef __cplusplus
298typedef bool __ockl_bool;
299#else
300typedef _Bool __ockl_bool;
301#endif
302
303__device__ __attribute__((const)) float __ockl_fdot2(__2f16 a, __2f16 b,
304 float c, __ockl_bool s);
305__device__ __attribute__((const)) __2f16 __ocml_ceil_2f16(__2f16);
306__device__ __attribute__((const)) __2f16 __ocml_fabs_2f16(__2f16);
307__device__ __2f16 __ocml_cos_2f16(__2f16);
308__device__ __attribute__((pure)) __2f16 __ocml_exp_2f16(__2f16);
309__device__ __attribute__((pure)) __2f16 __ocml_exp10_2f16(__2f16);
310__device__ __attribute__((pure)) __2f16 __ocml_exp2_2f16(__2f16);
311__device__ __attribute__((const)) __2f16 __ocml_floor_2f16(__2f16);
312__device__ __attribute__((const))
313__2f16 __ocml_fma_2f16(__2f16, __2f16, __2f16);
314__device__ __attribute__((const)) __2i16 __ocml_isinf_2f16(__2f16);
315__device__ __attribute__((const)) __2i16 __ocml_isnan_2f16(__2f16);
316__device__ __attribute__((pure)) __2f16 __ocml_log_2f16(__2f16);
317__device__ __attribute__((pure)) __2f16 __ocml_log10_2f16(__2f16);
318__device__ __attribute__((pure)) __2f16 __ocml_log2_2f16(__2f16);
319
320#if HIP_VERSION_MAJOR * 100 + HIP_VERSION_MINOR >= 560
321#define __DEPRECATED_SINCE_HIP_560(X) __attribute__((deprecated(X)))
322#else
323#define __DEPRECATED_SINCE_HIP_560(X)
324#endif
325
326// Deprecated, should be removed when rocm releases using it are no longer
327// relevant.
328__DEPRECATED_SINCE_HIP_560("use ((_Float16)1.0) / ")
329__device__ inline _Float16 __llvm_amdgcn_rcp_f16(_Float16 x) {
330 return ((_Float16)1.0f) / x;
331}
332
333__DEPRECATED_SINCE_HIP_560("use ((__2f16)1.0) / ")
334__device__ inline __2f16
335__llvm_amdgcn_rcp_2f16(__2f16 __x)
336{
337 return ((__2f16)1.0f) / __x;
338}
339
340#undef __DEPRECATED_SINCE_HIP_560
341
342__device__ __attribute__((const)) __2f16 __ocml_rint_2f16(__2f16);
343__device__ __attribute__((const)) __2f16 __ocml_rsqrt_2f16(__2f16);
344__device__ __2f16 __ocml_sin_2f16(__2f16);
345__device__ __attribute__((const)) __2f16 __ocml_sqrt_2f16(__2f16);
346__device__ __attribute__((const)) __2f16 __ocml_trunc_2f16(__2f16);
347__device__ __attribute__((const)) __2f16 __ocml_pown_2f16(__2f16, __2i16);
348
349#ifdef __cplusplus
350} // extern "C"
351#endif
352
353#endif // __CLANG_HIP_LIBDEVICE_DECLARES_H__
lib/include/__clang_hip_math.h deleted-1324
...@@ -1,1324 +0,0 @@
1/*===---- __clang_hip_math.h - Device-side HIP math support ----------------===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 *===-----------------------------------------------------------------------===
8 */
9#ifndef __CLANG_HIP_MATH_H__
10#define __CLANG_HIP_MATH_H__
11
12#if !defined(__HIP__) && !defined(__OPENMP_AMDGCN__)
13#error "This file is for HIP and OpenMP AMDGCN device compilation only."
14#endif
15
16#if !defined(__HIPCC_RTC__)
17#include <limits.h>
18#include <stdint.h>
19#ifdef __OPENMP_AMDGCN__
20#include <omp.h>
21#endif
22#endif // !defined(__HIPCC_RTC__)
23
24#pragma push_macro("__DEVICE__")
25
26#ifdef __OPENMP_AMDGCN__
27#define __DEVICE__ static inline __attribute__((always_inline, nothrow))
28#else
29#define __DEVICE__ static __device__ inline __attribute__((always_inline))
30#endif
31
32// Device library provides fast low precision and slow full-recision
33// implementations for some functions. Which one gets selected depends on
34// __CLANG_GPU_APPROX_TRANSCENDENTALS__ which gets defined by clang if
35// -ffast-math or -fgpu-approx-transcendentals are in effect.
36#pragma push_macro("__FAST_OR_SLOW")
37#if defined(__CLANG_GPU_APPROX_TRANSCENDENTALS__)
38#define __FAST_OR_SLOW(fast, slow) fast
39#else
40#define __FAST_OR_SLOW(fast, slow) slow
41#endif
42
43// A few functions return bool type starting only in C++11.
44#pragma push_macro("__RETURN_TYPE")
45#ifdef __OPENMP_AMDGCN__
46#define __RETURN_TYPE int
47#else
48#if defined(__cplusplus)
49#define __RETURN_TYPE bool
50#else
51#define __RETURN_TYPE int
52#endif
53#endif // __OPENMP_AMDGCN__
54
55#if defined (__cplusplus) && __cplusplus < 201103L
56// emulate static_assert on type sizes
57template<bool>
58struct __compare_result{};
59template<>
60struct __compare_result<true> {
61 static const __device__ bool valid;
62};
63
64__DEVICE__
65void __suppress_unused_warning(bool b){};
66template <unsigned int S, unsigned int T>
67__DEVICE__ void __static_assert_equal_size() {
68 __suppress_unused_warning(__compare_result<S == T>::valid);
69}
70
71#define __static_assert_type_size_equal(A, B) \
72 __static_assert_equal_size<A,B>()
73
74#else
75#define __static_assert_type_size_equal(A,B) \
76 static_assert((A) == (B), "")
77
78#endif
79
80__DEVICE__
81uint64_t __make_mantissa_base8(const char *__tagp __attribute__((nonnull))) {
82 uint64_t __r = 0;
83 while (*__tagp != '\0') {
84 char __tmp = *__tagp;
85
86 if (__tmp >= '0' && __tmp <= '7')
87 __r = (__r * 8u) + __tmp - '0';
88 else
89 return 0;
90
91 ++__tagp;
92 }
93
94 return __r;
95}
96
97__DEVICE__
98uint64_t __make_mantissa_base10(const char *__tagp __attribute__((nonnull))) {
99 uint64_t __r = 0;
100 while (*__tagp != '\0') {
101 char __tmp = *__tagp;
102
103 if (__tmp >= '0' && __tmp <= '9')
104 __r = (__r * 10u) + __tmp - '0';
105 else
106 return 0;
107
108 ++__tagp;
109 }
110
111 return __r;
112}
113
114__DEVICE__
115uint64_t __make_mantissa_base16(const char *__tagp __attribute__((nonnull))) {
116 uint64_t __r = 0;
117 while (*__tagp != '\0') {
118 char __tmp = *__tagp;
119
120 if (__tmp >= '0' && __tmp <= '9')
121 __r = (__r * 16u) + __tmp - '0';
122 else if (__tmp >= 'a' && __tmp <= 'f')
123 __r = (__r * 16u) + __tmp - 'a' + 10;
124 else if (__tmp >= 'A' && __tmp <= 'F')
125 __r = (__r * 16u) + __tmp - 'A' + 10;
126 else
127 return 0;
128
129 ++__tagp;
130 }
131
132 return __r;
133}
134
135__DEVICE__
136uint64_t __make_mantissa(const char *__tagp __attribute__((nonnull))) {
137 if (*__tagp == '0') {
138 ++__tagp;
139
140 if (*__tagp == 'x' || *__tagp == 'X')
141 return __make_mantissa_base16(__tagp);
142 else
143 return __make_mantissa_base8(__tagp);
144 }
145
146 return __make_mantissa_base10(__tagp);
147}
148
149// BEGIN FLOAT
150
151// BEGIN INTRINSICS
152
153__DEVICE__
154float __cosf(float __x) { return __ocml_native_cos_f32(__x); }
155
156__DEVICE__
157float __exp10f(float __x) {
158 const float __log2_10 = 0x1.a934f0p+1f;
159 return __builtin_amdgcn_exp2f(__log2_10 * __x);
160}
161
162__DEVICE__
163float __expf(float __x) {
164 const float __log2_e = 0x1.715476p+0;
165 return __builtin_amdgcn_exp2f(__log2_e * __x);
166}
167
168#if defined OCML_BASIC_ROUNDED_OPERATIONS
169__DEVICE__
170float __fadd_rd(float __x, float __y) { return __ocml_add_rtn_f32(__x, __y); }
171__DEVICE__
172float __fadd_rn(float __x, float __y) { return __ocml_add_rte_f32(__x, __y); }
173__DEVICE__
174float __fadd_ru(float __x, float __y) { return __ocml_add_rtp_f32(__x, __y); }
175__DEVICE__
176float __fadd_rz(float __x, float __y) { return __ocml_add_rtz_f32(__x, __y); }
177#else
178__DEVICE__
179float __fadd_rn(float __x, float __y) { return __x + __y; }
180#endif
181
182#if defined OCML_BASIC_ROUNDED_OPERATIONS
183__DEVICE__
184float __fdiv_rd(float __x, float __y) { return __ocml_div_rtn_f32(__x, __y); }
185__DEVICE__
186float __fdiv_rn(float __x, float __y) { return __ocml_div_rte_f32(__x, __y); }
187__DEVICE__
188float __fdiv_ru(float __x, float __y) { return __ocml_div_rtp_f32(__x, __y); }
189__DEVICE__
190float __fdiv_rz(float __x, float __y) { return __ocml_div_rtz_f32(__x, __y); }
191#else
192__DEVICE__
193float __fdiv_rn(float __x, float __y) { return __x / __y; }
194#endif
195
196__DEVICE__
197float __fdividef(float __x, float __y) { return __x / __y; }
198
199#if defined OCML_BASIC_ROUNDED_OPERATIONS
200__DEVICE__
201float __fmaf_rd(float __x, float __y, float __z) {
202 return __ocml_fma_rtn_f32(__x, __y, __z);
203}
204__DEVICE__
205float __fmaf_rn(float __x, float __y, float __z) {
206 return __ocml_fma_rte_f32(__x, __y, __z);
207}
208__DEVICE__
209float __fmaf_ru(float __x, float __y, float __z) {
210 return __ocml_fma_rtp_f32(__x, __y, __z);
211}
212__DEVICE__
213float __fmaf_rz(float __x, float __y, float __z) {
214 return __ocml_fma_rtz_f32(__x, __y, __z);
215}
216#else
217__DEVICE__
218float __fmaf_rn(float __x, float __y, float __z) {
219 return __builtin_fmaf(__x, __y, __z);
220}
221#endif
222
223#if defined OCML_BASIC_ROUNDED_OPERATIONS
224__DEVICE__
225float __fmul_rd(float __x, float __y) { return __ocml_mul_rtn_f32(__x, __y); }
226__DEVICE__
227float __fmul_rn(float __x, float __y) { return __ocml_mul_rte_f32(__x, __y); }
228__DEVICE__
229float __fmul_ru(float __x, float __y) { return __ocml_mul_rtp_f32(__x, __y); }
230__DEVICE__
231float __fmul_rz(float __x, float __y) { return __ocml_mul_rtz_f32(__x, __y); }
232#else
233__DEVICE__
234float __fmul_rn(float __x, float __y) { return __x * __y; }
235#endif
236
237#if defined OCML_BASIC_ROUNDED_OPERATIONS
238__DEVICE__
239float __frcp_rd(float __x) { return __ocml_div_rtn_f32(1.0f, __x); }
240__DEVICE__
241float __frcp_rn(float __x) { return __ocml_div_rte_f32(1.0f, __x); }
242__DEVICE__
243float __frcp_ru(float __x) { return __ocml_div_rtp_f32(1.0f, __x); }
244__DEVICE__
245float __frcp_rz(float __x) { return __ocml_div_rtz_f32(1.0f, __x); }
246#else
247__DEVICE__
248float __frcp_rn(float __x) { return 1.0f / __x; }
249#endif
250
251__DEVICE__
252float __frsqrt_rn(float __x) { return __builtin_amdgcn_rsqf(__x); }
253
254#if defined OCML_BASIC_ROUNDED_OPERATIONS
255__DEVICE__
256float __fsqrt_rd(float __x) { return __ocml_sqrt_rtn_f32(__x); }
257__DEVICE__
258float __fsqrt_rn(float __x) { return __ocml_sqrt_rte_f32(__x); }
259__DEVICE__
260float __fsqrt_ru(float __x) { return __ocml_sqrt_rtp_f32(__x); }
261__DEVICE__
262float __fsqrt_rz(float __x) { return __ocml_sqrt_rtz_f32(__x); }
263#else
264__DEVICE__
265float __fsqrt_rn(float __x) { return __ocml_native_sqrt_f32(__x); }
266#endif
267
268#if defined OCML_BASIC_ROUNDED_OPERATIONS
269__DEVICE__
270float __fsub_rd(float __x, float __y) { return __ocml_sub_rtn_f32(__x, __y); }
271__DEVICE__
272float __fsub_rn(float __x, float __y) { return __ocml_sub_rte_f32(__x, __y); }
273__DEVICE__
274float __fsub_ru(float __x, float __y) { return __ocml_sub_rtp_f32(__x, __y); }
275__DEVICE__
276float __fsub_rz(float __x, float __y) { return __ocml_sub_rtz_f32(__x, __y); }
277#else
278__DEVICE__
279float __fsub_rn(float __x, float __y) { return __x - __y; }
280#endif
281
282__DEVICE__
283float __log10f(float __x) { return __builtin_log10f(__x); }
284
285__DEVICE__
286float __log2f(float __x) { return __builtin_amdgcn_logf(__x); }
287
288__DEVICE__
289float __logf(float __x) { return __builtin_logf(__x); }
290
291__DEVICE__
292float __powf(float __x, float __y) { return __ocml_pow_f32(__x, __y); }
293
294__DEVICE__
295float __saturatef(float __x) { return (__x < 0) ? 0 : ((__x > 1) ? 1 : __x); }
296
297__DEVICE__
298void __sincosf(float __x, float *__sinptr, float *__cosptr) {
299 *__sinptr = __ocml_native_sin_f32(__x);
300 *__cosptr = __ocml_native_cos_f32(__x);
301}
302
303__DEVICE__
304float __sinf(float __x) { return __ocml_native_sin_f32(__x); }
305
306__DEVICE__
307float __tanf(float __x) {
308 return __sinf(__x) * __builtin_amdgcn_rcpf(__cosf(__x));
309}
310// END INTRINSICS
311
312#if defined(__cplusplus)
313__DEVICE__
314int abs(int __x) {
315 return __builtin_abs(__x);
316}
317__DEVICE__
318long labs(long __x) {
319 return __builtin_labs(__x);
320}
321__DEVICE__
322long long llabs(long long __x) {
323 return __builtin_llabs(__x);
324}
325#endif
326
327__DEVICE__
328float acosf(float __x) { return __ocml_acos_f32(__x); }
329
330__DEVICE__
331float acoshf(float __x) { return __ocml_acosh_f32(__x); }
332
333__DEVICE__
334float asinf(float __x) { return __ocml_asin_f32(__x); }
335
336__DEVICE__
337float asinhf(float __x) { return __ocml_asinh_f32(__x); }
338
339__DEVICE__
340float atan2f(float __x, float __y) { return __ocml_atan2_f32(__x, __y); }
341
342__DEVICE__
343float atanf(float __x) { return __ocml_atan_f32(__x); }
344
345__DEVICE__
346float atanhf(float __x) { return __ocml_atanh_f32(__x); }
347
348__DEVICE__
349float cbrtf(float __x) { return __ocml_cbrt_f32(__x); }
350
351__DEVICE__
352float ceilf(float __x) { return __builtin_ceilf(__x); }
353
354__DEVICE__
355float copysignf(float __x, float __y) { return __builtin_copysignf(__x, __y); }
356
357__DEVICE__
358float cosf(float __x) { return __FAST_OR_SLOW(__cosf, __ocml_cos_f32)(__x); }
359
360__DEVICE__
361float coshf(float __x) { return __ocml_cosh_f32(__x); }
362
363__DEVICE__
364float cospif(float __x) { return __ocml_cospi_f32(__x); }
365
366__DEVICE__
367float cyl_bessel_i0f(float __x) { return __ocml_i0_f32(__x); }
368
369__DEVICE__
370float cyl_bessel_i1f(float __x) { return __ocml_i1_f32(__x); }
371
372__DEVICE__
373float erfcf(float __x) { return __ocml_erfc_f32(__x); }
374
375__DEVICE__
376float erfcinvf(float __x) { return __ocml_erfcinv_f32(__x); }
377
378__DEVICE__
379float erfcxf(float __x) { return __ocml_erfcx_f32(__x); }
380
381__DEVICE__
382float erff(float __x) { return __ocml_erf_f32(__x); }
383
384__DEVICE__
385float erfinvf(float __x) { return __ocml_erfinv_f32(__x); }
386
387__DEVICE__
388float exp10f(float __x) { return __ocml_exp10_f32(__x); }
389
390__DEVICE__
391float exp2f(float __x) { return __builtin_exp2f(__x); }
392
393__DEVICE__
394float expf(float __x) { return __builtin_expf(__x); }
395
396__DEVICE__
397float expm1f(float __x) { return __ocml_expm1_f32(__x); }
398
399__DEVICE__
400float fabsf(float __x) { return __builtin_fabsf(__x); }
401
402__DEVICE__
403float fdimf(float __x, float __y) { return __ocml_fdim_f32(__x, __y); }
404
405__DEVICE__
406float fdividef(float __x, float __y) { return __x / __y; }
407
408__DEVICE__
409float floorf(float __x) { return __builtin_floorf(__x); }
410
411__DEVICE__
412float fmaf(float __x, float __y, float __z) {
413 return __builtin_fmaf(__x, __y, __z);
414}
415
416__DEVICE__
417float fmaxf(float __x, float __y) { return __builtin_fmaxf(__x, __y); }
418
419__DEVICE__
420float fminf(float __x, float __y) { return __builtin_fminf(__x, __y); }
421
422__DEVICE__
423float fmodf(float __x, float __y) { return __ocml_fmod_f32(__x, __y); }
424
425__DEVICE__
426float frexpf(float __x, int *__nptr) {
427 return __builtin_frexpf(__x, __nptr);
428}
429
430__DEVICE__
431float hypotf(float __x, float __y) { return __ocml_hypot_f32(__x, __y); }
432
433__DEVICE__
434int ilogbf(float __x) { return __ocml_ilogb_f32(__x); }
435
436__DEVICE__
437__RETURN_TYPE __finitef(float __x) { return __builtin_isfinite(__x); }
438
439__DEVICE__
440__RETURN_TYPE __isinff(float __x) { return __builtin_isinf(__x); }
441
442__DEVICE__
443__RETURN_TYPE __isnanf(float __x) { return __builtin_isnan(__x); }
444
445__DEVICE__
446float j0f(float __x) { return __ocml_j0_f32(__x); }
447
448__DEVICE__
449float j1f(float __x) { return __ocml_j1_f32(__x); }
450
451__DEVICE__
452float jnf(int __n, float __x) { // TODO: we could use Ahmes multiplication
453 // and the Miller & Brown algorithm
454 // for linear recurrences to get O(log n) steps, but it's unclear if
455 // it'd be beneficial in this case.
456 if (__n == 0)
457 return j0f(__x);
458 if (__n == 1)
459 return j1f(__x);
460
461 float __x0 = j0f(__x);
462 float __x1 = j1f(__x);
463 for (int __i = 1; __i < __n; ++__i) {
464 float __x2 = (2 * __i) / __x * __x1 - __x0;
465 __x0 = __x1;
466 __x1 = __x2;
467 }
468
469 return __x1;
470}
471
472__DEVICE__
473float ldexpf(float __x, int __e) { return __builtin_amdgcn_ldexpf(__x, __e); }
474
475__DEVICE__
476float lgammaf(float __x) { return __ocml_lgamma_f32(__x); }
477
478__DEVICE__
479long long int llrintf(float __x) { return __builtin_rintf(__x); }
480
481__DEVICE__
482long long int llroundf(float __x) { return __builtin_roundf(__x); }
483
484__DEVICE__
485float log10f(float __x) { return __builtin_log10f(__x); }
486
487__DEVICE__
488float log1pf(float __x) { return __ocml_log1p_f32(__x); }
489
490__DEVICE__
491float log2f(float __x) { return __FAST_OR_SLOW(__log2f, __ocml_log2_f32)(__x); }
492
493__DEVICE__
494float logbf(float __x) { return __ocml_logb_f32(__x); }
495
496__DEVICE__
497float logf(float __x) { return __FAST_OR_SLOW(__logf, __ocml_log_f32)(__x); }
498
499__DEVICE__
500long int lrintf(float __x) { return __builtin_rintf(__x); }
501
502__DEVICE__
503long int lroundf(float __x) { return __builtin_roundf(__x); }
504
505__DEVICE__
506float modff(float __x, float *__iptr) {
507 float __tmp;
508#ifdef __OPENMP_AMDGCN__
509#pragma omp allocate(__tmp) allocator(omp_thread_mem_alloc)
510#endif
511 float __r =
512 __ocml_modf_f32(__x, (__attribute__((address_space(5))) float *)&__tmp);
513 *__iptr = __tmp;
514 return __r;
515}
516
517__DEVICE__
518float nanf(const char *__tagp __attribute__((nonnull))) {
519 union {
520 float val;
521 struct ieee_float {
522 unsigned int mantissa : 22;
523 unsigned int quiet : 1;
524 unsigned int exponent : 8;
525 unsigned int sign : 1;
526 } bits;
527 } __tmp;
528 __static_assert_type_size_equal(sizeof(__tmp.val), sizeof(__tmp.bits));
529
530 __tmp.bits.sign = 0u;
531 __tmp.bits.exponent = ~0u;
532 __tmp.bits.quiet = 1u;
533 __tmp.bits.mantissa = __make_mantissa(__tagp);
534
535 return __tmp.val;
536}
537
538__DEVICE__
539float nearbyintf(float __x) { return __builtin_nearbyintf(__x); }
540
541__DEVICE__
542float nextafterf(float __x, float __y) {
543 return __ocml_nextafter_f32(__x, __y);
544}
545
546__DEVICE__
547float norm3df(float __x, float __y, float __z) {
548 return __ocml_len3_f32(__x, __y, __z);
549}
550
551__DEVICE__
552float norm4df(float __x, float __y, float __z, float __w) {
553 return __ocml_len4_f32(__x, __y, __z, __w);
554}
555
556__DEVICE__
557float normcdff(float __x) { return __ocml_ncdf_f32(__x); }
558
559__DEVICE__
560float normcdfinvf(float __x) { return __ocml_ncdfinv_f32(__x); }
561
562__DEVICE__
563float normf(int __dim,
564 const float *__a) { // TODO: placeholder until OCML adds support.
565 float __r = 0;
566 while (__dim--) {
567 __r += __a[0] * __a[0];
568 ++__a;
569 }
570
571 return __builtin_sqrtf(__r);
572}
573
574__DEVICE__
575float powf(float __x, float __y) { return __ocml_pow_f32(__x, __y); }
576
577__DEVICE__
578float powif(float __x, int __y) { return __ocml_pown_f32(__x, __y); }
579
580__DEVICE__
581float rcbrtf(float __x) { return __ocml_rcbrt_f32(__x); }
582
583__DEVICE__
584float remainderf(float __x, float __y) {
585 return __ocml_remainder_f32(__x, __y);
586}
587
588__DEVICE__
589float remquof(float __x, float __y, int *__quo) {
590 int __tmp;
591#ifdef __OPENMP_AMDGCN__
592#pragma omp allocate(__tmp) allocator(omp_thread_mem_alloc)
593#endif
594 float __r = __ocml_remquo_f32(
595 __x, __y, (__attribute__((address_space(5))) int *)&__tmp);
596 *__quo = __tmp;
597
598 return __r;
599}
600
601__DEVICE__
602float rhypotf(float __x, float __y) { return __ocml_rhypot_f32(__x, __y); }
603
604__DEVICE__
605float rintf(float __x) { return __builtin_rintf(__x); }
606
607__DEVICE__
608float rnorm3df(float __x, float __y, float __z) {
609 return __ocml_rlen3_f32(__x, __y, __z);
610}
611
612__DEVICE__
613float rnorm4df(float __x, float __y, float __z, float __w) {
614 return __ocml_rlen4_f32(__x, __y, __z, __w);
615}
616
617__DEVICE__
618float rnormf(int __dim,
619 const float *__a) { // TODO: placeholder until OCML adds support.
620 float __r = 0;
621 while (__dim--) {
622 __r += __a[0] * __a[0];
623 ++__a;
624 }
625
626 return __ocml_rsqrt_f32(__r);
627}
628
629__DEVICE__
630float roundf(float __x) { return __builtin_roundf(__x); }
631
632__DEVICE__
633float rsqrtf(float __x) { return __ocml_rsqrt_f32(__x); }
634
635__DEVICE__
636float scalblnf(float __x, long int __n) {
637 return (__n < INT_MAX) ? __builtin_amdgcn_ldexpf(__x, __n)
638 : __ocml_scalb_f32(__x, __n);
639}
640
641__DEVICE__
642float scalbnf(float __x, int __n) { return __builtin_amdgcn_ldexpf(__x, __n); }
643
644__DEVICE__
645__RETURN_TYPE __signbitf(float __x) { return __builtin_signbitf(__x); }
646
647__DEVICE__
648void sincosf(float __x, float *__sinptr, float *__cosptr) {
649 float __tmp;
650#ifdef __OPENMP_AMDGCN__
651#pragma omp allocate(__tmp) allocator(omp_thread_mem_alloc)
652#endif
653#ifdef __CLANG_CUDA_APPROX_TRANSCENDENTALS__
654 __sincosf(__x, __sinptr, __cosptr);
655#else
656 *__sinptr =
657 __ocml_sincos_f32(__x, (__attribute__((address_space(5))) float *)&__tmp);
658 *__cosptr = __tmp;
659#endif
660}
661
662__DEVICE__
663void sincospif(float __x, float *__sinptr, float *__cosptr) {
664 float __tmp;
665#ifdef __OPENMP_AMDGCN__
666#pragma omp allocate(__tmp) allocator(omp_thread_mem_alloc)
667#endif
668 *__sinptr = __ocml_sincospi_f32(
669 __x, (__attribute__((address_space(5))) float *)&__tmp);
670 *__cosptr = __tmp;
671}
672
673__DEVICE__
674float sinf(float __x) { return __FAST_OR_SLOW(__sinf, __ocml_sin_f32)(__x); }
675
676__DEVICE__
677float sinhf(float __x) { return __ocml_sinh_f32(__x); }
678
679__DEVICE__
680float sinpif(float __x) { return __ocml_sinpi_f32(__x); }
681
682__DEVICE__
683float sqrtf(float __x) { return __builtin_sqrtf(__x); }
684
685__DEVICE__
686float tanf(float __x) { return __ocml_tan_f32(__x); }
687
688__DEVICE__
689float tanhf(float __x) { return __ocml_tanh_f32(__x); }
690
691__DEVICE__
692float tgammaf(float __x) { return __ocml_tgamma_f32(__x); }
693
694__DEVICE__
695float truncf(float __x) { return __builtin_truncf(__x); }
696
697__DEVICE__
698float y0f(float __x) { return __ocml_y0_f32(__x); }
699
700__DEVICE__
701float y1f(float __x) { return __ocml_y1_f32(__x); }
702
703__DEVICE__
704float ynf(int __n, float __x) { // TODO: we could use Ahmes multiplication
705 // and the Miller & Brown algorithm
706 // for linear recurrences to get O(log n) steps, but it's unclear if
707 // it'd be beneficial in this case. Placeholder until OCML adds
708 // support.
709 if (__n == 0)
710 return y0f(__x);
711 if (__n == 1)
712 return y1f(__x);
713
714 float __x0 = y0f(__x);
715 float __x1 = y1f(__x);
716 for (int __i = 1; __i < __n; ++__i) {
717 float __x2 = (2 * __i) / __x * __x1 - __x0;
718 __x0 = __x1;
719 __x1 = __x2;
720 }
721
722 return __x1;
723}
724
725
726// END FLOAT
727
728// BEGIN DOUBLE
729__DEVICE__
730double acos(double __x) { return __ocml_acos_f64(__x); }
731
732__DEVICE__
733double acosh(double __x) { return __ocml_acosh_f64(__x); }
734
735__DEVICE__
736double asin(double __x) { return __ocml_asin_f64(__x); }
737
738__DEVICE__
739double asinh(double __x) { return __ocml_asinh_f64(__x); }
740
741__DEVICE__
742double atan(double __x) { return __ocml_atan_f64(__x); }
743
744__DEVICE__
745double atan2(double __x, double __y) { return __ocml_atan2_f64(__x, __y); }
746
747__DEVICE__
748double atanh(double __x) { return __ocml_atanh_f64(__x); }
749
750__DEVICE__
751double cbrt(double __x) { return __ocml_cbrt_f64(__x); }
752
753__DEVICE__
754double ceil(double __x) { return __builtin_ceil(__x); }
755
756__DEVICE__
757double copysign(double __x, double __y) {
758 return __builtin_copysign(__x, __y);
759}
760
761__DEVICE__
762double cos(double __x) { return __ocml_cos_f64(__x); }
763
764__DEVICE__
765double cosh(double __x) { return __ocml_cosh_f64(__x); }
766
767__DEVICE__
768double cospi(double __x) { return __ocml_cospi_f64(__x); }
769
770__DEVICE__
771double cyl_bessel_i0(double __x) { return __ocml_i0_f64(__x); }
772
773__DEVICE__
774double cyl_bessel_i1(double __x) { return __ocml_i1_f64(__x); }
775
776__DEVICE__
777double erf(double __x) { return __ocml_erf_f64(__x); }
778
779__DEVICE__
780double erfc(double __x) { return __ocml_erfc_f64(__x); }
781
782__DEVICE__
783double erfcinv(double __x) { return __ocml_erfcinv_f64(__x); }
784
785__DEVICE__
786double erfcx(double __x) { return __ocml_erfcx_f64(__x); }
787
788__DEVICE__
789double erfinv(double __x) { return __ocml_erfinv_f64(__x); }
790
791__DEVICE__
792double exp(double __x) { return __ocml_exp_f64(__x); }
793
794__DEVICE__
795double exp10(double __x) { return __ocml_exp10_f64(__x); }
796
797__DEVICE__
798double exp2(double __x) { return __ocml_exp2_f64(__x); }
799
800__DEVICE__
801double expm1(double __x) { return __ocml_expm1_f64(__x); }
802
803__DEVICE__
804double fabs(double __x) { return __builtin_fabs(__x); }
805
806__DEVICE__
807double fdim(double __x, double __y) { return __ocml_fdim_f64(__x, __y); }
808
809__DEVICE__
810double floor(double __x) { return __builtin_floor(__x); }
811
812__DEVICE__
813double fma(double __x, double __y, double __z) {
814 return __builtin_fma(__x, __y, __z);
815}
816
817__DEVICE__
818double fmax(double __x, double __y) { return __builtin_fmax(__x, __y); }
819
820__DEVICE__
821double fmin(double __x, double __y) { return __builtin_fmin(__x, __y); }
822
823__DEVICE__
824double fmod(double __x, double __y) { return __ocml_fmod_f64(__x, __y); }
825
826__DEVICE__
827double frexp(double __x, int *__nptr) {
828 return __builtin_frexp(__x, __nptr);
829}
830
831__DEVICE__
832double hypot(double __x, double __y) { return __ocml_hypot_f64(__x, __y); }
833
834__DEVICE__
835int ilogb(double __x) { return __ocml_ilogb_f64(__x); }
836
837__DEVICE__
838__RETURN_TYPE __finite(double __x) { return __builtin_isfinite(__x); }
839
840__DEVICE__
841__RETURN_TYPE __isinf(double __x) { return __builtin_isinf(__x); }
842
843__DEVICE__
844__RETURN_TYPE __isnan(double __x) { return __builtin_isnan(__x); }
845
846__DEVICE__
847double j0(double __x) { return __ocml_j0_f64(__x); }
848
849__DEVICE__
850double j1(double __x) { return __ocml_j1_f64(__x); }
851
852__DEVICE__
853double jn(int __n, double __x) { // TODO: we could use Ahmes multiplication
854 // and the Miller & Brown algorithm
855 // for linear recurrences to get O(log n) steps, but it's unclear if
856 // it'd be beneficial in this case. Placeholder until OCML adds
857 // support.
858 if (__n == 0)
859 return j0(__x);
860 if (__n == 1)
861 return j1(__x);
862
863 double __x0 = j0(__x);
864 double __x1 = j1(__x);
865 for (int __i = 1; __i < __n; ++__i) {
866 double __x2 = (2 * __i) / __x * __x1 - __x0;
867 __x0 = __x1;
868 __x1 = __x2;
869 }
870 return __x1;
871}
872
873__DEVICE__
874double ldexp(double __x, int __e) { return __builtin_amdgcn_ldexp(__x, __e); }
875
876__DEVICE__
877double lgamma(double __x) { return __ocml_lgamma_f64(__x); }
878
879__DEVICE__
880long long int llrint(double __x) { return __builtin_rint(__x); }
881
882__DEVICE__
883long long int llround(double __x) { return __builtin_round(__x); }
884
885__DEVICE__
886double log(double __x) { return __ocml_log_f64(__x); }
887
888__DEVICE__
889double log10(double __x) { return __ocml_log10_f64(__x); }
890
891__DEVICE__
892double log1p(double __x) { return __ocml_log1p_f64(__x); }
893
894__DEVICE__
895double log2(double __x) { return __ocml_log2_f64(__x); }
896
897__DEVICE__
898double logb(double __x) { return __ocml_logb_f64(__x); }
899
900__DEVICE__
901long int lrint(double __x) { return __builtin_rint(__x); }
902
903__DEVICE__
904long int lround(double __x) { return __builtin_round(__x); }
905
906__DEVICE__
907double modf(double __x, double *__iptr) {
908 double __tmp;
909#ifdef __OPENMP_AMDGCN__
910#pragma omp allocate(__tmp) allocator(omp_thread_mem_alloc)
911#endif
912 double __r =
913 __ocml_modf_f64(__x, (__attribute__((address_space(5))) double *)&__tmp);
914 *__iptr = __tmp;
915
916 return __r;
917}
918
919__DEVICE__
920double nan(const char *__tagp) {
921#if !_WIN32
922 union {
923 double val;
924 struct ieee_double {
925 uint64_t mantissa : 51;
926 uint32_t quiet : 1;
927 uint32_t exponent : 11;
928 uint32_t sign : 1;
929 } bits;
930 } __tmp;
931 __static_assert_type_size_equal(sizeof(__tmp.val), sizeof(__tmp.bits));
932
933 __tmp.bits.sign = 0u;
934 __tmp.bits.exponent = ~0u;
935 __tmp.bits.quiet = 1u;
936 __tmp.bits.mantissa = __make_mantissa(__tagp);
937
938 return __tmp.val;
939#else
940 __static_assert_type_size_equal(sizeof(uint64_t), sizeof(double));
941 uint64_t __val = __make_mantissa(__tagp);
942 __val |= 0xFFF << 51;
943 return *reinterpret_cast<double *>(&__val);
944#endif
945}
946
947__DEVICE__
948double nearbyint(double __x) { return __builtin_nearbyint(__x); }
949
950__DEVICE__
951double nextafter(double __x, double __y) {
952 return __ocml_nextafter_f64(__x, __y);
953}
954
955__DEVICE__
956double norm(int __dim,
957 const double *__a) { // TODO: placeholder until OCML adds support.
958 double __r = 0;
959 while (__dim--) {
960 __r += __a[0] * __a[0];
961 ++__a;
962 }
963
964 return __builtin_sqrt(__r);
965}
966
967__DEVICE__
968double norm3d(double __x, double __y, double __z) {
969 return __ocml_len3_f64(__x, __y, __z);
970}
971
972__DEVICE__
973double norm4d(double __x, double __y, double __z, double __w) {
974 return __ocml_len4_f64(__x, __y, __z, __w);
975}
976
977__DEVICE__
978double normcdf(double __x) { return __ocml_ncdf_f64(__x); }
979
980__DEVICE__
981double normcdfinv(double __x) { return __ocml_ncdfinv_f64(__x); }
982
983__DEVICE__
984double pow(double __x, double __y) { return __ocml_pow_f64(__x, __y); }
985
986__DEVICE__
987double powi(double __x, int __y) { return __ocml_pown_f64(__x, __y); }
988
989__DEVICE__
990double rcbrt(double __x) { return __ocml_rcbrt_f64(__x); }
991
992__DEVICE__
993double remainder(double __x, double __y) {
994 return __ocml_remainder_f64(__x, __y);
995}
996
997__DEVICE__
998double remquo(double __x, double __y, int *__quo) {
999 int __tmp;
1000#ifdef __OPENMP_AMDGCN__
1001#pragma omp allocate(__tmp) allocator(omp_thread_mem_alloc)
1002#endif
1003 double __r = __ocml_remquo_f64(
1004 __x, __y, (__attribute__((address_space(5))) int *)&__tmp);
1005 *__quo = __tmp;
1006
1007 return __r;
1008}
1009
1010__DEVICE__
1011double rhypot(double __x, double __y) { return __ocml_rhypot_f64(__x, __y); }
1012
1013__DEVICE__
1014double rint(double __x) { return __builtin_rint(__x); }
1015
1016__DEVICE__
1017double rnorm(int __dim,
1018 const double *__a) { // TODO: placeholder until OCML adds support.
1019 double __r = 0;
1020 while (__dim--) {
1021 __r += __a[0] * __a[0];
1022 ++__a;
1023 }
1024
1025 return __ocml_rsqrt_f64(__r);
1026}
1027
1028__DEVICE__
1029double rnorm3d(double __x, double __y, double __z) {
1030 return __ocml_rlen3_f64(__x, __y, __z);
1031}
1032
1033__DEVICE__
1034double rnorm4d(double __x, double __y, double __z, double __w) {
1035 return __ocml_rlen4_f64(__x, __y, __z, __w);
1036}
1037
1038__DEVICE__
1039double round(double __x) { return __builtin_round(__x); }
1040
1041__DEVICE__
1042double rsqrt(double __x) { return __ocml_rsqrt_f64(__x); }
1043
1044__DEVICE__
1045double scalbln(double __x, long int __n) {
1046 return (__n < INT_MAX) ? __builtin_amdgcn_ldexp(__x, __n)
1047 : __ocml_scalb_f64(__x, __n);
1048}
1049__DEVICE__
1050double scalbn(double __x, int __n) { return __builtin_amdgcn_ldexp(__x, __n); }
1051
1052__DEVICE__
1053__RETURN_TYPE __signbit(double __x) { return __builtin_signbit(__x); }
1054
1055__DEVICE__
1056double sin(double __x) { return __ocml_sin_f64(__x); }
1057
1058__DEVICE__
1059void sincos(double __x, double *__sinptr, double *__cosptr) {
1060 double __tmp;
1061#ifdef __OPENMP_AMDGCN__
1062#pragma omp allocate(__tmp) allocator(omp_thread_mem_alloc)
1063#endif
1064 *__sinptr = __ocml_sincos_f64(
1065 __x, (__attribute__((address_space(5))) double *)&__tmp);
1066 *__cosptr = __tmp;
1067}
1068
1069__DEVICE__
1070void sincospi(double __x, double *__sinptr, double *__cosptr) {
1071 double __tmp;
1072#ifdef __OPENMP_AMDGCN__
1073#pragma omp allocate(__tmp) allocator(omp_thread_mem_alloc)
1074#endif
1075 *__sinptr = __ocml_sincospi_f64(
1076 __x, (__attribute__((address_space(5))) double *)&__tmp);
1077 *__cosptr = __tmp;
1078}
1079
1080__DEVICE__
1081double sinh(double __x) { return __ocml_sinh_f64(__x); }
1082
1083__DEVICE__
1084double sinpi(double __x) { return __ocml_sinpi_f64(__x); }
1085
1086__DEVICE__
1087double sqrt(double __x) { return __builtin_sqrt(__x); }
1088
1089__DEVICE__
1090double tan(double __x) { return __ocml_tan_f64(__x); }
1091
1092__DEVICE__
1093double tanh(double __x) { return __ocml_tanh_f64(__x); }
1094
1095__DEVICE__
1096double tgamma(double __x) { return __ocml_tgamma_f64(__x); }
1097
1098__DEVICE__
1099double trunc(double __x) { return __builtin_trunc(__x); }
1100
1101__DEVICE__
1102double y0(double __x) { return __ocml_y0_f64(__x); }
1103
1104__DEVICE__
1105double y1(double __x) { return __ocml_y1_f64(__x); }
1106
1107__DEVICE__
1108double yn(int __n, double __x) { // TODO: we could use Ahmes multiplication
1109 // and the Miller & Brown algorithm
1110 // for linear recurrences to get O(log n) steps, but it's unclear if
1111 // it'd be beneficial in this case. Placeholder until OCML adds
1112 // support.
1113 if (__n == 0)
1114 return y0(__x);
1115 if (__n == 1)
1116 return y1(__x);
1117
1118 double __x0 = y0(__x);
1119 double __x1 = y1(__x);
1120 for (int __i = 1; __i < __n; ++__i) {
1121 double __x2 = (2 * __i) / __x * __x1 - __x0;
1122 __x0 = __x1;
1123 __x1 = __x2;
1124 }
1125
1126 return __x1;
1127}
1128
1129// BEGIN INTRINSICS
1130#if defined OCML_BASIC_ROUNDED_OPERATIONS
1131__DEVICE__
1132double __dadd_rd(double __x, double __y) {
1133 return __ocml_add_rtn_f64(__x, __y);
1134}
1135__DEVICE__
1136double __dadd_rn(double __x, double __y) {
1137 return __ocml_add_rte_f64(__x, __y);
1138}
1139__DEVICE__
1140double __dadd_ru(double __x, double __y) {
1141 return __ocml_add_rtp_f64(__x, __y);
1142}
1143__DEVICE__
1144double __dadd_rz(double __x, double __y) {
1145 return __ocml_add_rtz_f64(__x, __y);
1146}
1147#else
1148__DEVICE__
1149double __dadd_rn(double __x, double __y) { return __x + __y; }
1150#endif
1151
1152#if defined OCML_BASIC_ROUNDED_OPERATIONS
1153__DEVICE__
1154double __ddiv_rd(double __x, double __y) {
1155 return __ocml_div_rtn_f64(__x, __y);
1156}
1157__DEVICE__
1158double __ddiv_rn(double __x, double __y) {
1159 return __ocml_div_rte_f64(__x, __y);
1160}
1161__DEVICE__
1162double __ddiv_ru(double __x, double __y) {
1163 return __ocml_div_rtp_f64(__x, __y);
1164}
1165__DEVICE__
1166double __ddiv_rz(double __x, double __y) {
1167 return __ocml_div_rtz_f64(__x, __y);
1168}
1169#else
1170__DEVICE__
1171double __ddiv_rn(double __x, double __y) { return __x / __y; }
1172#endif
1173
1174#if defined OCML_BASIC_ROUNDED_OPERATIONS
1175__DEVICE__
1176double __dmul_rd(double __x, double __y) {
1177 return __ocml_mul_rtn_f64(__x, __y);
1178}
1179__DEVICE__
1180double __dmul_rn(double __x, double __y) {
1181 return __ocml_mul_rte_f64(__x, __y);
1182}
1183__DEVICE__
1184double __dmul_ru(double __x, double __y) {
1185 return __ocml_mul_rtp_f64(__x, __y);
1186}
1187__DEVICE__
1188double __dmul_rz(double __x, double __y) {
1189 return __ocml_mul_rtz_f64(__x, __y);
1190}
1191#else
1192__DEVICE__
1193double __dmul_rn(double __x, double __y) { return __x * __y; }
1194#endif
1195
1196#if defined OCML_BASIC_ROUNDED_OPERATIONS
1197__DEVICE__
1198double __drcp_rd(double __x) { return __ocml_div_rtn_f64(1.0, __x); }
1199__DEVICE__
1200double __drcp_rn(double __x) { return __ocml_div_rte_f64(1.0, __x); }
1201__DEVICE__
1202double __drcp_ru(double __x) { return __ocml_div_rtp_f64(1.0, __x); }
1203__DEVICE__
1204double __drcp_rz(double __x) { return __ocml_div_rtz_f64(1.0, __x); }
1205#else
1206__DEVICE__
1207double __drcp_rn(double __x) { return 1.0 / __x; }
1208#endif
1209
1210#if defined OCML_BASIC_ROUNDED_OPERATIONS
1211__DEVICE__
1212double __dsqrt_rd(double __x) { return __ocml_sqrt_rtn_f64(__x); }
1213__DEVICE__
1214double __dsqrt_rn(double __x) { return __ocml_sqrt_rte_f64(__x); }
1215__DEVICE__
1216double __dsqrt_ru(double __x) { return __ocml_sqrt_rtp_f64(__x); }
1217__DEVICE__
1218double __dsqrt_rz(double __x) { return __ocml_sqrt_rtz_f64(__x); }
1219#else
1220__DEVICE__
1221double __dsqrt_rn(double __x) { return __builtin_sqrt(__x); }
1222#endif
1223
1224#if defined OCML_BASIC_ROUNDED_OPERATIONS
1225__DEVICE__
1226double __dsub_rd(double __x, double __y) {
1227 return __ocml_sub_rtn_f64(__x, __y);
1228}
1229__DEVICE__
1230double __dsub_rn(double __x, double __y) {
1231 return __ocml_sub_rte_f64(__x, __y);
1232}
1233__DEVICE__
1234double __dsub_ru(double __x, double __y) {
1235 return __ocml_sub_rtp_f64(__x, __y);
1236}
1237__DEVICE__
1238double __dsub_rz(double __x, double __y) {
1239 return __ocml_sub_rtz_f64(__x, __y);
1240}
1241#else
1242__DEVICE__
1243double __dsub_rn(double __x, double __y) { return __x - __y; }
1244#endif
1245
1246#if defined OCML_BASIC_ROUNDED_OPERATIONS
1247__DEVICE__
1248double __fma_rd(double __x, double __y, double __z) {
1249 return __ocml_fma_rtn_f64(__x, __y, __z);
1250}
1251__DEVICE__
1252double __fma_rn(double __x, double __y, double __z) {
1253 return __ocml_fma_rte_f64(__x, __y, __z);
1254}
1255__DEVICE__
1256double __fma_ru(double __x, double __y, double __z) {
1257 return __ocml_fma_rtp_f64(__x, __y, __z);
1258}
1259__DEVICE__
1260double __fma_rz(double __x, double __y, double __z) {
1261 return __ocml_fma_rtz_f64(__x, __y, __z);
1262}
1263#else
1264__DEVICE__
1265double __fma_rn(double __x, double __y, double __z) {
1266 return __builtin_fma(__x, __y, __z);
1267}
1268#endif
1269// END INTRINSICS
1270// END DOUBLE
1271
1272// C only macros
1273#if !defined(__cplusplus) && __STDC_VERSION__ >= 201112L
1274#define isfinite(__x) _Generic((__x), float : __finitef, double : __finite)(__x)
1275#define isinf(__x) _Generic((__x), float : __isinff, double : __isinf)(__x)
1276#define isnan(__x) _Generic((__x), float : __isnanf, double : __isnan)(__x)
1277#define signbit(__x) \
1278 _Generic((__x), float : __signbitf, double : __signbit)(__x)
1279#endif // !defined(__cplusplus) && __STDC_VERSION__ >= 201112L
1280
1281#if defined(__cplusplus)
1282template <class T> __DEVICE__ T min(T __arg1, T __arg2) {
1283 return (__arg1 < __arg2) ? __arg1 : __arg2;
1284}
1285
1286template <class T> __DEVICE__ T max(T __arg1, T __arg2) {
1287 return (__arg1 > __arg2) ? __arg1 : __arg2;
1288}
1289
1290__DEVICE__ int min(int __arg1, int __arg2) {
1291 return (__arg1 < __arg2) ? __arg1 : __arg2;
1292}
1293__DEVICE__ int max(int __arg1, int __arg2) {
1294 return (__arg1 > __arg2) ? __arg1 : __arg2;
1295}
1296
1297__DEVICE__
1298float max(float __x, float __y) { return __builtin_fmaxf(__x, __y); }
1299
1300__DEVICE__
1301double max(double __x, double __y) { return __builtin_fmax(__x, __y); }
1302
1303__DEVICE__
1304float min(float __x, float __y) { return __builtin_fminf(__x, __y); }
1305
1306__DEVICE__
1307double min(double __x, double __y) { return __builtin_fmin(__x, __y); }
1308
1309#if !defined(__HIPCC_RTC__) && !defined(__OPENMP_AMDGCN__)
1310__host__ inline static int min(int __arg1, int __arg2) {
1311 return __arg1 < __arg2 ? __arg1 : __arg2;
1312}
1313
1314__host__ inline static int max(int __arg1, int __arg2) {
1315 return __arg1 > __arg2 ? __arg1 : __arg2;
1316}
1317#endif // !defined(__HIPCC_RTC__) && !defined(__OPENMP_AMDGCN__)
1318#endif
1319
1320#pragma pop_macro("__DEVICE__")
1321#pragma pop_macro("__RETURN_TYPE")
1322#pragma pop_macro("__FAST_OR_SLOW")
1323
1324#endif // __CLANG_HIP_MATH_H__
lib/include/__clang_hip_runtime_wrapper.h deleted-159
...@@ -1,159 +0,0 @@
1/*===---- __clang_hip_runtime_wrapper.h - HIP runtime support ---------------===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 *===-----------------------------------------------------------------------===
8 */
9
10/*
11 * WARNING: This header is intended to be directly -include'd by
12 * the compiler and is not supposed to be included by users.
13 *
14 */
15
16#ifndef __CLANG_HIP_RUNTIME_WRAPPER_H__
17#define __CLANG_HIP_RUNTIME_WRAPPER_H__
18
19#if __HIP__
20
21#define __host__ __attribute__((host))
22#define __device__ __attribute__((device))
23#define __global__ __attribute__((global))
24#define __shared__ __attribute__((shared))
25#define __constant__ __attribute__((constant))
26#define __managed__ __attribute__((managed))
27
28#if !defined(__cplusplus) || __cplusplus < 201103L
29 #define nullptr NULL;
30#endif
31
32#ifdef __cplusplus
33extern "C" {
34 __attribute__((__visibility__("default")))
35 __attribute__((weak))
36 __attribute__((noreturn))
37 __device__ void __cxa_pure_virtual(void) {
38 __builtin_trap();
39 }
40 __attribute__((__visibility__("default")))
41 __attribute__((weak))
42 __attribute__((noreturn))
43 __device__ void __cxa_deleted_virtual(void) {
44 __builtin_trap();
45 }
46}
47#endif //__cplusplus
48
49#if !defined(__HIPCC_RTC__)
50#if __has_include("hip/hip_version.h")
51#include "hip/hip_version.h"
52#endif // __has_include("hip/hip_version.h")
53#endif // __HIPCC_RTC__
54
55typedef __SIZE_TYPE__ __hip_size_t;
56
57#ifdef __cplusplus
58extern "C" {
59#endif //__cplusplus
60
61#if HIP_VERSION_MAJOR * 100 + HIP_VERSION_MINOR >= 405
62__device__ unsigned long long __ockl_dm_alloc(unsigned long long __size);
63__device__ void __ockl_dm_dealloc(unsigned long long __addr);
64#if __has_feature(address_sanitizer)
65__device__ unsigned long long __asan_malloc_impl(unsigned long long __size,
66 unsigned long long __pc);
67__device__ void __asan_free_impl(unsigned long long __addr,
68 unsigned long long __pc);
69__attribute__((noinline, weak)) __device__ void *malloc(__hip_size_t __size) {
70 unsigned long long __pc = (unsigned long long)__builtin_return_address(0);
71 return (void *)__asan_malloc_impl(__size, __pc);
72}
73__attribute__((noinline, weak)) __device__ void free(void *__ptr) {
74 unsigned long long __pc = (unsigned long long)__builtin_return_address(0);
75 __asan_free_impl((unsigned long long)__ptr, __pc);
76}
77#else // __has_feature(address_sanitizer)
78__attribute__((weak)) inline __device__ void *malloc(__hip_size_t __size) {
79 return (void *) __ockl_dm_alloc(__size);
80}
81__attribute__((weak)) inline __device__ void free(void *__ptr) {
82 __ockl_dm_dealloc((unsigned long long)__ptr);
83}
84#endif // __has_feature(address_sanitizer)
85#else // HIP version check
86#if __HIP_ENABLE_DEVICE_MALLOC__
87__device__ void *__hip_malloc(__hip_size_t __size);
88__device__ void *__hip_free(void *__ptr);
89__attribute__((weak)) inline __device__ void *malloc(__hip_size_t __size) {
90 return __hip_malloc(__size);
91}
92__attribute__((weak)) inline __device__ void free(void *__ptr) {
93 __hip_free(__ptr);
94}
95#else // __HIP_ENABLE_DEVICE_MALLOC__
96__attribute__((weak)) inline __device__ void *malloc(__hip_size_t __size) {
97 __builtin_trap();
98 return (void *)0;
99}
100__attribute__((weak)) inline __device__ void free(void *__ptr) {
101 __builtin_trap();
102}
103#endif // __HIP_ENABLE_DEVICE_MALLOC__
104#endif // HIP version check
105
106#ifdef __cplusplus
107} // extern "C"
108#endif //__cplusplus
109
110#if !defined(__HIPCC_RTC__)
111#include <cmath>
112#include <cstdlib>
113#include <stdlib.h>
114#if __has_include("hip/hip_version.h")
115#include "hip/hip_version.h"
116#endif // __has_include("hip/hip_version.h")
117#else
118typedef __SIZE_TYPE__ size_t;
119// Define macros which are needed to declare HIP device API's without standard
120// C/C++ headers. This is for readability so that these API's can be written
121// the same way as non-hipRTC use case. These macros need to be popped so that
122// they do not pollute users' name space.
123#pragma push_macro("NULL")
124#pragma push_macro("uint32_t")
125#pragma push_macro("uint64_t")
126#pragma push_macro("CHAR_BIT")
127#pragma push_macro("INT_MAX")
128#define NULL (void *)0
129#define uint32_t __UINT32_TYPE__
130#define uint64_t __UINT64_TYPE__
131#define CHAR_BIT __CHAR_BIT__
132#define INT_MAX __INTMAX_MAX__
133#endif // __HIPCC_RTC__
134
135#include <__clang_hip_libdevice_declares.h>
136#include <__clang_hip_math.h>
137#include <__clang_hip_stdlib.h>
138
139#if defined(__HIPCC_RTC__)
140#include <__clang_hip_cmath.h>
141#else
142#include <__clang_cuda_math_forward_declares.h>
143#include <__clang_hip_cmath.h>
144#include <__clang_cuda_complex_builtins.h>
145#include <algorithm>
146#include <complex>
147#include <new>
148#endif // __HIPCC_RTC__
149
150#define __CLANG_HIP_RUNTIME_WRAPPER_INCLUDED__ 1
151#if defined(__HIPCC_RTC__)
152#pragma pop_macro("NULL")
153#pragma pop_macro("uint32_t")
154#pragma pop_macro("uint64_t")
155#pragma pop_macro("CHAR_BIT")
156#pragma pop_macro("INT_MAX")
157#endif // __HIPCC_RTC__
158#endif // __HIP__
159#endif // __CLANG_HIP_RUNTIME_WRAPPER_H__
lib/include/__clang_hip_stdlib.h deleted-43
...@@ -1,43 +0,0 @@
1/*===---- __clang_hip_stdlib.h - Device-side HIP math support --------------===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 *===-----------------------------------------------------------------------===
8 */
9#ifndef __CLANG_HIP_STDLIB_H__
10
11#if !defined(__HIP__) && !defined(__OPENMP_AMDGCN__)
12#error "This file is for HIP and OpenMP AMDGCN device compilation only."
13#endif
14
15#if !defined(__cplusplus)
16
17#include <limits.h>
18
19#ifdef __OPENMP_AMDGCN__
20#define __DEVICE__ static inline __attribute__((always_inline, nothrow))
21#else
22#define __DEVICE__ static __device__ inline __attribute__((always_inline))
23#endif
24
25__DEVICE__
26int abs(int __x) {
27 int __sgn = __x >> (sizeof(int) * CHAR_BIT - 1);
28 return (__x ^ __sgn) - __sgn;
29}
30__DEVICE__
31long labs(long __x) {
32 long __sgn = __x >> (sizeof(long) * CHAR_BIT - 1);
33 return (__x ^ __sgn) - __sgn;
34}
35__DEVICE__
36long long llabs(long long __x) {
37 long long __sgn = __x >> (sizeof(long long) * CHAR_BIT - 1);
38 return (__x ^ __sgn) - __sgn;
39}
40
41#endif // !defined(__cplusplus)
42
43#endif // #define __CLANG_HIP_STDLIB_H__
lib/include/cuda_wrappers/algorithm deleted-116
...@@ -1,116 +0,0 @@
1/*===---- algorithm - CUDA wrapper for <algorithm> -------------------------===
2 *
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
4 * of this software and associated documentation files (the "Software"), to deal
5 * in the Software without restriction, including without limitation the rights
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 * copies of the Software, and to permit persons to whom the Software is
8 * furnished to do so, subject to the following conditions:
9 *
10 * The above copyright notice and this permission notice shall be included in
11 * all copies or substantial portions of the Software.
12 *
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 * THE SOFTWARE.
20 *
21 *===-----------------------------------------------------------------------===
22 */
23
24#ifndef __CLANG_CUDA_WRAPPERS_ALGORITHM
25#define __CLANG_CUDA_WRAPPERS_ALGORITHM
26
27// This header defines __device__ overloads of std::min/max.
28//
29// Ideally we'd declare these functions only if we're <= C++11. In C++14,
30// these functions are constexpr, and so are implicitly __host__ __device__.
31//
32// However, the compiler being in C++14 mode does not imply that the standard
33// library supports C++14. There is no macro we can test to check that the
34// stdlib has constexpr std::min/max. Thus we have to unconditionally define
35// our device overloads.
36//
37// A host+device function cannot be overloaded, and a constexpr function
38// implicitly become host device if there's no explicitly host or device
39// overload preceding it. So the simple thing to do would be to declare our
40// device min/max overloads, and then #include_next <algorithm>. This way our
41// device overloads would come first, and so if we have a C++14 stdlib, its
42// min/max won't become host+device and conflict with our device overloads.
43//
44// But that also doesn't work. libstdc++ is evil and declares std::min/max in
45// an internal header that is included *before* <algorithm>. Thus by the time
46// we're inside of this file, std::min/max may already have been declared, and
47// thus we can't prevent them from becoming host+device if they're constexpr.
48//
49// Therefore we perpetrate the following hack: We mark our __device__ overloads
50// with __attribute__((enable_if(true, ""))). This causes the signature of the
51// function to change without changing anything else about it. (Except that
52// overload resolution will prefer it over the __host__ __device__ version
53// rather than considering them equally good).
54
55#include_next <algorithm>
56
57// We need to define these overloads in exactly the namespace our standard
58// library uses (including the right inline namespace), otherwise they won't be
59// picked up by other functions in the standard library (e.g. functions in
60// <complex>). Thus the ugliness below.
61#ifdef _LIBCPP_BEGIN_NAMESPACE_STD
62_LIBCPP_BEGIN_NAMESPACE_STD
63#else
64namespace std {
65#ifdef _GLIBCXX_BEGIN_NAMESPACE_VERSION
66_GLIBCXX_BEGIN_NAMESPACE_VERSION
67#endif
68#endif
69
70#pragma push_macro("_CPP14_CONSTEXPR")
71#if __cplusplus >= 201402L
72#define _CPP14_CONSTEXPR constexpr
73#else
74#define _CPP14_CONSTEXPR
75#endif
76
77template <class __T, class __Cmp>
78__attribute__((enable_if(true, "")))
79inline _CPP14_CONSTEXPR __host__ __device__ const __T &
80max(const __T &__a, const __T &__b, __Cmp __cmp) {
81 return __cmp(__a, __b) ? __b : __a;
82}
83
84template <class __T>
85__attribute__((enable_if(true, "")))
86inline _CPP14_CONSTEXPR __host__ __device__ const __T &
87max(const __T &__a, const __T &__b) {
88 return __a < __b ? __b : __a;
89}
90
91template <class __T, class __Cmp>
92__attribute__((enable_if(true, "")))
93inline _CPP14_CONSTEXPR __host__ __device__ const __T &
94min(const __T &__a, const __T &__b, __Cmp __cmp) {
95 return __cmp(__b, __a) ? __b : __a;
96}
97
98template <class __T>
99__attribute__((enable_if(true, "")))
100inline _CPP14_CONSTEXPR __host__ __device__ const __T &
101min(const __T &__a, const __T &__b) {
102 return __b < __a ? __b : __a;
103}
104
105#pragma pop_macro("_CPP14_CONSTEXPR")
106
107#ifdef _LIBCPP_END_NAMESPACE_STD
108_LIBCPP_END_NAMESPACE_STD
109#else
110#ifdef _GLIBCXX_BEGIN_NAMESPACE_VERSION
111_GLIBCXX_END_NAMESPACE_VERSION
112#endif
113} // namespace std
114#endif
115
116#endif // __CLANG_CUDA_WRAPPERS_ALGORITHM
lib/include/cuda_wrappers/bits/basic_string.h deleted-9
...@@ -1,9 +0,0 @@
1// CUDA headers define __noinline__ which interferes with libstdc++'s use of
2// `__attribute((__noinline__))`. In order to avoid compilation error,
3// temporarily unset __noinline__ when we include affected libstdc++ header.
4
5#pragma push_macro("__noinline__")
6#undef __noinline__
7#include_next "bits/basic_string.h"
8
9#pragma pop_macro("__noinline__")
lib/include/cuda_wrappers/bits/basic_string.tcc deleted-9
...@@ -1,9 +0,0 @@
1// CUDA headers define __noinline__ which interferes with libstdc++'s use of
2// `__attribute((__noinline__))`. In order to avoid compilation error,
3// temporarily unset __noinline__ when we include affected libstdc++ header.
4
5#pragma push_macro("__noinline__")
6#undef __noinline__
7#include_next "bits/basic_string.tcc"
8
9#pragma pop_macro("__noinline__")
lib/include/cuda_wrappers/bits/shared_ptr_base.h deleted-9
...@@ -1,9 +0,0 @@
1// CUDA headers define __noinline__ which interferes with libstdc++'s use of
2// `__attribute((__noinline__))`. In order to avoid compilation error,
3// temporarily unset __noinline__ when we include affected libstdc++ header.
4
5#pragma push_macro("__noinline__")
6#undef __noinline__
7#include_next "bits/shared_ptr_base.h"
8
9#pragma pop_macro("__noinline__")
lib/include/cuda_wrappers/cmath deleted-90
...@@ -1,90 +0,0 @@
1/*===---- cmath - CUDA wrapper for <cmath> ---------------------------------===
2 *
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
4 * of this software and associated documentation files (the "Software"), to deal
5 * in the Software without restriction, including without limitation the rights
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 * copies of the Software, and to permit persons to whom the Software is
8 * furnished to do so, subject to the following conditions:
9 *
10 * The above copyright notice and this permission notice shall be included in
11 * all copies or substantial portions of the Software.
12 *
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 * THE SOFTWARE.
20 *
21 *===-----------------------------------------------------------------------===
22 */
23
24#ifndef __CLANG_CUDA_WRAPPERS_CMATH
25#define __CLANG_CUDA_WRAPPERS_CMATH
26
27#include_next <cmath>
28
29#if defined(_LIBCPP_STD_VER)
30
31// libc++ will need long double variants of these functions, but CUDA does not
32// provide them. We'll provide their declarations, which should allow the
33// headers to parse, but would not allow accidental use of them on a GPU.
34
35__attribute__((device)) long double logb(long double);
36__attribute__((device)) long double scalbn(long double, int);
37
38namespace std {
39
40// For __constexpr_fmin/fmax we only need device-side overloads before c++14
41// where they are not constexpr.
42#if _LIBCPP_STD_VER < 14
43
44__attribute__((device))
45inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 float __constexpr_fmax(float __x, float __y) _NOEXCEPT {
46 return __builtin_fmaxf(__x, __y);
47}
48
49__attribute__((device))
50inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 double __constexpr_fmax(double __x, double __y) _NOEXCEPT {
51 return __builtin_fmax(__x, __y);
52}
53
54__attribute__((device))
55inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 long double
56__constexpr_fmax(long double __x, long double __y) _NOEXCEPT {
57 return __builtin_fmaxl(__x, __y);
58}
59
60template <class _Tp, class _Up, __enable_if_t<is_arithmetic<_Tp>::value && is_arithmetic<_Up>::value, int> = 0>
61__attribute__((device))
62_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename __promote<_Tp, _Up>::type
63__constexpr_fmax(_Tp __x, _Up __y) _NOEXCEPT {
64 using __result_type = typename __promote<_Tp, _Up>::type;
65 return std::__constexpr_fmax(static_cast<__result_type>(__x), static_cast<__result_type>(__y));
66}
67#endif // _LIBCPP_STD_VER < 14
68
69// For logb/scalbn templates we must always provide device overloads because
70// libc++ implementation uses __builtin_XXX which gets translated into a libcall
71// which we can't handle on GPU. We need to forward those to CUDA-provided
72// implementations.
73
74template <class _Tp>
75__attribute__((device))
76_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp __constexpr_logb(_Tp __x) {
77 return ::logb(__x);
78}
79
80template <class _Tp>
81__attribute__((device))
82_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp __constexpr_scalbn(_Tp __x, int __exp) {
83 return ::scalbn(__x, __exp);
84}
85
86} // namespace std//
87
88#endif // _LIBCPP_STD_VER
89
90#endif // include guard
lib/include/cuda_wrappers/complex deleted-90
...@@ -1,90 +0,0 @@
1/*===---- complex - CUDA wrapper for <complex> ------------------------------===
2 *
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
4 * of this software and associated documentation files (the "Software"), to deal
5 * in the Software without restriction, including without limitation the rights
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 * copies of the Software, and to permit persons to whom the Software is
8 * furnished to do so, subject to the following conditions:
9 *
10 * The above copyright notice and this permission notice shall be included in
11 * all copies or substantial portions of the Software.
12 *
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 * THE SOFTWARE.
20 *
21 *===-----------------------------------------------------------------------===
22 */
23
24#ifndef __CLANG_CUDA_WRAPPERS_COMPLEX
25#define __CLANG_CUDA_WRAPPERS_COMPLEX
26
27// Wrapper around <complex> that forces its functions to be __host__
28// __device__.
29
30// First, include host-only headers we think are likely to be included by
31// <complex>, so that the pragma below only applies to <complex> itself.
32#if __cplusplus >= 201103L
33#include <type_traits>
34#endif
35#include <stdexcept>
36#include <cmath>
37#include <sstream>
38
39// Next, include our <algorithm> wrapper, to ensure that device overloads of
40// std::min/max are available.
41#include <algorithm>
42
43#pragma clang force_cuda_host_device begin
44
45// When compiling for device, ask libstdc++ to use its own implements of
46// complex functions, rather than calling builtins (which resolve to library
47// functions that don't exist when compiling CUDA device code).
48//
49// This is a little dicey, because it causes libstdc++ to define a different
50// set of overloads on host and device.
51//
52// // Present only when compiling for host.
53// __host__ __device__ void complex<float> sin(const complex<float>& x) {
54// return __builtin_csinf(x);
55// }
56//
57// // Present when compiling for host and for device.
58// template <typename T>
59// void __host__ __device__ complex<T> sin(const complex<T>& x) {
60// return complex<T>(sin(x.real()) * cosh(x.imag()),
61// cos(x.real()), sinh(x.imag()));
62// }
63//
64// This is safe because when compiling for device, all function calls in
65// __host__ code to sin() will still resolve to *something*, even if they don't
66// resolve to the same function as they resolve to when compiling for host. We
67// don't care that they don't resolve to the right function because we won't
68// codegen this host code when compiling for device.
69
70#pragma push_macro("_GLIBCXX_USE_C99_COMPLEX")
71#pragma push_macro("_GLIBCXX_USE_C99_COMPLEX_TR1")
72#define _GLIBCXX_USE_C99_COMPLEX 0
73#define _GLIBCXX_USE_C99_COMPLEX_TR1 0
74
75// Work around a compatibility issue with libstdc++ 11.1.0
76// https://bugs.llvm.org/show_bug.cgi?id=50383
77#pragma push_macro("__failed_assertion")
78#if _GLIBCXX_RELEASE == 11
79#define __failed_assertion __cuda_failed_assertion
80#endif
81
82#include_next <complex>
83
84#pragma pop_macro("__failed_assertion")
85#pragma pop_macro("_GLIBCXX_USE_C99_COMPLEX_TR1")
86#pragma pop_macro("_GLIBCXX_USE_C99_COMPLEX")
87
88#pragma clang force_cuda_host_device end
89
90#endif // include guard
lib/include/cuda_wrappers/new deleted-106
...@@ -1,106 +0,0 @@
1/*===---- new - CUDA wrapper for <new> -------------------------------------===
2 *
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
4 * of this software and associated documentation files (the "Software"), to deal
5 * in the Software without restriction, including without limitation the rights
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 * copies of the Software, and to permit persons to whom the Software is
8 * furnished to do so, subject to the following conditions:
9 *
10 * The above copyright notice and this permission notice shall be included in
11 * all copies or substantial portions of the Software.
12 *
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 * THE SOFTWARE.
20 *
21 *===-----------------------------------------------------------------------===
22 */
23
24#ifndef __CLANG_CUDA_WRAPPERS_NEW
25#define __CLANG_CUDA_WRAPPERS_NEW
26
27#include_next <new>
28
29#if !defined(__device__)
30// The header has been included too early from the standard C++ library
31// and CUDA-specific macros are not available yet.
32// Undo the include guard and try again later.
33#undef __CLANG_CUDA_WRAPPERS_NEW
34#else
35
36#pragma push_macro("CUDA_NOEXCEPT")
37#if __cplusplus >= 201103L
38#define CUDA_NOEXCEPT noexcept
39#else
40#define CUDA_NOEXCEPT
41#endif
42
43// Device overrides for non-placement new and delete.
44__device__ inline void *operator new(__SIZE_TYPE__ size) {
45 if (size == 0) {
46 size = 1;
47 }
48 return ::malloc(size);
49}
50__device__ inline void *operator new(__SIZE_TYPE__ size,
51 const std::nothrow_t &) CUDA_NOEXCEPT {
52 return ::operator new(size);
53}
54
55__device__ inline void *operator new[](__SIZE_TYPE__ size) {
56 return ::operator new(size);
57}
58__device__ inline void *operator new[](__SIZE_TYPE__ size,
59 const std::nothrow_t &) {
60 return ::operator new(size);
61}
62
63__device__ inline void operator delete(void* ptr) CUDA_NOEXCEPT {
64 if (ptr) {
65 ::free(ptr);
66 }
67}
68__device__ inline void operator delete(void *ptr,
69 const std::nothrow_t &) CUDA_NOEXCEPT {
70 ::operator delete(ptr);
71}
72
73__device__ inline void operator delete[](void* ptr) CUDA_NOEXCEPT {
74 ::operator delete(ptr);
75}
76__device__ inline void operator delete[](void *ptr,
77 const std::nothrow_t &) CUDA_NOEXCEPT {
78 ::operator delete(ptr);
79}
80
81// Sized delete, C++14 only.
82#if __cplusplus >= 201402L
83__device__ inline void operator delete(void *ptr,
84 __SIZE_TYPE__ size) CUDA_NOEXCEPT {
85 ::operator delete(ptr);
86}
87__device__ inline void operator delete[](void *ptr,
88 __SIZE_TYPE__ size) CUDA_NOEXCEPT {
89 ::operator delete(ptr);
90}
91#endif
92
93// Device overrides for placement new and delete.
94__device__ inline void *operator new(__SIZE_TYPE__, void *__ptr) CUDA_NOEXCEPT {
95 return __ptr;
96}
97__device__ inline void *operator new[](__SIZE_TYPE__, void *__ptr) CUDA_NOEXCEPT {
98 return __ptr;
99}
100__device__ inline void operator delete(void *, void *) CUDA_NOEXCEPT {}
101__device__ inline void operator delete[](void *, void *) CUDA_NOEXCEPT {}
102
103#pragma pop_macro("CUDA_NOEXCEPT")
104
105#endif // __device__
106#endif // include guard
lib/include/opencl-c-base.h deleted-829
...@@ -1,829 +0,0 @@
1//===----- opencl-c-base.h - OpenCL C language base definitions -----------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef _OPENCL_BASE_H_
10#define _OPENCL_BASE_H_
11
12// Define extension macros
13
14#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200)
15// For SPIR and SPIR-V all extensions are supported.
16#if defined(__SPIR__) || defined(__SPIRV__)
17#define cl_khr_subgroup_extended_types 1
18#define cl_khr_subgroup_non_uniform_vote 1
19#define cl_khr_subgroup_ballot 1
20#define cl_khr_subgroup_non_uniform_arithmetic 1
21#define cl_khr_subgroup_shuffle 1
22#define cl_khr_subgroup_shuffle_relative 1
23#define cl_khr_subgroup_clustered_reduce 1
24#define cl_khr_subgroup_rotate 1
25#define cl_khr_extended_bit_ops 1
26#define cl_khr_integer_dot_product 1
27#define __opencl_c_integer_dot_product_input_4x8bit 1
28#define __opencl_c_integer_dot_product_input_4x8bit_packed 1
29#define cl_ext_float_atomics 1
30#ifdef cl_khr_fp16
31#define __opencl_c_ext_fp16_global_atomic_load_store 1
32#define __opencl_c_ext_fp16_local_atomic_load_store 1
33#define __opencl_c_ext_fp16_global_atomic_add 1
34#define __opencl_c_ext_fp16_local_atomic_add 1
35#define __opencl_c_ext_fp16_global_atomic_min_max 1
36#define __opencl_c_ext_fp16_local_atomic_min_max 1
37#endif
38#ifdef cl_khr_fp64
39#define __opencl_c_ext_fp64_global_atomic_add 1
40#define __opencl_c_ext_fp64_local_atomic_add 1
41#define __opencl_c_ext_fp64_global_atomic_min_max 1
42#define __opencl_c_ext_fp64_local_atomic_min_max 1
43#endif
44#define __opencl_c_ext_fp32_global_atomic_add 1
45#define __opencl_c_ext_fp32_local_atomic_add 1
46#define __opencl_c_ext_fp32_global_atomic_min_max 1
47#define __opencl_c_ext_fp32_local_atomic_min_max 1
48#define __opencl_c_ext_image_raw10_raw12 1
49#define cl_khr_kernel_clock 1
50#define __opencl_c_kernel_clock_scope_device 1
51#define __opencl_c_kernel_clock_scope_work_group 1
52#define __opencl_c_kernel_clock_scope_sub_group 1
53
54#endif // defined(__SPIR__) || defined(__SPIRV__)
55#endif // (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200)
56
57// Define feature macros for OpenCL C 2.0
58#if (__OPENCL_CPP_VERSION__ == 100 || __OPENCL_C_VERSION__ == 200)
59#define __opencl_c_pipes 1
60#define __opencl_c_generic_address_space 1
61#define __opencl_c_work_group_collective_functions 1
62#define __opencl_c_atomic_order_acq_rel 1
63#define __opencl_c_atomic_order_seq_cst 1
64#define __opencl_c_atomic_scope_device 1
65#define __opencl_c_atomic_scope_all_devices 1
66#define __opencl_c_device_enqueue 1
67#define __opencl_c_read_write_images 1
68#define __opencl_c_program_scope_global_variables 1
69#define __opencl_c_images 1
70#endif
71
72// Define header-only feature macros for OpenCL C 3.0.
73#if (__OPENCL_CPP_VERSION__ == 202100 || __OPENCL_C_VERSION__ == 300)
74// For the SPIR and SPIR-V target all features are supported.
75#if defined(__SPIR__) || defined(__SPIRV__)
76#define __opencl_c_work_group_collective_functions 1
77#define __opencl_c_atomic_order_seq_cst 1
78#define __opencl_c_atomic_scope_device 1
79#define __opencl_c_atomic_scope_all_devices 1
80#define __opencl_c_read_write_images 1
81#endif // defined(__SPIR__)
82
83// Undefine any feature macros that have been explicitly disabled using
84// an __undef_<feature> macro.
85#ifdef __undef___opencl_c_work_group_collective_functions
86#undef __opencl_c_work_group_collective_functions
87#endif
88#ifdef __undef___opencl_c_atomic_order_seq_cst
89#undef __opencl_c_atomic_order_seq_cst
90#endif
91#ifdef __undef___opencl_c_atomic_scope_device
92#undef __opencl_c_atomic_scope_device
93#endif
94#ifdef __undef___opencl_c_atomic_scope_all_devices
95#undef __opencl_c_atomic_scope_all_devices
96#endif
97#ifdef __undef___opencl_c_read_write_images
98#undef __opencl_c_read_write_images
99#endif
100
101#endif // (__OPENCL_CPP_VERSION__ == 202100 || __OPENCL_C_VERSION__ == 300)
102
103#if !defined(__opencl_c_generic_address_space)
104// Internal feature macro to provide named (global, local, private) address
105// space overloads for builtin functions that take a pointer argument.
106#define __opencl_c_named_address_space_builtins 1
107#endif // !defined(__opencl_c_generic_address_space)
108
109#if defined(cl_intel_subgroups) || defined(cl_khr_subgroups) || defined(__opencl_c_subgroups)
110// Internal feature macro to provide subgroup builtins.
111#define __opencl_subgroup_builtins 1
112#endif
113
114// built-in scalar data types:
115
116/**
117 * An unsigned 8-bit integer.
118 */
119typedef unsigned char uchar;
120
121/**
122 * An unsigned 16-bit integer.
123 */
124typedef unsigned short ushort;
125
126/**
127 * An unsigned 32-bit integer.
128 */
129typedef unsigned int uint;
130
131/**
132 * An unsigned 64-bit integer.
133 */
134typedef unsigned long ulong;
135
136/**
137 * The unsigned integer type of the result of the sizeof operator. This
138 * is a 32-bit unsigned integer if CL_DEVICE_ADDRESS_BITS
139 * defined in table 4.3 is 32-bits and is a 64-bit unsigned integer if
140 * CL_DEVICE_ADDRESS_BITS is 64-bits.
141 */
142typedef __SIZE_TYPE__ size_t;
143
144/**
145 * A signed integer type that is the result of subtracting two pointers.
146 * This is a 32-bit signed integer if CL_DEVICE_ADDRESS_BITS
147 * defined in table 4.3 is 32-bits and is a 64-bit signed integer if
148 * CL_DEVICE_ADDRESS_BITS is 64-bits.
149 */
150typedef __PTRDIFF_TYPE__ ptrdiff_t;
151
152/**
153 * A signed integer type with the property that any valid pointer to
154 * void can be converted to this type, then converted back to pointer
155 * to void, and the result will compare equal to the original pointer.
156 */
157typedef __INTPTR_TYPE__ intptr_t;
158
159/**
160 * An unsigned integer type with the property that any valid pointer to
161 * void can be converted to this type, then converted back to pointer
162 * to void, and the result will compare equal to the original pointer.
163 */
164typedef __UINTPTR_TYPE__ uintptr_t;
165
166// built-in vector data types:
167typedef char char2 __attribute__((ext_vector_type(2)));
168typedef char char3 __attribute__((ext_vector_type(3)));
169typedef char char4 __attribute__((ext_vector_type(4)));
170typedef char char8 __attribute__((ext_vector_type(8)));
171typedef char char16 __attribute__((ext_vector_type(16)));
172typedef uchar uchar2 __attribute__((ext_vector_type(2)));
173typedef uchar uchar3 __attribute__((ext_vector_type(3)));
174typedef uchar uchar4 __attribute__((ext_vector_type(4)));
175typedef uchar uchar8 __attribute__((ext_vector_type(8)));
176typedef uchar uchar16 __attribute__((ext_vector_type(16)));
177typedef short short2 __attribute__((ext_vector_type(2)));
178typedef short short3 __attribute__((ext_vector_type(3)));
179typedef short short4 __attribute__((ext_vector_type(4)));
180typedef short short8 __attribute__((ext_vector_type(8)));
181typedef short short16 __attribute__((ext_vector_type(16)));
182typedef ushort ushort2 __attribute__((ext_vector_type(2)));
183typedef ushort ushort3 __attribute__((ext_vector_type(3)));
184typedef ushort ushort4 __attribute__((ext_vector_type(4)));
185typedef ushort ushort8 __attribute__((ext_vector_type(8)));
186typedef ushort ushort16 __attribute__((ext_vector_type(16)));
187typedef int int2 __attribute__((ext_vector_type(2)));
188typedef int int3 __attribute__((ext_vector_type(3)));
189typedef int int4 __attribute__((ext_vector_type(4)));
190typedef int int8 __attribute__((ext_vector_type(8)));
191typedef int int16 __attribute__((ext_vector_type(16)));
192typedef uint uint2 __attribute__((ext_vector_type(2)));
193typedef uint uint3 __attribute__((ext_vector_type(3)));
194typedef uint uint4 __attribute__((ext_vector_type(4)));
195typedef uint uint8 __attribute__((ext_vector_type(8)));
196typedef uint uint16 __attribute__((ext_vector_type(16)));
197typedef long long2 __attribute__((ext_vector_type(2)));
198typedef long long3 __attribute__((ext_vector_type(3)));
199typedef long long4 __attribute__((ext_vector_type(4)));
200typedef long long8 __attribute__((ext_vector_type(8)));
201typedef long long16 __attribute__((ext_vector_type(16)));
202typedef ulong ulong2 __attribute__((ext_vector_type(2)));
203typedef ulong ulong3 __attribute__((ext_vector_type(3)));
204typedef ulong ulong4 __attribute__((ext_vector_type(4)));
205typedef ulong ulong8 __attribute__((ext_vector_type(8)));
206typedef ulong ulong16 __attribute__((ext_vector_type(16)));
207typedef float float2 __attribute__((ext_vector_type(2)));
208typedef float float3 __attribute__((ext_vector_type(3)));
209typedef float float4 __attribute__((ext_vector_type(4)));
210typedef float float8 __attribute__((ext_vector_type(8)));
211typedef float float16 __attribute__((ext_vector_type(16)));
212#ifdef cl_khr_fp16
213#pragma OPENCL EXTENSION cl_khr_fp16 : enable
214typedef half half2 __attribute__((ext_vector_type(2)));
215typedef half half3 __attribute__((ext_vector_type(3)));
216typedef half half4 __attribute__((ext_vector_type(4)));
217typedef half half8 __attribute__((ext_vector_type(8)));
218typedef half half16 __attribute__((ext_vector_type(16)));
219#endif
220#ifdef cl_khr_fp64
221#if __OPENCL_C_VERSION__ < CL_VERSION_1_2
222#pragma OPENCL EXTENSION cl_khr_fp64 : enable
223#endif
224typedef double double2 __attribute__((ext_vector_type(2)));
225typedef double double3 __attribute__((ext_vector_type(3)));
226typedef double double4 __attribute__((ext_vector_type(4)));
227typedef double double8 __attribute__((ext_vector_type(8)));
228typedef double double16 __attribute__((ext_vector_type(16)));
229#endif
230
231// An internal alias for half, for use by OpenCLBuiltins.td.
232#define __half half
233
234#if defined(__OPENCL_CPP_VERSION__)
235#define NULL nullptr
236#elif defined(__OPENCL_C_VERSION__)
237#define NULL ((void*)0)
238#endif
239
240/**
241 * Value of maximum non-infinite single-precision floating-point
242 * number.
243 */
244#define MAXFLOAT 0x1.fffffep127f
245
246/**
247 * A positive float constant expression. HUGE_VALF evaluates
248 * to +infinity. Used as an error value returned by the built-in
249 * math functions.
250 */
251#define HUGE_VALF (__builtin_huge_valf())
252
253/**
254 * A positive double constant expression. HUGE_VAL evaluates
255 * to +infinity. Used as an error value returned by the built-in
256 * math functions.
257 */
258#define HUGE_VAL (__builtin_huge_val())
259
260/**
261 * A constant expression of type float representing positive or
262 * unsigned infinity.
263 */
264#define INFINITY (__builtin_inff())
265
266/**
267 * A constant expression of type float representing a quiet NaN.
268 */
269#define NAN as_float(INT_MAX)
270
271#define FP_ILOGB0 INT_MIN
272#define FP_ILOGBNAN INT_MAX
273
274#define FLT_DIG 6
275#define FLT_MANT_DIG 24
276#define FLT_MAX_10_EXP +38
277#define FLT_MAX_EXP +128
278#define FLT_MIN_10_EXP -37
279#define FLT_MIN_EXP -125
280#define FLT_RADIX 2
281#define FLT_MAX 0x1.fffffep127f
282#define FLT_MIN 0x1.0p-126f
283#define FLT_EPSILON 0x1.0p-23f
284
285#define M_E_F 2.71828182845904523536028747135266250f
286#define M_LOG2E_F 1.44269504088896340735992468100189214f
287#define M_LOG10E_F 0.434294481903251827651128918916605082f
288#define M_LN2_F 0.693147180559945309417232121458176568f
289#define M_LN10_F 2.30258509299404568401799145468436421f
290#define M_PI_F 3.14159265358979323846264338327950288f
291#define M_PI_2_F 1.57079632679489661923132169163975144f
292#define M_PI_4_F 0.785398163397448309615660845819875721f
293#define M_1_PI_F 0.318309886183790671537767526745028724f
294#define M_2_PI_F 0.636619772367581343075535053490057448f
295#define M_2_SQRTPI_F 1.12837916709551257389615890312154517f
296#define M_SQRT2_F 1.41421356237309504880168872420969808f
297#define M_SQRT1_2_F 0.707106781186547524400844362104849039f
298
299#define DBL_DIG 15
300#define DBL_MANT_DIG 53
301#define DBL_MAX_10_EXP +308
302#define DBL_MAX_EXP +1024
303#define DBL_MIN_10_EXP -307
304#define DBL_MIN_EXP -1021
305#define DBL_RADIX 2
306#define DBL_MAX 0x1.fffffffffffffp1023
307#define DBL_MIN 0x1.0p-1022
308#define DBL_EPSILON 0x1.0p-52
309
310#define M_E 0x1.5bf0a8b145769p+1
311#define M_LOG2E 0x1.71547652b82fep+0
312#define M_LOG10E 0x1.bcb7b1526e50ep-2
313#define M_LN2 0x1.62e42fefa39efp-1
314#define M_LN10 0x1.26bb1bbb55516p+1
315#define M_PI 0x1.921fb54442d18p+1
316#define M_PI_2 0x1.921fb54442d18p+0
317#define M_PI_4 0x1.921fb54442d18p-1
318#define M_1_PI 0x1.45f306dc9c883p-2
319#define M_2_PI 0x1.45f306dc9c883p-1
320#define M_2_SQRTPI 0x1.20dd750429b6dp+0
321#define M_SQRT2 0x1.6a09e667f3bcdp+0
322#define M_SQRT1_2 0x1.6a09e667f3bcdp-1
323
324#ifdef cl_khr_fp16
325
326#define HALF_DIG 3
327#define HALF_MANT_DIG 11
328#define HALF_MAX_10_EXP +4
329#define HALF_MAX_EXP +16
330#define HALF_MIN_10_EXP -4
331#define HALF_MIN_EXP -13
332#define HALF_RADIX 2
333#define HALF_MAX ((0x1.ffcp15h))
334#define HALF_MIN ((0x1.0p-14h))
335#define HALF_EPSILON ((0x1.0p-10h))
336
337#define M_E_H 2.71828182845904523536028747135266250h
338#define M_LOG2E_H 1.44269504088896340735992468100189214h
339#define M_LOG10E_H 0.434294481903251827651128918916605082h
340#define M_LN2_H 0.693147180559945309417232121458176568h
341#define M_LN10_H 2.30258509299404568401799145468436421h
342#define M_PI_H 3.14159265358979323846264338327950288h
343#define M_PI_2_H 1.57079632679489661923132169163975144h
344#define M_PI_4_H 0.785398163397448309615660845819875721h
345#define M_1_PI_H 0.318309886183790671537767526745028724h
346#define M_2_PI_H 0.636619772367581343075535053490057448h
347#define M_2_SQRTPI_H 1.12837916709551257389615890312154517h
348#define M_SQRT2_H 1.41421356237309504880168872420969808h
349#define M_SQRT1_2_H 0.707106781186547524400844362104849039h
350
351#endif //cl_khr_fp16
352
353#define CHAR_BIT 8
354#define SCHAR_MAX 127
355#define SCHAR_MIN (-128)
356#define UCHAR_MAX 255
357#define CHAR_MAX SCHAR_MAX
358#define CHAR_MIN SCHAR_MIN
359#define USHRT_MAX 65535
360#define SHRT_MAX 32767
361#define SHRT_MIN (-32768)
362#define UINT_MAX 0xffffffff
363#define INT_MAX 2147483647
364#define INT_MIN (-2147483647-1)
365#define ULONG_MAX 0xffffffffffffffffUL
366#define LONG_MAX 0x7fffffffffffffffL
367#define LONG_MIN (-0x7fffffffffffffffL-1)
368
369// OpenCL v1.1 s6.11.8, v1.2 s6.12.8, v2.0 s6.13.8 - Synchronization Functions
370
371// Flag type and values for barrier, mem_fence, read_mem_fence, write_mem_fence
372typedef uint cl_mem_fence_flags;
373
374/**
375 * Queue a memory fence to ensure correct
376 * ordering of memory operations to local memory
377 */
378#define CLK_LOCAL_MEM_FENCE 0x01
379
380/**
381 * Queue a memory fence to ensure correct
382 * ordering of memory operations to global memory
383 */
384#define CLK_GLOBAL_MEM_FENCE 0x02
385
386#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
387
388typedef enum memory_scope {
389 memory_scope_work_item = __OPENCL_MEMORY_SCOPE_WORK_ITEM,
390 memory_scope_work_group = __OPENCL_MEMORY_SCOPE_WORK_GROUP,
391 memory_scope_device = __OPENCL_MEMORY_SCOPE_DEVICE,
392#if defined(__opencl_c_atomic_scope_all_devices)
393 memory_scope_all_svm_devices = __OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES,
394#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
395 memory_scope_all_devices = memory_scope_all_svm_devices,
396#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
397#endif // defined(__opencl_c_atomic_scope_all_devices)
398/**
399 * Subgroups have different requirements on forward progress, so just test
400 * all the relevant macros.
401 * CL 3.0 sub-groups "they are not guaranteed to make independent forward progress"
402 * KHR subgroups "Subgroups within a workgroup are independent, make forward progress with respect to each other"
403 */
404#if defined(cl_intel_subgroups) || defined(cl_khr_subgroups) || defined(__opencl_c_subgroups)
405 memory_scope_sub_group = __OPENCL_MEMORY_SCOPE_SUB_GROUP
406#endif
407} memory_scope;
408
409/**
410 * Queue a memory fence to ensure correct ordering of memory
411 * operations between work-items of a work-group to
412 * image memory.
413 */
414#define CLK_IMAGE_MEM_FENCE 0x04
415
416#ifndef ATOMIC_VAR_INIT
417#define ATOMIC_VAR_INIT(x) (x)
418#endif //ATOMIC_VAR_INIT
419#define ATOMIC_FLAG_INIT 0
420
421// enum values aligned with what clang uses in EmitAtomicExpr()
422typedef enum memory_order
423{
424 memory_order_relaxed = __ATOMIC_RELAXED,
425 memory_order_acquire = __ATOMIC_ACQUIRE,
426 memory_order_release = __ATOMIC_RELEASE,
427 memory_order_acq_rel = __ATOMIC_ACQ_REL,
428#if defined(__opencl_c_atomic_order_seq_cst)
429 memory_order_seq_cst = __ATOMIC_SEQ_CST
430#endif
431} memory_order;
432
433#endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
434
435// OpenCL v1.1 s6.11.3, v1.2 s6.12.14, v2.0 s6.13.14 - Image Read and Write Functions
436
437// These values need to match the runtime equivalent
438//
439// Addressing Mode.
440//
441#define CLK_ADDRESS_NONE 0
442#define CLK_ADDRESS_CLAMP_TO_EDGE 2
443#define CLK_ADDRESS_CLAMP 4
444#define CLK_ADDRESS_REPEAT 6
445#define CLK_ADDRESS_MIRRORED_REPEAT 8
446
447//
448// Coordination Normalization
449//
450#define CLK_NORMALIZED_COORDS_FALSE 0
451#define CLK_NORMALIZED_COORDS_TRUE 1
452
453//
454// Filtering Mode.
455//
456#define CLK_FILTER_NEAREST 0x10
457#define CLK_FILTER_LINEAR 0x20
458
459#ifdef cl_khr_gl_msaa_sharing
460#pragma OPENCL EXTENSION cl_khr_gl_msaa_sharing : enable
461#endif //cl_khr_gl_msaa_sharing
462
463//
464// Channel Datatype.
465//
466#define CLK_SNORM_INT8 0x10D0
467#define CLK_SNORM_INT16 0x10D1
468#define CLK_UNORM_INT8 0x10D2
469#define CLK_UNORM_INT16 0x10D3
470#define CLK_UNORM_SHORT_565 0x10D4
471#define CLK_UNORM_SHORT_555 0x10D5
472#define CLK_UNORM_INT_101010 0x10D6
473#define CLK_SIGNED_INT8 0x10D7
474#define CLK_SIGNED_INT16 0x10D8
475#define CLK_SIGNED_INT32 0x10D9
476#define CLK_UNSIGNED_INT8 0x10DA
477#define CLK_UNSIGNED_INT16 0x10DB
478#define CLK_UNSIGNED_INT32 0x10DC
479#define CLK_HALF_FLOAT 0x10DD
480#define CLK_FLOAT 0x10DE
481#define CLK_UNORM_INT24 0x10DF
482#if __OPENCL_C_VERSION__ >= CL_VERSION_3_0
483#define CLK_UNORM_INT_101010_2 0x10E0
484#endif // __OPENCL_C_VERSION__ >= CL_VERSION_3_0
485#ifdef __opencl_c_ext_image_raw10_raw12
486#define CLK_UNSIGNED_INT_RAW10_EXT 0x10E3
487#define CLK_UNSIGNED_INT_RAW12_EXT 0x10E4
488#endif // __opencl_c_ext_image_raw10_raw12
489
490// Channel order, numbering must be aligned with cl_channel_order in cl.h
491//
492#define CLK_R 0x10B0
493#define CLK_A 0x10B1
494#define CLK_RG 0x10B2
495#define CLK_RA 0x10B3
496#define CLK_RGB 0x10B4
497#define CLK_RGBA 0x10B5
498#define CLK_BGRA 0x10B6
499#define CLK_ARGB 0x10B7
500#define CLK_INTENSITY 0x10B8
501#define CLK_LUMINANCE 0x10B9
502#define CLK_Rx 0x10BA
503#define CLK_RGx 0x10BB
504#define CLK_RGBx 0x10BC
505#define CLK_DEPTH 0x10BD
506#define CLK_DEPTH_STENCIL 0x10BE
507#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0
508#define CLK_sRGB 0x10BF
509#define CLK_sRGBx 0x10C0
510#define CLK_sRGBA 0x10C1
511#define CLK_sBGRA 0x10C2
512#define CLK_ABGR 0x10C3
513#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0
514
515// OpenCL v2.0 s6.13.16 - Pipe Functions
516#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
517#define CLK_NULL_RESERVE_ID (__builtin_astype(((void*)(__SIZE_MAX__)), reserve_id_t))
518
519// OpenCL v2.0 s6.13.17 - Enqueue Kernels
520#define CL_COMPLETE 0x0
521#define CL_RUNNING 0x1
522#define CL_SUBMITTED 0x2
523#define CL_QUEUED 0x3
524
525#define CLK_SUCCESS 0
526#define CLK_ENQUEUE_FAILURE -101
527#define CLK_INVALID_QUEUE -102
528#define CLK_INVALID_NDRANGE -160
529#define CLK_INVALID_EVENT_WAIT_LIST -57
530#define CLK_DEVICE_QUEUE_FULL -161
531#define CLK_INVALID_ARG_SIZE -51
532#define CLK_EVENT_ALLOCATION_FAILURE -100
533#define CLK_OUT_OF_RESOURCES -5
534
535#define CLK_NULL_QUEUE 0
536#define CLK_NULL_EVENT (__builtin_astype(((__SIZE_MAX__)), clk_event_t))
537
538// execution model related definitions
539#define CLK_ENQUEUE_FLAGS_NO_WAIT 0x0
540#define CLK_ENQUEUE_FLAGS_WAIT_KERNEL 0x1
541#define CLK_ENQUEUE_FLAGS_WAIT_WORK_GROUP 0x2
542
543typedef int kernel_enqueue_flags_t;
544typedef int clk_profiling_info;
545
546// Profiling info name (see capture_event_profiling_info)
547#define CLK_PROFILING_COMMAND_EXEC_TIME 0x1
548
549#define MAX_WORK_DIM 3
550
551#ifdef __opencl_c_device_enqueue
552typedef struct {
553 unsigned int workDimension;
554 size_t globalWorkOffset[MAX_WORK_DIM];
555 size_t globalWorkSize[MAX_WORK_DIM];
556 size_t localWorkSize[MAX_WORK_DIM];
557} ndrange_t;
558#endif // __opencl_c_device_enqueue
559
560#endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
561
562/**
563 * OpenCL v1.1/1.2/2.0 s6.2.4.2 - as_type operators
564 * Reinterprets a data type as another data type of the same size
565 */
566#define as_char(x) __builtin_astype((x), char)
567#define as_char2(x) __builtin_astype((x), char2)
568#define as_char3(x) __builtin_astype((x), char3)
569#define as_char4(x) __builtin_astype((x), char4)
570#define as_char8(x) __builtin_astype((x), char8)
571#define as_char16(x) __builtin_astype((x), char16)
572
573#define as_uchar(x) __builtin_astype((x), uchar)
574#define as_uchar2(x) __builtin_astype((x), uchar2)
575#define as_uchar3(x) __builtin_astype((x), uchar3)
576#define as_uchar4(x) __builtin_astype((x), uchar4)
577#define as_uchar8(x) __builtin_astype((x), uchar8)
578#define as_uchar16(x) __builtin_astype((x), uchar16)
579
580#define as_short(x) __builtin_astype((x), short)
581#define as_short2(x) __builtin_astype((x), short2)
582#define as_short3(x) __builtin_astype((x), short3)
583#define as_short4(x) __builtin_astype((x), short4)
584#define as_short8(x) __builtin_astype((x), short8)
585#define as_short16(x) __builtin_astype((x), short16)
586
587#define as_ushort(x) __builtin_astype((x), ushort)
588#define as_ushort2(x) __builtin_astype((x), ushort2)
589#define as_ushort3(x) __builtin_astype((x), ushort3)
590#define as_ushort4(x) __builtin_astype((x), ushort4)
591#define as_ushort8(x) __builtin_astype((x), ushort8)
592#define as_ushort16(x) __builtin_astype((x), ushort16)
593
594#define as_int(x) __builtin_astype((x), int)
595#define as_int2(x) __builtin_astype((x), int2)
596#define as_int3(x) __builtin_astype((x), int3)
597#define as_int4(x) __builtin_astype((x), int4)
598#define as_int8(x) __builtin_astype((x), int8)
599#define as_int16(x) __builtin_astype((x), int16)
600
601#define as_uint(x) __builtin_astype((x), uint)
602#define as_uint2(x) __builtin_astype((x), uint2)
603#define as_uint3(x) __builtin_astype((x), uint3)
604#define as_uint4(x) __builtin_astype((x), uint4)
605#define as_uint8(x) __builtin_astype((x), uint8)
606#define as_uint16(x) __builtin_astype((x), uint16)
607
608#define as_long(x) __builtin_astype((x), long)
609#define as_long2(x) __builtin_astype((x), long2)
610#define as_long3(x) __builtin_astype((x), long3)
611#define as_long4(x) __builtin_astype((x), long4)
612#define as_long8(x) __builtin_astype((x), long8)
613#define as_long16(x) __builtin_astype((x), long16)
614
615#define as_ulong(x) __builtin_astype((x), ulong)
616#define as_ulong2(x) __builtin_astype((x), ulong2)
617#define as_ulong3(x) __builtin_astype((x), ulong3)
618#define as_ulong4(x) __builtin_astype((x), ulong4)
619#define as_ulong8(x) __builtin_astype((x), ulong8)
620#define as_ulong16(x) __builtin_astype((x), ulong16)
621
622#define as_float(x) __builtin_astype((x), float)
623#define as_float2(x) __builtin_astype((x), float2)
624#define as_float3(x) __builtin_astype((x), float3)
625#define as_float4(x) __builtin_astype((x), float4)
626#define as_float8(x) __builtin_astype((x), float8)
627#define as_float16(x) __builtin_astype((x), float16)
628
629#ifdef cl_khr_fp64
630#define as_double(x) __builtin_astype((x), double)
631#define as_double2(x) __builtin_astype((x), double2)
632#define as_double3(x) __builtin_astype((x), double3)
633#define as_double4(x) __builtin_astype((x), double4)
634#define as_double8(x) __builtin_astype((x), double8)
635#define as_double16(x) __builtin_astype((x), double16)
636#endif // cl_khr_fp64
637
638#ifdef cl_khr_fp16
639#define as_half(x) __builtin_astype((x), half)
640#define as_half2(x) __builtin_astype((x), half2)
641#define as_half3(x) __builtin_astype((x), half3)
642#define as_half4(x) __builtin_astype((x), half4)
643#define as_half8(x) __builtin_astype((x), half8)
644#define as_half16(x) __builtin_astype((x), half16)
645#endif // cl_khr_fp16
646
647#define as_size_t(x) __builtin_astype((x), size_t)
648#define as_ptrdiff_t(x) __builtin_astype((x), ptrdiff_t)
649#define as_intptr_t(x) __builtin_astype((x), intptr_t)
650#define as_uintptr_t(x) __builtin_astype((x), uintptr_t)
651
652// C++ for OpenCL - __remove_address_space
653#if defined(__OPENCL_CPP_VERSION__)
654template <typename _Tp> struct __remove_address_space { using type = _Tp; };
655#if defined(__opencl_c_generic_address_space)
656template <typename _Tp> struct __remove_address_space<__generic _Tp> {
657 using type = _Tp;
658};
659#endif
660template <typename _Tp> struct __remove_address_space<__global _Tp> {
661 using type = _Tp;
662};
663template <typename _Tp> struct __remove_address_space<__private _Tp> {
664 using type = _Tp;
665};
666template <typename _Tp> struct __remove_address_space<__local _Tp> {
667 using type = _Tp;
668};
669template <typename _Tp> struct __remove_address_space<__constant _Tp> {
670 using type = _Tp;
671};
672#endif
673
674// OpenCL v1.1 s6.9, v1.2/2.0 s6.10 - Function qualifiers
675
676#define __kernel_exec(X, typen) __kernel \
677 __attribute__((work_group_size_hint(X, 1, 1))) \
678 __attribute__((vec_type_hint(typen)))
679
680#define kernel_exec(X, typen) __kernel \
681 __attribute__((work_group_size_hint(X, 1, 1))) \
682 __attribute__((vec_type_hint(typen)))
683
684#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_1_2)
685// OpenCL v1.2 s6.12.13, v2.0 s6.13.13 - printf
686
687int printf(__constant const char* st, ...) __attribute__((format(printf, 1, 2)));
688#endif
689
690#ifdef cl_intel_device_side_avc_motion_estimation
691
692#define CLK_AVC_ME_MAJOR_16x16_INTEL 0x0
693#define CLK_AVC_ME_MAJOR_16x8_INTEL 0x1
694#define CLK_AVC_ME_MAJOR_8x16_INTEL 0x2
695#define CLK_AVC_ME_MAJOR_8x8_INTEL 0x3
696
697#define CLK_AVC_ME_MINOR_8x8_INTEL 0x0
698#define CLK_AVC_ME_MINOR_8x4_INTEL 0x1
699#define CLK_AVC_ME_MINOR_4x8_INTEL 0x2
700#define CLK_AVC_ME_MINOR_4x4_INTEL 0x3
701
702#define CLK_AVC_ME_MAJOR_FORWARD_INTEL 0x0
703#define CLK_AVC_ME_MAJOR_BACKWARD_INTEL 0x1
704#define CLK_AVC_ME_MAJOR_BIDIRECTIONAL_INTEL 0x2
705
706#define CLK_AVC_ME_PARTITION_MASK_ALL_INTEL 0x0
707#define CLK_AVC_ME_PARTITION_MASK_16x16_INTEL 0x7E
708#define CLK_AVC_ME_PARTITION_MASK_16x8_INTEL 0x7D
709#define CLK_AVC_ME_PARTITION_MASK_8x16_INTEL 0x7B
710#define CLK_AVC_ME_PARTITION_MASK_8x8_INTEL 0x77
711#define CLK_AVC_ME_PARTITION_MASK_8x4_INTEL 0x6F
712#define CLK_AVC_ME_PARTITION_MASK_4x8_INTEL 0x5F
713#define CLK_AVC_ME_PARTITION_MASK_4x4_INTEL 0x3F
714
715#define CLK_AVC_ME_SLICE_TYPE_PRED_INTEL 0x0
716#define CLK_AVC_ME_SLICE_TYPE_BPRED_INTEL 0x1
717#define CLK_AVC_ME_SLICE_TYPE_INTRA_INTEL 0x2
718
719#define CLK_AVC_ME_SEARCH_WINDOW_EXHAUSTIVE_INTEL 0x0
720#define CLK_AVC_ME_SEARCH_WINDOW_SMALL_INTEL 0x1
721#define CLK_AVC_ME_SEARCH_WINDOW_TINY_INTEL 0x2
722#define CLK_AVC_ME_SEARCH_WINDOW_EXTRA_TINY_INTEL 0x3
723#define CLK_AVC_ME_SEARCH_WINDOW_DIAMOND_INTEL 0x4
724#define CLK_AVC_ME_SEARCH_WINDOW_LARGE_DIAMOND_INTEL 0x5
725#define CLK_AVC_ME_SEARCH_WINDOW_RESERVED0_INTEL 0x6
726#define CLK_AVC_ME_SEARCH_WINDOW_RESERVED1_INTEL 0x7
727#define CLK_AVC_ME_SEARCH_WINDOW_CUSTOM_INTEL 0x8
728
729#define CLK_AVC_ME_SAD_ADJUST_MODE_NONE_INTEL 0x0
730#define CLK_AVC_ME_SAD_ADJUST_MODE_HAAR_INTEL 0x2
731
732#define CLK_AVC_ME_SUBPIXEL_MODE_INTEGER_INTEL 0x0
733#define CLK_AVC_ME_SUBPIXEL_MODE_HPEL_INTEL 0x1
734#define CLK_AVC_ME_SUBPIXEL_MODE_QPEL_INTEL 0x3
735
736#define CLK_AVC_ME_COST_PRECISION_QPEL_INTEL 0x0
737#define CLK_AVC_ME_COST_PRECISION_HPEL_INTEL 0x1
738#define CLK_AVC_ME_COST_PRECISION_PEL_INTEL 0x2
739#define CLK_AVC_ME_COST_PRECISION_DPEL_INTEL 0x3
740
741#define CLK_AVC_ME_BIDIR_WEIGHT_QUARTER_INTEL 0x10
742#define CLK_AVC_ME_BIDIR_WEIGHT_THIRD_INTEL 0x15
743#define CLK_AVC_ME_BIDIR_WEIGHT_HALF_INTEL 0x20
744#define CLK_AVC_ME_BIDIR_WEIGHT_TWO_THIRD_INTEL 0x2B
745#define CLK_AVC_ME_BIDIR_WEIGHT_THREE_QUARTER_INTEL 0x30
746
747#define CLK_AVC_ME_BORDER_REACHED_LEFT_INTEL 0x0
748#define CLK_AVC_ME_BORDER_REACHED_RIGHT_INTEL 0x2
749#define CLK_AVC_ME_BORDER_REACHED_TOP_INTEL 0x4
750#define CLK_AVC_ME_BORDER_REACHED_BOTTOM_INTEL 0x8
751
752#define CLK_AVC_ME_INTRA_16x16_INTEL 0x0
753#define CLK_AVC_ME_INTRA_8x8_INTEL 0x1
754#define CLK_AVC_ME_INTRA_4x4_INTEL 0x2
755
756#define CLK_AVC_ME_SKIP_BLOCK_PARTITION_16x16_INTEL 0x0
757#define CLK_AVC_ME_SKIP_BLOCK_PARTITION_8x8_INTEL 0x4000
758
759#define CLK_AVC_ME_SKIP_BLOCK_16x16_FORWARD_ENABLE_INTEL (0x1 << 24)
760#define CLK_AVC_ME_SKIP_BLOCK_16x16_BACKWARD_ENABLE_INTEL (0x2 << 24)
761#define CLK_AVC_ME_SKIP_BLOCK_16x16_DUAL_ENABLE_INTEL (0x3 << 24)
762#define CLK_AVC_ME_SKIP_BLOCK_8x8_FORWARD_ENABLE_INTEL (0x55 << 24)
763#define CLK_AVC_ME_SKIP_BLOCK_8x8_BACKWARD_ENABLE_INTEL (0xAA << 24)
764#define CLK_AVC_ME_SKIP_BLOCK_8x8_DUAL_ENABLE_INTEL (0xFF << 24)
765#define CLK_AVC_ME_SKIP_BLOCK_8x8_0_FORWARD_ENABLE_INTEL (0x1 << 24)
766#define CLK_AVC_ME_SKIP_BLOCK_8x8_0_BACKWARD_ENABLE_INTEL (0x2 << 24)
767#define CLK_AVC_ME_SKIP_BLOCK_8x8_1_FORWARD_ENABLE_INTEL (0x1 << 26)
768#define CLK_AVC_ME_SKIP_BLOCK_8x8_1_BACKWARD_ENABLE_INTEL (0x2 << 26)
769#define CLK_AVC_ME_SKIP_BLOCK_8x8_2_FORWARD_ENABLE_INTEL (0x1 << 28)
770#define CLK_AVC_ME_SKIP_BLOCK_8x8_2_BACKWARD_ENABLE_INTEL (0x2 << 28)
771#define CLK_AVC_ME_SKIP_BLOCK_8x8_3_FORWARD_ENABLE_INTEL (0x1 << 30)
772#define CLK_AVC_ME_SKIP_BLOCK_8x8_3_BACKWARD_ENABLE_INTEL (0x2 << 30)
773
774#define CLK_AVC_ME_BLOCK_BASED_SKIP_4x4_INTEL 0x00
775#define CLK_AVC_ME_BLOCK_BASED_SKIP_8x8_INTEL 0x80
776
777#define CLK_AVC_ME_INTRA_LUMA_PARTITION_MASK_ALL_INTEL 0x0
778#define CLK_AVC_ME_INTRA_LUMA_PARTITION_MASK_16x16_INTEL 0x6
779#define CLK_AVC_ME_INTRA_LUMA_PARTITION_MASK_8x8_INTEL 0x5
780#define CLK_AVC_ME_INTRA_LUMA_PARTITION_MASK_4x4_INTEL 0x3
781
782#define CLK_AVC_ME_INTRA_NEIGHBOR_LEFT_MASK_ENABLE_INTEL 0x60
783#define CLK_AVC_ME_INTRA_NEIGHBOR_UPPER_MASK_ENABLE_INTEL 0x10
784#define CLK_AVC_ME_INTRA_NEIGHBOR_UPPER_RIGHT_MASK_ENABLE_INTEL 0x8
785#define CLK_AVC_ME_INTRA_NEIGHBOR_UPPER_LEFT_MASK_ENABLE_INTEL 0x4
786
787#define CLK_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_INTEL 0x0
788#define CLK_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
789#define CLK_AVC_ME_LUMA_PREDICTOR_MODE_DC_INTEL 0x2
790#define CLK_AVC_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_LEFT_INTEL 0x3
791#define CLK_AVC_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_RIGHT_INTEL 0x4
792#define CLK_AVC_ME_LUMA_PREDICTOR_MODE_PLANE_INTEL 0x4
793#define CLK_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_RIGHT_INTEL 0x5
794#define CLK_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_DOWN_INTEL 0x6
795#define CLK_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_LEFT_INTEL 0x7
796#define CLK_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_UP_INTEL 0x8
797#define CLK_AVC_ME_CHROMA_PREDICTOR_MODE_DC_INTEL 0x0
798#define CLK_AVC_ME_CHROMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
799#define CLK_AVC_ME_CHROMA_PREDICTOR_MODE_VERTICAL_INTEL 0x2
800#define CLK_AVC_ME_CHROMA_PREDICTOR_MODE_PLANE_INTEL 0x3
801
802#define CLK_AVC_ME_FRAME_FORWARD_INTEL 0x1
803#define CLK_AVC_ME_FRAME_BACKWARD_INTEL 0x2
804#define CLK_AVC_ME_FRAME_DUAL_INTEL 0x3
805
806#define CLK_AVC_ME_INTERLACED_SCAN_TOP_FIELD_INTEL 0x0
807#define CLK_AVC_ME_INTERLACED_SCAN_BOTTOM_FIELD_INTEL 0x1
808
809#define CLK_AVC_ME_INITIALIZE_INTEL 0x0
810
811#define CLK_AVC_IME_PAYLOAD_INITIALIZE_INTEL 0x0
812#define CLK_AVC_REF_PAYLOAD_INITIALIZE_INTEL 0x0
813#define CLK_AVC_SIC_PAYLOAD_INITIALIZE_INTEL 0x0
814
815#define CLK_AVC_IME_RESULT_INITIALIZE_INTEL 0x0
816#define CLK_AVC_REF_RESULT_INITIALIZE_INTEL 0x0
817#define CLK_AVC_SIC_RESULT_INITIALIZE_INTEL 0x0
818
819#define CLK_AVC_IME_RESULT_SINGLE_REFERENCE_STREAMOUT_INITIALIZE_INTEL 0x0
820#define CLK_AVC_IME_RESULT_SINGLE_REFERENCE_STREAMIN_INITIALIZE_INTEL 0x0
821#define CLK_AVC_IME_RESULT_DUAL_REFERENCE_STREAMOUT_INITIALIZE_INTEL 0x0
822#define CLK_AVC_IME_RESULT_DUAL_REFERENCE_STREAMIN_INITIALIZE_INTEL 0x0
823
824#endif // cl_intel_device_side_avc_motion_estimation
825
826// Disable any extensions we may have enabled previously.
827#pragma OPENCL EXTENSION all : disable
828
829#endif //_OPENCL_BASE_H_
lib/include/opencl-c.h deleted-18371
...@@ -1,18371 +0,0 @@
1//===--- opencl-c.h - OpenCL C language builtin function header -----------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef _OPENCL_H_
10#define _OPENCL_H_
11
12#include "opencl-c-base.h"
13
14#if defined(__opencl_c_images)
15#ifndef cl_khr_depth_images
16#define cl_khr_depth_images
17#endif //cl_khr_depth_images
18#endif //defined(__opencl_c_images)
19
20#if __OPENCL_C_VERSION__ < CL_VERSION_2_0
21#ifdef cl_khr_3d_image_writes
22#pragma OPENCL EXTENSION cl_khr_3d_image_writes : enable
23#endif //cl_khr_3d_image_writes
24#endif //__OPENCL_C_VERSION__ < CL_VERSION_2_0
25
26#if (defined(__OPENCL_CPP_VERSION__) || \
27 (__OPENCL_C_VERSION__ >= CL_VERSION_1_2)) && \
28 (defined(__SPIR__) || defined(__SPIRV__))
29#pragma OPENCL EXTENSION cl_intel_planar_yuv : begin
30#pragma OPENCL EXTENSION cl_intel_planar_yuv : end
31#endif // (defined(__OPENCL_CPP_VERSION__) ||
32 // (__OPENCL_C_VERSION__ >= CL_VERSION_1_2)) &&
33 // (defined(__SPIR__) || defined(__SPIRV__))
34
35#define __ovld __attribute__((overloadable))
36#define __conv __attribute__((convergent))
37
38// Optimizations
39#define __purefn __attribute__((pure))
40#define __cnfn __attribute__((const))
41
42
43// OpenCL v1.1/1.2/2.0 s6.2.3 - Explicit conversions
44
45char __ovld __cnfn convert_char_rte(char);
46char __ovld __cnfn convert_char_sat_rte(char);
47char __ovld __cnfn convert_char_rtz(char);
48char __ovld __cnfn convert_char_sat_rtz(char);
49char __ovld __cnfn convert_char_rtp(char);
50char __ovld __cnfn convert_char_sat_rtp(char);
51char __ovld __cnfn convert_char_rtn(char);
52char __ovld __cnfn convert_char_sat_rtn(char);
53char __ovld __cnfn convert_char(char);
54char __ovld __cnfn convert_char_sat(char);
55char __ovld __cnfn convert_char_rte(uchar);
56char __ovld __cnfn convert_char_sat_rte(uchar);
57char __ovld __cnfn convert_char_rtz(uchar);
58char __ovld __cnfn convert_char_sat_rtz(uchar);
59char __ovld __cnfn convert_char_rtp(uchar);
60char __ovld __cnfn convert_char_sat_rtp(uchar);
61char __ovld __cnfn convert_char_rtn(uchar);
62char __ovld __cnfn convert_char_sat_rtn(uchar);
63char __ovld __cnfn convert_char(uchar);
64char __ovld __cnfn convert_char_sat(uchar);
65char __ovld __cnfn convert_char_rte(short);
66char __ovld __cnfn convert_char_sat_rte(short);
67char __ovld __cnfn convert_char_rtz(short);
68char __ovld __cnfn convert_char_sat_rtz(short);
69char __ovld __cnfn convert_char_rtp(short);
70char __ovld __cnfn convert_char_sat_rtp(short);
71char __ovld __cnfn convert_char_rtn(short);
72char __ovld __cnfn convert_char_sat_rtn(short);
73char __ovld __cnfn convert_char(short);
74char __ovld __cnfn convert_char_sat(short);
75char __ovld __cnfn convert_char_rte(ushort);
76char __ovld __cnfn convert_char_sat_rte(ushort);
77char __ovld __cnfn convert_char_rtz(ushort);
78char __ovld __cnfn convert_char_sat_rtz(ushort);
79char __ovld __cnfn convert_char_rtp(ushort);
80char __ovld __cnfn convert_char_sat_rtp(ushort);
81char __ovld __cnfn convert_char_rtn(ushort);
82char __ovld __cnfn convert_char_sat_rtn(ushort);
83char __ovld __cnfn convert_char(ushort);
84char __ovld __cnfn convert_char_sat(ushort);
85char __ovld __cnfn convert_char_rte(int);
86char __ovld __cnfn convert_char_sat_rte(int);
87char __ovld __cnfn convert_char_rtz(int);
88char __ovld __cnfn convert_char_sat_rtz(int);
89char __ovld __cnfn convert_char_rtp(int);
90char __ovld __cnfn convert_char_sat_rtp(int);
91char __ovld __cnfn convert_char_rtn(int);
92char __ovld __cnfn convert_char_sat_rtn(int);
93char __ovld __cnfn convert_char(int);
94char __ovld __cnfn convert_char_sat(int);
95char __ovld __cnfn convert_char_rte(uint);
96char __ovld __cnfn convert_char_sat_rte(uint);
97char __ovld __cnfn convert_char_rtz(uint);
98char __ovld __cnfn convert_char_sat_rtz(uint);
99char __ovld __cnfn convert_char_rtp(uint);
100char __ovld __cnfn convert_char_sat_rtp(uint);
101char __ovld __cnfn convert_char_rtn(uint);
102char __ovld __cnfn convert_char_sat_rtn(uint);
103char __ovld __cnfn convert_char(uint);
104char __ovld __cnfn convert_char_sat(uint);
105char __ovld __cnfn convert_char_rte(long);
106char __ovld __cnfn convert_char_sat_rte(long);
107char __ovld __cnfn convert_char_rtz(long);
108char __ovld __cnfn convert_char_sat_rtz(long);
109char __ovld __cnfn convert_char_rtp(long);
110char __ovld __cnfn convert_char_sat_rtp(long);
111char __ovld __cnfn convert_char_rtn(long);
112char __ovld __cnfn convert_char_sat_rtn(long);
113char __ovld __cnfn convert_char(long);
114char __ovld __cnfn convert_char_sat(long);
115char __ovld __cnfn convert_char_rte(ulong);
116char __ovld __cnfn convert_char_sat_rte(ulong);
117char __ovld __cnfn convert_char_rtz(ulong);
118char __ovld __cnfn convert_char_sat_rtz(ulong);
119char __ovld __cnfn convert_char_rtp(ulong);
120char __ovld __cnfn convert_char_sat_rtp(ulong);
121char __ovld __cnfn convert_char_rtn(ulong);
122char __ovld __cnfn convert_char_sat_rtn(ulong);
123char __ovld __cnfn convert_char(ulong);
124char __ovld __cnfn convert_char_sat(ulong);
125char __ovld __cnfn convert_char_rte(float);
126char __ovld __cnfn convert_char_sat_rte(float);
127char __ovld __cnfn convert_char_rtz(float);
128char __ovld __cnfn convert_char_sat_rtz(float);
129char __ovld __cnfn convert_char_rtp(float);
130char __ovld __cnfn convert_char_sat_rtp(float);
131char __ovld __cnfn convert_char_rtn(float);
132char __ovld __cnfn convert_char_sat_rtn(float);
133char __ovld __cnfn convert_char(float);
134char __ovld __cnfn convert_char_sat(float);
135uchar __ovld __cnfn convert_uchar_rte(char);
136uchar __ovld __cnfn convert_uchar_sat_rte(char);
137uchar __ovld __cnfn convert_uchar_rtz(char);
138uchar __ovld __cnfn convert_uchar_sat_rtz(char);
139uchar __ovld __cnfn convert_uchar_rtp(char);
140uchar __ovld __cnfn convert_uchar_sat_rtp(char);
141uchar __ovld __cnfn convert_uchar_rtn(char);
142uchar __ovld __cnfn convert_uchar_sat_rtn(char);
143uchar __ovld __cnfn convert_uchar(char);
144uchar __ovld __cnfn convert_uchar_sat(char);
145uchar __ovld __cnfn convert_uchar_rte(uchar);
146uchar __ovld __cnfn convert_uchar_sat_rte(uchar);
147uchar __ovld __cnfn convert_uchar_rtz(uchar);
148uchar __ovld __cnfn convert_uchar_sat_rtz(uchar);
149uchar __ovld __cnfn convert_uchar_rtp(uchar);
150uchar __ovld __cnfn convert_uchar_sat_rtp(uchar);
151uchar __ovld __cnfn convert_uchar_rtn(uchar);
152uchar __ovld __cnfn convert_uchar_sat_rtn(uchar);
153uchar __ovld __cnfn convert_uchar(uchar);
154uchar __ovld __cnfn convert_uchar_sat(uchar);
155uchar __ovld __cnfn convert_uchar_rte(short);
156uchar __ovld __cnfn convert_uchar_sat_rte(short);
157uchar __ovld __cnfn convert_uchar_rtz(short);
158uchar __ovld __cnfn convert_uchar_sat_rtz(short);
159uchar __ovld __cnfn convert_uchar_rtp(short);
160uchar __ovld __cnfn convert_uchar_sat_rtp(short);
161uchar __ovld __cnfn convert_uchar_rtn(short);
162uchar __ovld __cnfn convert_uchar_sat_rtn(short);
163uchar __ovld __cnfn convert_uchar(short);
164uchar __ovld __cnfn convert_uchar_sat(short);
165uchar __ovld __cnfn convert_uchar_rte(ushort);
166uchar __ovld __cnfn convert_uchar_sat_rte(ushort);
167uchar __ovld __cnfn convert_uchar_rtz(ushort);
168uchar __ovld __cnfn convert_uchar_sat_rtz(ushort);
169uchar __ovld __cnfn convert_uchar_rtp(ushort);
170uchar __ovld __cnfn convert_uchar_sat_rtp(ushort);
171uchar __ovld __cnfn convert_uchar_rtn(ushort);
172uchar __ovld __cnfn convert_uchar_sat_rtn(ushort);
173uchar __ovld __cnfn convert_uchar(ushort);
174uchar __ovld __cnfn convert_uchar_sat(ushort);
175uchar __ovld __cnfn convert_uchar_rte(int);
176uchar __ovld __cnfn convert_uchar_sat_rte(int);
177uchar __ovld __cnfn convert_uchar_rtz(int);
178uchar __ovld __cnfn convert_uchar_sat_rtz(int);
179uchar __ovld __cnfn convert_uchar_rtp(int);
180uchar __ovld __cnfn convert_uchar_sat_rtp(int);
181uchar __ovld __cnfn convert_uchar_rtn(int);
182uchar __ovld __cnfn convert_uchar_sat_rtn(int);
183uchar __ovld __cnfn convert_uchar(int);
184uchar __ovld __cnfn convert_uchar_sat(int);
185uchar __ovld __cnfn convert_uchar_rte(uint);
186uchar __ovld __cnfn convert_uchar_sat_rte(uint);
187uchar __ovld __cnfn convert_uchar_rtz(uint);
188uchar __ovld __cnfn convert_uchar_sat_rtz(uint);
189uchar __ovld __cnfn convert_uchar_rtp(uint);
190uchar __ovld __cnfn convert_uchar_sat_rtp(uint);
191uchar __ovld __cnfn convert_uchar_rtn(uint);
192uchar __ovld __cnfn convert_uchar_sat_rtn(uint);
193uchar __ovld __cnfn convert_uchar(uint);
194uchar __ovld __cnfn convert_uchar_sat(uint);
195uchar __ovld __cnfn convert_uchar_rte(long);
196uchar __ovld __cnfn convert_uchar_sat_rte(long);
197uchar __ovld __cnfn convert_uchar_rtz(long);
198uchar __ovld __cnfn convert_uchar_sat_rtz(long);
199uchar __ovld __cnfn convert_uchar_rtp(long);
200uchar __ovld __cnfn convert_uchar_sat_rtp(long);
201uchar __ovld __cnfn convert_uchar_rtn(long);
202uchar __ovld __cnfn convert_uchar_sat_rtn(long);
203uchar __ovld __cnfn convert_uchar(long);
204uchar __ovld __cnfn convert_uchar_sat(long);
205uchar __ovld __cnfn convert_uchar_rte(ulong);
206uchar __ovld __cnfn convert_uchar_sat_rte(ulong);
207uchar __ovld __cnfn convert_uchar_rtz(ulong);
208uchar __ovld __cnfn convert_uchar_sat_rtz(ulong);
209uchar __ovld __cnfn convert_uchar_rtp(ulong);
210uchar __ovld __cnfn convert_uchar_sat_rtp(ulong);
211uchar __ovld __cnfn convert_uchar_rtn(ulong);
212uchar __ovld __cnfn convert_uchar_sat_rtn(ulong);
213uchar __ovld __cnfn convert_uchar(ulong);
214uchar __ovld __cnfn convert_uchar_sat(ulong);
215uchar __ovld __cnfn convert_uchar_rte(float);
216uchar __ovld __cnfn convert_uchar_sat_rte(float);
217uchar __ovld __cnfn convert_uchar_rtz(float);
218uchar __ovld __cnfn convert_uchar_sat_rtz(float);
219uchar __ovld __cnfn convert_uchar_rtp(float);
220uchar __ovld __cnfn convert_uchar_sat_rtp(float);
221uchar __ovld __cnfn convert_uchar_rtn(float);
222uchar __ovld __cnfn convert_uchar_sat_rtn(float);
223uchar __ovld __cnfn convert_uchar(float);
224uchar __ovld __cnfn convert_uchar_sat(float);
225
226short __ovld __cnfn convert_short_rte(char);
227short __ovld __cnfn convert_short_sat_rte(char);
228short __ovld __cnfn convert_short_rtz(char);
229short __ovld __cnfn convert_short_sat_rtz(char);
230short __ovld __cnfn convert_short_rtp(char);
231short __ovld __cnfn convert_short_sat_rtp(char);
232short __ovld __cnfn convert_short_rtn(char);
233short __ovld __cnfn convert_short_sat_rtn(char);
234short __ovld __cnfn convert_short(char);
235short __ovld __cnfn convert_short_sat(char);
236short __ovld __cnfn convert_short_rte(uchar);
237short __ovld __cnfn convert_short_sat_rte(uchar);
238short __ovld __cnfn convert_short_rtz(uchar);
239short __ovld __cnfn convert_short_sat_rtz(uchar);
240short __ovld __cnfn convert_short_rtp(uchar);
241short __ovld __cnfn convert_short_sat_rtp(uchar);
242short __ovld __cnfn convert_short_rtn(uchar);
243short __ovld __cnfn convert_short_sat_rtn(uchar);
244short __ovld __cnfn convert_short(uchar);
245short __ovld __cnfn convert_short_sat(uchar);
246short __ovld __cnfn convert_short_rte(short);
247short __ovld __cnfn convert_short_sat_rte(short);
248short __ovld __cnfn convert_short_rtz(short);
249short __ovld __cnfn convert_short_sat_rtz(short);
250short __ovld __cnfn convert_short_rtp(short);
251short __ovld __cnfn convert_short_sat_rtp(short);
252short __ovld __cnfn convert_short_rtn(short);
253short __ovld __cnfn convert_short_sat_rtn(short);
254short __ovld __cnfn convert_short(short);
255short __ovld __cnfn convert_short_sat(short);
256short __ovld __cnfn convert_short_rte(ushort);
257short __ovld __cnfn convert_short_sat_rte(ushort);
258short __ovld __cnfn convert_short_rtz(ushort);
259short __ovld __cnfn convert_short_sat_rtz(ushort);
260short __ovld __cnfn convert_short_rtp(ushort);
261short __ovld __cnfn convert_short_sat_rtp(ushort);
262short __ovld __cnfn convert_short_rtn(ushort);
263short __ovld __cnfn convert_short_sat_rtn(ushort);
264short __ovld __cnfn convert_short(ushort);
265short __ovld __cnfn convert_short_sat(ushort);
266short __ovld __cnfn convert_short_rte(int);
267short __ovld __cnfn convert_short_sat_rte(int);
268short __ovld __cnfn convert_short_rtz(int);
269short __ovld __cnfn convert_short_sat_rtz(int);
270short __ovld __cnfn convert_short_rtp(int);
271short __ovld __cnfn convert_short_sat_rtp(int);
272short __ovld __cnfn convert_short_rtn(int);
273short __ovld __cnfn convert_short_sat_rtn(int);
274short __ovld __cnfn convert_short(int);
275short __ovld __cnfn convert_short_sat(int);
276short __ovld __cnfn convert_short_rte(uint);
277short __ovld __cnfn convert_short_sat_rte(uint);
278short __ovld __cnfn convert_short_rtz(uint);
279short __ovld __cnfn convert_short_sat_rtz(uint);
280short __ovld __cnfn convert_short_rtp(uint);
281short __ovld __cnfn convert_short_sat_rtp(uint);
282short __ovld __cnfn convert_short_rtn(uint);
283short __ovld __cnfn convert_short_sat_rtn(uint);
284short __ovld __cnfn convert_short(uint);
285short __ovld __cnfn convert_short_sat(uint);
286short __ovld __cnfn convert_short_rte(long);
287short __ovld __cnfn convert_short_sat_rte(long);
288short __ovld __cnfn convert_short_rtz(long);
289short __ovld __cnfn convert_short_sat_rtz(long);
290short __ovld __cnfn convert_short_rtp(long);
291short __ovld __cnfn convert_short_sat_rtp(long);
292short __ovld __cnfn convert_short_rtn(long);
293short __ovld __cnfn convert_short_sat_rtn(long);
294short __ovld __cnfn convert_short(long);
295short __ovld __cnfn convert_short_sat(long);
296short __ovld __cnfn convert_short_rte(ulong);
297short __ovld __cnfn convert_short_sat_rte(ulong);
298short __ovld __cnfn convert_short_rtz(ulong);
299short __ovld __cnfn convert_short_sat_rtz(ulong);
300short __ovld __cnfn convert_short_rtp(ulong);
301short __ovld __cnfn convert_short_sat_rtp(ulong);
302short __ovld __cnfn convert_short_rtn(ulong);
303short __ovld __cnfn convert_short_sat_rtn(ulong);
304short __ovld __cnfn convert_short(ulong);
305short __ovld __cnfn convert_short_sat(ulong);
306short __ovld __cnfn convert_short_rte(float);
307short __ovld __cnfn convert_short_sat_rte(float);
308short __ovld __cnfn convert_short_rtz(float);
309short __ovld __cnfn convert_short_sat_rtz(float);
310short __ovld __cnfn convert_short_rtp(float);
311short __ovld __cnfn convert_short_sat_rtp(float);
312short __ovld __cnfn convert_short_rtn(float);
313short __ovld __cnfn convert_short_sat_rtn(float);
314short __ovld __cnfn convert_short(float);
315short __ovld __cnfn convert_short_sat(float);
316ushort __ovld __cnfn convert_ushort_rte(char);
317ushort __ovld __cnfn convert_ushort_sat_rte(char);
318ushort __ovld __cnfn convert_ushort_rtz(char);
319ushort __ovld __cnfn convert_ushort_sat_rtz(char);
320ushort __ovld __cnfn convert_ushort_rtp(char);
321ushort __ovld __cnfn convert_ushort_sat_rtp(char);
322ushort __ovld __cnfn convert_ushort_rtn(char);
323ushort __ovld __cnfn convert_ushort_sat_rtn(char);
324ushort __ovld __cnfn convert_ushort(char);
325ushort __ovld __cnfn convert_ushort_sat(char);
326ushort __ovld __cnfn convert_ushort_rte(uchar);
327ushort __ovld __cnfn convert_ushort_sat_rte(uchar);
328ushort __ovld __cnfn convert_ushort_rtz(uchar);
329ushort __ovld __cnfn convert_ushort_sat_rtz(uchar);
330ushort __ovld __cnfn convert_ushort_rtp(uchar);
331ushort __ovld __cnfn convert_ushort_sat_rtp(uchar);
332ushort __ovld __cnfn convert_ushort_rtn(uchar);
333ushort __ovld __cnfn convert_ushort_sat_rtn(uchar);
334ushort __ovld __cnfn convert_ushort(uchar);
335ushort __ovld __cnfn convert_ushort_sat(uchar);
336ushort __ovld __cnfn convert_ushort_rte(short);
337ushort __ovld __cnfn convert_ushort_sat_rte(short);
338ushort __ovld __cnfn convert_ushort_rtz(short);
339ushort __ovld __cnfn convert_ushort_sat_rtz(short);
340ushort __ovld __cnfn convert_ushort_rtp(short);
341ushort __ovld __cnfn convert_ushort_sat_rtp(short);
342ushort __ovld __cnfn convert_ushort_rtn(short);
343ushort __ovld __cnfn convert_ushort_sat_rtn(short);
344ushort __ovld __cnfn convert_ushort(short);
345ushort __ovld __cnfn convert_ushort_sat(short);
346ushort __ovld __cnfn convert_ushort_rte(ushort);
347ushort __ovld __cnfn convert_ushort_sat_rte(ushort);
348ushort __ovld __cnfn convert_ushort_rtz(ushort);
349ushort __ovld __cnfn convert_ushort_sat_rtz(ushort);
350ushort __ovld __cnfn convert_ushort_rtp(ushort);
351ushort __ovld __cnfn convert_ushort_sat_rtp(ushort);
352ushort __ovld __cnfn convert_ushort_rtn(ushort);
353ushort __ovld __cnfn convert_ushort_sat_rtn(ushort);
354ushort __ovld __cnfn convert_ushort(ushort);
355ushort __ovld __cnfn convert_ushort_sat(ushort);
356ushort __ovld __cnfn convert_ushort_rte(int);
357ushort __ovld __cnfn convert_ushort_sat_rte(int);
358ushort __ovld __cnfn convert_ushort_rtz(int);
359ushort __ovld __cnfn convert_ushort_sat_rtz(int);
360ushort __ovld __cnfn convert_ushort_rtp(int);
361ushort __ovld __cnfn convert_ushort_sat_rtp(int);
362ushort __ovld __cnfn convert_ushort_rtn(int);
363ushort __ovld __cnfn convert_ushort_sat_rtn(int);
364ushort __ovld __cnfn convert_ushort(int);
365ushort __ovld __cnfn convert_ushort_sat(int);
366ushort __ovld __cnfn convert_ushort_rte(uint);
367ushort __ovld __cnfn convert_ushort_sat_rte(uint);
368ushort __ovld __cnfn convert_ushort_rtz(uint);
369ushort __ovld __cnfn convert_ushort_sat_rtz(uint);
370ushort __ovld __cnfn convert_ushort_rtp(uint);
371ushort __ovld __cnfn convert_ushort_sat_rtp(uint);
372ushort __ovld __cnfn convert_ushort_rtn(uint);
373ushort __ovld __cnfn convert_ushort_sat_rtn(uint);
374ushort __ovld __cnfn convert_ushort(uint);
375ushort __ovld __cnfn convert_ushort_sat(uint);
376ushort __ovld __cnfn convert_ushort_rte(long);
377ushort __ovld __cnfn convert_ushort_sat_rte(long);
378ushort __ovld __cnfn convert_ushort_rtz(long);
379ushort __ovld __cnfn convert_ushort_sat_rtz(long);
380ushort __ovld __cnfn convert_ushort_rtp(long);
381ushort __ovld __cnfn convert_ushort_sat_rtp(long);
382ushort __ovld __cnfn convert_ushort_rtn(long);
383ushort __ovld __cnfn convert_ushort_sat_rtn(long);
384ushort __ovld __cnfn convert_ushort(long);
385ushort __ovld __cnfn convert_ushort_sat(long);
386ushort __ovld __cnfn convert_ushort_rte(ulong);
387ushort __ovld __cnfn convert_ushort_sat_rte(ulong);
388ushort __ovld __cnfn convert_ushort_rtz(ulong);
389ushort __ovld __cnfn convert_ushort_sat_rtz(ulong);
390ushort __ovld __cnfn convert_ushort_rtp(ulong);
391ushort __ovld __cnfn convert_ushort_sat_rtp(ulong);
392ushort __ovld __cnfn convert_ushort_rtn(ulong);
393ushort __ovld __cnfn convert_ushort_sat_rtn(ulong);
394ushort __ovld __cnfn convert_ushort(ulong);
395ushort __ovld __cnfn convert_ushort_sat(ulong);
396ushort __ovld __cnfn convert_ushort_rte(float);
397ushort __ovld __cnfn convert_ushort_sat_rte(float);
398ushort __ovld __cnfn convert_ushort_rtz(float);
399ushort __ovld __cnfn convert_ushort_sat_rtz(float);
400ushort __ovld __cnfn convert_ushort_rtp(float);
401ushort __ovld __cnfn convert_ushort_sat_rtp(float);
402ushort __ovld __cnfn convert_ushort_rtn(float);
403ushort __ovld __cnfn convert_ushort_sat_rtn(float);
404ushort __ovld __cnfn convert_ushort(float);
405ushort __ovld __cnfn convert_ushort_sat(float);
406int __ovld __cnfn convert_int_rte(char);
407int __ovld __cnfn convert_int_sat_rte(char);
408int __ovld __cnfn convert_int_rtz(char);
409int __ovld __cnfn convert_int_sat_rtz(char);
410int __ovld __cnfn convert_int_rtp(char);
411int __ovld __cnfn convert_int_sat_rtp(char);
412int __ovld __cnfn convert_int_rtn(char);
413int __ovld __cnfn convert_int_sat_rtn(char);
414int __ovld __cnfn convert_int(char);
415int __ovld __cnfn convert_int_sat(char);
416int __ovld __cnfn convert_int_rte(uchar);
417int __ovld __cnfn convert_int_sat_rte(uchar);
418int __ovld __cnfn convert_int_rtz(uchar);
419int __ovld __cnfn convert_int_sat_rtz(uchar);
420int __ovld __cnfn convert_int_rtp(uchar);
421int __ovld __cnfn convert_int_sat_rtp(uchar);
422int __ovld __cnfn convert_int_rtn(uchar);
423int __ovld __cnfn convert_int_sat_rtn(uchar);
424int __ovld __cnfn convert_int(uchar);
425int __ovld __cnfn convert_int_sat(uchar);
426int __ovld __cnfn convert_int_rte(short);
427int __ovld __cnfn convert_int_sat_rte(short);
428int __ovld __cnfn convert_int_rtz(short);
429int __ovld __cnfn convert_int_sat_rtz(short);
430int __ovld __cnfn convert_int_rtp(short);
431int __ovld __cnfn convert_int_sat_rtp(short);
432int __ovld __cnfn convert_int_rtn(short);
433int __ovld __cnfn convert_int_sat_rtn(short);
434int __ovld __cnfn convert_int(short);
435int __ovld __cnfn convert_int_sat(short);
436int __ovld __cnfn convert_int_rte(ushort);
437int __ovld __cnfn convert_int_sat_rte(ushort);
438int __ovld __cnfn convert_int_rtz(ushort);
439int __ovld __cnfn convert_int_sat_rtz(ushort);
440int __ovld __cnfn convert_int_rtp(ushort);
441int __ovld __cnfn convert_int_sat_rtp(ushort);
442int __ovld __cnfn convert_int_rtn(ushort);
443int __ovld __cnfn convert_int_sat_rtn(ushort);
444int __ovld __cnfn convert_int(ushort);
445int __ovld __cnfn convert_int_sat(ushort);
446int __ovld __cnfn convert_int_rte(int);
447int __ovld __cnfn convert_int_sat_rte(int);
448int __ovld __cnfn convert_int_rtz(int);
449int __ovld __cnfn convert_int_sat_rtz(int);
450int __ovld __cnfn convert_int_rtp(int);
451int __ovld __cnfn convert_int_sat_rtp(int);
452int __ovld __cnfn convert_int_rtn(int);
453int __ovld __cnfn convert_int_sat_rtn(int);
454int __ovld __cnfn convert_int(int);
455int __ovld __cnfn convert_int_sat(int);
456int __ovld __cnfn convert_int_rte(uint);
457int __ovld __cnfn convert_int_sat_rte(uint);
458int __ovld __cnfn convert_int_rtz(uint);
459int __ovld __cnfn convert_int_sat_rtz(uint);
460int __ovld __cnfn convert_int_rtp(uint);
461int __ovld __cnfn convert_int_sat_rtp(uint);
462int __ovld __cnfn convert_int_rtn(uint);
463int __ovld __cnfn convert_int_sat_rtn(uint);
464int __ovld __cnfn convert_int(uint);
465int __ovld __cnfn convert_int_sat(uint);
466int __ovld __cnfn convert_int_rte(long);
467int __ovld __cnfn convert_int_sat_rte(long);
468int __ovld __cnfn convert_int_rtz(long);
469int __ovld __cnfn convert_int_sat_rtz(long);
470int __ovld __cnfn convert_int_rtp(long);
471int __ovld __cnfn convert_int_sat_rtp(long);
472int __ovld __cnfn convert_int_rtn(long);
473int __ovld __cnfn convert_int_sat_rtn(long);
474int __ovld __cnfn convert_int(long);
475int __ovld __cnfn convert_int_sat(long);
476int __ovld __cnfn convert_int_rte(ulong);
477int __ovld __cnfn convert_int_sat_rte(ulong);
478int __ovld __cnfn convert_int_rtz(ulong);
479int __ovld __cnfn convert_int_sat_rtz(ulong);
480int __ovld __cnfn convert_int_rtp(ulong);
481int __ovld __cnfn convert_int_sat_rtp(ulong);
482int __ovld __cnfn convert_int_rtn(ulong);
483int __ovld __cnfn convert_int_sat_rtn(ulong);
484int __ovld __cnfn convert_int(ulong);
485int __ovld __cnfn convert_int_sat(ulong);
486int __ovld __cnfn convert_int_rte(float);
487int __ovld __cnfn convert_int_sat_rte(float);
488int __ovld __cnfn convert_int_rtz(float);
489int __ovld __cnfn convert_int_sat_rtz(float);
490int __ovld __cnfn convert_int_rtp(float);
491int __ovld __cnfn convert_int_sat_rtp(float);
492int __ovld __cnfn convert_int_rtn(float);
493int __ovld __cnfn convert_int_sat_rtn(float);
494int __ovld __cnfn convert_int(float);
495int __ovld __cnfn convert_int_sat(float);
496uint __ovld __cnfn convert_uint_rte(char);
497uint __ovld __cnfn convert_uint_sat_rte(char);
498uint __ovld __cnfn convert_uint_rtz(char);
499uint __ovld __cnfn convert_uint_sat_rtz(char);
500uint __ovld __cnfn convert_uint_rtp(char);
501uint __ovld __cnfn convert_uint_sat_rtp(char);
502uint __ovld __cnfn convert_uint_rtn(char);
503uint __ovld __cnfn convert_uint_sat_rtn(char);
504uint __ovld __cnfn convert_uint(char);
505uint __ovld __cnfn convert_uint_sat(char);
506uint __ovld __cnfn convert_uint_rte(uchar);
507uint __ovld __cnfn convert_uint_sat_rte(uchar);
508uint __ovld __cnfn convert_uint_rtz(uchar);
509uint __ovld __cnfn convert_uint_sat_rtz(uchar);
510uint __ovld __cnfn convert_uint_rtp(uchar);
511uint __ovld __cnfn convert_uint_sat_rtp(uchar);
512uint __ovld __cnfn convert_uint_rtn(uchar);
513uint __ovld __cnfn convert_uint_sat_rtn(uchar);
514uint __ovld __cnfn convert_uint(uchar);
515uint __ovld __cnfn convert_uint_sat(uchar);
516uint __ovld __cnfn convert_uint_rte(short);
517uint __ovld __cnfn convert_uint_sat_rte(short);
518uint __ovld __cnfn convert_uint_rtz(short);
519uint __ovld __cnfn convert_uint_sat_rtz(short);
520uint __ovld __cnfn convert_uint_rtp(short);
521uint __ovld __cnfn convert_uint_sat_rtp(short);
522uint __ovld __cnfn convert_uint_rtn(short);
523uint __ovld __cnfn convert_uint_sat_rtn(short);
524uint __ovld __cnfn convert_uint(short);
525uint __ovld __cnfn convert_uint_sat(short);
526uint __ovld __cnfn convert_uint_rte(ushort);
527uint __ovld __cnfn convert_uint_sat_rte(ushort);
528uint __ovld __cnfn convert_uint_rtz(ushort);
529uint __ovld __cnfn convert_uint_sat_rtz(ushort);
530uint __ovld __cnfn convert_uint_rtp(ushort);
531uint __ovld __cnfn convert_uint_sat_rtp(ushort);
532uint __ovld __cnfn convert_uint_rtn(ushort);
533uint __ovld __cnfn convert_uint_sat_rtn(ushort);
534uint __ovld __cnfn convert_uint(ushort);
535uint __ovld __cnfn convert_uint_sat(ushort);
536uint __ovld __cnfn convert_uint_rte(int);
537uint __ovld __cnfn convert_uint_sat_rte(int);
538uint __ovld __cnfn convert_uint_rtz(int);
539uint __ovld __cnfn convert_uint_sat_rtz(int);
540uint __ovld __cnfn convert_uint_rtp(int);
541uint __ovld __cnfn convert_uint_sat_rtp(int);
542uint __ovld __cnfn convert_uint_rtn(int);
543uint __ovld __cnfn convert_uint_sat_rtn(int);
544uint __ovld __cnfn convert_uint(int);
545uint __ovld __cnfn convert_uint_sat(int);
546uint __ovld __cnfn convert_uint_rte(uint);
547uint __ovld __cnfn convert_uint_sat_rte(uint);
548uint __ovld __cnfn convert_uint_rtz(uint);
549uint __ovld __cnfn convert_uint_sat_rtz(uint);
550uint __ovld __cnfn convert_uint_rtp(uint);
551uint __ovld __cnfn convert_uint_sat_rtp(uint);
552uint __ovld __cnfn convert_uint_rtn(uint);
553uint __ovld __cnfn convert_uint_sat_rtn(uint);
554uint __ovld __cnfn convert_uint(uint);
555uint __ovld __cnfn convert_uint_sat(uint);
556uint __ovld __cnfn convert_uint_rte(long);
557uint __ovld __cnfn convert_uint_sat_rte(long);
558uint __ovld __cnfn convert_uint_rtz(long);
559uint __ovld __cnfn convert_uint_sat_rtz(long);
560uint __ovld __cnfn convert_uint_rtp(long);
561uint __ovld __cnfn convert_uint_sat_rtp(long);
562uint __ovld __cnfn convert_uint_rtn(long);
563uint __ovld __cnfn convert_uint_sat_rtn(long);
564uint __ovld __cnfn convert_uint(long);
565uint __ovld __cnfn convert_uint_sat(long);
566uint __ovld __cnfn convert_uint_rte(ulong);
567uint __ovld __cnfn convert_uint_sat_rte(ulong);
568uint __ovld __cnfn convert_uint_rtz(ulong);
569uint __ovld __cnfn convert_uint_sat_rtz(ulong);
570uint __ovld __cnfn convert_uint_rtp(ulong);
571uint __ovld __cnfn convert_uint_sat_rtp(ulong);
572uint __ovld __cnfn convert_uint_rtn(ulong);
573uint __ovld __cnfn convert_uint_sat_rtn(ulong);
574uint __ovld __cnfn convert_uint(ulong);
575uint __ovld __cnfn convert_uint_sat(ulong);
576uint __ovld __cnfn convert_uint_rte(float);
577uint __ovld __cnfn convert_uint_sat_rte(float);
578uint __ovld __cnfn convert_uint_rtz(float);
579uint __ovld __cnfn convert_uint_sat_rtz(float);
580uint __ovld __cnfn convert_uint_rtp(float);
581uint __ovld __cnfn convert_uint_sat_rtp(float);
582uint __ovld __cnfn convert_uint_rtn(float);
583uint __ovld __cnfn convert_uint_sat_rtn(float);
584uint __ovld __cnfn convert_uint(float);
585uint __ovld __cnfn convert_uint_sat(float);
586long __ovld __cnfn convert_long_rte(char);
587long __ovld __cnfn convert_long_sat_rte(char);
588long __ovld __cnfn convert_long_rtz(char);
589long __ovld __cnfn convert_long_sat_rtz(char);
590long __ovld __cnfn convert_long_rtp(char);
591long __ovld __cnfn convert_long_sat_rtp(char);
592long __ovld __cnfn convert_long_rtn(char);
593long __ovld __cnfn convert_long_sat_rtn(char);
594long __ovld __cnfn convert_long(char);
595long __ovld __cnfn convert_long_sat(char);
596long __ovld __cnfn convert_long_rte(uchar);
597long __ovld __cnfn convert_long_sat_rte(uchar);
598long __ovld __cnfn convert_long_rtz(uchar);
599long __ovld __cnfn convert_long_sat_rtz(uchar);
600long __ovld __cnfn convert_long_rtp(uchar);
601long __ovld __cnfn convert_long_sat_rtp(uchar);
602long __ovld __cnfn convert_long_rtn(uchar);
603long __ovld __cnfn convert_long_sat_rtn(uchar);
604long __ovld __cnfn convert_long(uchar);
605long __ovld __cnfn convert_long_sat(uchar);
606long __ovld __cnfn convert_long_rte(short);
607long __ovld __cnfn convert_long_sat_rte(short);
608long __ovld __cnfn convert_long_rtz(short);
609long __ovld __cnfn convert_long_sat_rtz(short);
610long __ovld __cnfn convert_long_rtp(short);
611long __ovld __cnfn convert_long_sat_rtp(short);
612long __ovld __cnfn convert_long_rtn(short);
613long __ovld __cnfn convert_long_sat_rtn(short);
614long __ovld __cnfn convert_long(short);
615long __ovld __cnfn convert_long_sat(short);
616long __ovld __cnfn convert_long_rte(ushort);
617long __ovld __cnfn convert_long_sat_rte(ushort);
618long __ovld __cnfn convert_long_rtz(ushort);
619long __ovld __cnfn convert_long_sat_rtz(ushort);
620long __ovld __cnfn convert_long_rtp(ushort);
621long __ovld __cnfn convert_long_sat_rtp(ushort);
622long __ovld __cnfn convert_long_rtn(ushort);
623long __ovld __cnfn convert_long_sat_rtn(ushort);
624long __ovld __cnfn convert_long(ushort);
625long __ovld __cnfn convert_long_sat(ushort);
626long __ovld __cnfn convert_long_rte(int);
627long __ovld __cnfn convert_long_sat_rte(int);
628long __ovld __cnfn convert_long_rtz(int);
629long __ovld __cnfn convert_long_sat_rtz(int);
630long __ovld __cnfn convert_long_rtp(int);
631long __ovld __cnfn convert_long_sat_rtp(int);
632long __ovld __cnfn convert_long_rtn(int);
633long __ovld __cnfn convert_long_sat_rtn(int);
634long __ovld __cnfn convert_long(int);
635long __ovld __cnfn convert_long_sat(int);
636long __ovld __cnfn convert_long_rte(uint);
637long __ovld __cnfn convert_long_sat_rte(uint);
638long __ovld __cnfn convert_long_rtz(uint);
639long __ovld __cnfn convert_long_sat_rtz(uint);
640long __ovld __cnfn convert_long_rtp(uint);
641long __ovld __cnfn convert_long_sat_rtp(uint);
642long __ovld __cnfn convert_long_rtn(uint);
643long __ovld __cnfn convert_long_sat_rtn(uint);
644long __ovld __cnfn convert_long(uint);
645long __ovld __cnfn convert_long_sat(uint);
646long __ovld __cnfn convert_long_rte(long);
647long __ovld __cnfn convert_long_sat_rte(long);
648long __ovld __cnfn convert_long_rtz(long);
649long __ovld __cnfn convert_long_sat_rtz(long);
650long __ovld __cnfn convert_long_rtp(long);
651long __ovld __cnfn convert_long_sat_rtp(long);
652long __ovld __cnfn convert_long_rtn(long);
653long __ovld __cnfn convert_long_sat_rtn(long);
654long __ovld __cnfn convert_long(long);
655long __ovld __cnfn convert_long_sat(long);
656long __ovld __cnfn convert_long_rte(ulong);
657long __ovld __cnfn convert_long_sat_rte(ulong);
658long __ovld __cnfn convert_long_rtz(ulong);
659long __ovld __cnfn convert_long_sat_rtz(ulong);
660long __ovld __cnfn convert_long_rtp(ulong);
661long __ovld __cnfn convert_long_sat_rtp(ulong);
662long __ovld __cnfn convert_long_rtn(ulong);
663long __ovld __cnfn convert_long_sat_rtn(ulong);
664long __ovld __cnfn convert_long(ulong);
665long __ovld __cnfn convert_long_sat(ulong);
666long __ovld __cnfn convert_long_rte(float);
667long __ovld __cnfn convert_long_sat_rte(float);
668long __ovld __cnfn convert_long_rtz(float);
669long __ovld __cnfn convert_long_sat_rtz(float);
670long __ovld __cnfn convert_long_rtp(float);
671long __ovld __cnfn convert_long_sat_rtp(float);
672long __ovld __cnfn convert_long_rtn(float);
673long __ovld __cnfn convert_long_sat_rtn(float);
674long __ovld __cnfn convert_long(float);
675long __ovld __cnfn convert_long_sat(float);
676ulong __ovld __cnfn convert_ulong_rte(char);
677ulong __ovld __cnfn convert_ulong_sat_rte(char);
678ulong __ovld __cnfn convert_ulong_rtz(char);
679ulong __ovld __cnfn convert_ulong_sat_rtz(char);
680ulong __ovld __cnfn convert_ulong_rtp(char);
681ulong __ovld __cnfn convert_ulong_sat_rtp(char);
682ulong __ovld __cnfn convert_ulong_rtn(char);
683ulong __ovld __cnfn convert_ulong_sat_rtn(char);
684ulong __ovld __cnfn convert_ulong(char);
685ulong __ovld __cnfn convert_ulong_sat(char);
686ulong __ovld __cnfn convert_ulong_rte(uchar);
687ulong __ovld __cnfn convert_ulong_sat_rte(uchar);
688ulong __ovld __cnfn convert_ulong_rtz(uchar);
689ulong __ovld __cnfn convert_ulong_sat_rtz(uchar);
690ulong __ovld __cnfn convert_ulong_rtp(uchar);
691ulong __ovld __cnfn convert_ulong_sat_rtp(uchar);
692ulong __ovld __cnfn convert_ulong_rtn(uchar);
693ulong __ovld __cnfn convert_ulong_sat_rtn(uchar);
694ulong __ovld __cnfn convert_ulong(uchar);
695ulong __ovld __cnfn convert_ulong_sat(uchar);
696ulong __ovld __cnfn convert_ulong_rte(short);
697ulong __ovld __cnfn convert_ulong_sat_rte(short);
698ulong __ovld __cnfn convert_ulong_rtz(short);
699ulong __ovld __cnfn convert_ulong_sat_rtz(short);
700ulong __ovld __cnfn convert_ulong_rtp(short);
701ulong __ovld __cnfn convert_ulong_sat_rtp(short);
702ulong __ovld __cnfn convert_ulong_rtn(short);
703ulong __ovld __cnfn convert_ulong_sat_rtn(short);
704ulong __ovld __cnfn convert_ulong(short);
705ulong __ovld __cnfn convert_ulong_sat(short);
706ulong __ovld __cnfn convert_ulong_rte(ushort);
707ulong __ovld __cnfn convert_ulong_sat_rte(ushort);
708ulong __ovld __cnfn convert_ulong_rtz(ushort);
709ulong __ovld __cnfn convert_ulong_sat_rtz(ushort);
710ulong __ovld __cnfn convert_ulong_rtp(ushort);
711ulong __ovld __cnfn convert_ulong_sat_rtp(ushort);
712ulong __ovld __cnfn convert_ulong_rtn(ushort);
713ulong __ovld __cnfn convert_ulong_sat_rtn(ushort);
714ulong __ovld __cnfn convert_ulong(ushort);
715ulong __ovld __cnfn convert_ulong_sat(ushort);
716ulong __ovld __cnfn convert_ulong_rte(int);
717ulong __ovld __cnfn convert_ulong_sat_rte(int);
718ulong __ovld __cnfn convert_ulong_rtz(int);
719ulong __ovld __cnfn convert_ulong_sat_rtz(int);
720ulong __ovld __cnfn convert_ulong_rtp(int);
721ulong __ovld __cnfn convert_ulong_sat_rtp(int);
722ulong __ovld __cnfn convert_ulong_rtn(int);
723ulong __ovld __cnfn convert_ulong_sat_rtn(int);
724ulong __ovld __cnfn convert_ulong(int);
725ulong __ovld __cnfn convert_ulong_sat(int);
726ulong __ovld __cnfn convert_ulong_rte(uint);
727ulong __ovld __cnfn convert_ulong_sat_rte(uint);
728ulong __ovld __cnfn convert_ulong_rtz(uint);
729ulong __ovld __cnfn convert_ulong_sat_rtz(uint);
730ulong __ovld __cnfn convert_ulong_rtp(uint);
731ulong __ovld __cnfn convert_ulong_sat_rtp(uint);
732ulong __ovld __cnfn convert_ulong_rtn(uint);
733ulong __ovld __cnfn convert_ulong_sat_rtn(uint);
734ulong __ovld __cnfn convert_ulong(uint);
735ulong __ovld __cnfn convert_ulong_sat(uint);
736ulong __ovld __cnfn convert_ulong_rte(long);
737ulong __ovld __cnfn convert_ulong_sat_rte(long);
738ulong __ovld __cnfn convert_ulong_rtz(long);
739ulong __ovld __cnfn convert_ulong_sat_rtz(long);
740ulong __ovld __cnfn convert_ulong_rtp(long);
741ulong __ovld __cnfn convert_ulong_sat_rtp(long);
742ulong __ovld __cnfn convert_ulong_rtn(long);
743ulong __ovld __cnfn convert_ulong_sat_rtn(long);
744ulong __ovld __cnfn convert_ulong(long);
745ulong __ovld __cnfn convert_ulong_sat(long);
746ulong __ovld __cnfn convert_ulong_rte(ulong);
747ulong __ovld __cnfn convert_ulong_sat_rte(ulong);
748ulong __ovld __cnfn convert_ulong_rtz(ulong);
749ulong __ovld __cnfn convert_ulong_sat_rtz(ulong);
750ulong __ovld __cnfn convert_ulong_rtp(ulong);
751ulong __ovld __cnfn convert_ulong_sat_rtp(ulong);
752ulong __ovld __cnfn convert_ulong_rtn(ulong);
753ulong __ovld __cnfn convert_ulong_sat_rtn(ulong);
754ulong __ovld __cnfn convert_ulong(ulong);
755ulong __ovld __cnfn convert_ulong_sat(ulong);
756ulong __ovld __cnfn convert_ulong_rte(float);
757ulong __ovld __cnfn convert_ulong_sat_rte(float);
758ulong __ovld __cnfn convert_ulong_rtz(float);
759ulong __ovld __cnfn convert_ulong_sat_rtz(float);
760ulong __ovld __cnfn convert_ulong_rtp(float);
761ulong __ovld __cnfn convert_ulong_sat_rtp(float);
762ulong __ovld __cnfn convert_ulong_rtn(float);
763ulong __ovld __cnfn convert_ulong_sat_rtn(float);
764ulong __ovld __cnfn convert_ulong(float);
765ulong __ovld __cnfn convert_ulong_sat(float);
766float __ovld __cnfn convert_float_rte(char);
767float __ovld __cnfn convert_float_rtz(char);
768float __ovld __cnfn convert_float_rtp(char);
769float __ovld __cnfn convert_float_rtn(char);
770float __ovld __cnfn convert_float(char);
771float __ovld __cnfn convert_float_rte(uchar);
772float __ovld __cnfn convert_float_rtz(uchar);
773float __ovld __cnfn convert_float_rtp(uchar);
774float __ovld __cnfn convert_float_rtn(uchar);
775float __ovld __cnfn convert_float(uchar);
776float __ovld __cnfn convert_float_rte(short);
777float __ovld __cnfn convert_float_rtz(short);
778float __ovld __cnfn convert_float_rtp(short);
779float __ovld __cnfn convert_float_rtn(short);
780float __ovld __cnfn convert_float(short);
781float __ovld __cnfn convert_float_rte(ushort);
782float __ovld __cnfn convert_float_rtz(ushort);
783float __ovld __cnfn convert_float_rtp(ushort);
784float __ovld __cnfn convert_float_rtn(ushort);
785float __ovld __cnfn convert_float(ushort);
786float __ovld __cnfn convert_float_rte(int);
787float __ovld __cnfn convert_float_rtz(int);
788float __ovld __cnfn convert_float_rtp(int);
789float __ovld __cnfn convert_float_rtn(int);
790float __ovld __cnfn convert_float(int);
791float __ovld __cnfn convert_float_rte(uint);
792float __ovld __cnfn convert_float_rtz(uint);
793float __ovld __cnfn convert_float_rtp(uint);
794float __ovld __cnfn convert_float_rtn(uint);
795float __ovld __cnfn convert_float(uint);
796float __ovld __cnfn convert_float_rte(long);
797float __ovld __cnfn convert_float_rtz(long);
798float __ovld __cnfn convert_float_rtp(long);
799float __ovld __cnfn convert_float_rtn(long);
800float __ovld __cnfn convert_float(long);
801float __ovld __cnfn convert_float_rte(ulong);
802float __ovld __cnfn convert_float_rtz(ulong);
803float __ovld __cnfn convert_float_rtp(ulong);
804float __ovld __cnfn convert_float_rtn(ulong);
805float __ovld __cnfn convert_float(ulong);
806float __ovld __cnfn convert_float_rte(float);
807float __ovld __cnfn convert_float_rtz(float);
808float __ovld __cnfn convert_float_rtp(float);
809float __ovld __cnfn convert_float_rtn(float);
810float __ovld __cnfn convert_float(float);
811char2 __ovld __cnfn convert_char2_rte(char2);
812char2 __ovld __cnfn convert_char2_sat_rte(char2);
813char2 __ovld __cnfn convert_char2_rtz(char2);
814char2 __ovld __cnfn convert_char2_sat_rtz(char2);
815char2 __ovld __cnfn convert_char2_rtp(char2);
816char2 __ovld __cnfn convert_char2_sat_rtp(char2);
817char2 __ovld __cnfn convert_char2_rtn(char2);
818char2 __ovld __cnfn convert_char2_sat_rtn(char2);
819char2 __ovld __cnfn convert_char2(char2);
820char2 __ovld __cnfn convert_char2_sat(char2);
821char2 __ovld __cnfn convert_char2_rte(uchar2);
822char2 __ovld __cnfn convert_char2_sat_rte(uchar2);
823char2 __ovld __cnfn convert_char2_rtz(uchar2);
824char2 __ovld __cnfn convert_char2_sat_rtz(uchar2);
825char2 __ovld __cnfn convert_char2_rtp(uchar2);
826char2 __ovld __cnfn convert_char2_sat_rtp(uchar2);
827char2 __ovld __cnfn convert_char2_rtn(uchar2);
828char2 __ovld __cnfn convert_char2_sat_rtn(uchar2);
829char2 __ovld __cnfn convert_char2(uchar2);
830char2 __ovld __cnfn convert_char2_sat(uchar2);
831char2 __ovld __cnfn convert_char2_rte(short2);
832char2 __ovld __cnfn convert_char2_sat_rte(short2);
833char2 __ovld __cnfn convert_char2_rtz(short2);
834char2 __ovld __cnfn convert_char2_sat_rtz(short2);
835char2 __ovld __cnfn convert_char2_rtp(short2);
836char2 __ovld __cnfn convert_char2_sat_rtp(short2);
837char2 __ovld __cnfn convert_char2_rtn(short2);
838char2 __ovld __cnfn convert_char2_sat_rtn(short2);
839char2 __ovld __cnfn convert_char2(short2);
840char2 __ovld __cnfn convert_char2_sat(short2);
841char2 __ovld __cnfn convert_char2_rte(ushort2);
842char2 __ovld __cnfn convert_char2_sat_rte(ushort2);
843char2 __ovld __cnfn convert_char2_rtz(ushort2);
844char2 __ovld __cnfn convert_char2_sat_rtz(ushort2);
845char2 __ovld __cnfn convert_char2_rtp(ushort2);
846char2 __ovld __cnfn convert_char2_sat_rtp(ushort2);
847char2 __ovld __cnfn convert_char2_rtn(ushort2);
848char2 __ovld __cnfn convert_char2_sat_rtn(ushort2);
849char2 __ovld __cnfn convert_char2(ushort2);
850char2 __ovld __cnfn convert_char2_sat(ushort2);
851char2 __ovld __cnfn convert_char2_rte(int2);
852char2 __ovld __cnfn convert_char2_sat_rte(int2);
853char2 __ovld __cnfn convert_char2_rtz(int2);
854char2 __ovld __cnfn convert_char2_sat_rtz(int2);
855char2 __ovld __cnfn convert_char2_rtp(int2);
856char2 __ovld __cnfn convert_char2_sat_rtp(int2);
857char2 __ovld __cnfn convert_char2_rtn(int2);
858char2 __ovld __cnfn convert_char2_sat_rtn(int2);
859char2 __ovld __cnfn convert_char2(int2);
860char2 __ovld __cnfn convert_char2_sat(int2);
861char2 __ovld __cnfn convert_char2_rte(uint2);
862char2 __ovld __cnfn convert_char2_sat_rte(uint2);
863char2 __ovld __cnfn convert_char2_rtz(uint2);
864char2 __ovld __cnfn convert_char2_sat_rtz(uint2);
865char2 __ovld __cnfn convert_char2_rtp(uint2);
866char2 __ovld __cnfn convert_char2_sat_rtp(uint2);
867char2 __ovld __cnfn convert_char2_rtn(uint2);
868char2 __ovld __cnfn convert_char2_sat_rtn(uint2);
869char2 __ovld __cnfn convert_char2(uint2);
870char2 __ovld __cnfn convert_char2_sat(uint2);
871char2 __ovld __cnfn convert_char2_rte(long2);
872char2 __ovld __cnfn convert_char2_sat_rte(long2);
873char2 __ovld __cnfn convert_char2_rtz(long2);
874char2 __ovld __cnfn convert_char2_sat_rtz(long2);
875char2 __ovld __cnfn convert_char2_rtp(long2);
876char2 __ovld __cnfn convert_char2_sat_rtp(long2);
877char2 __ovld __cnfn convert_char2_rtn(long2);
878char2 __ovld __cnfn convert_char2_sat_rtn(long2);
879char2 __ovld __cnfn convert_char2(long2);
880char2 __ovld __cnfn convert_char2_sat(long2);
881char2 __ovld __cnfn convert_char2_rte(ulong2);
882char2 __ovld __cnfn convert_char2_sat_rte(ulong2);
883char2 __ovld __cnfn convert_char2_rtz(ulong2);
884char2 __ovld __cnfn convert_char2_sat_rtz(ulong2);
885char2 __ovld __cnfn convert_char2_rtp(ulong2);
886char2 __ovld __cnfn convert_char2_sat_rtp(ulong2);
887char2 __ovld __cnfn convert_char2_rtn(ulong2);
888char2 __ovld __cnfn convert_char2_sat_rtn(ulong2);
889char2 __ovld __cnfn convert_char2(ulong2);
890char2 __ovld __cnfn convert_char2_sat(ulong2);
891char2 __ovld __cnfn convert_char2_rte(float2);
892char2 __ovld __cnfn convert_char2_sat_rte(float2);
893char2 __ovld __cnfn convert_char2_rtz(float2);
894char2 __ovld __cnfn convert_char2_sat_rtz(float2);
895char2 __ovld __cnfn convert_char2_rtp(float2);
896char2 __ovld __cnfn convert_char2_sat_rtp(float2);
897char2 __ovld __cnfn convert_char2_rtn(float2);
898char2 __ovld __cnfn convert_char2_sat_rtn(float2);
899char2 __ovld __cnfn convert_char2(float2);
900char2 __ovld __cnfn convert_char2_sat(float2);
901uchar2 __ovld __cnfn convert_uchar2_rte(char2);
902uchar2 __ovld __cnfn convert_uchar2_sat_rte(char2);
903uchar2 __ovld __cnfn convert_uchar2_rtz(char2);
904uchar2 __ovld __cnfn convert_uchar2_sat_rtz(char2);
905uchar2 __ovld __cnfn convert_uchar2_rtp(char2);
906uchar2 __ovld __cnfn convert_uchar2_sat_rtp(char2);
907uchar2 __ovld __cnfn convert_uchar2_rtn(char2);
908uchar2 __ovld __cnfn convert_uchar2_sat_rtn(char2);
909uchar2 __ovld __cnfn convert_uchar2(char2);
910uchar2 __ovld __cnfn convert_uchar2_sat(char2);
911uchar2 __ovld __cnfn convert_uchar2_rte(uchar2);
912uchar2 __ovld __cnfn convert_uchar2_sat_rte(uchar2);
913uchar2 __ovld __cnfn convert_uchar2_rtz(uchar2);
914uchar2 __ovld __cnfn convert_uchar2_sat_rtz(uchar2);
915uchar2 __ovld __cnfn convert_uchar2_rtp(uchar2);
916uchar2 __ovld __cnfn convert_uchar2_sat_rtp(uchar2);
917uchar2 __ovld __cnfn convert_uchar2_rtn(uchar2);
918uchar2 __ovld __cnfn convert_uchar2_sat_rtn(uchar2);
919uchar2 __ovld __cnfn convert_uchar2(uchar2);
920uchar2 __ovld __cnfn convert_uchar2_sat(uchar2);
921uchar2 __ovld __cnfn convert_uchar2_rte(short2);
922uchar2 __ovld __cnfn convert_uchar2_sat_rte(short2);
923uchar2 __ovld __cnfn convert_uchar2_rtz(short2);
924uchar2 __ovld __cnfn convert_uchar2_sat_rtz(short2);
925uchar2 __ovld __cnfn convert_uchar2_rtp(short2);
926uchar2 __ovld __cnfn convert_uchar2_sat_rtp(short2);
927uchar2 __ovld __cnfn convert_uchar2_rtn(short2);
928uchar2 __ovld __cnfn convert_uchar2_sat_rtn(short2);
929uchar2 __ovld __cnfn convert_uchar2(short2);
930uchar2 __ovld __cnfn convert_uchar2_sat(short2);
931uchar2 __ovld __cnfn convert_uchar2_rte(ushort2);
932uchar2 __ovld __cnfn convert_uchar2_sat_rte(ushort2);
933uchar2 __ovld __cnfn convert_uchar2_rtz(ushort2);
934uchar2 __ovld __cnfn convert_uchar2_sat_rtz(ushort2);
935uchar2 __ovld __cnfn convert_uchar2_rtp(ushort2);
936uchar2 __ovld __cnfn convert_uchar2_sat_rtp(ushort2);
937uchar2 __ovld __cnfn convert_uchar2_rtn(ushort2);
938uchar2 __ovld __cnfn convert_uchar2_sat_rtn(ushort2);
939uchar2 __ovld __cnfn convert_uchar2(ushort2);
940uchar2 __ovld __cnfn convert_uchar2_sat(ushort2);
941uchar2 __ovld __cnfn convert_uchar2_rte(int2);
942uchar2 __ovld __cnfn convert_uchar2_sat_rte(int2);
943uchar2 __ovld __cnfn convert_uchar2_rtz(int2);
944uchar2 __ovld __cnfn convert_uchar2_sat_rtz(int2);
945uchar2 __ovld __cnfn convert_uchar2_rtp(int2);
946uchar2 __ovld __cnfn convert_uchar2_sat_rtp(int2);
947uchar2 __ovld __cnfn convert_uchar2_rtn(int2);
948uchar2 __ovld __cnfn convert_uchar2_sat_rtn(int2);
949uchar2 __ovld __cnfn convert_uchar2(int2);
950uchar2 __ovld __cnfn convert_uchar2_sat(int2);
951uchar2 __ovld __cnfn convert_uchar2_rte(uint2);
952uchar2 __ovld __cnfn convert_uchar2_sat_rte(uint2);
953uchar2 __ovld __cnfn convert_uchar2_rtz(uint2);
954uchar2 __ovld __cnfn convert_uchar2_sat_rtz(uint2);
955uchar2 __ovld __cnfn convert_uchar2_rtp(uint2);
956uchar2 __ovld __cnfn convert_uchar2_sat_rtp(uint2);
957uchar2 __ovld __cnfn convert_uchar2_rtn(uint2);
958uchar2 __ovld __cnfn convert_uchar2_sat_rtn(uint2);
959uchar2 __ovld __cnfn convert_uchar2(uint2);
960uchar2 __ovld __cnfn convert_uchar2_sat(uint2);
961uchar2 __ovld __cnfn convert_uchar2_rte(long2);
962uchar2 __ovld __cnfn convert_uchar2_sat_rte(long2);
963uchar2 __ovld __cnfn convert_uchar2_rtz(long2);
964uchar2 __ovld __cnfn convert_uchar2_sat_rtz(long2);
965uchar2 __ovld __cnfn convert_uchar2_rtp(long2);
966uchar2 __ovld __cnfn convert_uchar2_sat_rtp(long2);
967uchar2 __ovld __cnfn convert_uchar2_rtn(long2);
968uchar2 __ovld __cnfn convert_uchar2_sat_rtn(long2);
969uchar2 __ovld __cnfn convert_uchar2(long2);
970uchar2 __ovld __cnfn convert_uchar2_sat(long2);
971uchar2 __ovld __cnfn convert_uchar2_rte(ulong2);
972uchar2 __ovld __cnfn convert_uchar2_sat_rte(ulong2);
973uchar2 __ovld __cnfn convert_uchar2_rtz(ulong2);
974uchar2 __ovld __cnfn convert_uchar2_sat_rtz(ulong2);
975uchar2 __ovld __cnfn convert_uchar2_rtp(ulong2);
976uchar2 __ovld __cnfn convert_uchar2_sat_rtp(ulong2);
977uchar2 __ovld __cnfn convert_uchar2_rtn(ulong2);
978uchar2 __ovld __cnfn convert_uchar2_sat_rtn(ulong2);
979uchar2 __ovld __cnfn convert_uchar2(ulong2);
980uchar2 __ovld __cnfn convert_uchar2_sat(ulong2);
981uchar2 __ovld __cnfn convert_uchar2_rte(float2);
982uchar2 __ovld __cnfn convert_uchar2_sat_rte(float2);
983uchar2 __ovld __cnfn convert_uchar2_rtz(float2);
984uchar2 __ovld __cnfn convert_uchar2_sat_rtz(float2);
985uchar2 __ovld __cnfn convert_uchar2_rtp(float2);
986uchar2 __ovld __cnfn convert_uchar2_sat_rtp(float2);
987uchar2 __ovld __cnfn convert_uchar2_rtn(float2);
988uchar2 __ovld __cnfn convert_uchar2_sat_rtn(float2);
989uchar2 __ovld __cnfn convert_uchar2(float2);
990uchar2 __ovld __cnfn convert_uchar2_sat(float2);
991short2 __ovld __cnfn convert_short2_rte(char2);
992short2 __ovld __cnfn convert_short2_sat_rte(char2);
993short2 __ovld __cnfn convert_short2_rtz(char2);
994short2 __ovld __cnfn convert_short2_sat_rtz(char2);
995short2 __ovld __cnfn convert_short2_rtp(char2);
996short2 __ovld __cnfn convert_short2_sat_rtp(char2);
997short2 __ovld __cnfn convert_short2_rtn(char2);
998short2 __ovld __cnfn convert_short2_sat_rtn(char2);
999short2 __ovld __cnfn convert_short2(char2);
1000short2 __ovld __cnfn convert_short2_sat(char2);
1001short2 __ovld __cnfn convert_short2_rte(uchar2);
1002short2 __ovld __cnfn convert_short2_sat_rte(uchar2);
1003short2 __ovld __cnfn convert_short2_rtz(uchar2);
1004short2 __ovld __cnfn convert_short2_sat_rtz(uchar2);
1005short2 __ovld __cnfn convert_short2_rtp(uchar2);
1006short2 __ovld __cnfn convert_short2_sat_rtp(uchar2);
1007short2 __ovld __cnfn convert_short2_rtn(uchar2);
1008short2 __ovld __cnfn convert_short2_sat_rtn(uchar2);
1009short2 __ovld __cnfn convert_short2(uchar2);
1010short2 __ovld __cnfn convert_short2_sat(uchar2);
1011short2 __ovld __cnfn convert_short2_rte(short2);
1012short2 __ovld __cnfn convert_short2_sat_rte(short2);
1013short2 __ovld __cnfn convert_short2_rtz(short2);
1014short2 __ovld __cnfn convert_short2_sat_rtz(short2);
1015short2 __ovld __cnfn convert_short2_rtp(short2);
1016short2 __ovld __cnfn convert_short2_sat_rtp(short2);
1017short2 __ovld __cnfn convert_short2_rtn(short2);
1018short2 __ovld __cnfn convert_short2_sat_rtn(short2);
1019short2 __ovld __cnfn convert_short2(short2);
1020short2 __ovld __cnfn convert_short2_sat(short2);
1021short2 __ovld __cnfn convert_short2_rte(ushort2);
1022short2 __ovld __cnfn convert_short2_sat_rte(ushort2);
1023short2 __ovld __cnfn convert_short2_rtz(ushort2);
1024short2 __ovld __cnfn convert_short2_sat_rtz(ushort2);
1025short2 __ovld __cnfn convert_short2_rtp(ushort2);
1026short2 __ovld __cnfn convert_short2_sat_rtp(ushort2);
1027short2 __ovld __cnfn convert_short2_rtn(ushort2);
1028short2 __ovld __cnfn convert_short2_sat_rtn(ushort2);
1029short2 __ovld __cnfn convert_short2(ushort2);
1030short2 __ovld __cnfn convert_short2_sat(ushort2);
1031short2 __ovld __cnfn convert_short2_rte(int2);
1032short2 __ovld __cnfn convert_short2_sat_rte(int2);
1033short2 __ovld __cnfn convert_short2_rtz(int2);
1034short2 __ovld __cnfn convert_short2_sat_rtz(int2);
1035short2 __ovld __cnfn convert_short2_rtp(int2);
1036short2 __ovld __cnfn convert_short2_sat_rtp(int2);
1037short2 __ovld __cnfn convert_short2_rtn(int2);
1038short2 __ovld __cnfn convert_short2_sat_rtn(int2);
1039short2 __ovld __cnfn convert_short2(int2);
1040short2 __ovld __cnfn convert_short2_sat(int2);
1041short2 __ovld __cnfn convert_short2_rte(uint2);
1042short2 __ovld __cnfn convert_short2_sat_rte(uint2);
1043short2 __ovld __cnfn convert_short2_rtz(uint2);
1044short2 __ovld __cnfn convert_short2_sat_rtz(uint2);
1045short2 __ovld __cnfn convert_short2_rtp(uint2);
1046short2 __ovld __cnfn convert_short2_sat_rtp(uint2);
1047short2 __ovld __cnfn convert_short2_rtn(uint2);
1048short2 __ovld __cnfn convert_short2_sat_rtn(uint2);
1049short2 __ovld __cnfn convert_short2(uint2);
1050short2 __ovld __cnfn convert_short2_sat(uint2);
1051short2 __ovld __cnfn convert_short2_rte(long2);
1052short2 __ovld __cnfn convert_short2_sat_rte(long2);
1053short2 __ovld __cnfn convert_short2_rtz(long2);
1054short2 __ovld __cnfn convert_short2_sat_rtz(long2);
1055short2 __ovld __cnfn convert_short2_rtp(long2);
1056short2 __ovld __cnfn convert_short2_sat_rtp(long2);
1057short2 __ovld __cnfn convert_short2_rtn(long2);
1058short2 __ovld __cnfn convert_short2_sat_rtn(long2);
1059short2 __ovld __cnfn convert_short2(long2);
1060short2 __ovld __cnfn convert_short2_sat(long2);
1061short2 __ovld __cnfn convert_short2_rte(ulong2);
1062short2 __ovld __cnfn convert_short2_sat_rte(ulong2);
1063short2 __ovld __cnfn convert_short2_rtz(ulong2);
1064short2 __ovld __cnfn convert_short2_sat_rtz(ulong2);
1065short2 __ovld __cnfn convert_short2_rtp(ulong2);
1066short2 __ovld __cnfn convert_short2_sat_rtp(ulong2);
1067short2 __ovld __cnfn convert_short2_rtn(ulong2);
1068short2 __ovld __cnfn convert_short2_sat_rtn(ulong2);
1069short2 __ovld __cnfn convert_short2(ulong2);
1070short2 __ovld __cnfn convert_short2_sat(ulong2);
1071short2 __ovld __cnfn convert_short2_rte(float2);
1072short2 __ovld __cnfn convert_short2_sat_rte(float2);
1073short2 __ovld __cnfn convert_short2_rtz(float2);
1074short2 __ovld __cnfn convert_short2_sat_rtz(float2);
1075short2 __ovld __cnfn convert_short2_rtp(float2);
1076short2 __ovld __cnfn convert_short2_sat_rtp(float2);
1077short2 __ovld __cnfn convert_short2_rtn(float2);
1078short2 __ovld __cnfn convert_short2_sat_rtn(float2);
1079short2 __ovld __cnfn convert_short2(float2);
1080short2 __ovld __cnfn convert_short2_sat(float2);
1081ushort2 __ovld __cnfn convert_ushort2_rte(char2);
1082ushort2 __ovld __cnfn convert_ushort2_sat_rte(char2);
1083ushort2 __ovld __cnfn convert_ushort2_rtz(char2);
1084ushort2 __ovld __cnfn convert_ushort2_sat_rtz(char2);
1085ushort2 __ovld __cnfn convert_ushort2_rtp(char2);
1086ushort2 __ovld __cnfn convert_ushort2_sat_rtp(char2);
1087ushort2 __ovld __cnfn convert_ushort2_rtn(char2);
1088ushort2 __ovld __cnfn convert_ushort2_sat_rtn(char2);
1089ushort2 __ovld __cnfn convert_ushort2(char2);
1090ushort2 __ovld __cnfn convert_ushort2_sat(char2);
1091ushort2 __ovld __cnfn convert_ushort2_rte(uchar2);
1092ushort2 __ovld __cnfn convert_ushort2_sat_rte(uchar2);
1093ushort2 __ovld __cnfn convert_ushort2_rtz(uchar2);
1094ushort2 __ovld __cnfn convert_ushort2_sat_rtz(uchar2);
1095ushort2 __ovld __cnfn convert_ushort2_rtp(uchar2);
1096ushort2 __ovld __cnfn convert_ushort2_sat_rtp(uchar2);
1097ushort2 __ovld __cnfn convert_ushort2_rtn(uchar2);
1098ushort2 __ovld __cnfn convert_ushort2_sat_rtn(uchar2);
1099ushort2 __ovld __cnfn convert_ushort2(uchar2);
1100ushort2 __ovld __cnfn convert_ushort2_sat(uchar2);
1101ushort2 __ovld __cnfn convert_ushort2_rte(short2);
1102ushort2 __ovld __cnfn convert_ushort2_sat_rte(short2);
1103ushort2 __ovld __cnfn convert_ushort2_rtz(short2);
1104ushort2 __ovld __cnfn convert_ushort2_sat_rtz(short2);
1105ushort2 __ovld __cnfn convert_ushort2_rtp(short2);
1106ushort2 __ovld __cnfn convert_ushort2_sat_rtp(short2);
1107ushort2 __ovld __cnfn convert_ushort2_rtn(short2);
1108ushort2 __ovld __cnfn convert_ushort2_sat_rtn(short2);
1109ushort2 __ovld __cnfn convert_ushort2(short2);
1110ushort2 __ovld __cnfn convert_ushort2_sat(short2);
1111ushort2 __ovld __cnfn convert_ushort2_rte(ushort2);
1112ushort2 __ovld __cnfn convert_ushort2_sat_rte(ushort2);
1113ushort2 __ovld __cnfn convert_ushort2_rtz(ushort2);
1114ushort2 __ovld __cnfn convert_ushort2_sat_rtz(ushort2);
1115ushort2 __ovld __cnfn convert_ushort2_rtp(ushort2);
1116ushort2 __ovld __cnfn convert_ushort2_sat_rtp(ushort2);
1117ushort2 __ovld __cnfn convert_ushort2_rtn(ushort2);
1118ushort2 __ovld __cnfn convert_ushort2_sat_rtn(ushort2);
1119ushort2 __ovld __cnfn convert_ushort2(ushort2);
1120ushort2 __ovld __cnfn convert_ushort2_sat(ushort2);
1121ushort2 __ovld __cnfn convert_ushort2_rte(int2);
1122ushort2 __ovld __cnfn convert_ushort2_sat_rte(int2);
1123ushort2 __ovld __cnfn convert_ushort2_rtz(int2);
1124ushort2 __ovld __cnfn convert_ushort2_sat_rtz(int2);
1125ushort2 __ovld __cnfn convert_ushort2_rtp(int2);
1126ushort2 __ovld __cnfn convert_ushort2_sat_rtp(int2);
1127ushort2 __ovld __cnfn convert_ushort2_rtn(int2);
1128ushort2 __ovld __cnfn convert_ushort2_sat_rtn(int2);
1129ushort2 __ovld __cnfn convert_ushort2(int2);
1130ushort2 __ovld __cnfn convert_ushort2_sat(int2);
1131ushort2 __ovld __cnfn convert_ushort2_rte(uint2);
1132ushort2 __ovld __cnfn convert_ushort2_sat_rte(uint2);
1133ushort2 __ovld __cnfn convert_ushort2_rtz(uint2);
1134ushort2 __ovld __cnfn convert_ushort2_sat_rtz(uint2);
1135ushort2 __ovld __cnfn convert_ushort2_rtp(uint2);
1136ushort2 __ovld __cnfn convert_ushort2_sat_rtp(uint2);
1137ushort2 __ovld __cnfn convert_ushort2_rtn(uint2);
1138ushort2 __ovld __cnfn convert_ushort2_sat_rtn(uint2);
1139ushort2 __ovld __cnfn convert_ushort2(uint2);
1140ushort2 __ovld __cnfn convert_ushort2_sat(uint2);
1141ushort2 __ovld __cnfn convert_ushort2_rte(long2);
1142ushort2 __ovld __cnfn convert_ushort2_sat_rte(long2);
1143ushort2 __ovld __cnfn convert_ushort2_rtz(long2);
1144ushort2 __ovld __cnfn convert_ushort2_sat_rtz(long2);
1145ushort2 __ovld __cnfn convert_ushort2_rtp(long2);
1146ushort2 __ovld __cnfn convert_ushort2_sat_rtp(long2);
1147ushort2 __ovld __cnfn convert_ushort2_rtn(long2);
1148ushort2 __ovld __cnfn convert_ushort2_sat_rtn(long2);
1149ushort2 __ovld __cnfn convert_ushort2(long2);
1150ushort2 __ovld __cnfn convert_ushort2_sat(long2);
1151ushort2 __ovld __cnfn convert_ushort2_rte(ulong2);
1152ushort2 __ovld __cnfn convert_ushort2_sat_rte(ulong2);
1153ushort2 __ovld __cnfn convert_ushort2_rtz(ulong2);
1154ushort2 __ovld __cnfn convert_ushort2_sat_rtz(ulong2);
1155ushort2 __ovld __cnfn convert_ushort2_rtp(ulong2);
1156ushort2 __ovld __cnfn convert_ushort2_sat_rtp(ulong2);
1157ushort2 __ovld __cnfn convert_ushort2_rtn(ulong2);
1158ushort2 __ovld __cnfn convert_ushort2_sat_rtn(ulong2);
1159ushort2 __ovld __cnfn convert_ushort2(ulong2);
1160ushort2 __ovld __cnfn convert_ushort2_sat(ulong2);
1161ushort2 __ovld __cnfn convert_ushort2_rte(float2);
1162ushort2 __ovld __cnfn convert_ushort2_sat_rte(float2);
1163ushort2 __ovld __cnfn convert_ushort2_rtz(float2);
1164ushort2 __ovld __cnfn convert_ushort2_sat_rtz(float2);
1165ushort2 __ovld __cnfn convert_ushort2_rtp(float2);
1166ushort2 __ovld __cnfn convert_ushort2_sat_rtp(float2);
1167ushort2 __ovld __cnfn convert_ushort2_rtn(float2);
1168ushort2 __ovld __cnfn convert_ushort2_sat_rtn(float2);
1169ushort2 __ovld __cnfn convert_ushort2(float2);
1170ushort2 __ovld __cnfn convert_ushort2_sat(float2);
1171int2 __ovld __cnfn convert_int2_rte(char2);
1172int2 __ovld __cnfn convert_int2_sat_rte(char2);
1173int2 __ovld __cnfn convert_int2_rtz(char2);
1174int2 __ovld __cnfn convert_int2_sat_rtz(char2);
1175int2 __ovld __cnfn convert_int2_rtp(char2);
1176int2 __ovld __cnfn convert_int2_sat_rtp(char2);
1177int2 __ovld __cnfn convert_int2_rtn(char2);
1178int2 __ovld __cnfn convert_int2_sat_rtn(char2);
1179int2 __ovld __cnfn convert_int2(char2);
1180int2 __ovld __cnfn convert_int2_sat(char2);
1181int2 __ovld __cnfn convert_int2_rte(uchar2);
1182int2 __ovld __cnfn convert_int2_sat_rte(uchar2);
1183int2 __ovld __cnfn convert_int2_rtz(uchar2);
1184int2 __ovld __cnfn convert_int2_sat_rtz(uchar2);
1185int2 __ovld __cnfn convert_int2_rtp(uchar2);
1186int2 __ovld __cnfn convert_int2_sat_rtp(uchar2);
1187int2 __ovld __cnfn convert_int2_rtn(uchar2);
1188int2 __ovld __cnfn convert_int2_sat_rtn(uchar2);
1189int2 __ovld __cnfn convert_int2(uchar2);
1190int2 __ovld __cnfn convert_int2_sat(uchar2);
1191int2 __ovld __cnfn convert_int2_rte(short2);
1192int2 __ovld __cnfn convert_int2_sat_rte(short2);
1193int2 __ovld __cnfn convert_int2_rtz(short2);
1194int2 __ovld __cnfn convert_int2_sat_rtz(short2);
1195int2 __ovld __cnfn convert_int2_rtp(short2);
1196int2 __ovld __cnfn convert_int2_sat_rtp(short2);
1197int2 __ovld __cnfn convert_int2_rtn(short2);
1198int2 __ovld __cnfn convert_int2_sat_rtn(short2);
1199int2 __ovld __cnfn convert_int2(short2);
1200int2 __ovld __cnfn convert_int2_sat(short2);
1201int2 __ovld __cnfn convert_int2_rte(ushort2);
1202int2 __ovld __cnfn convert_int2_sat_rte(ushort2);
1203int2 __ovld __cnfn convert_int2_rtz(ushort2);
1204int2 __ovld __cnfn convert_int2_sat_rtz(ushort2);
1205int2 __ovld __cnfn convert_int2_rtp(ushort2);
1206int2 __ovld __cnfn convert_int2_sat_rtp(ushort2);
1207int2 __ovld __cnfn convert_int2_rtn(ushort2);
1208int2 __ovld __cnfn convert_int2_sat_rtn(ushort2);
1209int2 __ovld __cnfn convert_int2(ushort2);
1210int2 __ovld __cnfn convert_int2_sat(ushort2);
1211int2 __ovld __cnfn convert_int2_rte(int2);
1212int2 __ovld __cnfn convert_int2_sat_rte(int2);
1213int2 __ovld __cnfn convert_int2_rtz(int2);
1214int2 __ovld __cnfn convert_int2_sat_rtz(int2);
1215int2 __ovld __cnfn convert_int2_rtp(int2);
1216int2 __ovld __cnfn convert_int2_sat_rtp(int2);
1217int2 __ovld __cnfn convert_int2_rtn(int2);
1218int2 __ovld __cnfn convert_int2_sat_rtn(int2);
1219int2 __ovld __cnfn convert_int2(int2);
1220int2 __ovld __cnfn convert_int2_sat(int2);
1221int2 __ovld __cnfn convert_int2_rte(uint2);
1222int2 __ovld __cnfn convert_int2_sat_rte(uint2);
1223int2 __ovld __cnfn convert_int2_rtz(uint2);
1224int2 __ovld __cnfn convert_int2_sat_rtz(uint2);
1225int2 __ovld __cnfn convert_int2_rtp(uint2);
1226int2 __ovld __cnfn convert_int2_sat_rtp(uint2);
1227int2 __ovld __cnfn convert_int2_rtn(uint2);
1228int2 __ovld __cnfn convert_int2_sat_rtn(uint2);
1229int2 __ovld __cnfn convert_int2(uint2);
1230int2 __ovld __cnfn convert_int2_sat(uint2);
1231int2 __ovld __cnfn convert_int2_rte(long2);
1232int2 __ovld __cnfn convert_int2_sat_rte(long2);
1233int2 __ovld __cnfn convert_int2_rtz(long2);
1234int2 __ovld __cnfn convert_int2_sat_rtz(long2);
1235int2 __ovld __cnfn convert_int2_rtp(long2);
1236int2 __ovld __cnfn convert_int2_sat_rtp(long2);
1237int2 __ovld __cnfn convert_int2_rtn(long2);
1238int2 __ovld __cnfn convert_int2_sat_rtn(long2);
1239int2 __ovld __cnfn convert_int2(long2);
1240int2 __ovld __cnfn convert_int2_sat(long2);
1241int2 __ovld __cnfn convert_int2_rte(ulong2);
1242int2 __ovld __cnfn convert_int2_sat_rte(ulong2);
1243int2 __ovld __cnfn convert_int2_rtz(ulong2);
1244int2 __ovld __cnfn convert_int2_sat_rtz(ulong2);
1245int2 __ovld __cnfn convert_int2_rtp(ulong2);
1246int2 __ovld __cnfn convert_int2_sat_rtp(ulong2);
1247int2 __ovld __cnfn convert_int2_rtn(ulong2);
1248int2 __ovld __cnfn convert_int2_sat_rtn(ulong2);
1249int2 __ovld __cnfn convert_int2(ulong2);
1250int2 __ovld __cnfn convert_int2_sat(ulong2);
1251int2 __ovld __cnfn convert_int2_rte(float2);
1252int2 __ovld __cnfn convert_int2_sat_rte(float2);
1253int2 __ovld __cnfn convert_int2_rtz(float2);
1254int2 __ovld __cnfn convert_int2_sat_rtz(float2);
1255int2 __ovld __cnfn convert_int2_rtp(float2);
1256int2 __ovld __cnfn convert_int2_sat_rtp(float2);
1257int2 __ovld __cnfn convert_int2_rtn(float2);
1258int2 __ovld __cnfn convert_int2_sat_rtn(float2);
1259int2 __ovld __cnfn convert_int2(float2);
1260int2 __ovld __cnfn convert_int2_sat(float2);
1261uint2 __ovld __cnfn convert_uint2_rte(char2);
1262uint2 __ovld __cnfn convert_uint2_sat_rte(char2);
1263uint2 __ovld __cnfn convert_uint2_rtz(char2);
1264uint2 __ovld __cnfn convert_uint2_sat_rtz(char2);
1265uint2 __ovld __cnfn convert_uint2_rtp(char2);
1266uint2 __ovld __cnfn convert_uint2_sat_rtp(char2);
1267uint2 __ovld __cnfn convert_uint2_rtn(char2);
1268uint2 __ovld __cnfn convert_uint2_sat_rtn(char2);
1269uint2 __ovld __cnfn convert_uint2(char2);
1270uint2 __ovld __cnfn convert_uint2_sat(char2);
1271uint2 __ovld __cnfn convert_uint2_rte(uchar2);
1272uint2 __ovld __cnfn convert_uint2_sat_rte(uchar2);
1273uint2 __ovld __cnfn convert_uint2_rtz(uchar2);
1274uint2 __ovld __cnfn convert_uint2_sat_rtz(uchar2);
1275uint2 __ovld __cnfn convert_uint2_rtp(uchar2);
1276uint2 __ovld __cnfn convert_uint2_sat_rtp(uchar2);
1277uint2 __ovld __cnfn convert_uint2_rtn(uchar2);
1278uint2 __ovld __cnfn convert_uint2_sat_rtn(uchar2);
1279uint2 __ovld __cnfn convert_uint2(uchar2);
1280uint2 __ovld __cnfn convert_uint2_sat(uchar2);
1281uint2 __ovld __cnfn convert_uint2_rte(short2);
1282uint2 __ovld __cnfn convert_uint2_sat_rte(short2);
1283uint2 __ovld __cnfn convert_uint2_rtz(short2);
1284uint2 __ovld __cnfn convert_uint2_sat_rtz(short2);
1285uint2 __ovld __cnfn convert_uint2_rtp(short2);
1286uint2 __ovld __cnfn convert_uint2_sat_rtp(short2);
1287uint2 __ovld __cnfn convert_uint2_rtn(short2);
1288uint2 __ovld __cnfn convert_uint2_sat_rtn(short2);
1289uint2 __ovld __cnfn convert_uint2(short2);
1290uint2 __ovld __cnfn convert_uint2_sat(short2);
1291uint2 __ovld __cnfn convert_uint2_rte(ushort2);
1292uint2 __ovld __cnfn convert_uint2_sat_rte(ushort2);
1293uint2 __ovld __cnfn convert_uint2_rtz(ushort2);
1294uint2 __ovld __cnfn convert_uint2_sat_rtz(ushort2);
1295uint2 __ovld __cnfn convert_uint2_rtp(ushort2);
1296uint2 __ovld __cnfn convert_uint2_sat_rtp(ushort2);
1297uint2 __ovld __cnfn convert_uint2_rtn(ushort2);
1298uint2 __ovld __cnfn convert_uint2_sat_rtn(ushort2);
1299uint2 __ovld __cnfn convert_uint2(ushort2);
1300uint2 __ovld __cnfn convert_uint2_sat(ushort2);
1301uint2 __ovld __cnfn convert_uint2_rte(int2);
1302uint2 __ovld __cnfn convert_uint2_sat_rte(int2);
1303uint2 __ovld __cnfn convert_uint2_rtz(int2);
1304uint2 __ovld __cnfn convert_uint2_sat_rtz(int2);
1305uint2 __ovld __cnfn convert_uint2_rtp(int2);
1306uint2 __ovld __cnfn convert_uint2_sat_rtp(int2);
1307uint2 __ovld __cnfn convert_uint2_rtn(int2);
1308uint2 __ovld __cnfn convert_uint2_sat_rtn(int2);
1309uint2 __ovld __cnfn convert_uint2(int2);
1310uint2 __ovld __cnfn convert_uint2_sat(int2);
1311uint2 __ovld __cnfn convert_uint2_rte(uint2);
1312uint2 __ovld __cnfn convert_uint2_sat_rte(uint2);
1313uint2 __ovld __cnfn convert_uint2_rtz(uint2);
1314uint2 __ovld __cnfn convert_uint2_sat_rtz(uint2);
1315uint2 __ovld __cnfn convert_uint2_rtp(uint2);
1316uint2 __ovld __cnfn convert_uint2_sat_rtp(uint2);
1317uint2 __ovld __cnfn convert_uint2_rtn(uint2);
1318uint2 __ovld __cnfn convert_uint2_sat_rtn(uint2);
1319uint2 __ovld __cnfn convert_uint2(uint2);
1320uint2 __ovld __cnfn convert_uint2_sat(uint2);
1321uint2 __ovld __cnfn convert_uint2_rte(long2);
1322uint2 __ovld __cnfn convert_uint2_sat_rte(long2);
1323uint2 __ovld __cnfn convert_uint2_rtz(long2);
1324uint2 __ovld __cnfn convert_uint2_sat_rtz(long2);
1325uint2 __ovld __cnfn convert_uint2_rtp(long2);
1326uint2 __ovld __cnfn convert_uint2_sat_rtp(long2);
1327uint2 __ovld __cnfn convert_uint2_rtn(long2);
1328uint2 __ovld __cnfn convert_uint2_sat_rtn(long2);
1329uint2 __ovld __cnfn convert_uint2(long2);
1330uint2 __ovld __cnfn convert_uint2_sat(long2);
1331uint2 __ovld __cnfn convert_uint2_rte(ulong2);
1332uint2 __ovld __cnfn convert_uint2_sat_rte(ulong2);
1333uint2 __ovld __cnfn convert_uint2_rtz(ulong2);
1334uint2 __ovld __cnfn convert_uint2_sat_rtz(ulong2);
1335uint2 __ovld __cnfn convert_uint2_rtp(ulong2);
1336uint2 __ovld __cnfn convert_uint2_sat_rtp(ulong2);
1337uint2 __ovld __cnfn convert_uint2_rtn(ulong2);
1338uint2 __ovld __cnfn convert_uint2_sat_rtn(ulong2);
1339uint2 __ovld __cnfn convert_uint2(ulong2);
1340uint2 __ovld __cnfn convert_uint2_sat(ulong2);
1341uint2 __ovld __cnfn convert_uint2_rte(float2);
1342uint2 __ovld __cnfn convert_uint2_sat_rte(float2);
1343uint2 __ovld __cnfn convert_uint2_rtz(float2);
1344uint2 __ovld __cnfn convert_uint2_sat_rtz(float2);
1345uint2 __ovld __cnfn convert_uint2_rtp(float2);
1346uint2 __ovld __cnfn convert_uint2_sat_rtp(float2);
1347uint2 __ovld __cnfn convert_uint2_rtn(float2);
1348uint2 __ovld __cnfn convert_uint2_sat_rtn(float2);
1349uint2 __ovld __cnfn convert_uint2(float2);
1350uint2 __ovld __cnfn convert_uint2_sat(float2);
1351long2 __ovld __cnfn convert_long2_rte(char2);
1352long2 __ovld __cnfn convert_long2_sat_rte(char2);
1353long2 __ovld __cnfn convert_long2_rtz(char2);
1354long2 __ovld __cnfn convert_long2_sat_rtz(char2);
1355long2 __ovld __cnfn convert_long2_rtp(char2);
1356long2 __ovld __cnfn convert_long2_sat_rtp(char2);
1357long2 __ovld __cnfn convert_long2_rtn(char2);
1358long2 __ovld __cnfn convert_long2_sat_rtn(char2);
1359long2 __ovld __cnfn convert_long2(char2);
1360long2 __ovld __cnfn convert_long2_sat(char2);
1361long2 __ovld __cnfn convert_long2_rte(uchar2);
1362long2 __ovld __cnfn convert_long2_sat_rte(uchar2);
1363long2 __ovld __cnfn convert_long2_rtz(uchar2);
1364long2 __ovld __cnfn convert_long2_sat_rtz(uchar2);
1365long2 __ovld __cnfn convert_long2_rtp(uchar2);
1366long2 __ovld __cnfn convert_long2_sat_rtp(uchar2);
1367long2 __ovld __cnfn convert_long2_rtn(uchar2);
1368long2 __ovld __cnfn convert_long2_sat_rtn(uchar2);
1369long2 __ovld __cnfn convert_long2(uchar2);
1370long2 __ovld __cnfn convert_long2_sat(uchar2);
1371long2 __ovld __cnfn convert_long2_rte(short2);
1372long2 __ovld __cnfn convert_long2_sat_rte(short2);
1373long2 __ovld __cnfn convert_long2_rtz(short2);
1374long2 __ovld __cnfn convert_long2_sat_rtz(short2);
1375long2 __ovld __cnfn convert_long2_rtp(short2);
1376long2 __ovld __cnfn convert_long2_sat_rtp(short2);
1377long2 __ovld __cnfn convert_long2_rtn(short2);
1378long2 __ovld __cnfn convert_long2_sat_rtn(short2);
1379long2 __ovld __cnfn convert_long2(short2);
1380long2 __ovld __cnfn convert_long2_sat(short2);
1381long2 __ovld __cnfn convert_long2_rte(ushort2);
1382long2 __ovld __cnfn convert_long2_sat_rte(ushort2);
1383long2 __ovld __cnfn convert_long2_rtz(ushort2);
1384long2 __ovld __cnfn convert_long2_sat_rtz(ushort2);
1385long2 __ovld __cnfn convert_long2_rtp(ushort2);
1386long2 __ovld __cnfn convert_long2_sat_rtp(ushort2);
1387long2 __ovld __cnfn convert_long2_rtn(ushort2);
1388long2 __ovld __cnfn convert_long2_sat_rtn(ushort2);
1389long2 __ovld __cnfn convert_long2(ushort2);
1390long2 __ovld __cnfn convert_long2_sat(ushort2);
1391long2 __ovld __cnfn convert_long2_rte(int2);
1392long2 __ovld __cnfn convert_long2_sat_rte(int2);
1393long2 __ovld __cnfn convert_long2_rtz(int2);
1394long2 __ovld __cnfn convert_long2_sat_rtz(int2);
1395long2 __ovld __cnfn convert_long2_rtp(int2);
1396long2 __ovld __cnfn convert_long2_sat_rtp(int2);
1397long2 __ovld __cnfn convert_long2_rtn(int2);
1398long2 __ovld __cnfn convert_long2_sat_rtn(int2);
1399long2 __ovld __cnfn convert_long2(int2);
1400long2 __ovld __cnfn convert_long2_sat(int2);
1401long2 __ovld __cnfn convert_long2_rte(uint2);
1402long2 __ovld __cnfn convert_long2_sat_rte(uint2);
1403long2 __ovld __cnfn convert_long2_rtz(uint2);
1404long2 __ovld __cnfn convert_long2_sat_rtz(uint2);
1405long2 __ovld __cnfn convert_long2_rtp(uint2);
1406long2 __ovld __cnfn convert_long2_sat_rtp(uint2);
1407long2 __ovld __cnfn convert_long2_rtn(uint2);
1408long2 __ovld __cnfn convert_long2_sat_rtn(uint2);
1409long2 __ovld __cnfn convert_long2(uint2);
1410long2 __ovld __cnfn convert_long2_sat(uint2);
1411long2 __ovld __cnfn convert_long2_rte(long2);
1412long2 __ovld __cnfn convert_long2_sat_rte(long2);
1413long2 __ovld __cnfn convert_long2_rtz(long2);
1414long2 __ovld __cnfn convert_long2_sat_rtz(long2);
1415long2 __ovld __cnfn convert_long2_rtp(long2);
1416long2 __ovld __cnfn convert_long2_sat_rtp(long2);
1417long2 __ovld __cnfn convert_long2_rtn(long2);
1418long2 __ovld __cnfn convert_long2_sat_rtn(long2);
1419long2 __ovld __cnfn convert_long2(long2);
1420long2 __ovld __cnfn convert_long2_sat(long2);
1421long2 __ovld __cnfn convert_long2_rte(ulong2);
1422long2 __ovld __cnfn convert_long2_sat_rte(ulong2);
1423long2 __ovld __cnfn convert_long2_rtz(ulong2);
1424long2 __ovld __cnfn convert_long2_sat_rtz(ulong2);
1425long2 __ovld __cnfn convert_long2_rtp(ulong2);
1426long2 __ovld __cnfn convert_long2_sat_rtp(ulong2);
1427long2 __ovld __cnfn convert_long2_rtn(ulong2);
1428long2 __ovld __cnfn convert_long2_sat_rtn(ulong2);
1429long2 __ovld __cnfn convert_long2(ulong2);
1430long2 __ovld __cnfn convert_long2_sat(ulong2);
1431long2 __ovld __cnfn convert_long2_rte(float2);
1432long2 __ovld __cnfn convert_long2_sat_rte(float2);
1433long2 __ovld __cnfn convert_long2_rtz(float2);
1434long2 __ovld __cnfn convert_long2_sat_rtz(float2);
1435long2 __ovld __cnfn convert_long2_rtp(float2);
1436long2 __ovld __cnfn convert_long2_sat_rtp(float2);
1437long2 __ovld __cnfn convert_long2_rtn(float2);
1438long2 __ovld __cnfn convert_long2_sat_rtn(float2);
1439long2 __ovld __cnfn convert_long2(float2);
1440long2 __ovld __cnfn convert_long2_sat(float2);
1441ulong2 __ovld __cnfn convert_ulong2_rte(char2);
1442ulong2 __ovld __cnfn convert_ulong2_sat_rte(char2);
1443ulong2 __ovld __cnfn convert_ulong2_rtz(char2);
1444ulong2 __ovld __cnfn convert_ulong2_sat_rtz(char2);
1445ulong2 __ovld __cnfn convert_ulong2_rtp(char2);
1446ulong2 __ovld __cnfn convert_ulong2_sat_rtp(char2);
1447ulong2 __ovld __cnfn convert_ulong2_rtn(char2);
1448ulong2 __ovld __cnfn convert_ulong2_sat_rtn(char2);
1449ulong2 __ovld __cnfn convert_ulong2(char2);
1450ulong2 __ovld __cnfn convert_ulong2_sat(char2);
1451ulong2 __ovld __cnfn convert_ulong2_rte(uchar2);
1452ulong2 __ovld __cnfn convert_ulong2_sat_rte(uchar2);
1453ulong2 __ovld __cnfn convert_ulong2_rtz(uchar2);
1454ulong2 __ovld __cnfn convert_ulong2_sat_rtz(uchar2);
1455ulong2 __ovld __cnfn convert_ulong2_rtp(uchar2);
1456ulong2 __ovld __cnfn convert_ulong2_sat_rtp(uchar2);
1457ulong2 __ovld __cnfn convert_ulong2_rtn(uchar2);
1458ulong2 __ovld __cnfn convert_ulong2_sat_rtn(uchar2);
1459ulong2 __ovld __cnfn convert_ulong2(uchar2);
1460ulong2 __ovld __cnfn convert_ulong2_sat(uchar2);
1461ulong2 __ovld __cnfn convert_ulong2_rte(short2);
1462ulong2 __ovld __cnfn convert_ulong2_sat_rte(short2);
1463ulong2 __ovld __cnfn convert_ulong2_rtz(short2);
1464ulong2 __ovld __cnfn convert_ulong2_sat_rtz(short2);
1465ulong2 __ovld __cnfn convert_ulong2_rtp(short2);
1466ulong2 __ovld __cnfn convert_ulong2_sat_rtp(short2);
1467ulong2 __ovld __cnfn convert_ulong2_rtn(short2);
1468ulong2 __ovld __cnfn convert_ulong2_sat_rtn(short2);
1469ulong2 __ovld __cnfn convert_ulong2(short2);
1470ulong2 __ovld __cnfn convert_ulong2_sat(short2);
1471ulong2 __ovld __cnfn convert_ulong2_rte(ushort2);
1472ulong2 __ovld __cnfn convert_ulong2_sat_rte(ushort2);
1473ulong2 __ovld __cnfn convert_ulong2_rtz(ushort2);
1474ulong2 __ovld __cnfn convert_ulong2_sat_rtz(ushort2);
1475ulong2 __ovld __cnfn convert_ulong2_rtp(ushort2);
1476ulong2 __ovld __cnfn convert_ulong2_sat_rtp(ushort2);
1477ulong2 __ovld __cnfn convert_ulong2_rtn(ushort2);
1478ulong2 __ovld __cnfn convert_ulong2_sat_rtn(ushort2);
1479ulong2 __ovld __cnfn convert_ulong2(ushort2);
1480ulong2 __ovld __cnfn convert_ulong2_sat(ushort2);
1481ulong2 __ovld __cnfn convert_ulong2_rte(int2);
1482ulong2 __ovld __cnfn convert_ulong2_sat_rte(int2);
1483ulong2 __ovld __cnfn convert_ulong2_rtz(int2);
1484ulong2 __ovld __cnfn convert_ulong2_sat_rtz(int2);
1485ulong2 __ovld __cnfn convert_ulong2_rtp(int2);
1486ulong2 __ovld __cnfn convert_ulong2_sat_rtp(int2);
1487ulong2 __ovld __cnfn convert_ulong2_rtn(int2);
1488ulong2 __ovld __cnfn convert_ulong2_sat_rtn(int2);
1489ulong2 __ovld __cnfn convert_ulong2(int2);
1490ulong2 __ovld __cnfn convert_ulong2_sat(int2);
1491ulong2 __ovld __cnfn convert_ulong2_rte(uint2);
1492ulong2 __ovld __cnfn convert_ulong2_sat_rte(uint2);
1493ulong2 __ovld __cnfn convert_ulong2_rtz(uint2);
1494ulong2 __ovld __cnfn convert_ulong2_sat_rtz(uint2);
1495ulong2 __ovld __cnfn convert_ulong2_rtp(uint2);
1496ulong2 __ovld __cnfn convert_ulong2_sat_rtp(uint2);
1497ulong2 __ovld __cnfn convert_ulong2_rtn(uint2);
1498ulong2 __ovld __cnfn convert_ulong2_sat_rtn(uint2);
1499ulong2 __ovld __cnfn convert_ulong2(uint2);
1500ulong2 __ovld __cnfn convert_ulong2_sat(uint2);
1501ulong2 __ovld __cnfn convert_ulong2_rte(long2);
1502ulong2 __ovld __cnfn convert_ulong2_sat_rte(long2);
1503ulong2 __ovld __cnfn convert_ulong2_rtz(long2);
1504ulong2 __ovld __cnfn convert_ulong2_sat_rtz(long2);
1505ulong2 __ovld __cnfn convert_ulong2_rtp(long2);
1506ulong2 __ovld __cnfn convert_ulong2_sat_rtp(long2);
1507ulong2 __ovld __cnfn convert_ulong2_rtn(long2);
1508ulong2 __ovld __cnfn convert_ulong2_sat_rtn(long2);
1509ulong2 __ovld __cnfn convert_ulong2(long2);
1510ulong2 __ovld __cnfn convert_ulong2_sat(long2);
1511ulong2 __ovld __cnfn convert_ulong2_rte(ulong2);
1512ulong2 __ovld __cnfn convert_ulong2_sat_rte(ulong2);
1513ulong2 __ovld __cnfn convert_ulong2_rtz(ulong2);
1514ulong2 __ovld __cnfn convert_ulong2_sat_rtz(ulong2);
1515ulong2 __ovld __cnfn convert_ulong2_rtp(ulong2);
1516ulong2 __ovld __cnfn convert_ulong2_sat_rtp(ulong2);
1517ulong2 __ovld __cnfn convert_ulong2_rtn(ulong2);
1518ulong2 __ovld __cnfn convert_ulong2_sat_rtn(ulong2);
1519ulong2 __ovld __cnfn convert_ulong2(ulong2);
1520ulong2 __ovld __cnfn convert_ulong2_sat(ulong2);
1521ulong2 __ovld __cnfn convert_ulong2_rte(float2);
1522ulong2 __ovld __cnfn convert_ulong2_sat_rte(float2);
1523ulong2 __ovld __cnfn convert_ulong2_rtz(float2);
1524ulong2 __ovld __cnfn convert_ulong2_sat_rtz(float2);
1525ulong2 __ovld __cnfn convert_ulong2_rtp(float2);
1526ulong2 __ovld __cnfn convert_ulong2_sat_rtp(float2);
1527ulong2 __ovld __cnfn convert_ulong2_rtn(float2);
1528ulong2 __ovld __cnfn convert_ulong2_sat_rtn(float2);
1529ulong2 __ovld __cnfn convert_ulong2(float2);
1530ulong2 __ovld __cnfn convert_ulong2_sat(float2);
1531float2 __ovld __cnfn convert_float2_rte(char2);
1532float2 __ovld __cnfn convert_float2_rtz(char2);
1533float2 __ovld __cnfn convert_float2_rtp(char2);
1534float2 __ovld __cnfn convert_float2_rtn(char2);
1535float2 __ovld __cnfn convert_float2(char2);
1536float2 __ovld __cnfn convert_float2_rte(uchar2);
1537float2 __ovld __cnfn convert_float2_rtz(uchar2);
1538float2 __ovld __cnfn convert_float2_rtp(uchar2);
1539float2 __ovld __cnfn convert_float2_rtn(uchar2);
1540float2 __ovld __cnfn convert_float2(uchar2);
1541float2 __ovld __cnfn convert_float2_rte(short2);
1542float2 __ovld __cnfn convert_float2_rtz(short2);
1543float2 __ovld __cnfn convert_float2_rtp(short2);
1544float2 __ovld __cnfn convert_float2_rtn(short2);
1545float2 __ovld __cnfn convert_float2(short2);
1546float2 __ovld __cnfn convert_float2_rte(ushort2);
1547float2 __ovld __cnfn convert_float2_rtz(ushort2);
1548float2 __ovld __cnfn convert_float2_rtp(ushort2);
1549float2 __ovld __cnfn convert_float2_rtn(ushort2);
1550float2 __ovld __cnfn convert_float2(ushort2);
1551float2 __ovld __cnfn convert_float2_rte(int2);
1552float2 __ovld __cnfn convert_float2_rtz(int2);
1553float2 __ovld __cnfn convert_float2_rtp(int2);
1554float2 __ovld __cnfn convert_float2_rtn(int2);
1555float2 __ovld __cnfn convert_float2(int2);
1556float2 __ovld __cnfn convert_float2_rte(uint2);
1557float2 __ovld __cnfn convert_float2_rtz(uint2);
1558float2 __ovld __cnfn convert_float2_rtp(uint2);
1559float2 __ovld __cnfn convert_float2_rtn(uint2);
1560float2 __ovld __cnfn convert_float2(uint2);
1561float2 __ovld __cnfn convert_float2_rte(long2);
1562float2 __ovld __cnfn convert_float2_rtz(long2);
1563float2 __ovld __cnfn convert_float2_rtp(long2);
1564float2 __ovld __cnfn convert_float2_rtn(long2);
1565float2 __ovld __cnfn convert_float2(long2);
1566float2 __ovld __cnfn convert_float2_rte(ulong2);
1567float2 __ovld __cnfn convert_float2_rtz(ulong2);
1568float2 __ovld __cnfn convert_float2_rtp(ulong2);
1569float2 __ovld __cnfn convert_float2_rtn(ulong2);
1570float2 __ovld __cnfn convert_float2(ulong2);
1571float2 __ovld __cnfn convert_float2_rte(float2);
1572float2 __ovld __cnfn convert_float2_rtz(float2);
1573float2 __ovld __cnfn convert_float2_rtp(float2);
1574float2 __ovld __cnfn convert_float2_rtn(float2);
1575float2 __ovld __cnfn convert_float2(float2);
1576char3 __ovld __cnfn convert_char3_rte(char3);
1577char3 __ovld __cnfn convert_char3_sat_rte(char3);
1578char3 __ovld __cnfn convert_char3_rtz(char3);
1579char3 __ovld __cnfn convert_char3_sat_rtz(char3);
1580char3 __ovld __cnfn convert_char3_rtp(char3);
1581char3 __ovld __cnfn convert_char3_sat_rtp(char3);
1582char3 __ovld __cnfn convert_char3_rtn(char3);
1583char3 __ovld __cnfn convert_char3_sat_rtn(char3);
1584char3 __ovld __cnfn convert_char3(char3);
1585char3 __ovld __cnfn convert_char3_sat(char3);
1586char3 __ovld __cnfn convert_char3_rte(uchar3);
1587char3 __ovld __cnfn convert_char3_sat_rte(uchar3);
1588char3 __ovld __cnfn convert_char3_rtz(uchar3);
1589char3 __ovld __cnfn convert_char3_sat_rtz(uchar3);
1590char3 __ovld __cnfn convert_char3_rtp(uchar3);
1591char3 __ovld __cnfn convert_char3_sat_rtp(uchar3);
1592char3 __ovld __cnfn convert_char3_rtn(uchar3);
1593char3 __ovld __cnfn convert_char3_sat_rtn(uchar3);
1594char3 __ovld __cnfn convert_char3(uchar3);
1595char3 __ovld __cnfn convert_char3_sat(uchar3);
1596char3 __ovld __cnfn convert_char3_rte(short3);
1597char3 __ovld __cnfn convert_char3_sat_rte(short3);
1598char3 __ovld __cnfn convert_char3_rtz(short3);
1599char3 __ovld __cnfn convert_char3_sat_rtz(short3);
1600char3 __ovld __cnfn convert_char3_rtp(short3);
1601char3 __ovld __cnfn convert_char3_sat_rtp(short3);
1602char3 __ovld __cnfn convert_char3_rtn(short3);
1603char3 __ovld __cnfn convert_char3_sat_rtn(short3);
1604char3 __ovld __cnfn convert_char3(short3);
1605char3 __ovld __cnfn convert_char3_sat(short3);
1606char3 __ovld __cnfn convert_char3_rte(ushort3);
1607char3 __ovld __cnfn convert_char3_sat_rte(ushort3);
1608char3 __ovld __cnfn convert_char3_rtz(ushort3);
1609char3 __ovld __cnfn convert_char3_sat_rtz(ushort3);
1610char3 __ovld __cnfn convert_char3_rtp(ushort3);
1611char3 __ovld __cnfn convert_char3_sat_rtp(ushort3);
1612char3 __ovld __cnfn convert_char3_rtn(ushort3);
1613char3 __ovld __cnfn convert_char3_sat_rtn(ushort3);
1614char3 __ovld __cnfn convert_char3(ushort3);
1615char3 __ovld __cnfn convert_char3_sat(ushort3);
1616char3 __ovld __cnfn convert_char3_rte(int3);
1617char3 __ovld __cnfn convert_char3_sat_rte(int3);
1618char3 __ovld __cnfn convert_char3_rtz(int3);
1619char3 __ovld __cnfn convert_char3_sat_rtz(int3);
1620char3 __ovld __cnfn convert_char3_rtp(int3);
1621char3 __ovld __cnfn convert_char3_sat_rtp(int3);
1622char3 __ovld __cnfn convert_char3_rtn(int3);
1623char3 __ovld __cnfn convert_char3_sat_rtn(int3);
1624char3 __ovld __cnfn convert_char3(int3);
1625char3 __ovld __cnfn convert_char3_sat(int3);
1626char3 __ovld __cnfn convert_char3_rte(uint3);
1627char3 __ovld __cnfn convert_char3_sat_rte(uint3);
1628char3 __ovld __cnfn convert_char3_rtz(uint3);
1629char3 __ovld __cnfn convert_char3_sat_rtz(uint3);
1630char3 __ovld __cnfn convert_char3_rtp(uint3);
1631char3 __ovld __cnfn convert_char3_sat_rtp(uint3);
1632char3 __ovld __cnfn convert_char3_rtn(uint3);
1633char3 __ovld __cnfn convert_char3_sat_rtn(uint3);
1634char3 __ovld __cnfn convert_char3(uint3);
1635char3 __ovld __cnfn convert_char3_sat(uint3);
1636char3 __ovld __cnfn convert_char3_rte(long3);
1637char3 __ovld __cnfn convert_char3_sat_rte(long3);
1638char3 __ovld __cnfn convert_char3_rtz(long3);
1639char3 __ovld __cnfn convert_char3_sat_rtz(long3);
1640char3 __ovld __cnfn convert_char3_rtp(long3);
1641char3 __ovld __cnfn convert_char3_sat_rtp(long3);
1642char3 __ovld __cnfn convert_char3_rtn(long3);
1643char3 __ovld __cnfn convert_char3_sat_rtn(long3);
1644char3 __ovld __cnfn convert_char3(long3);
1645char3 __ovld __cnfn convert_char3_sat(long3);
1646char3 __ovld __cnfn convert_char3_rte(ulong3);
1647char3 __ovld __cnfn convert_char3_sat_rte(ulong3);
1648char3 __ovld __cnfn convert_char3_rtz(ulong3);
1649char3 __ovld __cnfn convert_char3_sat_rtz(ulong3);
1650char3 __ovld __cnfn convert_char3_rtp(ulong3);
1651char3 __ovld __cnfn convert_char3_sat_rtp(ulong3);
1652char3 __ovld __cnfn convert_char3_rtn(ulong3);
1653char3 __ovld __cnfn convert_char3_sat_rtn(ulong3);
1654char3 __ovld __cnfn convert_char3(ulong3);
1655char3 __ovld __cnfn convert_char3_sat(ulong3);
1656char3 __ovld __cnfn convert_char3_rte(float3);
1657char3 __ovld __cnfn convert_char3_sat_rte(float3);
1658char3 __ovld __cnfn convert_char3_rtz(float3);
1659char3 __ovld __cnfn convert_char3_sat_rtz(float3);
1660char3 __ovld __cnfn convert_char3_rtp(float3);
1661char3 __ovld __cnfn convert_char3_sat_rtp(float3);
1662char3 __ovld __cnfn convert_char3_rtn(float3);
1663char3 __ovld __cnfn convert_char3_sat_rtn(float3);
1664char3 __ovld __cnfn convert_char3(float3);
1665char3 __ovld __cnfn convert_char3_sat(float3);
1666uchar3 __ovld __cnfn convert_uchar3_rte(char3);
1667uchar3 __ovld __cnfn convert_uchar3_sat_rte(char3);
1668uchar3 __ovld __cnfn convert_uchar3_rtz(char3);
1669uchar3 __ovld __cnfn convert_uchar3_sat_rtz(char3);
1670uchar3 __ovld __cnfn convert_uchar3_rtp(char3);
1671uchar3 __ovld __cnfn convert_uchar3_sat_rtp(char3);
1672uchar3 __ovld __cnfn convert_uchar3_rtn(char3);
1673uchar3 __ovld __cnfn convert_uchar3_sat_rtn(char3);
1674uchar3 __ovld __cnfn convert_uchar3(char3);
1675uchar3 __ovld __cnfn convert_uchar3_sat(char3);
1676uchar3 __ovld __cnfn convert_uchar3_rte(uchar3);
1677uchar3 __ovld __cnfn convert_uchar3_sat_rte(uchar3);
1678uchar3 __ovld __cnfn convert_uchar3_rtz(uchar3);
1679uchar3 __ovld __cnfn convert_uchar3_sat_rtz(uchar3);
1680uchar3 __ovld __cnfn convert_uchar3_rtp(uchar3);
1681uchar3 __ovld __cnfn convert_uchar3_sat_rtp(uchar3);
1682uchar3 __ovld __cnfn convert_uchar3_rtn(uchar3);
1683uchar3 __ovld __cnfn convert_uchar3_sat_rtn(uchar3);
1684uchar3 __ovld __cnfn convert_uchar3(uchar3);
1685uchar3 __ovld __cnfn convert_uchar3_sat(uchar3);
1686uchar3 __ovld __cnfn convert_uchar3_rte(short3);
1687uchar3 __ovld __cnfn convert_uchar3_sat_rte(short3);
1688uchar3 __ovld __cnfn convert_uchar3_rtz(short3);
1689uchar3 __ovld __cnfn convert_uchar3_sat_rtz(short3);
1690uchar3 __ovld __cnfn convert_uchar3_rtp(short3);
1691uchar3 __ovld __cnfn convert_uchar3_sat_rtp(short3);
1692uchar3 __ovld __cnfn convert_uchar3_rtn(short3);
1693uchar3 __ovld __cnfn convert_uchar3_sat_rtn(short3);
1694uchar3 __ovld __cnfn convert_uchar3(short3);
1695uchar3 __ovld __cnfn convert_uchar3_sat(short3);
1696uchar3 __ovld __cnfn convert_uchar3_rte(ushort3);
1697uchar3 __ovld __cnfn convert_uchar3_sat_rte(ushort3);
1698uchar3 __ovld __cnfn convert_uchar3_rtz(ushort3);
1699uchar3 __ovld __cnfn convert_uchar3_sat_rtz(ushort3);
1700uchar3 __ovld __cnfn convert_uchar3_rtp(ushort3);
1701uchar3 __ovld __cnfn convert_uchar3_sat_rtp(ushort3);
1702uchar3 __ovld __cnfn convert_uchar3_rtn(ushort3);
1703uchar3 __ovld __cnfn convert_uchar3_sat_rtn(ushort3);
1704uchar3 __ovld __cnfn convert_uchar3(ushort3);
1705uchar3 __ovld __cnfn convert_uchar3_sat(ushort3);
1706uchar3 __ovld __cnfn convert_uchar3_rte(int3);
1707uchar3 __ovld __cnfn convert_uchar3_sat_rte(int3);
1708uchar3 __ovld __cnfn convert_uchar3_rtz(int3);
1709uchar3 __ovld __cnfn convert_uchar3_sat_rtz(int3);
1710uchar3 __ovld __cnfn convert_uchar3_rtp(int3);
1711uchar3 __ovld __cnfn convert_uchar3_sat_rtp(int3);
1712uchar3 __ovld __cnfn convert_uchar3_rtn(int3);
1713uchar3 __ovld __cnfn convert_uchar3_sat_rtn(int3);
1714uchar3 __ovld __cnfn convert_uchar3(int3);
1715uchar3 __ovld __cnfn convert_uchar3_sat(int3);
1716uchar3 __ovld __cnfn convert_uchar3_rte(uint3);
1717uchar3 __ovld __cnfn convert_uchar3_sat_rte(uint3);
1718uchar3 __ovld __cnfn convert_uchar3_rtz(uint3);
1719uchar3 __ovld __cnfn convert_uchar3_sat_rtz(uint3);
1720uchar3 __ovld __cnfn convert_uchar3_rtp(uint3);
1721uchar3 __ovld __cnfn convert_uchar3_sat_rtp(uint3);
1722uchar3 __ovld __cnfn convert_uchar3_rtn(uint3);
1723uchar3 __ovld __cnfn convert_uchar3_sat_rtn(uint3);
1724uchar3 __ovld __cnfn convert_uchar3(uint3);
1725uchar3 __ovld __cnfn convert_uchar3_sat(uint3);
1726uchar3 __ovld __cnfn convert_uchar3_rte(long3);
1727uchar3 __ovld __cnfn convert_uchar3_sat_rte(long3);
1728uchar3 __ovld __cnfn convert_uchar3_rtz(long3);
1729uchar3 __ovld __cnfn convert_uchar3_sat_rtz(long3);
1730uchar3 __ovld __cnfn convert_uchar3_rtp(long3);
1731uchar3 __ovld __cnfn convert_uchar3_sat_rtp(long3);
1732uchar3 __ovld __cnfn convert_uchar3_rtn(long3);
1733uchar3 __ovld __cnfn convert_uchar3_sat_rtn(long3);
1734uchar3 __ovld __cnfn convert_uchar3(long3);
1735uchar3 __ovld __cnfn convert_uchar3_sat(long3);
1736uchar3 __ovld __cnfn convert_uchar3_rte(ulong3);
1737uchar3 __ovld __cnfn convert_uchar3_sat_rte(ulong3);
1738uchar3 __ovld __cnfn convert_uchar3_rtz(ulong3);
1739uchar3 __ovld __cnfn convert_uchar3_sat_rtz(ulong3);
1740uchar3 __ovld __cnfn convert_uchar3_rtp(ulong3);
1741uchar3 __ovld __cnfn convert_uchar3_sat_rtp(ulong3);
1742uchar3 __ovld __cnfn convert_uchar3_rtn(ulong3);
1743uchar3 __ovld __cnfn convert_uchar3_sat_rtn(ulong3);
1744uchar3 __ovld __cnfn convert_uchar3(ulong3);
1745uchar3 __ovld __cnfn convert_uchar3_sat(ulong3);
1746uchar3 __ovld __cnfn convert_uchar3_rte(float3);
1747uchar3 __ovld __cnfn convert_uchar3_sat_rte(float3);
1748uchar3 __ovld __cnfn convert_uchar3_rtz(float3);
1749uchar3 __ovld __cnfn convert_uchar3_sat_rtz(float3);
1750uchar3 __ovld __cnfn convert_uchar3_rtp(float3);
1751uchar3 __ovld __cnfn convert_uchar3_sat_rtp(float3);
1752uchar3 __ovld __cnfn convert_uchar3_rtn(float3);
1753uchar3 __ovld __cnfn convert_uchar3_sat_rtn(float3);
1754uchar3 __ovld __cnfn convert_uchar3(float3);
1755uchar3 __ovld __cnfn convert_uchar3_sat(float3);
1756short3 __ovld __cnfn convert_short3_rte(char3);
1757short3 __ovld __cnfn convert_short3_sat_rte(char3);
1758short3 __ovld __cnfn convert_short3_rtz(char3);
1759short3 __ovld __cnfn convert_short3_sat_rtz(char3);
1760short3 __ovld __cnfn convert_short3_rtp(char3);
1761short3 __ovld __cnfn convert_short3_sat_rtp(char3);
1762short3 __ovld __cnfn convert_short3_rtn(char3);
1763short3 __ovld __cnfn convert_short3_sat_rtn(char3);
1764short3 __ovld __cnfn convert_short3(char3);
1765short3 __ovld __cnfn convert_short3_sat(char3);
1766short3 __ovld __cnfn convert_short3_rte(uchar3);
1767short3 __ovld __cnfn convert_short3_sat_rte(uchar3);
1768short3 __ovld __cnfn convert_short3_rtz(uchar3);
1769short3 __ovld __cnfn convert_short3_sat_rtz(uchar3);
1770short3 __ovld __cnfn convert_short3_rtp(uchar3);
1771short3 __ovld __cnfn convert_short3_sat_rtp(uchar3);
1772short3 __ovld __cnfn convert_short3_rtn(uchar3);
1773short3 __ovld __cnfn convert_short3_sat_rtn(uchar3);
1774short3 __ovld __cnfn convert_short3(uchar3);
1775short3 __ovld __cnfn convert_short3_sat(uchar3);
1776short3 __ovld __cnfn convert_short3_rte(short3);
1777short3 __ovld __cnfn convert_short3_sat_rte(short3);
1778short3 __ovld __cnfn convert_short3_rtz(short3);
1779short3 __ovld __cnfn convert_short3_sat_rtz(short3);
1780short3 __ovld __cnfn convert_short3_rtp(short3);
1781short3 __ovld __cnfn convert_short3_sat_rtp(short3);
1782short3 __ovld __cnfn convert_short3_rtn(short3);
1783short3 __ovld __cnfn convert_short3_sat_rtn(short3);
1784short3 __ovld __cnfn convert_short3(short3);
1785short3 __ovld __cnfn convert_short3_sat(short3);
1786short3 __ovld __cnfn convert_short3_rte(ushort3);
1787short3 __ovld __cnfn convert_short3_sat_rte(ushort3);
1788short3 __ovld __cnfn convert_short3_rtz(ushort3);
1789short3 __ovld __cnfn convert_short3_sat_rtz(ushort3);
1790short3 __ovld __cnfn convert_short3_rtp(ushort3);
1791short3 __ovld __cnfn convert_short3_sat_rtp(ushort3);
1792short3 __ovld __cnfn convert_short3_rtn(ushort3);
1793short3 __ovld __cnfn convert_short3_sat_rtn(ushort3);
1794short3 __ovld __cnfn convert_short3(ushort3);
1795short3 __ovld __cnfn convert_short3_sat(ushort3);
1796short3 __ovld __cnfn convert_short3_rte(int3);
1797short3 __ovld __cnfn convert_short3_sat_rte(int3);
1798short3 __ovld __cnfn convert_short3_rtz(int3);
1799short3 __ovld __cnfn convert_short3_sat_rtz(int3);
1800short3 __ovld __cnfn convert_short3_rtp(int3);
1801short3 __ovld __cnfn convert_short3_sat_rtp(int3);
1802short3 __ovld __cnfn convert_short3_rtn(int3);
1803short3 __ovld __cnfn convert_short3_sat_rtn(int3);
1804short3 __ovld __cnfn convert_short3(int3);
1805short3 __ovld __cnfn convert_short3_sat(int3);
1806short3 __ovld __cnfn convert_short3_rte(uint3);
1807short3 __ovld __cnfn convert_short3_sat_rte(uint3);
1808short3 __ovld __cnfn convert_short3_rtz(uint3);
1809short3 __ovld __cnfn convert_short3_sat_rtz(uint3);
1810short3 __ovld __cnfn convert_short3_rtp(uint3);
1811short3 __ovld __cnfn convert_short3_sat_rtp(uint3);
1812short3 __ovld __cnfn convert_short3_rtn(uint3);
1813short3 __ovld __cnfn convert_short3_sat_rtn(uint3);
1814short3 __ovld __cnfn convert_short3(uint3);
1815short3 __ovld __cnfn convert_short3_sat(uint3);
1816short3 __ovld __cnfn convert_short3_rte(long3);
1817short3 __ovld __cnfn convert_short3_sat_rte(long3);
1818short3 __ovld __cnfn convert_short3_rtz(long3);
1819short3 __ovld __cnfn convert_short3_sat_rtz(long3);
1820short3 __ovld __cnfn convert_short3_rtp(long3);
1821short3 __ovld __cnfn convert_short3_sat_rtp(long3);
1822short3 __ovld __cnfn convert_short3_rtn(long3);
1823short3 __ovld __cnfn convert_short3_sat_rtn(long3);
1824short3 __ovld __cnfn convert_short3(long3);
1825short3 __ovld __cnfn convert_short3_sat(long3);
1826short3 __ovld __cnfn convert_short3_rte(ulong3);
1827short3 __ovld __cnfn convert_short3_sat_rte(ulong3);
1828short3 __ovld __cnfn convert_short3_rtz(ulong3);
1829short3 __ovld __cnfn convert_short3_sat_rtz(ulong3);
1830short3 __ovld __cnfn convert_short3_rtp(ulong3);
1831short3 __ovld __cnfn convert_short3_sat_rtp(ulong3);
1832short3 __ovld __cnfn convert_short3_rtn(ulong3);
1833short3 __ovld __cnfn convert_short3_sat_rtn(ulong3);
1834short3 __ovld __cnfn convert_short3(ulong3);
1835short3 __ovld __cnfn convert_short3_sat(ulong3);
1836short3 __ovld __cnfn convert_short3_rte(float3);
1837short3 __ovld __cnfn convert_short3_sat_rte(float3);
1838short3 __ovld __cnfn convert_short3_rtz(float3);
1839short3 __ovld __cnfn convert_short3_sat_rtz(float3);
1840short3 __ovld __cnfn convert_short3_rtp(float3);
1841short3 __ovld __cnfn convert_short3_sat_rtp(float3);
1842short3 __ovld __cnfn convert_short3_rtn(float3);
1843short3 __ovld __cnfn convert_short3_sat_rtn(float3);
1844short3 __ovld __cnfn convert_short3(float3);
1845short3 __ovld __cnfn convert_short3_sat(float3);
1846ushort3 __ovld __cnfn convert_ushort3_rte(char3);
1847ushort3 __ovld __cnfn convert_ushort3_sat_rte(char3);
1848ushort3 __ovld __cnfn convert_ushort3_rtz(char3);
1849ushort3 __ovld __cnfn convert_ushort3_sat_rtz(char3);
1850ushort3 __ovld __cnfn convert_ushort3_rtp(char3);
1851ushort3 __ovld __cnfn convert_ushort3_sat_rtp(char3);
1852ushort3 __ovld __cnfn convert_ushort3_rtn(char3);
1853ushort3 __ovld __cnfn convert_ushort3_sat_rtn(char3);
1854ushort3 __ovld __cnfn convert_ushort3(char3);
1855ushort3 __ovld __cnfn convert_ushort3_sat(char3);
1856ushort3 __ovld __cnfn convert_ushort3_rte(uchar3);
1857ushort3 __ovld __cnfn convert_ushort3_sat_rte(uchar3);
1858ushort3 __ovld __cnfn convert_ushort3_rtz(uchar3);
1859ushort3 __ovld __cnfn convert_ushort3_sat_rtz(uchar3);
1860ushort3 __ovld __cnfn convert_ushort3_rtp(uchar3);
1861ushort3 __ovld __cnfn convert_ushort3_sat_rtp(uchar3);
1862ushort3 __ovld __cnfn convert_ushort3_rtn(uchar3);
1863ushort3 __ovld __cnfn convert_ushort3_sat_rtn(uchar3);
1864ushort3 __ovld __cnfn convert_ushort3(uchar3);
1865ushort3 __ovld __cnfn convert_ushort3_sat(uchar3);
1866ushort3 __ovld __cnfn convert_ushort3_rte(short3);
1867ushort3 __ovld __cnfn convert_ushort3_sat_rte(short3);
1868ushort3 __ovld __cnfn convert_ushort3_rtz(short3);
1869ushort3 __ovld __cnfn convert_ushort3_sat_rtz(short3);
1870ushort3 __ovld __cnfn convert_ushort3_rtp(short3);
1871ushort3 __ovld __cnfn convert_ushort3_sat_rtp(short3);
1872ushort3 __ovld __cnfn convert_ushort3_rtn(short3);
1873ushort3 __ovld __cnfn convert_ushort3_sat_rtn(short3);
1874ushort3 __ovld __cnfn convert_ushort3(short3);
1875ushort3 __ovld __cnfn convert_ushort3_sat(short3);
1876ushort3 __ovld __cnfn convert_ushort3_rte(ushort3);
1877ushort3 __ovld __cnfn convert_ushort3_sat_rte(ushort3);
1878ushort3 __ovld __cnfn convert_ushort3_rtz(ushort3);
1879ushort3 __ovld __cnfn convert_ushort3_sat_rtz(ushort3);
1880ushort3 __ovld __cnfn convert_ushort3_rtp(ushort3);
1881ushort3 __ovld __cnfn convert_ushort3_sat_rtp(ushort3);
1882ushort3 __ovld __cnfn convert_ushort3_rtn(ushort3);
1883ushort3 __ovld __cnfn convert_ushort3_sat_rtn(ushort3);
1884ushort3 __ovld __cnfn convert_ushort3(ushort3);
1885ushort3 __ovld __cnfn convert_ushort3_sat(ushort3);
1886ushort3 __ovld __cnfn convert_ushort3_rte(int3);
1887ushort3 __ovld __cnfn convert_ushort3_sat_rte(int3);
1888ushort3 __ovld __cnfn convert_ushort3_rtz(int3);
1889ushort3 __ovld __cnfn convert_ushort3_sat_rtz(int3);
1890ushort3 __ovld __cnfn convert_ushort3_rtp(int3);
1891ushort3 __ovld __cnfn convert_ushort3_sat_rtp(int3);
1892ushort3 __ovld __cnfn convert_ushort3_rtn(int3);
1893ushort3 __ovld __cnfn convert_ushort3_sat_rtn(int3);
1894ushort3 __ovld __cnfn convert_ushort3(int3);
1895ushort3 __ovld __cnfn convert_ushort3_sat(int3);
1896ushort3 __ovld __cnfn convert_ushort3_rte(uint3);
1897ushort3 __ovld __cnfn convert_ushort3_sat_rte(uint3);
1898ushort3 __ovld __cnfn convert_ushort3_rtz(uint3);
1899ushort3 __ovld __cnfn convert_ushort3_sat_rtz(uint3);
1900ushort3 __ovld __cnfn convert_ushort3_rtp(uint3);
1901ushort3 __ovld __cnfn convert_ushort3_sat_rtp(uint3);
1902ushort3 __ovld __cnfn convert_ushort3_rtn(uint3);
1903ushort3 __ovld __cnfn convert_ushort3_sat_rtn(uint3);
1904ushort3 __ovld __cnfn convert_ushort3(uint3);
1905ushort3 __ovld __cnfn convert_ushort3_sat(uint3);
1906ushort3 __ovld __cnfn convert_ushort3_rte(long3);
1907ushort3 __ovld __cnfn convert_ushort3_sat_rte(long3);
1908ushort3 __ovld __cnfn convert_ushort3_rtz(long3);
1909ushort3 __ovld __cnfn convert_ushort3_sat_rtz(long3);
1910ushort3 __ovld __cnfn convert_ushort3_rtp(long3);
1911ushort3 __ovld __cnfn convert_ushort3_sat_rtp(long3);
1912ushort3 __ovld __cnfn convert_ushort3_rtn(long3);
1913ushort3 __ovld __cnfn convert_ushort3_sat_rtn(long3);
1914ushort3 __ovld __cnfn convert_ushort3(long3);
1915ushort3 __ovld __cnfn convert_ushort3_sat(long3);
1916ushort3 __ovld __cnfn convert_ushort3_rte(ulong3);
1917ushort3 __ovld __cnfn convert_ushort3_sat_rte(ulong3);
1918ushort3 __ovld __cnfn convert_ushort3_rtz(ulong3);
1919ushort3 __ovld __cnfn convert_ushort3_sat_rtz(ulong3);
1920ushort3 __ovld __cnfn convert_ushort3_rtp(ulong3);
1921ushort3 __ovld __cnfn convert_ushort3_sat_rtp(ulong3);
1922ushort3 __ovld __cnfn convert_ushort3_rtn(ulong3);
1923ushort3 __ovld __cnfn convert_ushort3_sat_rtn(ulong3);
1924ushort3 __ovld __cnfn convert_ushort3(ulong3);
1925ushort3 __ovld __cnfn convert_ushort3_sat(ulong3);
1926ushort3 __ovld __cnfn convert_ushort3_rte(float3);
1927ushort3 __ovld __cnfn convert_ushort3_sat_rte(float3);
1928ushort3 __ovld __cnfn convert_ushort3_rtz(float3);
1929ushort3 __ovld __cnfn convert_ushort3_sat_rtz(float3);
1930ushort3 __ovld __cnfn convert_ushort3_rtp(float3);
1931ushort3 __ovld __cnfn convert_ushort3_sat_rtp(float3);
1932ushort3 __ovld __cnfn convert_ushort3_rtn(float3);
1933ushort3 __ovld __cnfn convert_ushort3_sat_rtn(float3);
1934ushort3 __ovld __cnfn convert_ushort3(float3);
1935ushort3 __ovld __cnfn convert_ushort3_sat(float3);
1936int3 __ovld __cnfn convert_int3_rte(char3);
1937int3 __ovld __cnfn convert_int3_sat_rte(char3);
1938int3 __ovld __cnfn convert_int3_rtz(char3);
1939int3 __ovld __cnfn convert_int3_sat_rtz(char3);
1940int3 __ovld __cnfn convert_int3_rtp(char3);
1941int3 __ovld __cnfn convert_int3_sat_rtp(char3);
1942int3 __ovld __cnfn convert_int3_rtn(char3);
1943int3 __ovld __cnfn convert_int3_sat_rtn(char3);
1944int3 __ovld __cnfn convert_int3(char3);
1945int3 __ovld __cnfn convert_int3_sat(char3);
1946int3 __ovld __cnfn convert_int3_rte(uchar3);
1947int3 __ovld __cnfn convert_int3_sat_rte(uchar3);
1948int3 __ovld __cnfn convert_int3_rtz(uchar3);
1949int3 __ovld __cnfn convert_int3_sat_rtz(uchar3);
1950int3 __ovld __cnfn convert_int3_rtp(uchar3);
1951int3 __ovld __cnfn convert_int3_sat_rtp(uchar3);
1952int3 __ovld __cnfn convert_int3_rtn(uchar3);
1953int3 __ovld __cnfn convert_int3_sat_rtn(uchar3);
1954int3 __ovld __cnfn convert_int3(uchar3);
1955int3 __ovld __cnfn convert_int3_sat(uchar3);
1956int3 __ovld __cnfn convert_int3_rte(short3);
1957int3 __ovld __cnfn convert_int3_sat_rte(short3);
1958int3 __ovld __cnfn convert_int3_rtz(short3);
1959int3 __ovld __cnfn convert_int3_sat_rtz(short3);
1960int3 __ovld __cnfn convert_int3_rtp(short3);
1961int3 __ovld __cnfn convert_int3_sat_rtp(short3);
1962int3 __ovld __cnfn convert_int3_rtn(short3);
1963int3 __ovld __cnfn convert_int3_sat_rtn(short3);
1964int3 __ovld __cnfn convert_int3(short3);
1965int3 __ovld __cnfn convert_int3_sat(short3);
1966int3 __ovld __cnfn convert_int3_rte(ushort3);
1967int3 __ovld __cnfn convert_int3_sat_rte(ushort3);
1968int3 __ovld __cnfn convert_int3_rtz(ushort3);
1969int3 __ovld __cnfn convert_int3_sat_rtz(ushort3);
1970int3 __ovld __cnfn convert_int3_rtp(ushort3);
1971int3 __ovld __cnfn convert_int3_sat_rtp(ushort3);
1972int3 __ovld __cnfn convert_int3_rtn(ushort3);
1973int3 __ovld __cnfn convert_int3_sat_rtn(ushort3);
1974int3 __ovld __cnfn convert_int3(ushort3);
1975int3 __ovld __cnfn convert_int3_sat(ushort3);
1976int3 __ovld __cnfn convert_int3_rte(int3);
1977int3 __ovld __cnfn convert_int3_sat_rte(int3);
1978int3 __ovld __cnfn convert_int3_rtz(int3);
1979int3 __ovld __cnfn convert_int3_sat_rtz(int3);
1980int3 __ovld __cnfn convert_int3_rtp(int3);
1981int3 __ovld __cnfn convert_int3_sat_rtp(int3);
1982int3 __ovld __cnfn convert_int3_rtn(int3);
1983int3 __ovld __cnfn convert_int3_sat_rtn(int3);
1984int3 __ovld __cnfn convert_int3(int3);
1985int3 __ovld __cnfn convert_int3_sat(int3);
1986int3 __ovld __cnfn convert_int3_rte(uint3);
1987int3 __ovld __cnfn convert_int3_sat_rte(uint3);
1988int3 __ovld __cnfn convert_int3_rtz(uint3);
1989int3 __ovld __cnfn convert_int3_sat_rtz(uint3);
1990int3 __ovld __cnfn convert_int3_rtp(uint3);
1991int3 __ovld __cnfn convert_int3_sat_rtp(uint3);
1992int3 __ovld __cnfn convert_int3_rtn(uint3);
1993int3 __ovld __cnfn convert_int3_sat_rtn(uint3);
1994int3 __ovld __cnfn convert_int3(uint3);
1995int3 __ovld __cnfn convert_int3_sat(uint3);
1996int3 __ovld __cnfn convert_int3_rte(long3);
1997int3 __ovld __cnfn convert_int3_sat_rte(long3);
1998int3 __ovld __cnfn convert_int3_rtz(long3);
1999int3 __ovld __cnfn convert_int3_sat_rtz(long3);
2000int3 __ovld __cnfn convert_int3_rtp(long3);
2001int3 __ovld __cnfn convert_int3_sat_rtp(long3);
2002int3 __ovld __cnfn convert_int3_rtn(long3);
2003int3 __ovld __cnfn convert_int3_sat_rtn(long3);
2004int3 __ovld __cnfn convert_int3(long3);
2005int3 __ovld __cnfn convert_int3_sat(long3);
2006int3 __ovld __cnfn convert_int3_rte(ulong3);
2007int3 __ovld __cnfn convert_int3_sat_rte(ulong3);
2008int3 __ovld __cnfn convert_int3_rtz(ulong3);
2009int3 __ovld __cnfn convert_int3_sat_rtz(ulong3);
2010int3 __ovld __cnfn convert_int3_rtp(ulong3);
2011int3 __ovld __cnfn convert_int3_sat_rtp(ulong3);
2012int3 __ovld __cnfn convert_int3_rtn(ulong3);
2013int3 __ovld __cnfn convert_int3_sat_rtn(ulong3);
2014int3 __ovld __cnfn convert_int3(ulong3);
2015int3 __ovld __cnfn convert_int3_sat(ulong3);
2016int3 __ovld __cnfn convert_int3_rte(float3);
2017int3 __ovld __cnfn convert_int3_sat_rte(float3);
2018int3 __ovld __cnfn convert_int3_rtz(float3);
2019int3 __ovld __cnfn convert_int3_sat_rtz(float3);
2020int3 __ovld __cnfn convert_int3_rtp(float3);
2021int3 __ovld __cnfn convert_int3_sat_rtp(float3);
2022int3 __ovld __cnfn convert_int3_rtn(float3);
2023int3 __ovld __cnfn convert_int3_sat_rtn(float3);
2024int3 __ovld __cnfn convert_int3(float3);
2025int3 __ovld __cnfn convert_int3_sat(float3);
2026uint3 __ovld __cnfn convert_uint3_rte(char3);
2027uint3 __ovld __cnfn convert_uint3_sat_rte(char3);
2028uint3 __ovld __cnfn convert_uint3_rtz(char3);
2029uint3 __ovld __cnfn convert_uint3_sat_rtz(char3);
2030uint3 __ovld __cnfn convert_uint3_rtp(char3);
2031uint3 __ovld __cnfn convert_uint3_sat_rtp(char3);
2032uint3 __ovld __cnfn convert_uint3_rtn(char3);
2033uint3 __ovld __cnfn convert_uint3_sat_rtn(char3);
2034uint3 __ovld __cnfn convert_uint3(char3);
2035uint3 __ovld __cnfn convert_uint3_sat(char3);
2036uint3 __ovld __cnfn convert_uint3_rte(uchar3);
2037uint3 __ovld __cnfn convert_uint3_sat_rte(uchar3);
2038uint3 __ovld __cnfn convert_uint3_rtz(uchar3);
2039uint3 __ovld __cnfn convert_uint3_sat_rtz(uchar3);
2040uint3 __ovld __cnfn convert_uint3_rtp(uchar3);
2041uint3 __ovld __cnfn convert_uint3_sat_rtp(uchar3);
2042uint3 __ovld __cnfn convert_uint3_rtn(uchar3);
2043uint3 __ovld __cnfn convert_uint3_sat_rtn(uchar3);
2044uint3 __ovld __cnfn convert_uint3(uchar3);
2045uint3 __ovld __cnfn convert_uint3_sat(uchar3);
2046uint3 __ovld __cnfn convert_uint3_rte(short3);
2047uint3 __ovld __cnfn convert_uint3_sat_rte(short3);
2048uint3 __ovld __cnfn convert_uint3_rtz(short3);
2049uint3 __ovld __cnfn convert_uint3_sat_rtz(short3);
2050uint3 __ovld __cnfn convert_uint3_rtp(short3);
2051uint3 __ovld __cnfn convert_uint3_sat_rtp(short3);
2052uint3 __ovld __cnfn convert_uint3_rtn(short3);
2053uint3 __ovld __cnfn convert_uint3_sat_rtn(short3);
2054uint3 __ovld __cnfn convert_uint3(short3);
2055uint3 __ovld __cnfn convert_uint3_sat(short3);
2056uint3 __ovld __cnfn convert_uint3_rte(ushort3);
2057uint3 __ovld __cnfn convert_uint3_sat_rte(ushort3);
2058uint3 __ovld __cnfn convert_uint3_rtz(ushort3);
2059uint3 __ovld __cnfn convert_uint3_sat_rtz(ushort3);
2060uint3 __ovld __cnfn convert_uint3_rtp(ushort3);
2061uint3 __ovld __cnfn convert_uint3_sat_rtp(ushort3);
2062uint3 __ovld __cnfn convert_uint3_rtn(ushort3);
2063uint3 __ovld __cnfn convert_uint3_sat_rtn(ushort3);
2064uint3 __ovld __cnfn convert_uint3(ushort3);
2065uint3 __ovld __cnfn convert_uint3_sat(ushort3);
2066uint3 __ovld __cnfn convert_uint3_rte(int3);
2067uint3 __ovld __cnfn convert_uint3_sat_rte(int3);
2068uint3 __ovld __cnfn convert_uint3_rtz(int3);
2069uint3 __ovld __cnfn convert_uint3_sat_rtz(int3);
2070uint3 __ovld __cnfn convert_uint3_rtp(int3);
2071uint3 __ovld __cnfn convert_uint3_sat_rtp(int3);
2072uint3 __ovld __cnfn convert_uint3_rtn(int3);
2073uint3 __ovld __cnfn convert_uint3_sat_rtn(int3);
2074uint3 __ovld __cnfn convert_uint3(int3);
2075uint3 __ovld __cnfn convert_uint3_sat(int3);
2076uint3 __ovld __cnfn convert_uint3_rte(uint3);
2077uint3 __ovld __cnfn convert_uint3_sat_rte(uint3);
2078uint3 __ovld __cnfn convert_uint3_rtz(uint3);
2079uint3 __ovld __cnfn convert_uint3_sat_rtz(uint3);
2080uint3 __ovld __cnfn convert_uint3_rtp(uint3);
2081uint3 __ovld __cnfn convert_uint3_sat_rtp(uint3);
2082uint3 __ovld __cnfn convert_uint3_rtn(uint3);
2083uint3 __ovld __cnfn convert_uint3_sat_rtn(uint3);
2084uint3 __ovld __cnfn convert_uint3(uint3);
2085uint3 __ovld __cnfn convert_uint3_sat(uint3);
2086uint3 __ovld __cnfn convert_uint3_rte(long3);
2087uint3 __ovld __cnfn convert_uint3_sat_rte(long3);
2088uint3 __ovld __cnfn convert_uint3_rtz(long3);
2089uint3 __ovld __cnfn convert_uint3_sat_rtz(long3);
2090uint3 __ovld __cnfn convert_uint3_rtp(long3);
2091uint3 __ovld __cnfn convert_uint3_sat_rtp(long3);
2092uint3 __ovld __cnfn convert_uint3_rtn(long3);
2093uint3 __ovld __cnfn convert_uint3_sat_rtn(long3);
2094uint3 __ovld __cnfn convert_uint3(long3);
2095uint3 __ovld __cnfn convert_uint3_sat(long3);
2096uint3 __ovld __cnfn convert_uint3_rte(ulong3);
2097uint3 __ovld __cnfn convert_uint3_sat_rte(ulong3);
2098uint3 __ovld __cnfn convert_uint3_rtz(ulong3);
2099uint3 __ovld __cnfn convert_uint3_sat_rtz(ulong3);
2100uint3 __ovld __cnfn convert_uint3_rtp(ulong3);
2101uint3 __ovld __cnfn convert_uint3_sat_rtp(ulong3);
2102uint3 __ovld __cnfn convert_uint3_rtn(ulong3);
2103uint3 __ovld __cnfn convert_uint3_sat_rtn(ulong3);
2104uint3 __ovld __cnfn convert_uint3(ulong3);
2105uint3 __ovld __cnfn convert_uint3_sat(ulong3);
2106uint3 __ovld __cnfn convert_uint3_rte(float3);
2107uint3 __ovld __cnfn convert_uint3_sat_rte(float3);
2108uint3 __ovld __cnfn convert_uint3_rtz(float3);
2109uint3 __ovld __cnfn convert_uint3_sat_rtz(float3);
2110uint3 __ovld __cnfn convert_uint3_rtp(float3);
2111uint3 __ovld __cnfn convert_uint3_sat_rtp(float3);
2112uint3 __ovld __cnfn convert_uint3_rtn(float3);
2113uint3 __ovld __cnfn convert_uint3_sat_rtn(float3);
2114uint3 __ovld __cnfn convert_uint3(float3);
2115uint3 __ovld __cnfn convert_uint3_sat(float3);
2116long3 __ovld __cnfn convert_long3_rte(char3);
2117long3 __ovld __cnfn convert_long3_sat_rte(char3);
2118long3 __ovld __cnfn convert_long3_rtz(char3);
2119long3 __ovld __cnfn convert_long3_sat_rtz(char3);
2120long3 __ovld __cnfn convert_long3_rtp(char3);
2121long3 __ovld __cnfn convert_long3_sat_rtp(char3);
2122long3 __ovld __cnfn convert_long3_rtn(char3);
2123long3 __ovld __cnfn convert_long3_sat_rtn(char3);
2124long3 __ovld __cnfn convert_long3(char3);
2125long3 __ovld __cnfn convert_long3_sat(char3);
2126long3 __ovld __cnfn convert_long3_rte(uchar3);
2127long3 __ovld __cnfn convert_long3_sat_rte(uchar3);
2128long3 __ovld __cnfn convert_long3_rtz(uchar3);
2129long3 __ovld __cnfn convert_long3_sat_rtz(uchar3);
2130long3 __ovld __cnfn convert_long3_rtp(uchar3);
2131long3 __ovld __cnfn convert_long3_sat_rtp(uchar3);
2132long3 __ovld __cnfn convert_long3_rtn(uchar3);
2133long3 __ovld __cnfn convert_long3_sat_rtn(uchar3);
2134long3 __ovld __cnfn convert_long3(uchar3);
2135long3 __ovld __cnfn convert_long3_sat(uchar3);
2136long3 __ovld __cnfn convert_long3_rte(short3);
2137long3 __ovld __cnfn convert_long3_sat_rte(short3);
2138long3 __ovld __cnfn convert_long3_rtz(short3);
2139long3 __ovld __cnfn convert_long3_sat_rtz(short3);
2140long3 __ovld __cnfn convert_long3_rtp(short3);
2141long3 __ovld __cnfn convert_long3_sat_rtp(short3);
2142long3 __ovld __cnfn convert_long3_rtn(short3);
2143long3 __ovld __cnfn convert_long3_sat_rtn(short3);
2144long3 __ovld __cnfn convert_long3(short3);
2145long3 __ovld __cnfn convert_long3_sat(short3);
2146long3 __ovld __cnfn convert_long3_rte(ushort3);
2147long3 __ovld __cnfn convert_long3_sat_rte(ushort3);
2148long3 __ovld __cnfn convert_long3_rtz(ushort3);
2149long3 __ovld __cnfn convert_long3_sat_rtz(ushort3);
2150long3 __ovld __cnfn convert_long3_rtp(ushort3);
2151long3 __ovld __cnfn convert_long3_sat_rtp(ushort3);
2152long3 __ovld __cnfn convert_long3_rtn(ushort3);
2153long3 __ovld __cnfn convert_long3_sat_rtn(ushort3);
2154long3 __ovld __cnfn convert_long3(ushort3);
2155long3 __ovld __cnfn convert_long3_sat(ushort3);
2156long3 __ovld __cnfn convert_long3_rte(int3);
2157long3 __ovld __cnfn convert_long3_sat_rte(int3);
2158long3 __ovld __cnfn convert_long3_rtz(int3);
2159long3 __ovld __cnfn convert_long3_sat_rtz(int3);
2160long3 __ovld __cnfn convert_long3_rtp(int3);
2161long3 __ovld __cnfn convert_long3_sat_rtp(int3);
2162long3 __ovld __cnfn convert_long3_rtn(int3);
2163long3 __ovld __cnfn convert_long3_sat_rtn(int3);
2164long3 __ovld __cnfn convert_long3(int3);
2165long3 __ovld __cnfn convert_long3_sat(int3);
2166long3 __ovld __cnfn convert_long3_rte(uint3);
2167long3 __ovld __cnfn convert_long3_sat_rte(uint3);
2168long3 __ovld __cnfn convert_long3_rtz(uint3);
2169long3 __ovld __cnfn convert_long3_sat_rtz(uint3);
2170long3 __ovld __cnfn convert_long3_rtp(uint3);
2171long3 __ovld __cnfn convert_long3_sat_rtp(uint3);
2172long3 __ovld __cnfn convert_long3_rtn(uint3);
2173long3 __ovld __cnfn convert_long3_sat_rtn(uint3);
2174long3 __ovld __cnfn convert_long3(uint3);
2175long3 __ovld __cnfn convert_long3_sat(uint3);
2176long3 __ovld __cnfn convert_long3_rte(long3);
2177long3 __ovld __cnfn convert_long3_sat_rte(long3);
2178long3 __ovld __cnfn convert_long3_rtz(long3);
2179long3 __ovld __cnfn convert_long3_sat_rtz(long3);
2180long3 __ovld __cnfn convert_long3_rtp(long3);
2181long3 __ovld __cnfn convert_long3_sat_rtp(long3);
2182long3 __ovld __cnfn convert_long3_rtn(long3);
2183long3 __ovld __cnfn convert_long3_sat_rtn(long3);
2184long3 __ovld __cnfn convert_long3(long3);
2185long3 __ovld __cnfn convert_long3_sat(long3);
2186long3 __ovld __cnfn convert_long3_rte(ulong3);
2187long3 __ovld __cnfn convert_long3_sat_rte(ulong3);
2188long3 __ovld __cnfn convert_long3_rtz(ulong3);
2189long3 __ovld __cnfn convert_long3_sat_rtz(ulong3);
2190long3 __ovld __cnfn convert_long3_rtp(ulong3);
2191long3 __ovld __cnfn convert_long3_sat_rtp(ulong3);
2192long3 __ovld __cnfn convert_long3_rtn(ulong3);
2193long3 __ovld __cnfn convert_long3_sat_rtn(ulong3);
2194long3 __ovld __cnfn convert_long3(ulong3);
2195long3 __ovld __cnfn convert_long3_sat(ulong3);
2196long3 __ovld __cnfn convert_long3_rte(float3);
2197long3 __ovld __cnfn convert_long3_sat_rte(float3);
2198long3 __ovld __cnfn convert_long3_rtz(float3);
2199long3 __ovld __cnfn convert_long3_sat_rtz(float3);
2200long3 __ovld __cnfn convert_long3_rtp(float3);
2201long3 __ovld __cnfn convert_long3_sat_rtp(float3);
2202long3 __ovld __cnfn convert_long3_rtn(float3);
2203long3 __ovld __cnfn convert_long3_sat_rtn(float3);
2204long3 __ovld __cnfn convert_long3(float3);
2205long3 __ovld __cnfn convert_long3_sat(float3);
2206ulong3 __ovld __cnfn convert_ulong3_rte(char3);
2207ulong3 __ovld __cnfn convert_ulong3_sat_rte(char3);
2208ulong3 __ovld __cnfn convert_ulong3_rtz(char3);
2209ulong3 __ovld __cnfn convert_ulong3_sat_rtz(char3);
2210ulong3 __ovld __cnfn convert_ulong3_rtp(char3);
2211ulong3 __ovld __cnfn convert_ulong3_sat_rtp(char3);
2212ulong3 __ovld __cnfn convert_ulong3_rtn(char3);
2213ulong3 __ovld __cnfn convert_ulong3_sat_rtn(char3);
2214ulong3 __ovld __cnfn convert_ulong3(char3);
2215ulong3 __ovld __cnfn convert_ulong3_sat(char3);
2216ulong3 __ovld __cnfn convert_ulong3_rte(uchar3);
2217ulong3 __ovld __cnfn convert_ulong3_sat_rte(uchar3);
2218ulong3 __ovld __cnfn convert_ulong3_rtz(uchar3);
2219ulong3 __ovld __cnfn convert_ulong3_sat_rtz(uchar3);
2220ulong3 __ovld __cnfn convert_ulong3_rtp(uchar3);
2221ulong3 __ovld __cnfn convert_ulong3_sat_rtp(uchar3);
2222ulong3 __ovld __cnfn convert_ulong3_rtn(uchar3);
2223ulong3 __ovld __cnfn convert_ulong3_sat_rtn(uchar3);
2224ulong3 __ovld __cnfn convert_ulong3(uchar3);
2225ulong3 __ovld __cnfn convert_ulong3_sat(uchar3);
2226ulong3 __ovld __cnfn convert_ulong3_rte(short3);
2227ulong3 __ovld __cnfn convert_ulong3_sat_rte(short3);
2228ulong3 __ovld __cnfn convert_ulong3_rtz(short3);
2229ulong3 __ovld __cnfn convert_ulong3_sat_rtz(short3);
2230ulong3 __ovld __cnfn convert_ulong3_rtp(short3);
2231ulong3 __ovld __cnfn convert_ulong3_sat_rtp(short3);
2232ulong3 __ovld __cnfn convert_ulong3_rtn(short3);
2233ulong3 __ovld __cnfn convert_ulong3_sat_rtn(short3);
2234ulong3 __ovld __cnfn convert_ulong3(short3);
2235ulong3 __ovld __cnfn convert_ulong3_sat(short3);
2236ulong3 __ovld __cnfn convert_ulong3_rte(ushort3);
2237ulong3 __ovld __cnfn convert_ulong3_sat_rte(ushort3);
2238ulong3 __ovld __cnfn convert_ulong3_rtz(ushort3);
2239ulong3 __ovld __cnfn convert_ulong3_sat_rtz(ushort3);
2240ulong3 __ovld __cnfn convert_ulong3_rtp(ushort3);
2241ulong3 __ovld __cnfn convert_ulong3_sat_rtp(ushort3);
2242ulong3 __ovld __cnfn convert_ulong3_rtn(ushort3);
2243ulong3 __ovld __cnfn convert_ulong3_sat_rtn(ushort3);
2244ulong3 __ovld __cnfn convert_ulong3(ushort3);
2245ulong3 __ovld __cnfn convert_ulong3_sat(ushort3);
2246ulong3 __ovld __cnfn convert_ulong3_rte(int3);
2247ulong3 __ovld __cnfn convert_ulong3_sat_rte(int3);
2248ulong3 __ovld __cnfn convert_ulong3_rtz(int3);
2249ulong3 __ovld __cnfn convert_ulong3_sat_rtz(int3);
2250ulong3 __ovld __cnfn convert_ulong3_rtp(int3);
2251ulong3 __ovld __cnfn convert_ulong3_sat_rtp(int3);
2252ulong3 __ovld __cnfn convert_ulong3_rtn(int3);
2253ulong3 __ovld __cnfn convert_ulong3_sat_rtn(int3);
2254ulong3 __ovld __cnfn convert_ulong3(int3);
2255ulong3 __ovld __cnfn convert_ulong3_sat(int3);
2256ulong3 __ovld __cnfn convert_ulong3_rte(uint3);
2257ulong3 __ovld __cnfn convert_ulong3_sat_rte(uint3);
2258ulong3 __ovld __cnfn convert_ulong3_rtz(uint3);
2259ulong3 __ovld __cnfn convert_ulong3_sat_rtz(uint3);
2260ulong3 __ovld __cnfn convert_ulong3_rtp(uint3);
2261ulong3 __ovld __cnfn convert_ulong3_sat_rtp(uint3);
2262ulong3 __ovld __cnfn convert_ulong3_rtn(uint3);
2263ulong3 __ovld __cnfn convert_ulong3_sat_rtn(uint3);
2264ulong3 __ovld __cnfn convert_ulong3(uint3);
2265ulong3 __ovld __cnfn convert_ulong3_sat(uint3);
2266ulong3 __ovld __cnfn convert_ulong3_rte(long3);
2267ulong3 __ovld __cnfn convert_ulong3_sat_rte(long3);
2268ulong3 __ovld __cnfn convert_ulong3_rtz(long3);
2269ulong3 __ovld __cnfn convert_ulong3_sat_rtz(long3);
2270ulong3 __ovld __cnfn convert_ulong3_rtp(long3);
2271ulong3 __ovld __cnfn convert_ulong3_sat_rtp(long3);
2272ulong3 __ovld __cnfn convert_ulong3_rtn(long3);
2273ulong3 __ovld __cnfn convert_ulong3_sat_rtn(long3);
2274ulong3 __ovld __cnfn convert_ulong3(long3);
2275ulong3 __ovld __cnfn convert_ulong3_sat(long3);
2276ulong3 __ovld __cnfn convert_ulong3_rte(ulong3);
2277ulong3 __ovld __cnfn convert_ulong3_sat_rte(ulong3);
2278ulong3 __ovld __cnfn convert_ulong3_rtz(ulong3);
2279ulong3 __ovld __cnfn convert_ulong3_sat_rtz(ulong3);
2280ulong3 __ovld __cnfn convert_ulong3_rtp(ulong3);
2281ulong3 __ovld __cnfn convert_ulong3_sat_rtp(ulong3);
2282ulong3 __ovld __cnfn convert_ulong3_rtn(ulong3);
2283ulong3 __ovld __cnfn convert_ulong3_sat_rtn(ulong3);
2284ulong3 __ovld __cnfn convert_ulong3(ulong3);
2285ulong3 __ovld __cnfn convert_ulong3_sat(ulong3);
2286ulong3 __ovld __cnfn convert_ulong3_rte(float3);
2287ulong3 __ovld __cnfn convert_ulong3_sat_rte(float3);
2288ulong3 __ovld __cnfn convert_ulong3_rtz(float3);
2289ulong3 __ovld __cnfn convert_ulong3_sat_rtz(float3);
2290ulong3 __ovld __cnfn convert_ulong3_rtp(float3);
2291ulong3 __ovld __cnfn convert_ulong3_sat_rtp(float3);
2292ulong3 __ovld __cnfn convert_ulong3_rtn(float3);
2293ulong3 __ovld __cnfn convert_ulong3_sat_rtn(float3);
2294ulong3 __ovld __cnfn convert_ulong3(float3);
2295ulong3 __ovld __cnfn convert_ulong3_sat(float3);
2296float3 __ovld __cnfn convert_float3_rte(char3);
2297float3 __ovld __cnfn convert_float3_rtz(char3);
2298float3 __ovld __cnfn convert_float3_rtp(char3);
2299float3 __ovld __cnfn convert_float3_rtn(char3);
2300float3 __ovld __cnfn convert_float3(char3);
2301float3 __ovld __cnfn convert_float3_rte(uchar3);
2302float3 __ovld __cnfn convert_float3_rtz(uchar3);
2303float3 __ovld __cnfn convert_float3_rtp(uchar3);
2304float3 __ovld __cnfn convert_float3_rtn(uchar3);
2305float3 __ovld __cnfn convert_float3(uchar3);
2306float3 __ovld __cnfn convert_float3_rte(short3);
2307float3 __ovld __cnfn convert_float3_rtz(short3);
2308float3 __ovld __cnfn convert_float3_rtp(short3);
2309float3 __ovld __cnfn convert_float3_rtn(short3);
2310float3 __ovld __cnfn convert_float3(short3);
2311float3 __ovld __cnfn convert_float3_rte(ushort3);
2312float3 __ovld __cnfn convert_float3_rtz(ushort3);
2313float3 __ovld __cnfn convert_float3_rtp(ushort3);
2314float3 __ovld __cnfn convert_float3_rtn(ushort3);
2315float3 __ovld __cnfn convert_float3(ushort3);
2316float3 __ovld __cnfn convert_float3_rte(int3);
2317float3 __ovld __cnfn convert_float3_rtz(int3);
2318float3 __ovld __cnfn convert_float3_rtp(int3);
2319float3 __ovld __cnfn convert_float3_rtn(int3);
2320float3 __ovld __cnfn convert_float3(int3);
2321float3 __ovld __cnfn convert_float3_rte(uint3);
2322float3 __ovld __cnfn convert_float3_rtz(uint3);
2323float3 __ovld __cnfn convert_float3_rtp(uint3);
2324float3 __ovld __cnfn convert_float3_rtn(uint3);
2325float3 __ovld __cnfn convert_float3(uint3);
2326float3 __ovld __cnfn convert_float3_rte(long3);
2327float3 __ovld __cnfn convert_float3_rtz(long3);
2328float3 __ovld __cnfn convert_float3_rtp(long3);
2329float3 __ovld __cnfn convert_float3_rtn(long3);
2330float3 __ovld __cnfn convert_float3(long3);
2331float3 __ovld __cnfn convert_float3_rte(ulong3);
2332float3 __ovld __cnfn convert_float3_rtz(ulong3);
2333float3 __ovld __cnfn convert_float3_rtp(ulong3);
2334float3 __ovld __cnfn convert_float3_rtn(ulong3);
2335float3 __ovld __cnfn convert_float3(ulong3);
2336float3 __ovld __cnfn convert_float3_rte(float3);
2337float3 __ovld __cnfn convert_float3_rtz(float3);
2338float3 __ovld __cnfn convert_float3_rtp(float3);
2339float3 __ovld __cnfn convert_float3_rtn(float3);
2340float3 __ovld __cnfn convert_float3(float3);
2341char4 __ovld __cnfn convert_char4_rte(char4);
2342char4 __ovld __cnfn convert_char4_sat_rte(char4);
2343char4 __ovld __cnfn convert_char4_rtz(char4);
2344char4 __ovld __cnfn convert_char4_sat_rtz(char4);
2345char4 __ovld __cnfn convert_char4_rtp(char4);
2346char4 __ovld __cnfn convert_char4_sat_rtp(char4);
2347char4 __ovld __cnfn convert_char4_rtn(char4);
2348char4 __ovld __cnfn convert_char4_sat_rtn(char4);
2349char4 __ovld __cnfn convert_char4(char4);
2350char4 __ovld __cnfn convert_char4_sat(char4);
2351char4 __ovld __cnfn convert_char4_rte(uchar4);
2352char4 __ovld __cnfn convert_char4_sat_rte(uchar4);
2353char4 __ovld __cnfn convert_char4_rtz(uchar4);
2354char4 __ovld __cnfn convert_char4_sat_rtz(uchar4);
2355char4 __ovld __cnfn convert_char4_rtp(uchar4);
2356char4 __ovld __cnfn convert_char4_sat_rtp(uchar4);
2357char4 __ovld __cnfn convert_char4_rtn(uchar4);
2358char4 __ovld __cnfn convert_char4_sat_rtn(uchar4);
2359char4 __ovld __cnfn convert_char4(uchar4);
2360char4 __ovld __cnfn convert_char4_sat(uchar4);
2361char4 __ovld __cnfn convert_char4_rte(short4);
2362char4 __ovld __cnfn convert_char4_sat_rte(short4);
2363char4 __ovld __cnfn convert_char4_rtz(short4);
2364char4 __ovld __cnfn convert_char4_sat_rtz(short4);
2365char4 __ovld __cnfn convert_char4_rtp(short4);
2366char4 __ovld __cnfn convert_char4_sat_rtp(short4);
2367char4 __ovld __cnfn convert_char4_rtn(short4);
2368char4 __ovld __cnfn convert_char4_sat_rtn(short4);
2369char4 __ovld __cnfn convert_char4(short4);
2370char4 __ovld __cnfn convert_char4_sat(short4);
2371char4 __ovld __cnfn convert_char4_rte(ushort4);
2372char4 __ovld __cnfn convert_char4_sat_rte(ushort4);
2373char4 __ovld __cnfn convert_char4_rtz(ushort4);
2374char4 __ovld __cnfn convert_char4_sat_rtz(ushort4);
2375char4 __ovld __cnfn convert_char4_rtp(ushort4);
2376char4 __ovld __cnfn convert_char4_sat_rtp(ushort4);
2377char4 __ovld __cnfn convert_char4_rtn(ushort4);
2378char4 __ovld __cnfn convert_char4_sat_rtn(ushort4);
2379char4 __ovld __cnfn convert_char4(ushort4);
2380char4 __ovld __cnfn convert_char4_sat(ushort4);
2381char4 __ovld __cnfn convert_char4_rte(int4);
2382char4 __ovld __cnfn convert_char4_sat_rte(int4);
2383char4 __ovld __cnfn convert_char4_rtz(int4);
2384char4 __ovld __cnfn convert_char4_sat_rtz(int4);
2385char4 __ovld __cnfn convert_char4_rtp(int4);
2386char4 __ovld __cnfn convert_char4_sat_rtp(int4);
2387char4 __ovld __cnfn convert_char4_rtn(int4);
2388char4 __ovld __cnfn convert_char4_sat_rtn(int4);
2389char4 __ovld __cnfn convert_char4(int4);
2390char4 __ovld __cnfn convert_char4_sat(int4);
2391char4 __ovld __cnfn convert_char4_rte(uint4);
2392char4 __ovld __cnfn convert_char4_sat_rte(uint4);
2393char4 __ovld __cnfn convert_char4_rtz(uint4);
2394char4 __ovld __cnfn convert_char4_sat_rtz(uint4);
2395char4 __ovld __cnfn convert_char4_rtp(uint4);
2396char4 __ovld __cnfn convert_char4_sat_rtp(uint4);
2397char4 __ovld __cnfn convert_char4_rtn(uint4);
2398char4 __ovld __cnfn convert_char4_sat_rtn(uint4);
2399char4 __ovld __cnfn convert_char4(uint4);
2400char4 __ovld __cnfn convert_char4_sat(uint4);
2401char4 __ovld __cnfn convert_char4_rte(long4);
2402char4 __ovld __cnfn convert_char4_sat_rte(long4);
2403char4 __ovld __cnfn convert_char4_rtz(long4);
2404char4 __ovld __cnfn convert_char4_sat_rtz(long4);
2405char4 __ovld __cnfn convert_char4_rtp(long4);
2406char4 __ovld __cnfn convert_char4_sat_rtp(long4);
2407char4 __ovld __cnfn convert_char4_rtn(long4);
2408char4 __ovld __cnfn convert_char4_sat_rtn(long4);
2409char4 __ovld __cnfn convert_char4(long4);
2410char4 __ovld __cnfn convert_char4_sat(long4);
2411char4 __ovld __cnfn convert_char4_rte(ulong4);
2412char4 __ovld __cnfn convert_char4_sat_rte(ulong4);
2413char4 __ovld __cnfn convert_char4_rtz(ulong4);
2414char4 __ovld __cnfn convert_char4_sat_rtz(ulong4);
2415char4 __ovld __cnfn convert_char4_rtp(ulong4);
2416char4 __ovld __cnfn convert_char4_sat_rtp(ulong4);
2417char4 __ovld __cnfn convert_char4_rtn(ulong4);
2418char4 __ovld __cnfn convert_char4_sat_rtn(ulong4);
2419char4 __ovld __cnfn convert_char4(ulong4);
2420char4 __ovld __cnfn convert_char4_sat(ulong4);
2421char4 __ovld __cnfn convert_char4_rte(float4);
2422char4 __ovld __cnfn convert_char4_sat_rte(float4);
2423char4 __ovld __cnfn convert_char4_rtz(float4);
2424char4 __ovld __cnfn convert_char4_sat_rtz(float4);
2425char4 __ovld __cnfn convert_char4_rtp(float4);
2426char4 __ovld __cnfn convert_char4_sat_rtp(float4);
2427char4 __ovld __cnfn convert_char4_rtn(float4);
2428char4 __ovld __cnfn convert_char4_sat_rtn(float4);
2429char4 __ovld __cnfn convert_char4(float4);
2430char4 __ovld __cnfn convert_char4_sat(float4);
2431uchar4 __ovld __cnfn convert_uchar4_rte(char4);
2432uchar4 __ovld __cnfn convert_uchar4_sat_rte(char4);
2433uchar4 __ovld __cnfn convert_uchar4_rtz(char4);
2434uchar4 __ovld __cnfn convert_uchar4_sat_rtz(char4);
2435uchar4 __ovld __cnfn convert_uchar4_rtp(char4);
2436uchar4 __ovld __cnfn convert_uchar4_sat_rtp(char4);
2437uchar4 __ovld __cnfn convert_uchar4_rtn(char4);
2438uchar4 __ovld __cnfn convert_uchar4_sat_rtn(char4);
2439uchar4 __ovld __cnfn convert_uchar4(char4);
2440uchar4 __ovld __cnfn convert_uchar4_sat(char4);
2441uchar4 __ovld __cnfn convert_uchar4_rte(uchar4);
2442uchar4 __ovld __cnfn convert_uchar4_sat_rte(uchar4);
2443uchar4 __ovld __cnfn convert_uchar4_rtz(uchar4);
2444uchar4 __ovld __cnfn convert_uchar4_sat_rtz(uchar4);
2445uchar4 __ovld __cnfn convert_uchar4_rtp(uchar4);
2446uchar4 __ovld __cnfn convert_uchar4_sat_rtp(uchar4);
2447uchar4 __ovld __cnfn convert_uchar4_rtn(uchar4);
2448uchar4 __ovld __cnfn convert_uchar4_sat_rtn(uchar4);
2449uchar4 __ovld __cnfn convert_uchar4(uchar4);
2450uchar4 __ovld __cnfn convert_uchar4_sat(uchar4);
2451uchar4 __ovld __cnfn convert_uchar4_rte(short4);
2452uchar4 __ovld __cnfn convert_uchar4_sat_rte(short4);
2453uchar4 __ovld __cnfn convert_uchar4_rtz(short4);
2454uchar4 __ovld __cnfn convert_uchar4_sat_rtz(short4);
2455uchar4 __ovld __cnfn convert_uchar4_rtp(short4);
2456uchar4 __ovld __cnfn convert_uchar4_sat_rtp(short4);
2457uchar4 __ovld __cnfn convert_uchar4_rtn(short4);
2458uchar4 __ovld __cnfn convert_uchar4_sat_rtn(short4);
2459uchar4 __ovld __cnfn convert_uchar4(short4);
2460uchar4 __ovld __cnfn convert_uchar4_sat(short4);
2461uchar4 __ovld __cnfn convert_uchar4_rte(ushort4);
2462uchar4 __ovld __cnfn convert_uchar4_sat_rte(ushort4);
2463uchar4 __ovld __cnfn convert_uchar4_rtz(ushort4);
2464uchar4 __ovld __cnfn convert_uchar4_sat_rtz(ushort4);
2465uchar4 __ovld __cnfn convert_uchar4_rtp(ushort4);
2466uchar4 __ovld __cnfn convert_uchar4_sat_rtp(ushort4);
2467uchar4 __ovld __cnfn convert_uchar4_rtn(ushort4);
2468uchar4 __ovld __cnfn convert_uchar4_sat_rtn(ushort4);
2469uchar4 __ovld __cnfn convert_uchar4(ushort4);
2470uchar4 __ovld __cnfn convert_uchar4_sat(ushort4);
2471uchar4 __ovld __cnfn convert_uchar4_rte(int4);
2472uchar4 __ovld __cnfn convert_uchar4_sat_rte(int4);
2473uchar4 __ovld __cnfn convert_uchar4_rtz(int4);
2474uchar4 __ovld __cnfn convert_uchar4_sat_rtz(int4);
2475uchar4 __ovld __cnfn convert_uchar4_rtp(int4);
2476uchar4 __ovld __cnfn convert_uchar4_sat_rtp(int4);
2477uchar4 __ovld __cnfn convert_uchar4_rtn(int4);
2478uchar4 __ovld __cnfn convert_uchar4_sat_rtn(int4);
2479uchar4 __ovld __cnfn convert_uchar4(int4);
2480uchar4 __ovld __cnfn convert_uchar4_sat(int4);
2481uchar4 __ovld __cnfn convert_uchar4_rte(uint4);
2482uchar4 __ovld __cnfn convert_uchar4_sat_rte(uint4);
2483uchar4 __ovld __cnfn convert_uchar4_rtz(uint4);
2484uchar4 __ovld __cnfn convert_uchar4_sat_rtz(uint4);
2485uchar4 __ovld __cnfn convert_uchar4_rtp(uint4);
2486uchar4 __ovld __cnfn convert_uchar4_sat_rtp(uint4);
2487uchar4 __ovld __cnfn convert_uchar4_rtn(uint4);
2488uchar4 __ovld __cnfn convert_uchar4_sat_rtn(uint4);
2489uchar4 __ovld __cnfn convert_uchar4(uint4);
2490uchar4 __ovld __cnfn convert_uchar4_sat(uint4);
2491uchar4 __ovld __cnfn convert_uchar4_rte(long4);
2492uchar4 __ovld __cnfn convert_uchar4_sat_rte(long4);
2493uchar4 __ovld __cnfn convert_uchar4_rtz(long4);
2494uchar4 __ovld __cnfn convert_uchar4_sat_rtz(long4);
2495uchar4 __ovld __cnfn convert_uchar4_rtp(long4);
2496uchar4 __ovld __cnfn convert_uchar4_sat_rtp(long4);
2497uchar4 __ovld __cnfn convert_uchar4_rtn(long4);
2498uchar4 __ovld __cnfn convert_uchar4_sat_rtn(long4);
2499uchar4 __ovld __cnfn convert_uchar4(long4);
2500uchar4 __ovld __cnfn convert_uchar4_sat(long4);
2501uchar4 __ovld __cnfn convert_uchar4_rte(ulong4);
2502uchar4 __ovld __cnfn convert_uchar4_sat_rte(ulong4);
2503uchar4 __ovld __cnfn convert_uchar4_rtz(ulong4);
2504uchar4 __ovld __cnfn convert_uchar4_sat_rtz(ulong4);
2505uchar4 __ovld __cnfn convert_uchar4_rtp(ulong4);
2506uchar4 __ovld __cnfn convert_uchar4_sat_rtp(ulong4);
2507uchar4 __ovld __cnfn convert_uchar4_rtn(ulong4);
2508uchar4 __ovld __cnfn convert_uchar4_sat_rtn(ulong4);
2509uchar4 __ovld __cnfn convert_uchar4(ulong4);
2510uchar4 __ovld __cnfn convert_uchar4_sat(ulong4);
2511uchar4 __ovld __cnfn convert_uchar4_rte(float4);
2512uchar4 __ovld __cnfn convert_uchar4_sat_rte(float4);
2513uchar4 __ovld __cnfn convert_uchar4_rtz(float4);
2514uchar4 __ovld __cnfn convert_uchar4_sat_rtz(float4);
2515uchar4 __ovld __cnfn convert_uchar4_rtp(float4);
2516uchar4 __ovld __cnfn convert_uchar4_sat_rtp(float4);
2517uchar4 __ovld __cnfn convert_uchar4_rtn(float4);
2518uchar4 __ovld __cnfn convert_uchar4_sat_rtn(float4);
2519uchar4 __ovld __cnfn convert_uchar4(float4);
2520uchar4 __ovld __cnfn convert_uchar4_sat(float4);
2521short4 __ovld __cnfn convert_short4_rte(char4);
2522short4 __ovld __cnfn convert_short4_sat_rte(char4);
2523short4 __ovld __cnfn convert_short4_rtz(char4);
2524short4 __ovld __cnfn convert_short4_sat_rtz(char4);
2525short4 __ovld __cnfn convert_short4_rtp(char4);
2526short4 __ovld __cnfn convert_short4_sat_rtp(char4);
2527short4 __ovld __cnfn convert_short4_rtn(char4);
2528short4 __ovld __cnfn convert_short4_sat_rtn(char4);
2529short4 __ovld __cnfn convert_short4(char4);
2530short4 __ovld __cnfn convert_short4_sat(char4);
2531short4 __ovld __cnfn convert_short4_rte(uchar4);
2532short4 __ovld __cnfn convert_short4_sat_rte(uchar4);
2533short4 __ovld __cnfn convert_short4_rtz(uchar4);
2534short4 __ovld __cnfn convert_short4_sat_rtz(uchar4);
2535short4 __ovld __cnfn convert_short4_rtp(uchar4);
2536short4 __ovld __cnfn convert_short4_sat_rtp(uchar4);
2537short4 __ovld __cnfn convert_short4_rtn(uchar4);
2538short4 __ovld __cnfn convert_short4_sat_rtn(uchar4);
2539short4 __ovld __cnfn convert_short4(uchar4);
2540short4 __ovld __cnfn convert_short4_sat(uchar4);
2541short4 __ovld __cnfn convert_short4_rte(short4);
2542short4 __ovld __cnfn convert_short4_sat_rte(short4);
2543short4 __ovld __cnfn convert_short4_rtz(short4);
2544short4 __ovld __cnfn convert_short4_sat_rtz(short4);
2545short4 __ovld __cnfn convert_short4_rtp(short4);
2546short4 __ovld __cnfn convert_short4_sat_rtp(short4);
2547short4 __ovld __cnfn convert_short4_rtn(short4);
2548short4 __ovld __cnfn convert_short4_sat_rtn(short4);
2549short4 __ovld __cnfn convert_short4(short4);
2550short4 __ovld __cnfn convert_short4_sat(short4);
2551short4 __ovld __cnfn convert_short4_rte(ushort4);
2552short4 __ovld __cnfn convert_short4_sat_rte(ushort4);
2553short4 __ovld __cnfn convert_short4_rtz(ushort4);
2554short4 __ovld __cnfn convert_short4_sat_rtz(ushort4);
2555short4 __ovld __cnfn convert_short4_rtp(ushort4);
2556short4 __ovld __cnfn convert_short4_sat_rtp(ushort4);
2557short4 __ovld __cnfn convert_short4_rtn(ushort4);
2558short4 __ovld __cnfn convert_short4_sat_rtn(ushort4);
2559short4 __ovld __cnfn convert_short4(ushort4);
2560short4 __ovld __cnfn convert_short4_sat(ushort4);
2561short4 __ovld __cnfn convert_short4_rte(int4);
2562short4 __ovld __cnfn convert_short4_sat_rte(int4);
2563short4 __ovld __cnfn convert_short4_rtz(int4);
2564short4 __ovld __cnfn convert_short4_sat_rtz(int4);
2565short4 __ovld __cnfn convert_short4_rtp(int4);
2566short4 __ovld __cnfn convert_short4_sat_rtp(int4);
2567short4 __ovld __cnfn convert_short4_rtn(int4);
2568short4 __ovld __cnfn convert_short4_sat_rtn(int4);
2569short4 __ovld __cnfn convert_short4(int4);
2570short4 __ovld __cnfn convert_short4_sat(int4);
2571short4 __ovld __cnfn convert_short4_rte(uint4);
2572short4 __ovld __cnfn convert_short4_sat_rte(uint4);
2573short4 __ovld __cnfn convert_short4_rtz(uint4);
2574short4 __ovld __cnfn convert_short4_sat_rtz(uint4);
2575short4 __ovld __cnfn convert_short4_rtp(uint4);
2576short4 __ovld __cnfn convert_short4_sat_rtp(uint4);
2577short4 __ovld __cnfn convert_short4_rtn(uint4);
2578short4 __ovld __cnfn convert_short4_sat_rtn(uint4);
2579short4 __ovld __cnfn convert_short4(uint4);
2580short4 __ovld __cnfn convert_short4_sat(uint4);
2581short4 __ovld __cnfn convert_short4_rte(long4);
2582short4 __ovld __cnfn convert_short4_sat_rte(long4);
2583short4 __ovld __cnfn convert_short4_rtz(long4);
2584short4 __ovld __cnfn convert_short4_sat_rtz(long4);
2585short4 __ovld __cnfn convert_short4_rtp(long4);
2586short4 __ovld __cnfn convert_short4_sat_rtp(long4);
2587short4 __ovld __cnfn convert_short4_rtn(long4);
2588short4 __ovld __cnfn convert_short4_sat_rtn(long4);
2589short4 __ovld __cnfn convert_short4(long4);
2590short4 __ovld __cnfn convert_short4_sat(long4);
2591short4 __ovld __cnfn convert_short4_rte(ulong4);
2592short4 __ovld __cnfn convert_short4_sat_rte(ulong4);
2593short4 __ovld __cnfn convert_short4_rtz(ulong4);
2594short4 __ovld __cnfn convert_short4_sat_rtz(ulong4);
2595short4 __ovld __cnfn convert_short4_rtp(ulong4);
2596short4 __ovld __cnfn convert_short4_sat_rtp(ulong4);
2597short4 __ovld __cnfn convert_short4_rtn(ulong4);
2598short4 __ovld __cnfn convert_short4_sat_rtn(ulong4);
2599short4 __ovld __cnfn convert_short4(ulong4);
2600short4 __ovld __cnfn convert_short4_sat(ulong4);
2601short4 __ovld __cnfn convert_short4_rte(float4);
2602short4 __ovld __cnfn convert_short4_sat_rte(float4);
2603short4 __ovld __cnfn convert_short4_rtz(float4);
2604short4 __ovld __cnfn convert_short4_sat_rtz(float4);
2605short4 __ovld __cnfn convert_short4_rtp(float4);
2606short4 __ovld __cnfn convert_short4_sat_rtp(float4);
2607short4 __ovld __cnfn convert_short4_rtn(float4);
2608short4 __ovld __cnfn convert_short4_sat_rtn(float4);
2609short4 __ovld __cnfn convert_short4(float4);
2610short4 __ovld __cnfn convert_short4_sat(float4);
2611ushort4 __ovld __cnfn convert_ushort4_rte(char4);
2612ushort4 __ovld __cnfn convert_ushort4_sat_rte(char4);
2613ushort4 __ovld __cnfn convert_ushort4_rtz(char4);
2614ushort4 __ovld __cnfn convert_ushort4_sat_rtz(char4);
2615ushort4 __ovld __cnfn convert_ushort4_rtp(char4);
2616ushort4 __ovld __cnfn convert_ushort4_sat_rtp(char4);
2617ushort4 __ovld __cnfn convert_ushort4_rtn(char4);
2618ushort4 __ovld __cnfn convert_ushort4_sat_rtn(char4);
2619ushort4 __ovld __cnfn convert_ushort4(char4);
2620ushort4 __ovld __cnfn convert_ushort4_sat(char4);
2621ushort4 __ovld __cnfn convert_ushort4_rte(uchar4);
2622ushort4 __ovld __cnfn convert_ushort4_sat_rte(uchar4);
2623ushort4 __ovld __cnfn convert_ushort4_rtz(uchar4);
2624ushort4 __ovld __cnfn convert_ushort4_sat_rtz(uchar4);
2625ushort4 __ovld __cnfn convert_ushort4_rtp(uchar4);
2626ushort4 __ovld __cnfn convert_ushort4_sat_rtp(uchar4);
2627ushort4 __ovld __cnfn convert_ushort4_rtn(uchar4);
2628ushort4 __ovld __cnfn convert_ushort4_sat_rtn(uchar4);
2629ushort4 __ovld __cnfn convert_ushort4(uchar4);
2630ushort4 __ovld __cnfn convert_ushort4_sat(uchar4);
2631ushort4 __ovld __cnfn convert_ushort4_rte(short4);
2632ushort4 __ovld __cnfn convert_ushort4_sat_rte(short4);
2633ushort4 __ovld __cnfn convert_ushort4_rtz(short4);
2634ushort4 __ovld __cnfn convert_ushort4_sat_rtz(short4);
2635ushort4 __ovld __cnfn convert_ushort4_rtp(short4);
2636ushort4 __ovld __cnfn convert_ushort4_sat_rtp(short4);
2637ushort4 __ovld __cnfn convert_ushort4_rtn(short4);
2638ushort4 __ovld __cnfn convert_ushort4_sat_rtn(short4);
2639ushort4 __ovld __cnfn convert_ushort4(short4);
2640ushort4 __ovld __cnfn convert_ushort4_sat(short4);
2641ushort4 __ovld __cnfn convert_ushort4_rte(ushort4);
2642ushort4 __ovld __cnfn convert_ushort4_sat_rte(ushort4);
2643ushort4 __ovld __cnfn convert_ushort4_rtz(ushort4);
2644ushort4 __ovld __cnfn convert_ushort4_sat_rtz(ushort4);
2645ushort4 __ovld __cnfn convert_ushort4_rtp(ushort4);
2646ushort4 __ovld __cnfn convert_ushort4_sat_rtp(ushort4);
2647ushort4 __ovld __cnfn convert_ushort4_rtn(ushort4);
2648ushort4 __ovld __cnfn convert_ushort4_sat_rtn(ushort4);
2649ushort4 __ovld __cnfn convert_ushort4(ushort4);
2650ushort4 __ovld __cnfn convert_ushort4_sat(ushort4);
2651ushort4 __ovld __cnfn convert_ushort4_rte(int4);
2652ushort4 __ovld __cnfn convert_ushort4_sat_rte(int4);
2653ushort4 __ovld __cnfn convert_ushort4_rtz(int4);
2654ushort4 __ovld __cnfn convert_ushort4_sat_rtz(int4);
2655ushort4 __ovld __cnfn convert_ushort4_rtp(int4);
2656ushort4 __ovld __cnfn convert_ushort4_sat_rtp(int4);
2657ushort4 __ovld __cnfn convert_ushort4_rtn(int4);
2658ushort4 __ovld __cnfn convert_ushort4_sat_rtn(int4);
2659ushort4 __ovld __cnfn convert_ushort4(int4);
2660ushort4 __ovld __cnfn convert_ushort4_sat(int4);
2661ushort4 __ovld __cnfn convert_ushort4_rte(uint4);
2662ushort4 __ovld __cnfn convert_ushort4_sat_rte(uint4);
2663ushort4 __ovld __cnfn convert_ushort4_rtz(uint4);
2664ushort4 __ovld __cnfn convert_ushort4_sat_rtz(uint4);
2665ushort4 __ovld __cnfn convert_ushort4_rtp(uint4);
2666ushort4 __ovld __cnfn convert_ushort4_sat_rtp(uint4);
2667ushort4 __ovld __cnfn convert_ushort4_rtn(uint4);
2668ushort4 __ovld __cnfn convert_ushort4_sat_rtn(uint4);
2669ushort4 __ovld __cnfn convert_ushort4(uint4);
2670ushort4 __ovld __cnfn convert_ushort4_sat(uint4);
2671ushort4 __ovld __cnfn convert_ushort4_rte(long4);
2672ushort4 __ovld __cnfn convert_ushort4_sat_rte(long4);
2673ushort4 __ovld __cnfn convert_ushort4_rtz(long4);
2674ushort4 __ovld __cnfn convert_ushort4_sat_rtz(long4);
2675ushort4 __ovld __cnfn convert_ushort4_rtp(long4);
2676ushort4 __ovld __cnfn convert_ushort4_sat_rtp(long4);
2677ushort4 __ovld __cnfn convert_ushort4_rtn(long4);
2678ushort4 __ovld __cnfn convert_ushort4_sat_rtn(long4);
2679ushort4 __ovld __cnfn convert_ushort4(long4);
2680ushort4 __ovld __cnfn convert_ushort4_sat(long4);
2681ushort4 __ovld __cnfn convert_ushort4_rte(ulong4);
2682ushort4 __ovld __cnfn convert_ushort4_sat_rte(ulong4);
2683ushort4 __ovld __cnfn convert_ushort4_rtz(ulong4);
2684ushort4 __ovld __cnfn convert_ushort4_sat_rtz(ulong4);
2685ushort4 __ovld __cnfn convert_ushort4_rtp(ulong4);
2686ushort4 __ovld __cnfn convert_ushort4_sat_rtp(ulong4);
2687ushort4 __ovld __cnfn convert_ushort4_rtn(ulong4);
2688ushort4 __ovld __cnfn convert_ushort4_sat_rtn(ulong4);
2689ushort4 __ovld __cnfn convert_ushort4(ulong4);
2690ushort4 __ovld __cnfn convert_ushort4_sat(ulong4);
2691ushort4 __ovld __cnfn convert_ushort4_rte(float4);
2692ushort4 __ovld __cnfn convert_ushort4_sat_rte(float4);
2693ushort4 __ovld __cnfn convert_ushort4_rtz(float4);
2694ushort4 __ovld __cnfn convert_ushort4_sat_rtz(float4);
2695ushort4 __ovld __cnfn convert_ushort4_rtp(float4);
2696ushort4 __ovld __cnfn convert_ushort4_sat_rtp(float4);
2697ushort4 __ovld __cnfn convert_ushort4_rtn(float4);
2698ushort4 __ovld __cnfn convert_ushort4_sat_rtn(float4);
2699ushort4 __ovld __cnfn convert_ushort4(float4);
2700ushort4 __ovld __cnfn convert_ushort4_sat(float4);
2701int4 __ovld __cnfn convert_int4_rte(char4);
2702int4 __ovld __cnfn convert_int4_sat_rte(char4);
2703int4 __ovld __cnfn convert_int4_rtz(char4);
2704int4 __ovld __cnfn convert_int4_sat_rtz(char4);
2705int4 __ovld __cnfn convert_int4_rtp(char4);
2706int4 __ovld __cnfn convert_int4_sat_rtp(char4);
2707int4 __ovld __cnfn convert_int4_rtn(char4);
2708int4 __ovld __cnfn convert_int4_sat_rtn(char4);
2709int4 __ovld __cnfn convert_int4(char4);
2710int4 __ovld __cnfn convert_int4_sat(char4);
2711int4 __ovld __cnfn convert_int4_rte(uchar4);
2712int4 __ovld __cnfn convert_int4_sat_rte(uchar4);
2713int4 __ovld __cnfn convert_int4_rtz(uchar4);
2714int4 __ovld __cnfn convert_int4_sat_rtz(uchar4);
2715int4 __ovld __cnfn convert_int4_rtp(uchar4);
2716int4 __ovld __cnfn convert_int4_sat_rtp(uchar4);
2717int4 __ovld __cnfn convert_int4_rtn(uchar4);
2718int4 __ovld __cnfn convert_int4_sat_rtn(uchar4);
2719int4 __ovld __cnfn convert_int4(uchar4);
2720int4 __ovld __cnfn convert_int4_sat(uchar4);
2721int4 __ovld __cnfn convert_int4_rte(short4);
2722int4 __ovld __cnfn convert_int4_sat_rte(short4);
2723int4 __ovld __cnfn convert_int4_rtz(short4);
2724int4 __ovld __cnfn convert_int4_sat_rtz(short4);
2725int4 __ovld __cnfn convert_int4_rtp(short4);
2726int4 __ovld __cnfn convert_int4_sat_rtp(short4);
2727int4 __ovld __cnfn convert_int4_rtn(short4);
2728int4 __ovld __cnfn convert_int4_sat_rtn(short4);
2729int4 __ovld __cnfn convert_int4(short4);
2730int4 __ovld __cnfn convert_int4_sat(short4);
2731int4 __ovld __cnfn convert_int4_rte(ushort4);
2732int4 __ovld __cnfn convert_int4_sat_rte(ushort4);
2733int4 __ovld __cnfn convert_int4_rtz(ushort4);
2734int4 __ovld __cnfn convert_int4_sat_rtz(ushort4);
2735int4 __ovld __cnfn convert_int4_rtp(ushort4);
2736int4 __ovld __cnfn convert_int4_sat_rtp(ushort4);
2737int4 __ovld __cnfn convert_int4_rtn(ushort4);
2738int4 __ovld __cnfn convert_int4_sat_rtn(ushort4);
2739int4 __ovld __cnfn convert_int4(ushort4);
2740int4 __ovld __cnfn convert_int4_sat(ushort4);
2741int4 __ovld __cnfn convert_int4_rte(int4);
2742int4 __ovld __cnfn convert_int4_sat_rte(int4);
2743int4 __ovld __cnfn convert_int4_rtz(int4);
2744int4 __ovld __cnfn convert_int4_sat_rtz(int4);
2745int4 __ovld __cnfn convert_int4_rtp(int4);
2746int4 __ovld __cnfn convert_int4_sat_rtp(int4);
2747int4 __ovld __cnfn convert_int4_rtn(int4);
2748int4 __ovld __cnfn convert_int4_sat_rtn(int4);
2749int4 __ovld __cnfn convert_int4(int4);
2750int4 __ovld __cnfn convert_int4_sat(int4);
2751int4 __ovld __cnfn convert_int4_rte(uint4);
2752int4 __ovld __cnfn convert_int4_sat_rte(uint4);
2753int4 __ovld __cnfn convert_int4_rtz(uint4);
2754int4 __ovld __cnfn convert_int4_sat_rtz(uint4);
2755int4 __ovld __cnfn convert_int4_rtp(uint4);
2756int4 __ovld __cnfn convert_int4_sat_rtp(uint4);
2757int4 __ovld __cnfn convert_int4_rtn(uint4);
2758int4 __ovld __cnfn convert_int4_sat_rtn(uint4);
2759int4 __ovld __cnfn convert_int4(uint4);
2760int4 __ovld __cnfn convert_int4_sat(uint4);
2761int4 __ovld __cnfn convert_int4_rte(long4);
2762int4 __ovld __cnfn convert_int4_sat_rte(long4);
2763int4 __ovld __cnfn convert_int4_rtz(long4);
2764int4 __ovld __cnfn convert_int4_sat_rtz(long4);
2765int4 __ovld __cnfn convert_int4_rtp(long4);
2766int4 __ovld __cnfn convert_int4_sat_rtp(long4);
2767int4 __ovld __cnfn convert_int4_rtn(long4);
2768int4 __ovld __cnfn convert_int4_sat_rtn(long4);
2769int4 __ovld __cnfn convert_int4(long4);
2770int4 __ovld __cnfn convert_int4_sat(long4);
2771int4 __ovld __cnfn convert_int4_rte(ulong4);
2772int4 __ovld __cnfn convert_int4_sat_rte(ulong4);
2773int4 __ovld __cnfn convert_int4_rtz(ulong4);
2774int4 __ovld __cnfn convert_int4_sat_rtz(ulong4);
2775int4 __ovld __cnfn convert_int4_rtp(ulong4);
2776int4 __ovld __cnfn convert_int4_sat_rtp(ulong4);
2777int4 __ovld __cnfn convert_int4_rtn(ulong4);
2778int4 __ovld __cnfn convert_int4_sat_rtn(ulong4);
2779int4 __ovld __cnfn convert_int4(ulong4);
2780int4 __ovld __cnfn convert_int4_sat(ulong4);
2781int4 __ovld __cnfn convert_int4_rte(float4);
2782int4 __ovld __cnfn convert_int4_sat_rte(float4);
2783int4 __ovld __cnfn convert_int4_rtz(float4);
2784int4 __ovld __cnfn convert_int4_sat_rtz(float4);
2785int4 __ovld __cnfn convert_int4_rtp(float4);
2786int4 __ovld __cnfn convert_int4_sat_rtp(float4);
2787int4 __ovld __cnfn convert_int4_rtn(float4);
2788int4 __ovld __cnfn convert_int4_sat_rtn(float4);
2789int4 __ovld __cnfn convert_int4(float4);
2790int4 __ovld __cnfn convert_int4_sat(float4);
2791uint4 __ovld __cnfn convert_uint4_rte(char4);
2792uint4 __ovld __cnfn convert_uint4_sat_rte(char4);
2793uint4 __ovld __cnfn convert_uint4_rtz(char4);
2794uint4 __ovld __cnfn convert_uint4_sat_rtz(char4);
2795uint4 __ovld __cnfn convert_uint4_rtp(char4);
2796uint4 __ovld __cnfn convert_uint4_sat_rtp(char4);
2797uint4 __ovld __cnfn convert_uint4_rtn(char4);
2798uint4 __ovld __cnfn convert_uint4_sat_rtn(char4);
2799uint4 __ovld __cnfn convert_uint4(char4);
2800uint4 __ovld __cnfn convert_uint4_sat(char4);
2801uint4 __ovld __cnfn convert_uint4_rte(uchar4);
2802uint4 __ovld __cnfn convert_uint4_sat_rte(uchar4);
2803uint4 __ovld __cnfn convert_uint4_rtz(uchar4);
2804uint4 __ovld __cnfn convert_uint4_sat_rtz(uchar4);
2805uint4 __ovld __cnfn convert_uint4_rtp(uchar4);
2806uint4 __ovld __cnfn convert_uint4_sat_rtp(uchar4);
2807uint4 __ovld __cnfn convert_uint4_rtn(uchar4);
2808uint4 __ovld __cnfn convert_uint4_sat_rtn(uchar4);
2809uint4 __ovld __cnfn convert_uint4(uchar4);
2810uint4 __ovld __cnfn convert_uint4_sat(uchar4);
2811uint4 __ovld __cnfn convert_uint4_rte(short4);
2812uint4 __ovld __cnfn convert_uint4_sat_rte(short4);
2813uint4 __ovld __cnfn convert_uint4_rtz(short4);
2814uint4 __ovld __cnfn convert_uint4_sat_rtz(short4);
2815uint4 __ovld __cnfn convert_uint4_rtp(short4);
2816uint4 __ovld __cnfn convert_uint4_sat_rtp(short4);
2817uint4 __ovld __cnfn convert_uint4_rtn(short4);
2818uint4 __ovld __cnfn convert_uint4_sat_rtn(short4);
2819uint4 __ovld __cnfn convert_uint4(short4);
2820uint4 __ovld __cnfn convert_uint4_sat(short4);
2821uint4 __ovld __cnfn convert_uint4_rte(ushort4);
2822uint4 __ovld __cnfn convert_uint4_sat_rte(ushort4);
2823uint4 __ovld __cnfn convert_uint4_rtz(ushort4);
2824uint4 __ovld __cnfn convert_uint4_sat_rtz(ushort4);
2825uint4 __ovld __cnfn convert_uint4_rtp(ushort4);
2826uint4 __ovld __cnfn convert_uint4_sat_rtp(ushort4);
2827uint4 __ovld __cnfn convert_uint4_rtn(ushort4);
2828uint4 __ovld __cnfn convert_uint4_sat_rtn(ushort4);
2829uint4 __ovld __cnfn convert_uint4(ushort4);
2830uint4 __ovld __cnfn convert_uint4_sat(ushort4);
2831uint4 __ovld __cnfn convert_uint4_rte(int4);
2832uint4 __ovld __cnfn convert_uint4_sat_rte(int4);
2833uint4 __ovld __cnfn convert_uint4_rtz(int4);
2834uint4 __ovld __cnfn convert_uint4_sat_rtz(int4);
2835uint4 __ovld __cnfn convert_uint4_rtp(int4);
2836uint4 __ovld __cnfn convert_uint4_sat_rtp(int4);
2837uint4 __ovld __cnfn convert_uint4_rtn(int4);
2838uint4 __ovld __cnfn convert_uint4_sat_rtn(int4);
2839uint4 __ovld __cnfn convert_uint4(int4);
2840uint4 __ovld __cnfn convert_uint4_sat(int4);
2841uint4 __ovld __cnfn convert_uint4_rte(uint4);
2842uint4 __ovld __cnfn convert_uint4_sat_rte(uint4);
2843uint4 __ovld __cnfn convert_uint4_rtz(uint4);
2844uint4 __ovld __cnfn convert_uint4_sat_rtz(uint4);
2845uint4 __ovld __cnfn convert_uint4_rtp(uint4);
2846uint4 __ovld __cnfn convert_uint4_sat_rtp(uint4);
2847uint4 __ovld __cnfn convert_uint4_rtn(uint4);
2848uint4 __ovld __cnfn convert_uint4_sat_rtn(uint4);
2849uint4 __ovld __cnfn convert_uint4(uint4);
2850uint4 __ovld __cnfn convert_uint4_sat(uint4);
2851uint4 __ovld __cnfn convert_uint4_rte(long4);
2852uint4 __ovld __cnfn convert_uint4_sat_rte(long4);
2853uint4 __ovld __cnfn convert_uint4_rtz(long4);
2854uint4 __ovld __cnfn convert_uint4_sat_rtz(long4);
2855uint4 __ovld __cnfn convert_uint4_rtp(long4);
2856uint4 __ovld __cnfn convert_uint4_sat_rtp(long4);
2857uint4 __ovld __cnfn convert_uint4_rtn(long4);
2858uint4 __ovld __cnfn convert_uint4_sat_rtn(long4);
2859uint4 __ovld __cnfn convert_uint4(long4);
2860uint4 __ovld __cnfn convert_uint4_sat(long4);
2861uint4 __ovld __cnfn convert_uint4_rte(ulong4);
2862uint4 __ovld __cnfn convert_uint4_sat_rte(ulong4);
2863uint4 __ovld __cnfn convert_uint4_rtz(ulong4);
2864uint4 __ovld __cnfn convert_uint4_sat_rtz(ulong4);
2865uint4 __ovld __cnfn convert_uint4_rtp(ulong4);
2866uint4 __ovld __cnfn convert_uint4_sat_rtp(ulong4);
2867uint4 __ovld __cnfn convert_uint4_rtn(ulong4);
2868uint4 __ovld __cnfn convert_uint4_sat_rtn(ulong4);
2869uint4 __ovld __cnfn convert_uint4(ulong4);
2870uint4 __ovld __cnfn convert_uint4_sat(ulong4);
2871uint4 __ovld __cnfn convert_uint4_rte(float4);
2872uint4 __ovld __cnfn convert_uint4_sat_rte(float4);
2873uint4 __ovld __cnfn convert_uint4_rtz(float4);
2874uint4 __ovld __cnfn convert_uint4_sat_rtz(float4);
2875uint4 __ovld __cnfn convert_uint4_rtp(float4);
2876uint4 __ovld __cnfn convert_uint4_sat_rtp(float4);
2877uint4 __ovld __cnfn convert_uint4_rtn(float4);
2878uint4 __ovld __cnfn convert_uint4_sat_rtn(float4);
2879uint4 __ovld __cnfn convert_uint4(float4);
2880uint4 __ovld __cnfn convert_uint4_sat(float4);
2881long4 __ovld __cnfn convert_long4_rte(char4);
2882long4 __ovld __cnfn convert_long4_sat_rte(char4);
2883long4 __ovld __cnfn convert_long4_rtz(char4);
2884long4 __ovld __cnfn convert_long4_sat_rtz(char4);
2885long4 __ovld __cnfn convert_long4_rtp(char4);
2886long4 __ovld __cnfn convert_long4_sat_rtp(char4);
2887long4 __ovld __cnfn convert_long4_rtn(char4);
2888long4 __ovld __cnfn convert_long4_sat_rtn(char4);
2889long4 __ovld __cnfn convert_long4(char4);
2890long4 __ovld __cnfn convert_long4_sat(char4);
2891long4 __ovld __cnfn convert_long4_rte(uchar4);
2892long4 __ovld __cnfn convert_long4_sat_rte(uchar4);
2893long4 __ovld __cnfn convert_long4_rtz(uchar4);
2894long4 __ovld __cnfn convert_long4_sat_rtz(uchar4);
2895long4 __ovld __cnfn convert_long4_rtp(uchar4);
2896long4 __ovld __cnfn convert_long4_sat_rtp(uchar4);
2897long4 __ovld __cnfn convert_long4_rtn(uchar4);
2898long4 __ovld __cnfn convert_long4_sat_rtn(uchar4);
2899long4 __ovld __cnfn convert_long4(uchar4);
2900long4 __ovld __cnfn convert_long4_sat(uchar4);
2901long4 __ovld __cnfn convert_long4_rte(short4);
2902long4 __ovld __cnfn convert_long4_sat_rte(short4);
2903long4 __ovld __cnfn convert_long4_rtz(short4);
2904long4 __ovld __cnfn convert_long4_sat_rtz(short4);
2905long4 __ovld __cnfn convert_long4_rtp(short4);
2906long4 __ovld __cnfn convert_long4_sat_rtp(short4);
2907long4 __ovld __cnfn convert_long4_rtn(short4);
2908long4 __ovld __cnfn convert_long4_sat_rtn(short4);
2909long4 __ovld __cnfn convert_long4(short4);
2910long4 __ovld __cnfn convert_long4_sat(short4);
2911long4 __ovld __cnfn convert_long4_rte(ushort4);
2912long4 __ovld __cnfn convert_long4_sat_rte(ushort4);
2913long4 __ovld __cnfn convert_long4_rtz(ushort4);
2914long4 __ovld __cnfn convert_long4_sat_rtz(ushort4);
2915long4 __ovld __cnfn convert_long4_rtp(ushort4);
2916long4 __ovld __cnfn convert_long4_sat_rtp(ushort4);
2917long4 __ovld __cnfn convert_long4_rtn(ushort4);
2918long4 __ovld __cnfn convert_long4_sat_rtn(ushort4);
2919long4 __ovld __cnfn convert_long4(ushort4);
2920long4 __ovld __cnfn convert_long4_sat(ushort4);
2921long4 __ovld __cnfn convert_long4_rte(int4);
2922long4 __ovld __cnfn convert_long4_sat_rte(int4);
2923long4 __ovld __cnfn convert_long4_rtz(int4);
2924long4 __ovld __cnfn convert_long4_sat_rtz(int4);
2925long4 __ovld __cnfn convert_long4_rtp(int4);
2926long4 __ovld __cnfn convert_long4_sat_rtp(int4);
2927long4 __ovld __cnfn convert_long4_rtn(int4);
2928long4 __ovld __cnfn convert_long4_sat_rtn(int4);
2929long4 __ovld __cnfn convert_long4(int4);
2930long4 __ovld __cnfn convert_long4_sat(int4);
2931long4 __ovld __cnfn convert_long4_rte(uint4);
2932long4 __ovld __cnfn convert_long4_sat_rte(uint4);
2933long4 __ovld __cnfn convert_long4_rtz(uint4);
2934long4 __ovld __cnfn convert_long4_sat_rtz(uint4);
2935long4 __ovld __cnfn convert_long4_rtp(uint4);
2936long4 __ovld __cnfn convert_long4_sat_rtp(uint4);
2937long4 __ovld __cnfn convert_long4_rtn(uint4);
2938long4 __ovld __cnfn convert_long4_sat_rtn(uint4);
2939long4 __ovld __cnfn convert_long4(uint4);
2940long4 __ovld __cnfn convert_long4_sat(uint4);
2941long4 __ovld __cnfn convert_long4_rte(long4);
2942long4 __ovld __cnfn convert_long4_sat_rte(long4);
2943long4 __ovld __cnfn convert_long4_rtz(long4);
2944long4 __ovld __cnfn convert_long4_sat_rtz(long4);
2945long4 __ovld __cnfn convert_long4_rtp(long4);
2946long4 __ovld __cnfn convert_long4_sat_rtp(long4);
2947long4 __ovld __cnfn convert_long4_rtn(long4);
2948long4 __ovld __cnfn convert_long4_sat_rtn(long4);
2949long4 __ovld __cnfn convert_long4(long4);
2950long4 __ovld __cnfn convert_long4_sat(long4);
2951long4 __ovld __cnfn convert_long4_rte(ulong4);
2952long4 __ovld __cnfn convert_long4_sat_rte(ulong4);
2953long4 __ovld __cnfn convert_long4_rtz(ulong4);
2954long4 __ovld __cnfn convert_long4_sat_rtz(ulong4);
2955long4 __ovld __cnfn convert_long4_rtp(ulong4);
2956long4 __ovld __cnfn convert_long4_sat_rtp(ulong4);
2957long4 __ovld __cnfn convert_long4_rtn(ulong4);
2958long4 __ovld __cnfn convert_long4_sat_rtn(ulong4);
2959long4 __ovld __cnfn convert_long4(ulong4);
2960long4 __ovld __cnfn convert_long4_sat(ulong4);
2961long4 __ovld __cnfn convert_long4_rte(float4);
2962long4 __ovld __cnfn convert_long4_sat_rte(float4);
2963long4 __ovld __cnfn convert_long4_rtz(float4);
2964long4 __ovld __cnfn convert_long4_sat_rtz(float4);
2965long4 __ovld __cnfn convert_long4_rtp(float4);
2966long4 __ovld __cnfn convert_long4_sat_rtp(float4);
2967long4 __ovld __cnfn convert_long4_rtn(float4);
2968long4 __ovld __cnfn convert_long4_sat_rtn(float4);
2969long4 __ovld __cnfn convert_long4(float4);
2970long4 __ovld __cnfn convert_long4_sat(float4);
2971ulong4 __ovld __cnfn convert_ulong4_rte(char4);
2972ulong4 __ovld __cnfn convert_ulong4_sat_rte(char4);
2973ulong4 __ovld __cnfn convert_ulong4_rtz(char4);
2974ulong4 __ovld __cnfn convert_ulong4_sat_rtz(char4);
2975ulong4 __ovld __cnfn convert_ulong4_rtp(char4);
2976ulong4 __ovld __cnfn convert_ulong4_sat_rtp(char4);
2977ulong4 __ovld __cnfn convert_ulong4_rtn(char4);
2978ulong4 __ovld __cnfn convert_ulong4_sat_rtn(char4);
2979ulong4 __ovld __cnfn convert_ulong4(char4);
2980ulong4 __ovld __cnfn convert_ulong4_sat(char4);
2981ulong4 __ovld __cnfn convert_ulong4_rte(uchar4);
2982ulong4 __ovld __cnfn convert_ulong4_sat_rte(uchar4);
2983ulong4 __ovld __cnfn convert_ulong4_rtz(uchar4);
2984ulong4 __ovld __cnfn convert_ulong4_sat_rtz(uchar4);
2985ulong4 __ovld __cnfn convert_ulong4_rtp(uchar4);
2986ulong4 __ovld __cnfn convert_ulong4_sat_rtp(uchar4);
2987ulong4 __ovld __cnfn convert_ulong4_rtn(uchar4);
2988ulong4 __ovld __cnfn convert_ulong4_sat_rtn(uchar4);
2989ulong4 __ovld __cnfn convert_ulong4(uchar4);
2990ulong4 __ovld __cnfn convert_ulong4_sat(uchar4);
2991ulong4 __ovld __cnfn convert_ulong4_rte(short4);
2992ulong4 __ovld __cnfn convert_ulong4_sat_rte(short4);
2993ulong4 __ovld __cnfn convert_ulong4_rtz(short4);
2994ulong4 __ovld __cnfn convert_ulong4_sat_rtz(short4);
2995ulong4 __ovld __cnfn convert_ulong4_rtp(short4);
2996ulong4 __ovld __cnfn convert_ulong4_sat_rtp(short4);
2997ulong4 __ovld __cnfn convert_ulong4_rtn(short4);
2998ulong4 __ovld __cnfn convert_ulong4_sat_rtn(short4);
2999ulong4 __ovld __cnfn convert_ulong4(short4);
3000ulong4 __ovld __cnfn convert_ulong4_sat(short4);
3001ulong4 __ovld __cnfn convert_ulong4_rte(ushort4);
3002ulong4 __ovld __cnfn convert_ulong4_sat_rte(ushort4);
3003ulong4 __ovld __cnfn convert_ulong4_rtz(ushort4);
3004ulong4 __ovld __cnfn convert_ulong4_sat_rtz(ushort4);
3005ulong4 __ovld __cnfn convert_ulong4_rtp(ushort4);
3006ulong4 __ovld __cnfn convert_ulong4_sat_rtp(ushort4);
3007ulong4 __ovld __cnfn convert_ulong4_rtn(ushort4);
3008ulong4 __ovld __cnfn convert_ulong4_sat_rtn(ushort4);
3009ulong4 __ovld __cnfn convert_ulong4(ushort4);
3010ulong4 __ovld __cnfn convert_ulong4_sat(ushort4);
3011ulong4 __ovld __cnfn convert_ulong4_rte(int4);
3012ulong4 __ovld __cnfn convert_ulong4_sat_rte(int4);
3013ulong4 __ovld __cnfn convert_ulong4_rtz(int4);
3014ulong4 __ovld __cnfn convert_ulong4_sat_rtz(int4);
3015ulong4 __ovld __cnfn convert_ulong4_rtp(int4);
3016ulong4 __ovld __cnfn convert_ulong4_sat_rtp(int4);
3017ulong4 __ovld __cnfn convert_ulong4_rtn(int4);
3018ulong4 __ovld __cnfn convert_ulong4_sat_rtn(int4);
3019ulong4 __ovld __cnfn convert_ulong4(int4);
3020ulong4 __ovld __cnfn convert_ulong4_sat(int4);
3021ulong4 __ovld __cnfn convert_ulong4_rte(uint4);
3022ulong4 __ovld __cnfn convert_ulong4_sat_rte(uint4);
3023ulong4 __ovld __cnfn convert_ulong4_rtz(uint4);
3024ulong4 __ovld __cnfn convert_ulong4_sat_rtz(uint4);
3025ulong4 __ovld __cnfn convert_ulong4_rtp(uint4);
3026ulong4 __ovld __cnfn convert_ulong4_sat_rtp(uint4);
3027ulong4 __ovld __cnfn convert_ulong4_rtn(uint4);
3028ulong4 __ovld __cnfn convert_ulong4_sat_rtn(uint4);
3029ulong4 __ovld __cnfn convert_ulong4(uint4);
3030ulong4 __ovld __cnfn convert_ulong4_sat(uint4);
3031ulong4 __ovld __cnfn convert_ulong4_rte(long4);
3032ulong4 __ovld __cnfn convert_ulong4_sat_rte(long4);
3033ulong4 __ovld __cnfn convert_ulong4_rtz(long4);
3034ulong4 __ovld __cnfn convert_ulong4_sat_rtz(long4);
3035ulong4 __ovld __cnfn convert_ulong4_rtp(long4);
3036ulong4 __ovld __cnfn convert_ulong4_sat_rtp(long4);
3037ulong4 __ovld __cnfn convert_ulong4_rtn(long4);
3038ulong4 __ovld __cnfn convert_ulong4_sat_rtn(long4);
3039ulong4 __ovld __cnfn convert_ulong4(long4);
3040ulong4 __ovld __cnfn convert_ulong4_sat(long4);
3041ulong4 __ovld __cnfn convert_ulong4_rte(ulong4);
3042ulong4 __ovld __cnfn convert_ulong4_sat_rte(ulong4);
3043ulong4 __ovld __cnfn convert_ulong4_rtz(ulong4);
3044ulong4 __ovld __cnfn convert_ulong4_sat_rtz(ulong4);
3045ulong4 __ovld __cnfn convert_ulong4_rtp(ulong4);
3046ulong4 __ovld __cnfn convert_ulong4_sat_rtp(ulong4);
3047ulong4 __ovld __cnfn convert_ulong4_rtn(ulong4);
3048ulong4 __ovld __cnfn convert_ulong4_sat_rtn(ulong4);
3049ulong4 __ovld __cnfn convert_ulong4(ulong4);
3050ulong4 __ovld __cnfn convert_ulong4_sat(ulong4);
3051ulong4 __ovld __cnfn convert_ulong4_rte(float4);
3052ulong4 __ovld __cnfn convert_ulong4_sat_rte(float4);
3053ulong4 __ovld __cnfn convert_ulong4_rtz(float4);
3054ulong4 __ovld __cnfn convert_ulong4_sat_rtz(float4);
3055ulong4 __ovld __cnfn convert_ulong4_rtp(float4);
3056ulong4 __ovld __cnfn convert_ulong4_sat_rtp(float4);
3057ulong4 __ovld __cnfn convert_ulong4_rtn(float4);
3058ulong4 __ovld __cnfn convert_ulong4_sat_rtn(float4);
3059ulong4 __ovld __cnfn convert_ulong4(float4);
3060ulong4 __ovld __cnfn convert_ulong4_sat(float4);
3061float4 __ovld __cnfn convert_float4_rte(char4);
3062float4 __ovld __cnfn convert_float4_rtz(char4);
3063float4 __ovld __cnfn convert_float4_rtp(char4);
3064float4 __ovld __cnfn convert_float4_rtn(char4);
3065float4 __ovld __cnfn convert_float4(char4);
3066float4 __ovld __cnfn convert_float4_rte(uchar4);
3067float4 __ovld __cnfn convert_float4_rtz(uchar4);
3068float4 __ovld __cnfn convert_float4_rtp(uchar4);
3069float4 __ovld __cnfn convert_float4_rtn(uchar4);
3070float4 __ovld __cnfn convert_float4(uchar4);
3071float4 __ovld __cnfn convert_float4_rte(short4);
3072float4 __ovld __cnfn convert_float4_rtz(short4);
3073float4 __ovld __cnfn convert_float4_rtp(short4);
3074float4 __ovld __cnfn convert_float4_rtn(short4);
3075float4 __ovld __cnfn convert_float4(short4);
3076float4 __ovld __cnfn convert_float4_rte(ushort4);
3077float4 __ovld __cnfn convert_float4_rtz(ushort4);
3078float4 __ovld __cnfn convert_float4_rtp(ushort4);
3079float4 __ovld __cnfn convert_float4_rtn(ushort4);
3080float4 __ovld __cnfn convert_float4(ushort4);
3081float4 __ovld __cnfn convert_float4_rte(int4);
3082float4 __ovld __cnfn convert_float4_rtz(int4);
3083float4 __ovld __cnfn convert_float4_rtp(int4);
3084float4 __ovld __cnfn convert_float4_rtn(int4);
3085float4 __ovld __cnfn convert_float4(int4);
3086float4 __ovld __cnfn convert_float4_rte(uint4);
3087float4 __ovld __cnfn convert_float4_rtz(uint4);
3088float4 __ovld __cnfn convert_float4_rtp(uint4);
3089float4 __ovld __cnfn convert_float4_rtn(uint4);
3090float4 __ovld __cnfn convert_float4(uint4);
3091float4 __ovld __cnfn convert_float4_rte(long4);
3092float4 __ovld __cnfn convert_float4_rtz(long4);
3093float4 __ovld __cnfn convert_float4_rtp(long4);
3094float4 __ovld __cnfn convert_float4_rtn(long4);
3095float4 __ovld __cnfn convert_float4(long4);
3096float4 __ovld __cnfn convert_float4_rte(ulong4);
3097float4 __ovld __cnfn convert_float4_rtz(ulong4);
3098float4 __ovld __cnfn convert_float4_rtp(ulong4);
3099float4 __ovld __cnfn convert_float4_rtn(ulong4);
3100float4 __ovld __cnfn convert_float4(ulong4);
3101float4 __ovld __cnfn convert_float4_rte(float4);
3102float4 __ovld __cnfn convert_float4_rtz(float4);
3103float4 __ovld __cnfn convert_float4_rtp(float4);
3104float4 __ovld __cnfn convert_float4_rtn(float4);
3105float4 __ovld __cnfn convert_float4(float4);
3106char8 __ovld __cnfn convert_char8_rte(char8);
3107char8 __ovld __cnfn convert_char8_sat_rte(char8);
3108char8 __ovld __cnfn convert_char8_rtz(char8);
3109char8 __ovld __cnfn convert_char8_sat_rtz(char8);
3110char8 __ovld __cnfn convert_char8_rtp(char8);
3111char8 __ovld __cnfn convert_char8_sat_rtp(char8);
3112char8 __ovld __cnfn convert_char8_rtn(char8);
3113char8 __ovld __cnfn convert_char8_sat_rtn(char8);
3114char8 __ovld __cnfn convert_char8(char8);
3115char8 __ovld __cnfn convert_char8_sat(char8);
3116char8 __ovld __cnfn convert_char8_rte(uchar8);
3117char8 __ovld __cnfn convert_char8_sat_rte(uchar8);
3118char8 __ovld __cnfn convert_char8_rtz(uchar8);
3119char8 __ovld __cnfn convert_char8_sat_rtz(uchar8);
3120char8 __ovld __cnfn convert_char8_rtp(uchar8);
3121char8 __ovld __cnfn convert_char8_sat_rtp(uchar8);
3122char8 __ovld __cnfn convert_char8_rtn(uchar8);
3123char8 __ovld __cnfn convert_char8_sat_rtn(uchar8);
3124char8 __ovld __cnfn convert_char8(uchar8);
3125char8 __ovld __cnfn convert_char8_sat(uchar8);
3126char8 __ovld __cnfn convert_char8_rte(short8);
3127char8 __ovld __cnfn convert_char8_sat_rte(short8);
3128char8 __ovld __cnfn convert_char8_rtz(short8);
3129char8 __ovld __cnfn convert_char8_sat_rtz(short8);
3130char8 __ovld __cnfn convert_char8_rtp(short8);
3131char8 __ovld __cnfn convert_char8_sat_rtp(short8);
3132char8 __ovld __cnfn convert_char8_rtn(short8);
3133char8 __ovld __cnfn convert_char8_sat_rtn(short8);
3134char8 __ovld __cnfn convert_char8(short8);
3135char8 __ovld __cnfn convert_char8_sat(short8);
3136char8 __ovld __cnfn convert_char8_rte(ushort8);
3137char8 __ovld __cnfn convert_char8_sat_rte(ushort8);
3138char8 __ovld __cnfn convert_char8_rtz(ushort8);
3139char8 __ovld __cnfn convert_char8_sat_rtz(ushort8);
3140char8 __ovld __cnfn convert_char8_rtp(ushort8);
3141char8 __ovld __cnfn convert_char8_sat_rtp(ushort8);
3142char8 __ovld __cnfn convert_char8_rtn(ushort8);
3143char8 __ovld __cnfn convert_char8_sat_rtn(ushort8);
3144char8 __ovld __cnfn convert_char8(ushort8);
3145char8 __ovld __cnfn convert_char8_sat(ushort8);
3146char8 __ovld __cnfn convert_char8_rte(int8);
3147char8 __ovld __cnfn convert_char8_sat_rte(int8);
3148char8 __ovld __cnfn convert_char8_rtz(int8);
3149char8 __ovld __cnfn convert_char8_sat_rtz(int8);
3150char8 __ovld __cnfn convert_char8_rtp(int8);
3151char8 __ovld __cnfn convert_char8_sat_rtp(int8);
3152char8 __ovld __cnfn convert_char8_rtn(int8);
3153char8 __ovld __cnfn convert_char8_sat_rtn(int8);
3154char8 __ovld __cnfn convert_char8(int8);
3155char8 __ovld __cnfn convert_char8_sat(int8);
3156char8 __ovld __cnfn convert_char8_rte(uint8);
3157char8 __ovld __cnfn convert_char8_sat_rte(uint8);
3158char8 __ovld __cnfn convert_char8_rtz(uint8);
3159char8 __ovld __cnfn convert_char8_sat_rtz(uint8);
3160char8 __ovld __cnfn convert_char8_rtp(uint8);
3161char8 __ovld __cnfn convert_char8_sat_rtp(uint8);
3162char8 __ovld __cnfn convert_char8_rtn(uint8);
3163char8 __ovld __cnfn convert_char8_sat_rtn(uint8);
3164char8 __ovld __cnfn convert_char8(uint8);
3165char8 __ovld __cnfn convert_char8_sat(uint8);
3166char8 __ovld __cnfn convert_char8_rte(long8);
3167char8 __ovld __cnfn convert_char8_sat_rte(long8);
3168char8 __ovld __cnfn convert_char8_rtz(long8);
3169char8 __ovld __cnfn convert_char8_sat_rtz(long8);
3170char8 __ovld __cnfn convert_char8_rtp(long8);
3171char8 __ovld __cnfn convert_char8_sat_rtp(long8);
3172char8 __ovld __cnfn convert_char8_rtn(long8);
3173char8 __ovld __cnfn convert_char8_sat_rtn(long8);
3174char8 __ovld __cnfn convert_char8(long8);
3175char8 __ovld __cnfn convert_char8_sat(long8);
3176char8 __ovld __cnfn convert_char8_rte(ulong8);
3177char8 __ovld __cnfn convert_char8_sat_rte(ulong8);
3178char8 __ovld __cnfn convert_char8_rtz(ulong8);
3179char8 __ovld __cnfn convert_char8_sat_rtz(ulong8);
3180char8 __ovld __cnfn convert_char8_rtp(ulong8);
3181char8 __ovld __cnfn convert_char8_sat_rtp(ulong8);
3182char8 __ovld __cnfn convert_char8_rtn(ulong8);
3183char8 __ovld __cnfn convert_char8_sat_rtn(ulong8);
3184char8 __ovld __cnfn convert_char8(ulong8);
3185char8 __ovld __cnfn convert_char8_sat(ulong8);
3186char8 __ovld __cnfn convert_char8_rte(float8);
3187char8 __ovld __cnfn convert_char8_sat_rte(float8);
3188char8 __ovld __cnfn convert_char8_rtz(float8);
3189char8 __ovld __cnfn convert_char8_sat_rtz(float8);
3190char8 __ovld __cnfn convert_char8_rtp(float8);
3191char8 __ovld __cnfn convert_char8_sat_rtp(float8);
3192char8 __ovld __cnfn convert_char8_rtn(float8);
3193char8 __ovld __cnfn convert_char8_sat_rtn(float8);
3194char8 __ovld __cnfn convert_char8(float8);
3195char8 __ovld __cnfn convert_char8_sat(float8);
3196uchar8 __ovld __cnfn convert_uchar8_rte(char8);
3197uchar8 __ovld __cnfn convert_uchar8_sat_rte(char8);
3198uchar8 __ovld __cnfn convert_uchar8_rtz(char8);
3199uchar8 __ovld __cnfn convert_uchar8_sat_rtz(char8);
3200uchar8 __ovld __cnfn convert_uchar8_rtp(char8);
3201uchar8 __ovld __cnfn convert_uchar8_sat_rtp(char8);
3202uchar8 __ovld __cnfn convert_uchar8_rtn(char8);
3203uchar8 __ovld __cnfn convert_uchar8_sat_rtn(char8);
3204uchar8 __ovld __cnfn convert_uchar8(char8);
3205uchar8 __ovld __cnfn convert_uchar8_sat(char8);
3206uchar8 __ovld __cnfn convert_uchar8_rte(uchar8);
3207uchar8 __ovld __cnfn convert_uchar8_sat_rte(uchar8);
3208uchar8 __ovld __cnfn convert_uchar8_rtz(uchar8);
3209uchar8 __ovld __cnfn convert_uchar8_sat_rtz(uchar8);
3210uchar8 __ovld __cnfn convert_uchar8_rtp(uchar8);
3211uchar8 __ovld __cnfn convert_uchar8_sat_rtp(uchar8);
3212uchar8 __ovld __cnfn convert_uchar8_rtn(uchar8);
3213uchar8 __ovld __cnfn convert_uchar8_sat_rtn(uchar8);
3214uchar8 __ovld __cnfn convert_uchar8(uchar8);
3215uchar8 __ovld __cnfn convert_uchar8_sat(uchar8);
3216uchar8 __ovld __cnfn convert_uchar8_rte(short8);
3217uchar8 __ovld __cnfn convert_uchar8_sat_rte(short8);
3218uchar8 __ovld __cnfn convert_uchar8_rtz(short8);
3219uchar8 __ovld __cnfn convert_uchar8_sat_rtz(short8);
3220uchar8 __ovld __cnfn convert_uchar8_rtp(short8);
3221uchar8 __ovld __cnfn convert_uchar8_sat_rtp(short8);
3222uchar8 __ovld __cnfn convert_uchar8_rtn(short8);
3223uchar8 __ovld __cnfn convert_uchar8_sat_rtn(short8);
3224uchar8 __ovld __cnfn convert_uchar8(short8);
3225uchar8 __ovld __cnfn convert_uchar8_sat(short8);
3226uchar8 __ovld __cnfn convert_uchar8_rte(ushort8);
3227uchar8 __ovld __cnfn convert_uchar8_sat_rte(ushort8);
3228uchar8 __ovld __cnfn convert_uchar8_rtz(ushort8);
3229uchar8 __ovld __cnfn convert_uchar8_sat_rtz(ushort8);
3230uchar8 __ovld __cnfn convert_uchar8_rtp(ushort8);
3231uchar8 __ovld __cnfn convert_uchar8_sat_rtp(ushort8);
3232uchar8 __ovld __cnfn convert_uchar8_rtn(ushort8);
3233uchar8 __ovld __cnfn convert_uchar8_sat_rtn(ushort8);
3234uchar8 __ovld __cnfn convert_uchar8(ushort8);
3235uchar8 __ovld __cnfn convert_uchar8_sat(ushort8);
3236uchar8 __ovld __cnfn convert_uchar8_rte(int8);
3237uchar8 __ovld __cnfn convert_uchar8_sat_rte(int8);
3238uchar8 __ovld __cnfn convert_uchar8_rtz(int8);
3239uchar8 __ovld __cnfn convert_uchar8_sat_rtz(int8);
3240uchar8 __ovld __cnfn convert_uchar8_rtp(int8);
3241uchar8 __ovld __cnfn convert_uchar8_sat_rtp(int8);
3242uchar8 __ovld __cnfn convert_uchar8_rtn(int8);
3243uchar8 __ovld __cnfn convert_uchar8_sat_rtn(int8);
3244uchar8 __ovld __cnfn convert_uchar8(int8);
3245uchar8 __ovld __cnfn convert_uchar8_sat(int8);
3246uchar8 __ovld __cnfn convert_uchar8_rte(uint8);
3247uchar8 __ovld __cnfn convert_uchar8_sat_rte(uint8);
3248uchar8 __ovld __cnfn convert_uchar8_rtz(uint8);
3249uchar8 __ovld __cnfn convert_uchar8_sat_rtz(uint8);
3250uchar8 __ovld __cnfn convert_uchar8_rtp(uint8);
3251uchar8 __ovld __cnfn convert_uchar8_sat_rtp(uint8);
3252uchar8 __ovld __cnfn convert_uchar8_rtn(uint8);
3253uchar8 __ovld __cnfn convert_uchar8_sat_rtn(uint8);
3254uchar8 __ovld __cnfn convert_uchar8(uint8);
3255uchar8 __ovld __cnfn convert_uchar8_sat(uint8);
3256uchar8 __ovld __cnfn convert_uchar8_rte(long8);
3257uchar8 __ovld __cnfn convert_uchar8_sat_rte(long8);
3258uchar8 __ovld __cnfn convert_uchar8_rtz(long8);
3259uchar8 __ovld __cnfn convert_uchar8_sat_rtz(long8);
3260uchar8 __ovld __cnfn convert_uchar8_rtp(long8);
3261uchar8 __ovld __cnfn convert_uchar8_sat_rtp(long8);
3262uchar8 __ovld __cnfn convert_uchar8_rtn(long8);
3263uchar8 __ovld __cnfn convert_uchar8_sat_rtn(long8);
3264uchar8 __ovld __cnfn convert_uchar8(long8);
3265uchar8 __ovld __cnfn convert_uchar8_sat(long8);
3266uchar8 __ovld __cnfn convert_uchar8_rte(ulong8);
3267uchar8 __ovld __cnfn convert_uchar8_sat_rte(ulong8);
3268uchar8 __ovld __cnfn convert_uchar8_rtz(ulong8);
3269uchar8 __ovld __cnfn convert_uchar8_sat_rtz(ulong8);
3270uchar8 __ovld __cnfn convert_uchar8_rtp(ulong8);
3271uchar8 __ovld __cnfn convert_uchar8_sat_rtp(ulong8);
3272uchar8 __ovld __cnfn convert_uchar8_rtn(ulong8);
3273uchar8 __ovld __cnfn convert_uchar8_sat_rtn(ulong8);
3274uchar8 __ovld __cnfn convert_uchar8(ulong8);
3275uchar8 __ovld __cnfn convert_uchar8_sat(ulong8);
3276uchar8 __ovld __cnfn convert_uchar8_rte(float8);
3277uchar8 __ovld __cnfn convert_uchar8_sat_rte(float8);
3278uchar8 __ovld __cnfn convert_uchar8_rtz(float8);
3279uchar8 __ovld __cnfn convert_uchar8_sat_rtz(float8);
3280uchar8 __ovld __cnfn convert_uchar8_rtp(float8);
3281uchar8 __ovld __cnfn convert_uchar8_sat_rtp(float8);
3282uchar8 __ovld __cnfn convert_uchar8_rtn(float8);
3283uchar8 __ovld __cnfn convert_uchar8_sat_rtn(float8);
3284uchar8 __ovld __cnfn convert_uchar8(float8);
3285uchar8 __ovld __cnfn convert_uchar8_sat(float8);
3286short8 __ovld __cnfn convert_short8_rte(char8);
3287short8 __ovld __cnfn convert_short8_sat_rte(char8);
3288short8 __ovld __cnfn convert_short8_rtz(char8);
3289short8 __ovld __cnfn convert_short8_sat_rtz(char8);
3290short8 __ovld __cnfn convert_short8_rtp(char8);
3291short8 __ovld __cnfn convert_short8_sat_rtp(char8);
3292short8 __ovld __cnfn convert_short8_rtn(char8);
3293short8 __ovld __cnfn convert_short8_sat_rtn(char8);
3294short8 __ovld __cnfn convert_short8(char8);
3295short8 __ovld __cnfn convert_short8_sat(char8);
3296short8 __ovld __cnfn convert_short8_rte(uchar8);
3297short8 __ovld __cnfn convert_short8_sat_rte(uchar8);
3298short8 __ovld __cnfn convert_short8_rtz(uchar8);
3299short8 __ovld __cnfn convert_short8_sat_rtz(uchar8);
3300short8 __ovld __cnfn convert_short8_rtp(uchar8);
3301short8 __ovld __cnfn convert_short8_sat_rtp(uchar8);
3302short8 __ovld __cnfn convert_short8_rtn(uchar8);
3303short8 __ovld __cnfn convert_short8_sat_rtn(uchar8);
3304short8 __ovld __cnfn convert_short8(uchar8);
3305short8 __ovld __cnfn convert_short8_sat(uchar8);
3306short8 __ovld __cnfn convert_short8_rte(short8);
3307short8 __ovld __cnfn convert_short8_sat_rte(short8);
3308short8 __ovld __cnfn convert_short8_rtz(short8);
3309short8 __ovld __cnfn convert_short8_sat_rtz(short8);
3310short8 __ovld __cnfn convert_short8_rtp(short8);
3311short8 __ovld __cnfn convert_short8_sat_rtp(short8);
3312short8 __ovld __cnfn convert_short8_rtn(short8);
3313short8 __ovld __cnfn convert_short8_sat_rtn(short8);
3314short8 __ovld __cnfn convert_short8(short8);
3315short8 __ovld __cnfn convert_short8_sat(short8);
3316short8 __ovld __cnfn convert_short8_rte(ushort8);
3317short8 __ovld __cnfn convert_short8_sat_rte(ushort8);
3318short8 __ovld __cnfn convert_short8_rtz(ushort8);
3319short8 __ovld __cnfn convert_short8_sat_rtz(ushort8);
3320short8 __ovld __cnfn convert_short8_rtp(ushort8);
3321short8 __ovld __cnfn convert_short8_sat_rtp(ushort8);
3322short8 __ovld __cnfn convert_short8_rtn(ushort8);
3323short8 __ovld __cnfn convert_short8_sat_rtn(ushort8);
3324short8 __ovld __cnfn convert_short8(ushort8);
3325short8 __ovld __cnfn convert_short8_sat(ushort8);
3326short8 __ovld __cnfn convert_short8_rte(int8);
3327short8 __ovld __cnfn convert_short8_sat_rte(int8);
3328short8 __ovld __cnfn convert_short8_rtz(int8);
3329short8 __ovld __cnfn convert_short8_sat_rtz(int8);
3330short8 __ovld __cnfn convert_short8_rtp(int8);
3331short8 __ovld __cnfn convert_short8_sat_rtp(int8);
3332short8 __ovld __cnfn convert_short8_rtn(int8);
3333short8 __ovld __cnfn convert_short8_sat_rtn(int8);
3334short8 __ovld __cnfn convert_short8(int8);
3335short8 __ovld __cnfn convert_short8_sat(int8);
3336short8 __ovld __cnfn convert_short8_rte(uint8);
3337short8 __ovld __cnfn convert_short8_sat_rte(uint8);
3338short8 __ovld __cnfn convert_short8_rtz(uint8);
3339short8 __ovld __cnfn convert_short8_sat_rtz(uint8);
3340short8 __ovld __cnfn convert_short8_rtp(uint8);
3341short8 __ovld __cnfn convert_short8_sat_rtp(uint8);
3342short8 __ovld __cnfn convert_short8_rtn(uint8);
3343short8 __ovld __cnfn convert_short8_sat_rtn(uint8);
3344short8 __ovld __cnfn convert_short8(uint8);
3345short8 __ovld __cnfn convert_short8_sat(uint8);
3346short8 __ovld __cnfn convert_short8_rte(long8);
3347short8 __ovld __cnfn convert_short8_sat_rte(long8);
3348short8 __ovld __cnfn convert_short8_rtz(long8);
3349short8 __ovld __cnfn convert_short8_sat_rtz(long8);
3350short8 __ovld __cnfn convert_short8_rtp(long8);
3351short8 __ovld __cnfn convert_short8_sat_rtp(long8);
3352short8 __ovld __cnfn convert_short8_rtn(long8);
3353short8 __ovld __cnfn convert_short8_sat_rtn(long8);
3354short8 __ovld __cnfn convert_short8(long8);
3355short8 __ovld __cnfn convert_short8_sat(long8);
3356short8 __ovld __cnfn convert_short8_rte(ulong8);
3357short8 __ovld __cnfn convert_short8_sat_rte(ulong8);
3358short8 __ovld __cnfn convert_short8_rtz(ulong8);
3359short8 __ovld __cnfn convert_short8_sat_rtz(ulong8);
3360short8 __ovld __cnfn convert_short8_rtp(ulong8);
3361short8 __ovld __cnfn convert_short8_sat_rtp(ulong8);
3362short8 __ovld __cnfn convert_short8_rtn(ulong8);
3363short8 __ovld __cnfn convert_short8_sat_rtn(ulong8);
3364short8 __ovld __cnfn convert_short8(ulong8);
3365short8 __ovld __cnfn convert_short8_sat(ulong8);
3366short8 __ovld __cnfn convert_short8_rte(float8);
3367short8 __ovld __cnfn convert_short8_sat_rte(float8);
3368short8 __ovld __cnfn convert_short8_rtz(float8);
3369short8 __ovld __cnfn convert_short8_sat_rtz(float8);
3370short8 __ovld __cnfn convert_short8_rtp(float8);
3371short8 __ovld __cnfn convert_short8_sat_rtp(float8);
3372short8 __ovld __cnfn convert_short8_rtn(float8);
3373short8 __ovld __cnfn convert_short8_sat_rtn(float8);
3374short8 __ovld __cnfn convert_short8(float8);
3375short8 __ovld __cnfn convert_short8_sat(float8);
3376ushort8 __ovld __cnfn convert_ushort8_rte(char8);
3377ushort8 __ovld __cnfn convert_ushort8_sat_rte(char8);
3378ushort8 __ovld __cnfn convert_ushort8_rtz(char8);
3379ushort8 __ovld __cnfn convert_ushort8_sat_rtz(char8);
3380ushort8 __ovld __cnfn convert_ushort8_rtp(char8);
3381ushort8 __ovld __cnfn convert_ushort8_sat_rtp(char8);
3382ushort8 __ovld __cnfn convert_ushort8_rtn(char8);
3383ushort8 __ovld __cnfn convert_ushort8_sat_rtn(char8);
3384ushort8 __ovld __cnfn convert_ushort8(char8);
3385ushort8 __ovld __cnfn convert_ushort8_sat(char8);
3386ushort8 __ovld __cnfn convert_ushort8_rte(uchar8);
3387ushort8 __ovld __cnfn convert_ushort8_sat_rte(uchar8);
3388ushort8 __ovld __cnfn convert_ushort8_rtz(uchar8);
3389ushort8 __ovld __cnfn convert_ushort8_sat_rtz(uchar8);
3390ushort8 __ovld __cnfn convert_ushort8_rtp(uchar8);
3391ushort8 __ovld __cnfn convert_ushort8_sat_rtp(uchar8);
3392ushort8 __ovld __cnfn convert_ushort8_rtn(uchar8);
3393ushort8 __ovld __cnfn convert_ushort8_sat_rtn(uchar8);
3394ushort8 __ovld __cnfn convert_ushort8(uchar8);
3395ushort8 __ovld __cnfn convert_ushort8_sat(uchar8);
3396ushort8 __ovld __cnfn convert_ushort8_rte(short8);
3397ushort8 __ovld __cnfn convert_ushort8_sat_rte(short8);
3398ushort8 __ovld __cnfn convert_ushort8_rtz(short8);
3399ushort8 __ovld __cnfn convert_ushort8_sat_rtz(short8);
3400ushort8 __ovld __cnfn convert_ushort8_rtp(short8);
3401ushort8 __ovld __cnfn convert_ushort8_sat_rtp(short8);
3402ushort8 __ovld __cnfn convert_ushort8_rtn(short8);
3403ushort8 __ovld __cnfn convert_ushort8_sat_rtn(short8);
3404ushort8 __ovld __cnfn convert_ushort8(short8);
3405ushort8 __ovld __cnfn convert_ushort8_sat(short8);
3406ushort8 __ovld __cnfn convert_ushort8_rte(ushort8);
3407ushort8 __ovld __cnfn convert_ushort8_sat_rte(ushort8);
3408ushort8 __ovld __cnfn convert_ushort8_rtz(ushort8);
3409ushort8 __ovld __cnfn convert_ushort8_sat_rtz(ushort8);
3410ushort8 __ovld __cnfn convert_ushort8_rtp(ushort8);
3411ushort8 __ovld __cnfn convert_ushort8_sat_rtp(ushort8);
3412ushort8 __ovld __cnfn convert_ushort8_rtn(ushort8);
3413ushort8 __ovld __cnfn convert_ushort8_sat_rtn(ushort8);
3414ushort8 __ovld __cnfn convert_ushort8(ushort8);
3415ushort8 __ovld __cnfn convert_ushort8_sat(ushort8);
3416ushort8 __ovld __cnfn convert_ushort8_rte(int8);
3417ushort8 __ovld __cnfn convert_ushort8_sat_rte(int8);
3418ushort8 __ovld __cnfn convert_ushort8_rtz(int8);
3419ushort8 __ovld __cnfn convert_ushort8_sat_rtz(int8);
3420ushort8 __ovld __cnfn convert_ushort8_rtp(int8);
3421ushort8 __ovld __cnfn convert_ushort8_sat_rtp(int8);
3422ushort8 __ovld __cnfn convert_ushort8_rtn(int8);
3423ushort8 __ovld __cnfn convert_ushort8_sat_rtn(int8);
3424ushort8 __ovld __cnfn convert_ushort8(int8);
3425ushort8 __ovld __cnfn convert_ushort8_sat(int8);
3426ushort8 __ovld __cnfn convert_ushort8_rte(uint8);
3427ushort8 __ovld __cnfn convert_ushort8_sat_rte(uint8);
3428ushort8 __ovld __cnfn convert_ushort8_rtz(uint8);
3429ushort8 __ovld __cnfn convert_ushort8_sat_rtz(uint8);
3430ushort8 __ovld __cnfn convert_ushort8_rtp(uint8);
3431ushort8 __ovld __cnfn convert_ushort8_sat_rtp(uint8);
3432ushort8 __ovld __cnfn convert_ushort8_rtn(uint8);
3433ushort8 __ovld __cnfn convert_ushort8_sat_rtn(uint8);
3434ushort8 __ovld __cnfn convert_ushort8(uint8);
3435ushort8 __ovld __cnfn convert_ushort8_sat(uint8);
3436ushort8 __ovld __cnfn convert_ushort8_rte(long8);
3437ushort8 __ovld __cnfn convert_ushort8_sat_rte(long8);
3438ushort8 __ovld __cnfn convert_ushort8_rtz(long8);
3439ushort8 __ovld __cnfn convert_ushort8_sat_rtz(long8);
3440ushort8 __ovld __cnfn convert_ushort8_rtp(long8);
3441ushort8 __ovld __cnfn convert_ushort8_sat_rtp(long8);
3442ushort8 __ovld __cnfn convert_ushort8_rtn(long8);
3443ushort8 __ovld __cnfn convert_ushort8_sat_rtn(long8);
3444ushort8 __ovld __cnfn convert_ushort8(long8);
3445ushort8 __ovld __cnfn convert_ushort8_sat(long8);
3446ushort8 __ovld __cnfn convert_ushort8_rte(ulong8);
3447ushort8 __ovld __cnfn convert_ushort8_sat_rte(ulong8);
3448ushort8 __ovld __cnfn convert_ushort8_rtz(ulong8);
3449ushort8 __ovld __cnfn convert_ushort8_sat_rtz(ulong8);
3450ushort8 __ovld __cnfn convert_ushort8_rtp(ulong8);
3451ushort8 __ovld __cnfn convert_ushort8_sat_rtp(ulong8);
3452ushort8 __ovld __cnfn convert_ushort8_rtn(ulong8);
3453ushort8 __ovld __cnfn convert_ushort8_sat_rtn(ulong8);
3454ushort8 __ovld __cnfn convert_ushort8(ulong8);
3455ushort8 __ovld __cnfn convert_ushort8_sat(ulong8);
3456ushort8 __ovld __cnfn convert_ushort8_rte(float8);
3457ushort8 __ovld __cnfn convert_ushort8_sat_rte(float8);
3458ushort8 __ovld __cnfn convert_ushort8_rtz(float8);
3459ushort8 __ovld __cnfn convert_ushort8_sat_rtz(float8);
3460ushort8 __ovld __cnfn convert_ushort8_rtp(float8);
3461ushort8 __ovld __cnfn convert_ushort8_sat_rtp(float8);
3462ushort8 __ovld __cnfn convert_ushort8_rtn(float8);
3463ushort8 __ovld __cnfn convert_ushort8_sat_rtn(float8);
3464ushort8 __ovld __cnfn convert_ushort8(float8);
3465ushort8 __ovld __cnfn convert_ushort8_sat(float8);
3466int8 __ovld __cnfn convert_int8_rte(char8);
3467int8 __ovld __cnfn convert_int8_sat_rte(char8);
3468int8 __ovld __cnfn convert_int8_rtz(char8);
3469int8 __ovld __cnfn convert_int8_sat_rtz(char8);
3470int8 __ovld __cnfn convert_int8_rtp(char8);
3471int8 __ovld __cnfn convert_int8_sat_rtp(char8);
3472int8 __ovld __cnfn convert_int8_rtn(char8);
3473int8 __ovld __cnfn convert_int8_sat_rtn(char8);
3474int8 __ovld __cnfn convert_int8(char8);
3475int8 __ovld __cnfn convert_int8_sat(char8);
3476int8 __ovld __cnfn convert_int8_rte(uchar8);
3477int8 __ovld __cnfn convert_int8_sat_rte(uchar8);
3478int8 __ovld __cnfn convert_int8_rtz(uchar8);
3479int8 __ovld __cnfn convert_int8_sat_rtz(uchar8);
3480int8 __ovld __cnfn convert_int8_rtp(uchar8);
3481int8 __ovld __cnfn convert_int8_sat_rtp(uchar8);
3482int8 __ovld __cnfn convert_int8_rtn(uchar8);
3483int8 __ovld __cnfn convert_int8_sat_rtn(uchar8);
3484int8 __ovld __cnfn convert_int8(uchar8);
3485int8 __ovld __cnfn convert_int8_sat(uchar8);
3486int8 __ovld __cnfn convert_int8_rte(short8);
3487int8 __ovld __cnfn convert_int8_sat_rte(short8);
3488int8 __ovld __cnfn convert_int8_rtz(short8);
3489int8 __ovld __cnfn convert_int8_sat_rtz(short8);
3490int8 __ovld __cnfn convert_int8_rtp(short8);
3491int8 __ovld __cnfn convert_int8_sat_rtp(short8);
3492int8 __ovld __cnfn convert_int8_rtn(short8);
3493int8 __ovld __cnfn convert_int8_sat_rtn(short8);
3494int8 __ovld __cnfn convert_int8(short8);
3495int8 __ovld __cnfn convert_int8_sat(short8);
3496int8 __ovld __cnfn convert_int8_rte(ushort8);
3497int8 __ovld __cnfn convert_int8_sat_rte(ushort8);
3498int8 __ovld __cnfn convert_int8_rtz(ushort8);
3499int8 __ovld __cnfn convert_int8_sat_rtz(ushort8);
3500int8 __ovld __cnfn convert_int8_rtp(ushort8);
3501int8 __ovld __cnfn convert_int8_sat_rtp(ushort8);
3502int8 __ovld __cnfn convert_int8_rtn(ushort8);
3503int8 __ovld __cnfn convert_int8_sat_rtn(ushort8);
3504int8 __ovld __cnfn convert_int8(ushort8);
3505int8 __ovld __cnfn convert_int8_sat(ushort8);
3506int8 __ovld __cnfn convert_int8_rte(int8);
3507int8 __ovld __cnfn convert_int8_sat_rte(int8);
3508int8 __ovld __cnfn convert_int8_rtz(int8);
3509int8 __ovld __cnfn convert_int8_sat_rtz(int8);
3510int8 __ovld __cnfn convert_int8_rtp(int8);
3511int8 __ovld __cnfn convert_int8_sat_rtp(int8);
3512int8 __ovld __cnfn convert_int8_rtn(int8);
3513int8 __ovld __cnfn convert_int8_sat_rtn(int8);
3514int8 __ovld __cnfn convert_int8(int8);
3515int8 __ovld __cnfn convert_int8_sat(int8);
3516int8 __ovld __cnfn convert_int8_rte(uint8);
3517int8 __ovld __cnfn convert_int8_sat_rte(uint8);
3518int8 __ovld __cnfn convert_int8_rtz(uint8);
3519int8 __ovld __cnfn convert_int8_sat_rtz(uint8);
3520int8 __ovld __cnfn convert_int8_rtp(uint8);
3521int8 __ovld __cnfn convert_int8_sat_rtp(uint8);
3522int8 __ovld __cnfn convert_int8_rtn(uint8);
3523int8 __ovld __cnfn convert_int8_sat_rtn(uint8);
3524int8 __ovld __cnfn convert_int8(uint8);
3525int8 __ovld __cnfn convert_int8_sat(uint8);
3526int8 __ovld __cnfn convert_int8_rte(long8);
3527int8 __ovld __cnfn convert_int8_sat_rte(long8);
3528int8 __ovld __cnfn convert_int8_rtz(long8);
3529int8 __ovld __cnfn convert_int8_sat_rtz(long8);
3530int8 __ovld __cnfn convert_int8_rtp(long8);
3531int8 __ovld __cnfn convert_int8_sat_rtp(long8);
3532int8 __ovld __cnfn convert_int8_rtn(long8);
3533int8 __ovld __cnfn convert_int8_sat_rtn(long8);
3534int8 __ovld __cnfn convert_int8(long8);
3535int8 __ovld __cnfn convert_int8_sat(long8);
3536int8 __ovld __cnfn convert_int8_rte(ulong8);
3537int8 __ovld __cnfn convert_int8_sat_rte(ulong8);
3538int8 __ovld __cnfn convert_int8_rtz(ulong8);
3539int8 __ovld __cnfn convert_int8_sat_rtz(ulong8);
3540int8 __ovld __cnfn convert_int8_rtp(ulong8);
3541int8 __ovld __cnfn convert_int8_sat_rtp(ulong8);
3542int8 __ovld __cnfn convert_int8_rtn(ulong8);
3543int8 __ovld __cnfn convert_int8_sat_rtn(ulong8);
3544int8 __ovld __cnfn convert_int8(ulong8);
3545int8 __ovld __cnfn convert_int8_sat(ulong8);
3546int8 __ovld __cnfn convert_int8_rte(float8);
3547int8 __ovld __cnfn convert_int8_sat_rte(float8);
3548int8 __ovld __cnfn convert_int8_rtz(float8);
3549int8 __ovld __cnfn convert_int8_sat_rtz(float8);
3550int8 __ovld __cnfn convert_int8_rtp(float8);
3551int8 __ovld __cnfn convert_int8_sat_rtp(float8);
3552int8 __ovld __cnfn convert_int8_rtn(float8);
3553int8 __ovld __cnfn convert_int8_sat_rtn(float8);
3554int8 __ovld __cnfn convert_int8(float8);
3555int8 __ovld __cnfn convert_int8_sat(float8);
3556uint8 __ovld __cnfn convert_uint8_rte(char8);
3557uint8 __ovld __cnfn convert_uint8_sat_rte(char8);
3558uint8 __ovld __cnfn convert_uint8_rtz(char8);
3559uint8 __ovld __cnfn convert_uint8_sat_rtz(char8);
3560uint8 __ovld __cnfn convert_uint8_rtp(char8);
3561uint8 __ovld __cnfn convert_uint8_sat_rtp(char8);
3562uint8 __ovld __cnfn convert_uint8_rtn(char8);
3563uint8 __ovld __cnfn convert_uint8_sat_rtn(char8);
3564uint8 __ovld __cnfn convert_uint8(char8);
3565uint8 __ovld __cnfn convert_uint8_sat(char8);
3566uint8 __ovld __cnfn convert_uint8_rte(uchar8);
3567uint8 __ovld __cnfn convert_uint8_sat_rte(uchar8);
3568uint8 __ovld __cnfn convert_uint8_rtz(uchar8);
3569uint8 __ovld __cnfn convert_uint8_sat_rtz(uchar8);
3570uint8 __ovld __cnfn convert_uint8_rtp(uchar8);
3571uint8 __ovld __cnfn convert_uint8_sat_rtp(uchar8);
3572uint8 __ovld __cnfn convert_uint8_rtn(uchar8);
3573uint8 __ovld __cnfn convert_uint8_sat_rtn(uchar8);
3574uint8 __ovld __cnfn convert_uint8(uchar8);
3575uint8 __ovld __cnfn convert_uint8_sat(uchar8);
3576uint8 __ovld __cnfn convert_uint8_rte(short8);
3577uint8 __ovld __cnfn convert_uint8_sat_rte(short8);
3578uint8 __ovld __cnfn convert_uint8_rtz(short8);
3579uint8 __ovld __cnfn convert_uint8_sat_rtz(short8);
3580uint8 __ovld __cnfn convert_uint8_rtp(short8);
3581uint8 __ovld __cnfn convert_uint8_sat_rtp(short8);
3582uint8 __ovld __cnfn convert_uint8_rtn(short8);
3583uint8 __ovld __cnfn convert_uint8_sat_rtn(short8);
3584uint8 __ovld __cnfn convert_uint8(short8);
3585uint8 __ovld __cnfn convert_uint8_sat(short8);
3586uint8 __ovld __cnfn convert_uint8_rte(ushort8);
3587uint8 __ovld __cnfn convert_uint8_sat_rte(ushort8);
3588uint8 __ovld __cnfn convert_uint8_rtz(ushort8);
3589uint8 __ovld __cnfn convert_uint8_sat_rtz(ushort8);
3590uint8 __ovld __cnfn convert_uint8_rtp(ushort8);
3591uint8 __ovld __cnfn convert_uint8_sat_rtp(ushort8);
3592uint8 __ovld __cnfn convert_uint8_rtn(ushort8);
3593uint8 __ovld __cnfn convert_uint8_sat_rtn(ushort8);
3594uint8 __ovld __cnfn convert_uint8(ushort8);
3595uint8 __ovld __cnfn convert_uint8_sat(ushort8);
3596uint8 __ovld __cnfn convert_uint8_rte(int8);
3597uint8 __ovld __cnfn convert_uint8_sat_rte(int8);
3598uint8 __ovld __cnfn convert_uint8_rtz(int8);
3599uint8 __ovld __cnfn convert_uint8_sat_rtz(int8);
3600uint8 __ovld __cnfn convert_uint8_rtp(int8);
3601uint8 __ovld __cnfn convert_uint8_sat_rtp(int8);
3602uint8 __ovld __cnfn convert_uint8_rtn(int8);
3603uint8 __ovld __cnfn convert_uint8_sat_rtn(int8);
3604uint8 __ovld __cnfn convert_uint8(int8);
3605uint8 __ovld __cnfn convert_uint8_sat(int8);
3606uint8 __ovld __cnfn convert_uint8_rte(uint8);
3607uint8 __ovld __cnfn convert_uint8_sat_rte(uint8);
3608uint8 __ovld __cnfn convert_uint8_rtz(uint8);
3609uint8 __ovld __cnfn convert_uint8_sat_rtz(uint8);
3610uint8 __ovld __cnfn convert_uint8_rtp(uint8);
3611uint8 __ovld __cnfn convert_uint8_sat_rtp(uint8);
3612uint8 __ovld __cnfn convert_uint8_rtn(uint8);
3613uint8 __ovld __cnfn convert_uint8_sat_rtn(uint8);
3614uint8 __ovld __cnfn convert_uint8(uint8);
3615uint8 __ovld __cnfn convert_uint8_sat(uint8);
3616uint8 __ovld __cnfn convert_uint8_rte(long8);
3617uint8 __ovld __cnfn convert_uint8_sat_rte(long8);
3618uint8 __ovld __cnfn convert_uint8_rtz(long8);
3619uint8 __ovld __cnfn convert_uint8_sat_rtz(long8);
3620uint8 __ovld __cnfn convert_uint8_rtp(long8);
3621uint8 __ovld __cnfn convert_uint8_sat_rtp(long8);
3622uint8 __ovld __cnfn convert_uint8_rtn(long8);
3623uint8 __ovld __cnfn convert_uint8_sat_rtn(long8);
3624uint8 __ovld __cnfn convert_uint8(long8);
3625uint8 __ovld __cnfn convert_uint8_sat(long8);
3626uint8 __ovld __cnfn convert_uint8_rte(ulong8);
3627uint8 __ovld __cnfn convert_uint8_sat_rte(ulong8);
3628uint8 __ovld __cnfn convert_uint8_rtz(ulong8);
3629uint8 __ovld __cnfn convert_uint8_sat_rtz(ulong8);
3630uint8 __ovld __cnfn convert_uint8_rtp(ulong8);
3631uint8 __ovld __cnfn convert_uint8_sat_rtp(ulong8);
3632uint8 __ovld __cnfn convert_uint8_rtn(ulong8);
3633uint8 __ovld __cnfn convert_uint8_sat_rtn(ulong8);
3634uint8 __ovld __cnfn convert_uint8(ulong8);
3635uint8 __ovld __cnfn convert_uint8_sat(ulong8);
3636uint8 __ovld __cnfn convert_uint8_rte(float8);
3637uint8 __ovld __cnfn convert_uint8_sat_rte(float8);
3638uint8 __ovld __cnfn convert_uint8_rtz(float8);
3639uint8 __ovld __cnfn convert_uint8_sat_rtz(float8);
3640uint8 __ovld __cnfn convert_uint8_rtp(float8);
3641uint8 __ovld __cnfn convert_uint8_sat_rtp(float8);
3642uint8 __ovld __cnfn convert_uint8_rtn(float8);
3643uint8 __ovld __cnfn convert_uint8_sat_rtn(float8);
3644uint8 __ovld __cnfn convert_uint8(float8);
3645uint8 __ovld __cnfn convert_uint8_sat(float8);
3646long8 __ovld __cnfn convert_long8_rte(char8);
3647long8 __ovld __cnfn convert_long8_sat_rte(char8);
3648long8 __ovld __cnfn convert_long8_rtz(char8);
3649long8 __ovld __cnfn convert_long8_sat_rtz(char8);
3650long8 __ovld __cnfn convert_long8_rtp(char8);
3651long8 __ovld __cnfn convert_long8_sat_rtp(char8);
3652long8 __ovld __cnfn convert_long8_rtn(char8);
3653long8 __ovld __cnfn convert_long8_sat_rtn(char8);
3654long8 __ovld __cnfn convert_long8(char8);
3655long8 __ovld __cnfn convert_long8_sat(char8);
3656long8 __ovld __cnfn convert_long8_rte(uchar8);
3657long8 __ovld __cnfn convert_long8_sat_rte(uchar8);
3658long8 __ovld __cnfn convert_long8_rtz(uchar8);
3659long8 __ovld __cnfn convert_long8_sat_rtz(uchar8);
3660long8 __ovld __cnfn convert_long8_rtp(uchar8);
3661long8 __ovld __cnfn convert_long8_sat_rtp(uchar8);
3662long8 __ovld __cnfn convert_long8_rtn(uchar8);
3663long8 __ovld __cnfn convert_long8_sat_rtn(uchar8);
3664long8 __ovld __cnfn convert_long8(uchar8);
3665long8 __ovld __cnfn convert_long8_sat(uchar8);
3666long8 __ovld __cnfn convert_long8_rte(short8);
3667long8 __ovld __cnfn convert_long8_sat_rte(short8);
3668long8 __ovld __cnfn convert_long8_rtz(short8);
3669long8 __ovld __cnfn convert_long8_sat_rtz(short8);
3670long8 __ovld __cnfn convert_long8_rtp(short8);
3671long8 __ovld __cnfn convert_long8_sat_rtp(short8);
3672long8 __ovld __cnfn convert_long8_rtn(short8);
3673long8 __ovld __cnfn convert_long8_sat_rtn(short8);
3674long8 __ovld __cnfn convert_long8(short8);
3675long8 __ovld __cnfn convert_long8_sat(short8);
3676long8 __ovld __cnfn convert_long8_rte(ushort8);
3677long8 __ovld __cnfn convert_long8_sat_rte(ushort8);
3678long8 __ovld __cnfn convert_long8_rtz(ushort8);
3679long8 __ovld __cnfn convert_long8_sat_rtz(ushort8);
3680long8 __ovld __cnfn convert_long8_rtp(ushort8);
3681long8 __ovld __cnfn convert_long8_sat_rtp(ushort8);
3682long8 __ovld __cnfn convert_long8_rtn(ushort8);
3683long8 __ovld __cnfn convert_long8_sat_rtn(ushort8);
3684long8 __ovld __cnfn convert_long8(ushort8);
3685long8 __ovld __cnfn convert_long8_sat(ushort8);
3686long8 __ovld __cnfn convert_long8_rte(int8);
3687long8 __ovld __cnfn convert_long8_sat_rte(int8);
3688long8 __ovld __cnfn convert_long8_rtz(int8);
3689long8 __ovld __cnfn convert_long8_sat_rtz(int8);
3690long8 __ovld __cnfn convert_long8_rtp(int8);
3691long8 __ovld __cnfn convert_long8_sat_rtp(int8);
3692long8 __ovld __cnfn convert_long8_rtn(int8);
3693long8 __ovld __cnfn convert_long8_sat_rtn(int8);
3694long8 __ovld __cnfn convert_long8(int8);
3695long8 __ovld __cnfn convert_long8_sat(int8);
3696long8 __ovld __cnfn convert_long8_rte(uint8);
3697long8 __ovld __cnfn convert_long8_sat_rte(uint8);
3698long8 __ovld __cnfn convert_long8_rtz(uint8);
3699long8 __ovld __cnfn convert_long8_sat_rtz(uint8);
3700long8 __ovld __cnfn convert_long8_rtp(uint8);
3701long8 __ovld __cnfn convert_long8_sat_rtp(uint8);
3702long8 __ovld __cnfn convert_long8_rtn(uint8);
3703long8 __ovld __cnfn convert_long8_sat_rtn(uint8);
3704long8 __ovld __cnfn convert_long8(uint8);
3705long8 __ovld __cnfn convert_long8_sat(uint8);
3706long8 __ovld __cnfn convert_long8_rte(long8);
3707long8 __ovld __cnfn convert_long8_sat_rte(long8);
3708long8 __ovld __cnfn convert_long8_rtz(long8);
3709long8 __ovld __cnfn convert_long8_sat_rtz(long8);
3710long8 __ovld __cnfn convert_long8_rtp(long8);
3711long8 __ovld __cnfn convert_long8_sat_rtp(long8);
3712long8 __ovld __cnfn convert_long8_rtn(long8);
3713long8 __ovld __cnfn convert_long8_sat_rtn(long8);
3714long8 __ovld __cnfn convert_long8(long8);
3715long8 __ovld __cnfn convert_long8_sat(long8);
3716long8 __ovld __cnfn convert_long8_rte(ulong8);
3717long8 __ovld __cnfn convert_long8_sat_rte(ulong8);
3718long8 __ovld __cnfn convert_long8_rtz(ulong8);
3719long8 __ovld __cnfn convert_long8_sat_rtz(ulong8);
3720long8 __ovld __cnfn convert_long8_rtp(ulong8);
3721long8 __ovld __cnfn convert_long8_sat_rtp(ulong8);
3722long8 __ovld __cnfn convert_long8_rtn(ulong8);
3723long8 __ovld __cnfn convert_long8_sat_rtn(ulong8);
3724long8 __ovld __cnfn convert_long8(ulong8);
3725long8 __ovld __cnfn convert_long8_sat(ulong8);
3726long8 __ovld __cnfn convert_long8_rte(float8);
3727long8 __ovld __cnfn convert_long8_sat_rte(float8);
3728long8 __ovld __cnfn convert_long8_rtz(float8);
3729long8 __ovld __cnfn convert_long8_sat_rtz(float8);
3730long8 __ovld __cnfn convert_long8_rtp(float8);
3731long8 __ovld __cnfn convert_long8_sat_rtp(float8);
3732long8 __ovld __cnfn convert_long8_rtn(float8);
3733long8 __ovld __cnfn convert_long8_sat_rtn(float8);
3734long8 __ovld __cnfn convert_long8(float8);
3735long8 __ovld __cnfn convert_long8_sat(float8);
3736ulong8 __ovld __cnfn convert_ulong8_rte(char8);
3737ulong8 __ovld __cnfn convert_ulong8_sat_rte(char8);
3738ulong8 __ovld __cnfn convert_ulong8_rtz(char8);
3739ulong8 __ovld __cnfn convert_ulong8_sat_rtz(char8);
3740ulong8 __ovld __cnfn convert_ulong8_rtp(char8);
3741ulong8 __ovld __cnfn convert_ulong8_sat_rtp(char8);
3742ulong8 __ovld __cnfn convert_ulong8_rtn(char8);
3743ulong8 __ovld __cnfn convert_ulong8_sat_rtn(char8);
3744ulong8 __ovld __cnfn convert_ulong8(char8);
3745ulong8 __ovld __cnfn convert_ulong8_sat(char8);
3746ulong8 __ovld __cnfn convert_ulong8_rte(uchar8);
3747ulong8 __ovld __cnfn convert_ulong8_sat_rte(uchar8);
3748ulong8 __ovld __cnfn convert_ulong8_rtz(uchar8);
3749ulong8 __ovld __cnfn convert_ulong8_sat_rtz(uchar8);
3750ulong8 __ovld __cnfn convert_ulong8_rtp(uchar8);
3751ulong8 __ovld __cnfn convert_ulong8_sat_rtp(uchar8);
3752ulong8 __ovld __cnfn convert_ulong8_rtn(uchar8);
3753ulong8 __ovld __cnfn convert_ulong8_sat_rtn(uchar8);
3754ulong8 __ovld __cnfn convert_ulong8(uchar8);
3755ulong8 __ovld __cnfn convert_ulong8_sat(uchar8);
3756ulong8 __ovld __cnfn convert_ulong8_rte(short8);
3757ulong8 __ovld __cnfn convert_ulong8_sat_rte(short8);
3758ulong8 __ovld __cnfn convert_ulong8_rtz(short8);
3759ulong8 __ovld __cnfn convert_ulong8_sat_rtz(short8);
3760ulong8 __ovld __cnfn convert_ulong8_rtp(short8);
3761ulong8 __ovld __cnfn convert_ulong8_sat_rtp(short8);
3762ulong8 __ovld __cnfn convert_ulong8_rtn(short8);
3763ulong8 __ovld __cnfn convert_ulong8_sat_rtn(short8);
3764ulong8 __ovld __cnfn convert_ulong8(short8);
3765ulong8 __ovld __cnfn convert_ulong8_sat(short8);
3766ulong8 __ovld __cnfn convert_ulong8_rte(ushort8);
3767ulong8 __ovld __cnfn convert_ulong8_sat_rte(ushort8);
3768ulong8 __ovld __cnfn convert_ulong8_rtz(ushort8);
3769ulong8 __ovld __cnfn convert_ulong8_sat_rtz(ushort8);
3770ulong8 __ovld __cnfn convert_ulong8_rtp(ushort8);
3771ulong8 __ovld __cnfn convert_ulong8_sat_rtp(ushort8);
3772ulong8 __ovld __cnfn convert_ulong8_rtn(ushort8);
3773ulong8 __ovld __cnfn convert_ulong8_sat_rtn(ushort8);
3774ulong8 __ovld __cnfn convert_ulong8(ushort8);
3775ulong8 __ovld __cnfn convert_ulong8_sat(ushort8);
3776ulong8 __ovld __cnfn convert_ulong8_rte(int8);
3777ulong8 __ovld __cnfn convert_ulong8_sat_rte(int8);
3778ulong8 __ovld __cnfn convert_ulong8_rtz(int8);
3779ulong8 __ovld __cnfn convert_ulong8_sat_rtz(int8);
3780ulong8 __ovld __cnfn convert_ulong8_rtp(int8);
3781ulong8 __ovld __cnfn convert_ulong8_sat_rtp(int8);
3782ulong8 __ovld __cnfn convert_ulong8_rtn(int8);
3783ulong8 __ovld __cnfn convert_ulong8_sat_rtn(int8);
3784ulong8 __ovld __cnfn convert_ulong8(int8);
3785ulong8 __ovld __cnfn convert_ulong8_sat(int8);
3786ulong8 __ovld __cnfn convert_ulong8_rte(uint8);
3787ulong8 __ovld __cnfn convert_ulong8_sat_rte(uint8);
3788ulong8 __ovld __cnfn convert_ulong8_rtz(uint8);
3789ulong8 __ovld __cnfn convert_ulong8_sat_rtz(uint8);
3790ulong8 __ovld __cnfn convert_ulong8_rtp(uint8);
3791ulong8 __ovld __cnfn convert_ulong8_sat_rtp(uint8);
3792ulong8 __ovld __cnfn convert_ulong8_rtn(uint8);
3793ulong8 __ovld __cnfn convert_ulong8_sat_rtn(uint8);
3794ulong8 __ovld __cnfn convert_ulong8(uint8);
3795ulong8 __ovld __cnfn convert_ulong8_sat(uint8);
3796ulong8 __ovld __cnfn convert_ulong8_rte(long8);
3797ulong8 __ovld __cnfn convert_ulong8_sat_rte(long8);
3798ulong8 __ovld __cnfn convert_ulong8_rtz(long8);
3799ulong8 __ovld __cnfn convert_ulong8_sat_rtz(long8);
3800ulong8 __ovld __cnfn convert_ulong8_rtp(long8);
3801ulong8 __ovld __cnfn convert_ulong8_sat_rtp(long8);
3802ulong8 __ovld __cnfn convert_ulong8_rtn(long8);
3803ulong8 __ovld __cnfn convert_ulong8_sat_rtn(long8);
3804ulong8 __ovld __cnfn convert_ulong8(long8);
3805ulong8 __ovld __cnfn convert_ulong8_sat(long8);
3806ulong8 __ovld __cnfn convert_ulong8_rte(ulong8);
3807ulong8 __ovld __cnfn convert_ulong8_sat_rte(ulong8);
3808ulong8 __ovld __cnfn convert_ulong8_rtz(ulong8);
3809ulong8 __ovld __cnfn convert_ulong8_sat_rtz(ulong8);
3810ulong8 __ovld __cnfn convert_ulong8_rtp(ulong8);
3811ulong8 __ovld __cnfn convert_ulong8_sat_rtp(ulong8);
3812ulong8 __ovld __cnfn convert_ulong8_rtn(ulong8);
3813ulong8 __ovld __cnfn convert_ulong8_sat_rtn(ulong8);
3814ulong8 __ovld __cnfn convert_ulong8(ulong8);
3815ulong8 __ovld __cnfn convert_ulong8_sat(ulong8);
3816ulong8 __ovld __cnfn convert_ulong8_rte(float8);
3817ulong8 __ovld __cnfn convert_ulong8_sat_rte(float8);
3818ulong8 __ovld __cnfn convert_ulong8_rtz(float8);
3819ulong8 __ovld __cnfn convert_ulong8_sat_rtz(float8);
3820ulong8 __ovld __cnfn convert_ulong8_rtp(float8);
3821ulong8 __ovld __cnfn convert_ulong8_sat_rtp(float8);
3822ulong8 __ovld __cnfn convert_ulong8_rtn(float8);
3823ulong8 __ovld __cnfn convert_ulong8_sat_rtn(float8);
3824ulong8 __ovld __cnfn convert_ulong8(float8);
3825ulong8 __ovld __cnfn convert_ulong8_sat(float8);
3826float8 __ovld __cnfn convert_float8_rte(char8);
3827float8 __ovld __cnfn convert_float8_rtz(char8);
3828float8 __ovld __cnfn convert_float8_rtp(char8);
3829float8 __ovld __cnfn convert_float8_rtn(char8);
3830float8 __ovld __cnfn convert_float8(char8);
3831float8 __ovld __cnfn convert_float8_rte(uchar8);
3832float8 __ovld __cnfn convert_float8_rtz(uchar8);
3833float8 __ovld __cnfn convert_float8_rtp(uchar8);
3834float8 __ovld __cnfn convert_float8_rtn(uchar8);
3835float8 __ovld __cnfn convert_float8(uchar8);
3836float8 __ovld __cnfn convert_float8_rte(short8);
3837float8 __ovld __cnfn convert_float8_rtz(short8);
3838float8 __ovld __cnfn convert_float8_rtp(short8);
3839float8 __ovld __cnfn convert_float8_rtn(short8);
3840float8 __ovld __cnfn convert_float8(short8);
3841float8 __ovld __cnfn convert_float8_rte(ushort8);
3842float8 __ovld __cnfn convert_float8_rtz(ushort8);
3843float8 __ovld __cnfn convert_float8_rtp(ushort8);
3844float8 __ovld __cnfn convert_float8_rtn(ushort8);
3845float8 __ovld __cnfn convert_float8(ushort8);
3846float8 __ovld __cnfn convert_float8_rte(int8);
3847float8 __ovld __cnfn convert_float8_rtz(int8);
3848float8 __ovld __cnfn convert_float8_rtp(int8);
3849float8 __ovld __cnfn convert_float8_rtn(int8);
3850float8 __ovld __cnfn convert_float8(int8);
3851float8 __ovld __cnfn convert_float8_rte(uint8);
3852float8 __ovld __cnfn convert_float8_rtz(uint8);
3853float8 __ovld __cnfn convert_float8_rtp(uint8);
3854float8 __ovld __cnfn convert_float8_rtn(uint8);
3855float8 __ovld __cnfn convert_float8(uint8);
3856float8 __ovld __cnfn convert_float8_rte(long8);
3857float8 __ovld __cnfn convert_float8_rtz(long8);
3858float8 __ovld __cnfn convert_float8_rtp(long8);
3859float8 __ovld __cnfn convert_float8_rtn(long8);
3860float8 __ovld __cnfn convert_float8(long8);
3861float8 __ovld __cnfn convert_float8_rte(ulong8);
3862float8 __ovld __cnfn convert_float8_rtz(ulong8);
3863float8 __ovld __cnfn convert_float8_rtp(ulong8);
3864float8 __ovld __cnfn convert_float8_rtn(ulong8);
3865float8 __ovld __cnfn convert_float8(ulong8);
3866float8 __ovld __cnfn convert_float8_rte(float8);
3867float8 __ovld __cnfn convert_float8_rtz(float8);
3868float8 __ovld __cnfn convert_float8_rtp(float8);
3869float8 __ovld __cnfn convert_float8_rtn(float8);
3870float8 __ovld __cnfn convert_float8(float8);
3871char16 __ovld __cnfn convert_char16_rte(char16);
3872char16 __ovld __cnfn convert_char16_sat_rte(char16);
3873char16 __ovld __cnfn convert_char16_rtz(char16);
3874char16 __ovld __cnfn convert_char16_sat_rtz(char16);
3875char16 __ovld __cnfn convert_char16_rtp(char16);
3876char16 __ovld __cnfn convert_char16_sat_rtp(char16);
3877char16 __ovld __cnfn convert_char16_rtn(char16);
3878char16 __ovld __cnfn convert_char16_sat_rtn(char16);
3879char16 __ovld __cnfn convert_char16(char16);
3880char16 __ovld __cnfn convert_char16_sat(char16);
3881char16 __ovld __cnfn convert_char16_rte(uchar16);
3882char16 __ovld __cnfn convert_char16_sat_rte(uchar16);
3883char16 __ovld __cnfn convert_char16_rtz(uchar16);
3884char16 __ovld __cnfn convert_char16_sat_rtz(uchar16);
3885char16 __ovld __cnfn convert_char16_rtp(uchar16);
3886char16 __ovld __cnfn convert_char16_sat_rtp(uchar16);
3887char16 __ovld __cnfn convert_char16_rtn(uchar16);
3888char16 __ovld __cnfn convert_char16_sat_rtn(uchar16);
3889char16 __ovld __cnfn convert_char16(uchar16);
3890char16 __ovld __cnfn convert_char16_sat(uchar16);
3891char16 __ovld __cnfn convert_char16_rte(short16);
3892char16 __ovld __cnfn convert_char16_sat_rte(short16);
3893char16 __ovld __cnfn convert_char16_rtz(short16);
3894char16 __ovld __cnfn convert_char16_sat_rtz(short16);
3895char16 __ovld __cnfn convert_char16_rtp(short16);
3896char16 __ovld __cnfn convert_char16_sat_rtp(short16);
3897char16 __ovld __cnfn convert_char16_rtn(short16);
3898char16 __ovld __cnfn convert_char16_sat_rtn(short16);
3899char16 __ovld __cnfn convert_char16(short16);
3900char16 __ovld __cnfn convert_char16_sat(short16);
3901char16 __ovld __cnfn convert_char16_rte(ushort16);
3902char16 __ovld __cnfn convert_char16_sat_rte(ushort16);
3903char16 __ovld __cnfn convert_char16_rtz(ushort16);
3904char16 __ovld __cnfn convert_char16_sat_rtz(ushort16);
3905char16 __ovld __cnfn convert_char16_rtp(ushort16);
3906char16 __ovld __cnfn convert_char16_sat_rtp(ushort16);
3907char16 __ovld __cnfn convert_char16_rtn(ushort16);
3908char16 __ovld __cnfn convert_char16_sat_rtn(ushort16);
3909char16 __ovld __cnfn convert_char16(ushort16);
3910char16 __ovld __cnfn convert_char16_sat(ushort16);
3911char16 __ovld __cnfn convert_char16_rte(int16);
3912char16 __ovld __cnfn convert_char16_sat_rte(int16);
3913char16 __ovld __cnfn convert_char16_rtz(int16);
3914char16 __ovld __cnfn convert_char16_sat_rtz(int16);
3915char16 __ovld __cnfn convert_char16_rtp(int16);
3916char16 __ovld __cnfn convert_char16_sat_rtp(int16);
3917char16 __ovld __cnfn convert_char16_rtn(int16);
3918char16 __ovld __cnfn convert_char16_sat_rtn(int16);
3919char16 __ovld __cnfn convert_char16(int16);
3920char16 __ovld __cnfn convert_char16_sat(int16);
3921char16 __ovld __cnfn convert_char16_rte(uint16);
3922char16 __ovld __cnfn convert_char16_sat_rte(uint16);
3923char16 __ovld __cnfn convert_char16_rtz(uint16);
3924char16 __ovld __cnfn convert_char16_sat_rtz(uint16);
3925char16 __ovld __cnfn convert_char16_rtp(uint16);
3926char16 __ovld __cnfn convert_char16_sat_rtp(uint16);
3927char16 __ovld __cnfn convert_char16_rtn(uint16);
3928char16 __ovld __cnfn convert_char16_sat_rtn(uint16);
3929char16 __ovld __cnfn convert_char16(uint16);
3930char16 __ovld __cnfn convert_char16_sat(uint16);
3931char16 __ovld __cnfn convert_char16_rte(long16);
3932char16 __ovld __cnfn convert_char16_sat_rte(long16);
3933char16 __ovld __cnfn convert_char16_rtz(long16);
3934char16 __ovld __cnfn convert_char16_sat_rtz(long16);
3935char16 __ovld __cnfn convert_char16_rtp(long16);
3936char16 __ovld __cnfn convert_char16_sat_rtp(long16);
3937char16 __ovld __cnfn convert_char16_rtn(long16);
3938char16 __ovld __cnfn convert_char16_sat_rtn(long16);
3939char16 __ovld __cnfn convert_char16(long16);
3940char16 __ovld __cnfn convert_char16_sat(long16);
3941char16 __ovld __cnfn convert_char16_rte(ulong16);
3942char16 __ovld __cnfn convert_char16_sat_rte(ulong16);
3943char16 __ovld __cnfn convert_char16_rtz(ulong16);
3944char16 __ovld __cnfn convert_char16_sat_rtz(ulong16);
3945char16 __ovld __cnfn convert_char16_rtp(ulong16);
3946char16 __ovld __cnfn convert_char16_sat_rtp(ulong16);
3947char16 __ovld __cnfn convert_char16_rtn(ulong16);
3948char16 __ovld __cnfn convert_char16_sat_rtn(ulong16);
3949char16 __ovld __cnfn convert_char16(ulong16);
3950char16 __ovld __cnfn convert_char16_sat(ulong16);
3951char16 __ovld __cnfn convert_char16_rte(float16);
3952char16 __ovld __cnfn convert_char16_sat_rte(float16);
3953char16 __ovld __cnfn convert_char16_rtz(float16);
3954char16 __ovld __cnfn convert_char16_sat_rtz(float16);
3955char16 __ovld __cnfn convert_char16_rtp(float16);
3956char16 __ovld __cnfn convert_char16_sat_rtp(float16);
3957char16 __ovld __cnfn convert_char16_rtn(float16);
3958char16 __ovld __cnfn convert_char16_sat_rtn(float16);
3959char16 __ovld __cnfn convert_char16(float16);
3960char16 __ovld __cnfn convert_char16_sat(float16);
3961uchar16 __ovld __cnfn convert_uchar16_rte(char16);
3962uchar16 __ovld __cnfn convert_uchar16_sat_rte(char16);
3963uchar16 __ovld __cnfn convert_uchar16_rtz(char16);
3964uchar16 __ovld __cnfn convert_uchar16_sat_rtz(char16);
3965uchar16 __ovld __cnfn convert_uchar16_rtp(char16);
3966uchar16 __ovld __cnfn convert_uchar16_sat_rtp(char16);
3967uchar16 __ovld __cnfn convert_uchar16_rtn(char16);
3968uchar16 __ovld __cnfn convert_uchar16_sat_rtn(char16);
3969uchar16 __ovld __cnfn convert_uchar16(char16);
3970uchar16 __ovld __cnfn convert_uchar16_sat(char16);
3971uchar16 __ovld __cnfn convert_uchar16_rte(uchar16);
3972uchar16 __ovld __cnfn convert_uchar16_sat_rte(uchar16);
3973uchar16 __ovld __cnfn convert_uchar16_rtz(uchar16);
3974uchar16 __ovld __cnfn convert_uchar16_sat_rtz(uchar16);
3975uchar16 __ovld __cnfn convert_uchar16_rtp(uchar16);
3976uchar16 __ovld __cnfn convert_uchar16_sat_rtp(uchar16);
3977uchar16 __ovld __cnfn convert_uchar16_rtn(uchar16);
3978uchar16 __ovld __cnfn convert_uchar16_sat_rtn(uchar16);
3979uchar16 __ovld __cnfn convert_uchar16(uchar16);
3980uchar16 __ovld __cnfn convert_uchar16_sat(uchar16);
3981uchar16 __ovld __cnfn convert_uchar16_rte(short16);
3982uchar16 __ovld __cnfn convert_uchar16_sat_rte(short16);
3983uchar16 __ovld __cnfn convert_uchar16_rtz(short16);
3984uchar16 __ovld __cnfn convert_uchar16_sat_rtz(short16);
3985uchar16 __ovld __cnfn convert_uchar16_rtp(short16);
3986uchar16 __ovld __cnfn convert_uchar16_sat_rtp(short16);
3987uchar16 __ovld __cnfn convert_uchar16_rtn(short16);
3988uchar16 __ovld __cnfn convert_uchar16_sat_rtn(short16);
3989uchar16 __ovld __cnfn convert_uchar16(short16);
3990uchar16 __ovld __cnfn convert_uchar16_sat(short16);
3991uchar16 __ovld __cnfn convert_uchar16_rte(ushort16);
3992uchar16 __ovld __cnfn convert_uchar16_sat_rte(ushort16);
3993uchar16 __ovld __cnfn convert_uchar16_rtz(ushort16);
3994uchar16 __ovld __cnfn convert_uchar16_sat_rtz(ushort16);
3995uchar16 __ovld __cnfn convert_uchar16_rtp(ushort16);
3996uchar16 __ovld __cnfn convert_uchar16_sat_rtp(ushort16);
3997uchar16 __ovld __cnfn convert_uchar16_rtn(ushort16);
3998uchar16 __ovld __cnfn convert_uchar16_sat_rtn(ushort16);
3999uchar16 __ovld __cnfn convert_uchar16(ushort16);
4000uchar16 __ovld __cnfn convert_uchar16_sat(ushort16);
4001uchar16 __ovld __cnfn convert_uchar16_rte(int16);
4002uchar16 __ovld __cnfn convert_uchar16_sat_rte(int16);
4003uchar16 __ovld __cnfn convert_uchar16_rtz(int16);
4004uchar16 __ovld __cnfn convert_uchar16_sat_rtz(int16);
4005uchar16 __ovld __cnfn convert_uchar16_rtp(int16);
4006uchar16 __ovld __cnfn convert_uchar16_sat_rtp(int16);
4007uchar16 __ovld __cnfn convert_uchar16_rtn(int16);
4008uchar16 __ovld __cnfn convert_uchar16_sat_rtn(int16);
4009uchar16 __ovld __cnfn convert_uchar16(int16);
4010uchar16 __ovld __cnfn convert_uchar16_sat(int16);
4011uchar16 __ovld __cnfn convert_uchar16_rte(uint16);
4012uchar16 __ovld __cnfn convert_uchar16_sat_rte(uint16);
4013uchar16 __ovld __cnfn convert_uchar16_rtz(uint16);
4014uchar16 __ovld __cnfn convert_uchar16_sat_rtz(uint16);
4015uchar16 __ovld __cnfn convert_uchar16_rtp(uint16);
4016uchar16 __ovld __cnfn convert_uchar16_sat_rtp(uint16);
4017uchar16 __ovld __cnfn convert_uchar16_rtn(uint16);
4018uchar16 __ovld __cnfn convert_uchar16_sat_rtn(uint16);
4019uchar16 __ovld __cnfn convert_uchar16(uint16);
4020uchar16 __ovld __cnfn convert_uchar16_sat(uint16);
4021uchar16 __ovld __cnfn convert_uchar16_rte(long16);
4022uchar16 __ovld __cnfn convert_uchar16_sat_rte(long16);
4023uchar16 __ovld __cnfn convert_uchar16_rtz(long16);
4024uchar16 __ovld __cnfn convert_uchar16_sat_rtz(long16);
4025uchar16 __ovld __cnfn convert_uchar16_rtp(long16);
4026uchar16 __ovld __cnfn convert_uchar16_sat_rtp(long16);
4027uchar16 __ovld __cnfn convert_uchar16_rtn(long16);
4028uchar16 __ovld __cnfn convert_uchar16_sat_rtn(long16);
4029uchar16 __ovld __cnfn convert_uchar16(long16);
4030uchar16 __ovld __cnfn convert_uchar16_sat(long16);
4031uchar16 __ovld __cnfn convert_uchar16_rte(ulong16);
4032uchar16 __ovld __cnfn convert_uchar16_sat_rte(ulong16);
4033uchar16 __ovld __cnfn convert_uchar16_rtz(ulong16);
4034uchar16 __ovld __cnfn convert_uchar16_sat_rtz(ulong16);
4035uchar16 __ovld __cnfn convert_uchar16_rtp(ulong16);
4036uchar16 __ovld __cnfn convert_uchar16_sat_rtp(ulong16);
4037uchar16 __ovld __cnfn convert_uchar16_rtn(ulong16);
4038uchar16 __ovld __cnfn convert_uchar16_sat_rtn(ulong16);
4039uchar16 __ovld __cnfn convert_uchar16(ulong16);
4040uchar16 __ovld __cnfn convert_uchar16_sat(ulong16);
4041uchar16 __ovld __cnfn convert_uchar16_rte(float16);
4042uchar16 __ovld __cnfn convert_uchar16_sat_rte(float16);
4043uchar16 __ovld __cnfn convert_uchar16_rtz(float16);
4044uchar16 __ovld __cnfn convert_uchar16_sat_rtz(float16);
4045uchar16 __ovld __cnfn convert_uchar16_rtp(float16);
4046uchar16 __ovld __cnfn convert_uchar16_sat_rtp(float16);
4047uchar16 __ovld __cnfn convert_uchar16_rtn(float16);
4048uchar16 __ovld __cnfn convert_uchar16_sat_rtn(float16);
4049uchar16 __ovld __cnfn convert_uchar16(float16);
4050uchar16 __ovld __cnfn convert_uchar16_sat(float16);
4051short16 __ovld __cnfn convert_short16_rte(char16);
4052short16 __ovld __cnfn convert_short16_sat_rte(char16);
4053short16 __ovld __cnfn convert_short16_rtz(char16);
4054short16 __ovld __cnfn convert_short16_sat_rtz(char16);
4055short16 __ovld __cnfn convert_short16_rtp(char16);
4056short16 __ovld __cnfn convert_short16_sat_rtp(char16);
4057short16 __ovld __cnfn convert_short16_rtn(char16);
4058short16 __ovld __cnfn convert_short16_sat_rtn(char16);
4059short16 __ovld __cnfn convert_short16(char16);
4060short16 __ovld __cnfn convert_short16_sat(char16);
4061short16 __ovld __cnfn convert_short16_rte(uchar16);
4062short16 __ovld __cnfn convert_short16_sat_rte(uchar16);
4063short16 __ovld __cnfn convert_short16_rtz(uchar16);
4064short16 __ovld __cnfn convert_short16_sat_rtz(uchar16);
4065short16 __ovld __cnfn convert_short16_rtp(uchar16);
4066short16 __ovld __cnfn convert_short16_sat_rtp(uchar16);
4067short16 __ovld __cnfn convert_short16_rtn(uchar16);
4068short16 __ovld __cnfn convert_short16_sat_rtn(uchar16);
4069short16 __ovld __cnfn convert_short16(uchar16);
4070short16 __ovld __cnfn convert_short16_sat(uchar16);
4071short16 __ovld __cnfn convert_short16_rte(short16);
4072short16 __ovld __cnfn convert_short16_sat_rte(short16);
4073short16 __ovld __cnfn convert_short16_rtz(short16);
4074short16 __ovld __cnfn convert_short16_sat_rtz(short16);
4075short16 __ovld __cnfn convert_short16_rtp(short16);
4076short16 __ovld __cnfn convert_short16_sat_rtp(short16);
4077short16 __ovld __cnfn convert_short16_rtn(short16);
4078short16 __ovld __cnfn convert_short16_sat_rtn(short16);
4079short16 __ovld __cnfn convert_short16(short16);
4080short16 __ovld __cnfn convert_short16_sat(short16);
4081short16 __ovld __cnfn convert_short16_rte(ushort16);
4082short16 __ovld __cnfn convert_short16_sat_rte(ushort16);
4083short16 __ovld __cnfn convert_short16_rtz(ushort16);
4084short16 __ovld __cnfn convert_short16_sat_rtz(ushort16);
4085short16 __ovld __cnfn convert_short16_rtp(ushort16);
4086short16 __ovld __cnfn convert_short16_sat_rtp(ushort16);
4087short16 __ovld __cnfn convert_short16_rtn(ushort16);
4088short16 __ovld __cnfn convert_short16_sat_rtn(ushort16);
4089short16 __ovld __cnfn convert_short16(ushort16);
4090short16 __ovld __cnfn convert_short16_sat(ushort16);
4091short16 __ovld __cnfn convert_short16_rte(int16);
4092short16 __ovld __cnfn convert_short16_sat_rte(int16);
4093short16 __ovld __cnfn convert_short16_rtz(int16);
4094short16 __ovld __cnfn convert_short16_sat_rtz(int16);
4095short16 __ovld __cnfn convert_short16_rtp(int16);
4096short16 __ovld __cnfn convert_short16_sat_rtp(int16);
4097short16 __ovld __cnfn convert_short16_rtn(int16);
4098short16 __ovld __cnfn convert_short16_sat_rtn(int16);
4099short16 __ovld __cnfn convert_short16(int16);
4100short16 __ovld __cnfn convert_short16_sat(int16);
4101short16 __ovld __cnfn convert_short16_rte(uint16);
4102short16 __ovld __cnfn convert_short16_sat_rte(uint16);
4103short16 __ovld __cnfn convert_short16_rtz(uint16);
4104short16 __ovld __cnfn convert_short16_sat_rtz(uint16);
4105short16 __ovld __cnfn convert_short16_rtp(uint16);
4106short16 __ovld __cnfn convert_short16_sat_rtp(uint16);
4107short16 __ovld __cnfn convert_short16_rtn(uint16);
4108short16 __ovld __cnfn convert_short16_sat_rtn(uint16);
4109short16 __ovld __cnfn convert_short16(uint16);
4110short16 __ovld __cnfn convert_short16_sat(uint16);
4111short16 __ovld __cnfn convert_short16_rte(long16);
4112short16 __ovld __cnfn convert_short16_sat_rte(long16);
4113short16 __ovld __cnfn convert_short16_rtz(long16);
4114short16 __ovld __cnfn convert_short16_sat_rtz(long16);
4115short16 __ovld __cnfn convert_short16_rtp(long16);
4116short16 __ovld __cnfn convert_short16_sat_rtp(long16);
4117short16 __ovld __cnfn convert_short16_rtn(long16);
4118short16 __ovld __cnfn convert_short16_sat_rtn(long16);
4119short16 __ovld __cnfn convert_short16(long16);
4120short16 __ovld __cnfn convert_short16_sat(long16);
4121short16 __ovld __cnfn convert_short16_rte(ulong16);
4122short16 __ovld __cnfn convert_short16_sat_rte(ulong16);
4123short16 __ovld __cnfn convert_short16_rtz(ulong16);
4124short16 __ovld __cnfn convert_short16_sat_rtz(ulong16);
4125short16 __ovld __cnfn convert_short16_rtp(ulong16);
4126short16 __ovld __cnfn convert_short16_sat_rtp(ulong16);
4127short16 __ovld __cnfn convert_short16_rtn(ulong16);
4128short16 __ovld __cnfn convert_short16_sat_rtn(ulong16);
4129short16 __ovld __cnfn convert_short16(ulong16);
4130short16 __ovld __cnfn convert_short16_sat(ulong16);
4131short16 __ovld __cnfn convert_short16_rte(float16);
4132short16 __ovld __cnfn convert_short16_sat_rte(float16);
4133short16 __ovld __cnfn convert_short16_rtz(float16);
4134short16 __ovld __cnfn convert_short16_sat_rtz(float16);
4135short16 __ovld __cnfn convert_short16_rtp(float16);
4136short16 __ovld __cnfn convert_short16_sat_rtp(float16);
4137short16 __ovld __cnfn convert_short16_rtn(float16);
4138short16 __ovld __cnfn convert_short16_sat_rtn(float16);
4139short16 __ovld __cnfn convert_short16(float16);
4140short16 __ovld __cnfn convert_short16_sat(float16);
4141ushort16 __ovld __cnfn convert_ushort16_rte(char16);
4142ushort16 __ovld __cnfn convert_ushort16_sat_rte(char16);
4143ushort16 __ovld __cnfn convert_ushort16_rtz(char16);
4144ushort16 __ovld __cnfn convert_ushort16_sat_rtz(char16);
4145ushort16 __ovld __cnfn convert_ushort16_rtp(char16);
4146ushort16 __ovld __cnfn convert_ushort16_sat_rtp(char16);
4147ushort16 __ovld __cnfn convert_ushort16_rtn(char16);
4148ushort16 __ovld __cnfn convert_ushort16_sat_rtn(char16);
4149ushort16 __ovld __cnfn convert_ushort16(char16);
4150ushort16 __ovld __cnfn convert_ushort16_sat(char16);
4151ushort16 __ovld __cnfn convert_ushort16_rte(uchar16);
4152ushort16 __ovld __cnfn convert_ushort16_sat_rte(uchar16);
4153ushort16 __ovld __cnfn convert_ushort16_rtz(uchar16);
4154ushort16 __ovld __cnfn convert_ushort16_sat_rtz(uchar16);
4155ushort16 __ovld __cnfn convert_ushort16_rtp(uchar16);
4156ushort16 __ovld __cnfn convert_ushort16_sat_rtp(uchar16);
4157ushort16 __ovld __cnfn convert_ushort16_rtn(uchar16);
4158ushort16 __ovld __cnfn convert_ushort16_sat_rtn(uchar16);
4159ushort16 __ovld __cnfn convert_ushort16(uchar16);
4160ushort16 __ovld __cnfn convert_ushort16_sat(uchar16);
4161ushort16 __ovld __cnfn convert_ushort16_rte(short16);
4162ushort16 __ovld __cnfn convert_ushort16_sat_rte(short16);
4163ushort16 __ovld __cnfn convert_ushort16_rtz(short16);
4164ushort16 __ovld __cnfn convert_ushort16_sat_rtz(short16);
4165ushort16 __ovld __cnfn convert_ushort16_rtp(short16);
4166ushort16 __ovld __cnfn convert_ushort16_sat_rtp(short16);
4167ushort16 __ovld __cnfn convert_ushort16_rtn(short16);
4168ushort16 __ovld __cnfn convert_ushort16_sat_rtn(short16);
4169ushort16 __ovld __cnfn convert_ushort16(short16);
4170ushort16 __ovld __cnfn convert_ushort16_sat(short16);
4171ushort16 __ovld __cnfn convert_ushort16_rte(ushort16);
4172ushort16 __ovld __cnfn convert_ushort16_sat_rte(ushort16);
4173ushort16 __ovld __cnfn convert_ushort16_rtz(ushort16);
4174ushort16 __ovld __cnfn convert_ushort16_sat_rtz(ushort16);
4175ushort16 __ovld __cnfn convert_ushort16_rtp(ushort16);
4176ushort16 __ovld __cnfn convert_ushort16_sat_rtp(ushort16);
4177ushort16 __ovld __cnfn convert_ushort16_rtn(ushort16);
4178ushort16 __ovld __cnfn convert_ushort16_sat_rtn(ushort16);
4179ushort16 __ovld __cnfn convert_ushort16(ushort16);
4180ushort16 __ovld __cnfn convert_ushort16_sat(ushort16);
4181ushort16 __ovld __cnfn convert_ushort16_rte(int16);
4182ushort16 __ovld __cnfn convert_ushort16_sat_rte(int16);
4183ushort16 __ovld __cnfn convert_ushort16_rtz(int16);
4184ushort16 __ovld __cnfn convert_ushort16_sat_rtz(int16);
4185ushort16 __ovld __cnfn convert_ushort16_rtp(int16);
4186ushort16 __ovld __cnfn convert_ushort16_sat_rtp(int16);
4187ushort16 __ovld __cnfn convert_ushort16_rtn(int16);
4188ushort16 __ovld __cnfn convert_ushort16_sat_rtn(int16);
4189ushort16 __ovld __cnfn convert_ushort16(int16);
4190ushort16 __ovld __cnfn convert_ushort16_sat(int16);
4191ushort16 __ovld __cnfn convert_ushort16_rte(uint16);
4192ushort16 __ovld __cnfn convert_ushort16_sat_rte(uint16);
4193ushort16 __ovld __cnfn convert_ushort16_rtz(uint16);
4194ushort16 __ovld __cnfn convert_ushort16_sat_rtz(uint16);
4195ushort16 __ovld __cnfn convert_ushort16_rtp(uint16);
4196ushort16 __ovld __cnfn convert_ushort16_sat_rtp(uint16);
4197ushort16 __ovld __cnfn convert_ushort16_rtn(uint16);
4198ushort16 __ovld __cnfn convert_ushort16_sat_rtn(uint16);
4199ushort16 __ovld __cnfn convert_ushort16(uint16);
4200ushort16 __ovld __cnfn convert_ushort16_sat(uint16);
4201ushort16 __ovld __cnfn convert_ushort16_rte(long16);
4202ushort16 __ovld __cnfn convert_ushort16_sat_rte(long16);
4203ushort16 __ovld __cnfn convert_ushort16_rtz(long16);
4204ushort16 __ovld __cnfn convert_ushort16_sat_rtz(long16);
4205ushort16 __ovld __cnfn convert_ushort16_rtp(long16);
4206ushort16 __ovld __cnfn convert_ushort16_sat_rtp(long16);
4207ushort16 __ovld __cnfn convert_ushort16_rtn(long16);
4208ushort16 __ovld __cnfn convert_ushort16_sat_rtn(long16);
4209ushort16 __ovld __cnfn convert_ushort16(long16);
4210ushort16 __ovld __cnfn convert_ushort16_sat(long16);
4211ushort16 __ovld __cnfn convert_ushort16_rte(ulong16);
4212ushort16 __ovld __cnfn convert_ushort16_sat_rte(ulong16);
4213ushort16 __ovld __cnfn convert_ushort16_rtz(ulong16);
4214ushort16 __ovld __cnfn convert_ushort16_sat_rtz(ulong16);
4215ushort16 __ovld __cnfn convert_ushort16_rtp(ulong16);
4216ushort16 __ovld __cnfn convert_ushort16_sat_rtp(ulong16);
4217ushort16 __ovld __cnfn convert_ushort16_rtn(ulong16);
4218ushort16 __ovld __cnfn convert_ushort16_sat_rtn(ulong16);
4219ushort16 __ovld __cnfn convert_ushort16(ulong16);
4220ushort16 __ovld __cnfn convert_ushort16_sat(ulong16);
4221ushort16 __ovld __cnfn convert_ushort16_rte(float16);
4222ushort16 __ovld __cnfn convert_ushort16_sat_rte(float16);
4223ushort16 __ovld __cnfn convert_ushort16_rtz(float16);
4224ushort16 __ovld __cnfn convert_ushort16_sat_rtz(float16);
4225ushort16 __ovld __cnfn convert_ushort16_rtp(float16);
4226ushort16 __ovld __cnfn convert_ushort16_sat_rtp(float16);
4227ushort16 __ovld __cnfn convert_ushort16_rtn(float16);
4228ushort16 __ovld __cnfn convert_ushort16_sat_rtn(float16);
4229ushort16 __ovld __cnfn convert_ushort16(float16);
4230ushort16 __ovld __cnfn convert_ushort16_sat(float16);
4231int16 __ovld __cnfn convert_int16_rte(char16);
4232int16 __ovld __cnfn convert_int16_sat_rte(char16);
4233int16 __ovld __cnfn convert_int16_rtz(char16);
4234int16 __ovld __cnfn convert_int16_sat_rtz(char16);
4235int16 __ovld __cnfn convert_int16_rtp(char16);
4236int16 __ovld __cnfn convert_int16_sat_rtp(char16);
4237int16 __ovld __cnfn convert_int16_rtn(char16);
4238int16 __ovld __cnfn convert_int16_sat_rtn(char16);
4239int16 __ovld __cnfn convert_int16(char16);
4240int16 __ovld __cnfn convert_int16_sat(char16);
4241int16 __ovld __cnfn convert_int16_rte(uchar16);
4242int16 __ovld __cnfn convert_int16_sat_rte(uchar16);
4243int16 __ovld __cnfn convert_int16_rtz(uchar16);
4244int16 __ovld __cnfn convert_int16_sat_rtz(uchar16);
4245int16 __ovld __cnfn convert_int16_rtp(uchar16);
4246int16 __ovld __cnfn convert_int16_sat_rtp(uchar16);
4247int16 __ovld __cnfn convert_int16_rtn(uchar16);
4248int16 __ovld __cnfn convert_int16_sat_rtn(uchar16);
4249int16 __ovld __cnfn convert_int16(uchar16);
4250int16 __ovld __cnfn convert_int16_sat(uchar16);
4251int16 __ovld __cnfn convert_int16_rte(short16);
4252int16 __ovld __cnfn convert_int16_sat_rte(short16);
4253int16 __ovld __cnfn convert_int16_rtz(short16);
4254int16 __ovld __cnfn convert_int16_sat_rtz(short16);
4255int16 __ovld __cnfn convert_int16_rtp(short16);
4256int16 __ovld __cnfn convert_int16_sat_rtp(short16);
4257int16 __ovld __cnfn convert_int16_rtn(short16);
4258int16 __ovld __cnfn convert_int16_sat_rtn(short16);
4259int16 __ovld __cnfn convert_int16(short16);
4260int16 __ovld __cnfn convert_int16_sat(short16);
4261int16 __ovld __cnfn convert_int16_rte(ushort16);
4262int16 __ovld __cnfn convert_int16_sat_rte(ushort16);
4263int16 __ovld __cnfn convert_int16_rtz(ushort16);
4264int16 __ovld __cnfn convert_int16_sat_rtz(ushort16);
4265int16 __ovld __cnfn convert_int16_rtp(ushort16);
4266int16 __ovld __cnfn convert_int16_sat_rtp(ushort16);
4267int16 __ovld __cnfn convert_int16_rtn(ushort16);
4268int16 __ovld __cnfn convert_int16_sat_rtn(ushort16);
4269int16 __ovld __cnfn convert_int16(ushort16);
4270int16 __ovld __cnfn convert_int16_sat(ushort16);
4271int16 __ovld __cnfn convert_int16_rte(int16);
4272int16 __ovld __cnfn convert_int16_sat_rte(int16);
4273int16 __ovld __cnfn convert_int16_rtz(int16);
4274int16 __ovld __cnfn convert_int16_sat_rtz(int16);
4275int16 __ovld __cnfn convert_int16_rtp(int16);
4276int16 __ovld __cnfn convert_int16_sat_rtp(int16);
4277int16 __ovld __cnfn convert_int16_rtn(int16);
4278int16 __ovld __cnfn convert_int16_sat_rtn(int16);
4279int16 __ovld __cnfn convert_int16(int16);
4280int16 __ovld __cnfn convert_int16_sat(int16);
4281int16 __ovld __cnfn convert_int16_rte(uint16);
4282int16 __ovld __cnfn convert_int16_sat_rte(uint16);
4283int16 __ovld __cnfn convert_int16_rtz(uint16);
4284int16 __ovld __cnfn convert_int16_sat_rtz(uint16);
4285int16 __ovld __cnfn convert_int16_rtp(uint16);
4286int16 __ovld __cnfn convert_int16_sat_rtp(uint16);
4287int16 __ovld __cnfn convert_int16_rtn(uint16);
4288int16 __ovld __cnfn convert_int16_sat_rtn(uint16);
4289int16 __ovld __cnfn convert_int16(uint16);
4290int16 __ovld __cnfn convert_int16_sat(uint16);
4291int16 __ovld __cnfn convert_int16_rte(long16);
4292int16 __ovld __cnfn convert_int16_sat_rte(long16);
4293int16 __ovld __cnfn convert_int16_rtz(long16);
4294int16 __ovld __cnfn convert_int16_sat_rtz(long16);
4295int16 __ovld __cnfn convert_int16_rtp(long16);
4296int16 __ovld __cnfn convert_int16_sat_rtp(long16);
4297int16 __ovld __cnfn convert_int16_rtn(long16);
4298int16 __ovld __cnfn convert_int16_sat_rtn(long16);
4299int16 __ovld __cnfn convert_int16(long16);
4300int16 __ovld __cnfn convert_int16_sat(long16);
4301int16 __ovld __cnfn convert_int16_rte(ulong16);
4302int16 __ovld __cnfn convert_int16_sat_rte(ulong16);
4303int16 __ovld __cnfn convert_int16_rtz(ulong16);
4304int16 __ovld __cnfn convert_int16_sat_rtz(ulong16);
4305int16 __ovld __cnfn convert_int16_rtp(ulong16);
4306int16 __ovld __cnfn convert_int16_sat_rtp(ulong16);
4307int16 __ovld __cnfn convert_int16_rtn(ulong16);
4308int16 __ovld __cnfn convert_int16_sat_rtn(ulong16);
4309int16 __ovld __cnfn convert_int16(ulong16);
4310int16 __ovld __cnfn convert_int16_sat(ulong16);
4311int16 __ovld __cnfn convert_int16_rte(float16);
4312int16 __ovld __cnfn convert_int16_sat_rte(float16);
4313int16 __ovld __cnfn convert_int16_rtz(float16);
4314int16 __ovld __cnfn convert_int16_sat_rtz(float16);
4315int16 __ovld __cnfn convert_int16_rtp(float16);
4316int16 __ovld __cnfn convert_int16_sat_rtp(float16);
4317int16 __ovld __cnfn convert_int16_rtn(float16);
4318int16 __ovld __cnfn convert_int16_sat_rtn(float16);
4319int16 __ovld __cnfn convert_int16(float16);
4320int16 __ovld __cnfn convert_int16_sat(float16);
4321uint16 __ovld __cnfn convert_uint16_rte(char16);
4322uint16 __ovld __cnfn convert_uint16_sat_rte(char16);
4323uint16 __ovld __cnfn convert_uint16_rtz(char16);
4324uint16 __ovld __cnfn convert_uint16_sat_rtz(char16);
4325uint16 __ovld __cnfn convert_uint16_rtp(char16);
4326uint16 __ovld __cnfn convert_uint16_sat_rtp(char16);
4327uint16 __ovld __cnfn convert_uint16_rtn(char16);
4328uint16 __ovld __cnfn convert_uint16_sat_rtn(char16);
4329uint16 __ovld __cnfn convert_uint16(char16);
4330uint16 __ovld __cnfn convert_uint16_sat(char16);
4331uint16 __ovld __cnfn convert_uint16_rte(uchar16);
4332uint16 __ovld __cnfn convert_uint16_sat_rte(uchar16);
4333uint16 __ovld __cnfn convert_uint16_rtz(uchar16);
4334uint16 __ovld __cnfn convert_uint16_sat_rtz(uchar16);
4335uint16 __ovld __cnfn convert_uint16_rtp(uchar16);
4336uint16 __ovld __cnfn convert_uint16_sat_rtp(uchar16);
4337uint16 __ovld __cnfn convert_uint16_rtn(uchar16);
4338uint16 __ovld __cnfn convert_uint16_sat_rtn(uchar16);
4339uint16 __ovld __cnfn convert_uint16(uchar16);
4340uint16 __ovld __cnfn convert_uint16_sat(uchar16);
4341uint16 __ovld __cnfn convert_uint16_rte(short16);
4342uint16 __ovld __cnfn convert_uint16_sat_rte(short16);
4343uint16 __ovld __cnfn convert_uint16_rtz(short16);
4344uint16 __ovld __cnfn convert_uint16_sat_rtz(short16);
4345uint16 __ovld __cnfn convert_uint16_rtp(short16);
4346uint16 __ovld __cnfn convert_uint16_sat_rtp(short16);
4347uint16 __ovld __cnfn convert_uint16_rtn(short16);
4348uint16 __ovld __cnfn convert_uint16_sat_rtn(short16);
4349uint16 __ovld __cnfn convert_uint16(short16);
4350uint16 __ovld __cnfn convert_uint16_sat(short16);
4351uint16 __ovld __cnfn convert_uint16_rte(ushort16);
4352uint16 __ovld __cnfn convert_uint16_sat_rte(ushort16);
4353uint16 __ovld __cnfn convert_uint16_rtz(ushort16);
4354uint16 __ovld __cnfn convert_uint16_sat_rtz(ushort16);
4355uint16 __ovld __cnfn convert_uint16_rtp(ushort16);
4356uint16 __ovld __cnfn convert_uint16_sat_rtp(ushort16);
4357uint16 __ovld __cnfn convert_uint16_rtn(ushort16);
4358uint16 __ovld __cnfn convert_uint16_sat_rtn(ushort16);
4359uint16 __ovld __cnfn convert_uint16(ushort16);
4360uint16 __ovld __cnfn convert_uint16_sat(ushort16);
4361uint16 __ovld __cnfn convert_uint16_rte(int16);
4362uint16 __ovld __cnfn convert_uint16_sat_rte(int16);
4363uint16 __ovld __cnfn convert_uint16_rtz(int16);
4364uint16 __ovld __cnfn convert_uint16_sat_rtz(int16);
4365uint16 __ovld __cnfn convert_uint16_rtp(int16);
4366uint16 __ovld __cnfn convert_uint16_sat_rtp(int16);
4367uint16 __ovld __cnfn convert_uint16_rtn(int16);
4368uint16 __ovld __cnfn convert_uint16_sat_rtn(int16);
4369uint16 __ovld __cnfn convert_uint16(int16);
4370uint16 __ovld __cnfn convert_uint16_sat(int16);
4371uint16 __ovld __cnfn convert_uint16_rte(uint16);
4372uint16 __ovld __cnfn convert_uint16_sat_rte(uint16);
4373uint16 __ovld __cnfn convert_uint16_rtz(uint16);
4374uint16 __ovld __cnfn convert_uint16_sat_rtz(uint16);
4375uint16 __ovld __cnfn convert_uint16_rtp(uint16);
4376uint16 __ovld __cnfn convert_uint16_sat_rtp(uint16);
4377uint16 __ovld __cnfn convert_uint16_rtn(uint16);
4378uint16 __ovld __cnfn convert_uint16_sat_rtn(uint16);
4379uint16 __ovld __cnfn convert_uint16(uint16);
4380uint16 __ovld __cnfn convert_uint16_sat(uint16);
4381uint16 __ovld __cnfn convert_uint16_rte(long16);
4382uint16 __ovld __cnfn convert_uint16_sat_rte(long16);
4383uint16 __ovld __cnfn convert_uint16_rtz(long16);
4384uint16 __ovld __cnfn convert_uint16_sat_rtz(long16);
4385uint16 __ovld __cnfn convert_uint16_rtp(long16);
4386uint16 __ovld __cnfn convert_uint16_sat_rtp(long16);
4387uint16 __ovld __cnfn convert_uint16_rtn(long16);
4388uint16 __ovld __cnfn convert_uint16_sat_rtn(long16);
4389uint16 __ovld __cnfn convert_uint16(long16);
4390uint16 __ovld __cnfn convert_uint16_sat(long16);
4391uint16 __ovld __cnfn convert_uint16_rte(ulong16);
4392uint16 __ovld __cnfn convert_uint16_sat_rte(ulong16);
4393uint16 __ovld __cnfn convert_uint16_rtz(ulong16);
4394uint16 __ovld __cnfn convert_uint16_sat_rtz(ulong16);
4395uint16 __ovld __cnfn convert_uint16_rtp(ulong16);
4396uint16 __ovld __cnfn convert_uint16_sat_rtp(ulong16);
4397uint16 __ovld __cnfn convert_uint16_rtn(ulong16);
4398uint16 __ovld __cnfn convert_uint16_sat_rtn(ulong16);
4399uint16 __ovld __cnfn convert_uint16(ulong16);
4400uint16 __ovld __cnfn convert_uint16_sat(ulong16);
4401uint16 __ovld __cnfn convert_uint16_rte(float16);
4402uint16 __ovld __cnfn convert_uint16_sat_rte(float16);
4403uint16 __ovld __cnfn convert_uint16_rtz(float16);
4404uint16 __ovld __cnfn convert_uint16_sat_rtz(float16);
4405uint16 __ovld __cnfn convert_uint16_rtp(float16);
4406uint16 __ovld __cnfn convert_uint16_sat_rtp(float16);
4407uint16 __ovld __cnfn convert_uint16_rtn(float16);
4408uint16 __ovld __cnfn convert_uint16_sat_rtn(float16);
4409uint16 __ovld __cnfn convert_uint16(float16);
4410uint16 __ovld __cnfn convert_uint16_sat(float16);
4411long16 __ovld __cnfn convert_long16_rte(char16);
4412long16 __ovld __cnfn convert_long16_sat_rte(char16);
4413long16 __ovld __cnfn convert_long16_rtz(char16);
4414long16 __ovld __cnfn convert_long16_sat_rtz(char16);
4415long16 __ovld __cnfn convert_long16_rtp(char16);
4416long16 __ovld __cnfn convert_long16_sat_rtp(char16);
4417long16 __ovld __cnfn convert_long16_rtn(char16);
4418long16 __ovld __cnfn convert_long16_sat_rtn(char16);
4419long16 __ovld __cnfn convert_long16(char16);
4420long16 __ovld __cnfn convert_long16_sat(char16);
4421long16 __ovld __cnfn convert_long16_rte(uchar16);
4422long16 __ovld __cnfn convert_long16_sat_rte(uchar16);
4423long16 __ovld __cnfn convert_long16_rtz(uchar16);
4424long16 __ovld __cnfn convert_long16_sat_rtz(uchar16);
4425long16 __ovld __cnfn convert_long16_rtp(uchar16);
4426long16 __ovld __cnfn convert_long16_sat_rtp(uchar16);
4427long16 __ovld __cnfn convert_long16_rtn(uchar16);
4428long16 __ovld __cnfn convert_long16_sat_rtn(uchar16);
4429long16 __ovld __cnfn convert_long16(uchar16);
4430long16 __ovld __cnfn convert_long16_sat(uchar16);
4431long16 __ovld __cnfn convert_long16_rte(short16);
4432long16 __ovld __cnfn convert_long16_sat_rte(short16);
4433long16 __ovld __cnfn convert_long16_rtz(short16);
4434long16 __ovld __cnfn convert_long16_sat_rtz(short16);
4435long16 __ovld __cnfn convert_long16_rtp(short16);
4436long16 __ovld __cnfn convert_long16_sat_rtp(short16);
4437long16 __ovld __cnfn convert_long16_rtn(short16);
4438long16 __ovld __cnfn convert_long16_sat_rtn(short16);
4439long16 __ovld __cnfn convert_long16(short16);
4440long16 __ovld __cnfn convert_long16_sat(short16);
4441long16 __ovld __cnfn convert_long16_rte(ushort16);
4442long16 __ovld __cnfn convert_long16_sat_rte(ushort16);
4443long16 __ovld __cnfn convert_long16_rtz(ushort16);
4444long16 __ovld __cnfn convert_long16_sat_rtz(ushort16);
4445long16 __ovld __cnfn convert_long16_rtp(ushort16);
4446long16 __ovld __cnfn convert_long16_sat_rtp(ushort16);
4447long16 __ovld __cnfn convert_long16_rtn(ushort16);
4448long16 __ovld __cnfn convert_long16_sat_rtn(ushort16);
4449long16 __ovld __cnfn convert_long16(ushort16);
4450long16 __ovld __cnfn convert_long16_sat(ushort16);
4451long16 __ovld __cnfn convert_long16_rte(int16);
4452long16 __ovld __cnfn convert_long16_sat_rte(int16);
4453long16 __ovld __cnfn convert_long16_rtz(int16);
4454long16 __ovld __cnfn convert_long16_sat_rtz(int16);
4455long16 __ovld __cnfn convert_long16_rtp(int16);
4456long16 __ovld __cnfn convert_long16_sat_rtp(int16);
4457long16 __ovld __cnfn convert_long16_rtn(int16);
4458long16 __ovld __cnfn convert_long16_sat_rtn(int16);
4459long16 __ovld __cnfn convert_long16(int16);
4460long16 __ovld __cnfn convert_long16_sat(int16);
4461long16 __ovld __cnfn convert_long16_rte(uint16);
4462long16 __ovld __cnfn convert_long16_sat_rte(uint16);
4463long16 __ovld __cnfn convert_long16_rtz(uint16);
4464long16 __ovld __cnfn convert_long16_sat_rtz(uint16);
4465long16 __ovld __cnfn convert_long16_rtp(uint16);
4466long16 __ovld __cnfn convert_long16_sat_rtp(uint16);
4467long16 __ovld __cnfn convert_long16_rtn(uint16);
4468long16 __ovld __cnfn convert_long16_sat_rtn(uint16);
4469long16 __ovld __cnfn convert_long16(uint16);
4470long16 __ovld __cnfn convert_long16_sat(uint16);
4471long16 __ovld __cnfn convert_long16_rte(long16);
4472long16 __ovld __cnfn convert_long16_sat_rte(long16);
4473long16 __ovld __cnfn convert_long16_rtz(long16);
4474long16 __ovld __cnfn convert_long16_sat_rtz(long16);
4475long16 __ovld __cnfn convert_long16_rtp(long16);
4476long16 __ovld __cnfn convert_long16_sat_rtp(long16);
4477long16 __ovld __cnfn convert_long16_rtn(long16);
4478long16 __ovld __cnfn convert_long16_sat_rtn(long16);
4479long16 __ovld __cnfn convert_long16(long16);
4480long16 __ovld __cnfn convert_long16_sat(long16);
4481long16 __ovld __cnfn convert_long16_rte(ulong16);
4482long16 __ovld __cnfn convert_long16_sat_rte(ulong16);
4483long16 __ovld __cnfn convert_long16_rtz(ulong16);
4484long16 __ovld __cnfn convert_long16_sat_rtz(ulong16);
4485long16 __ovld __cnfn convert_long16_rtp(ulong16);
4486long16 __ovld __cnfn convert_long16_sat_rtp(ulong16);
4487long16 __ovld __cnfn convert_long16_rtn(ulong16);
4488long16 __ovld __cnfn convert_long16_sat_rtn(ulong16);
4489long16 __ovld __cnfn convert_long16(ulong16);
4490long16 __ovld __cnfn convert_long16_sat(ulong16);
4491long16 __ovld __cnfn convert_long16_rte(float16);
4492long16 __ovld __cnfn convert_long16_sat_rte(float16);
4493long16 __ovld __cnfn convert_long16_rtz(float16);
4494long16 __ovld __cnfn convert_long16_sat_rtz(float16);
4495long16 __ovld __cnfn convert_long16_rtp(float16);
4496long16 __ovld __cnfn convert_long16_sat_rtp(float16);
4497long16 __ovld __cnfn convert_long16_rtn(float16);
4498long16 __ovld __cnfn convert_long16_sat_rtn(float16);
4499long16 __ovld __cnfn convert_long16(float16);
4500long16 __ovld __cnfn convert_long16_sat(float16);
4501ulong16 __ovld __cnfn convert_ulong16_rte(char16);
4502ulong16 __ovld __cnfn convert_ulong16_sat_rte(char16);
4503ulong16 __ovld __cnfn convert_ulong16_rtz(char16);
4504ulong16 __ovld __cnfn convert_ulong16_sat_rtz(char16);
4505ulong16 __ovld __cnfn convert_ulong16_rtp(char16);
4506ulong16 __ovld __cnfn convert_ulong16_sat_rtp(char16);
4507ulong16 __ovld __cnfn convert_ulong16_rtn(char16);
4508ulong16 __ovld __cnfn convert_ulong16_sat_rtn(char16);
4509ulong16 __ovld __cnfn convert_ulong16(char16);
4510ulong16 __ovld __cnfn convert_ulong16_sat(char16);
4511ulong16 __ovld __cnfn convert_ulong16_rte(uchar16);
4512ulong16 __ovld __cnfn convert_ulong16_sat_rte(uchar16);
4513ulong16 __ovld __cnfn convert_ulong16_rtz(uchar16);
4514ulong16 __ovld __cnfn convert_ulong16_sat_rtz(uchar16);
4515ulong16 __ovld __cnfn convert_ulong16_rtp(uchar16);
4516ulong16 __ovld __cnfn convert_ulong16_sat_rtp(uchar16);
4517ulong16 __ovld __cnfn convert_ulong16_rtn(uchar16);
4518ulong16 __ovld __cnfn convert_ulong16_sat_rtn(uchar16);
4519ulong16 __ovld __cnfn convert_ulong16(uchar16);
4520ulong16 __ovld __cnfn convert_ulong16_sat(uchar16);
4521ulong16 __ovld __cnfn convert_ulong16_rte(short16);
4522ulong16 __ovld __cnfn convert_ulong16_sat_rte(short16);
4523ulong16 __ovld __cnfn convert_ulong16_rtz(short16);
4524ulong16 __ovld __cnfn convert_ulong16_sat_rtz(short16);
4525ulong16 __ovld __cnfn convert_ulong16_rtp(short16);
4526ulong16 __ovld __cnfn convert_ulong16_sat_rtp(short16);
4527ulong16 __ovld __cnfn convert_ulong16_rtn(short16);
4528ulong16 __ovld __cnfn convert_ulong16_sat_rtn(short16);
4529ulong16 __ovld __cnfn convert_ulong16(short16);
4530ulong16 __ovld __cnfn convert_ulong16_sat(short16);
4531ulong16 __ovld __cnfn convert_ulong16_rte(ushort16);
4532ulong16 __ovld __cnfn convert_ulong16_sat_rte(ushort16);
4533ulong16 __ovld __cnfn convert_ulong16_rtz(ushort16);
4534ulong16 __ovld __cnfn convert_ulong16_sat_rtz(ushort16);
4535ulong16 __ovld __cnfn convert_ulong16_rtp(ushort16);
4536ulong16 __ovld __cnfn convert_ulong16_sat_rtp(ushort16);
4537ulong16 __ovld __cnfn convert_ulong16_rtn(ushort16);
4538ulong16 __ovld __cnfn convert_ulong16_sat_rtn(ushort16);
4539ulong16 __ovld __cnfn convert_ulong16(ushort16);
4540ulong16 __ovld __cnfn convert_ulong16_sat(ushort16);
4541ulong16 __ovld __cnfn convert_ulong16_rte(int16);
4542ulong16 __ovld __cnfn convert_ulong16_sat_rte(int16);
4543ulong16 __ovld __cnfn convert_ulong16_rtz(int16);
4544ulong16 __ovld __cnfn convert_ulong16_sat_rtz(int16);
4545ulong16 __ovld __cnfn convert_ulong16_rtp(int16);
4546ulong16 __ovld __cnfn convert_ulong16_sat_rtp(int16);
4547ulong16 __ovld __cnfn convert_ulong16_rtn(int16);
4548ulong16 __ovld __cnfn convert_ulong16_sat_rtn(int16);
4549ulong16 __ovld __cnfn convert_ulong16(int16);
4550ulong16 __ovld __cnfn convert_ulong16_sat(int16);
4551ulong16 __ovld __cnfn convert_ulong16_rte(uint16);
4552ulong16 __ovld __cnfn convert_ulong16_sat_rte(uint16);
4553ulong16 __ovld __cnfn convert_ulong16_rtz(uint16);
4554ulong16 __ovld __cnfn convert_ulong16_sat_rtz(uint16);
4555ulong16 __ovld __cnfn convert_ulong16_rtp(uint16);
4556ulong16 __ovld __cnfn convert_ulong16_sat_rtp(uint16);
4557ulong16 __ovld __cnfn convert_ulong16_rtn(uint16);
4558ulong16 __ovld __cnfn convert_ulong16_sat_rtn(uint16);
4559ulong16 __ovld __cnfn convert_ulong16(uint16);
4560ulong16 __ovld __cnfn convert_ulong16_sat(uint16);
4561ulong16 __ovld __cnfn convert_ulong16_rte(long16);
4562ulong16 __ovld __cnfn convert_ulong16_sat_rte(long16);
4563ulong16 __ovld __cnfn convert_ulong16_rtz(long16);
4564ulong16 __ovld __cnfn convert_ulong16_sat_rtz(long16);
4565ulong16 __ovld __cnfn convert_ulong16_rtp(long16);
4566ulong16 __ovld __cnfn convert_ulong16_sat_rtp(long16);
4567ulong16 __ovld __cnfn convert_ulong16_rtn(long16);
4568ulong16 __ovld __cnfn convert_ulong16_sat_rtn(long16);
4569ulong16 __ovld __cnfn convert_ulong16(long16);
4570ulong16 __ovld __cnfn convert_ulong16_sat(long16);
4571ulong16 __ovld __cnfn convert_ulong16_rte(ulong16);
4572ulong16 __ovld __cnfn convert_ulong16_sat_rte(ulong16);
4573ulong16 __ovld __cnfn convert_ulong16_rtz(ulong16);
4574ulong16 __ovld __cnfn convert_ulong16_sat_rtz(ulong16);
4575ulong16 __ovld __cnfn convert_ulong16_rtp(ulong16);
4576ulong16 __ovld __cnfn convert_ulong16_sat_rtp(ulong16);
4577ulong16 __ovld __cnfn convert_ulong16_rtn(ulong16);
4578ulong16 __ovld __cnfn convert_ulong16_sat_rtn(ulong16);
4579ulong16 __ovld __cnfn convert_ulong16(ulong16);
4580ulong16 __ovld __cnfn convert_ulong16_sat(ulong16);
4581ulong16 __ovld __cnfn convert_ulong16_rte(float16);
4582ulong16 __ovld __cnfn convert_ulong16_sat_rte(float16);
4583ulong16 __ovld __cnfn convert_ulong16_rtz(float16);
4584ulong16 __ovld __cnfn convert_ulong16_sat_rtz(float16);
4585ulong16 __ovld __cnfn convert_ulong16_rtp(float16);
4586ulong16 __ovld __cnfn convert_ulong16_sat_rtp(float16);
4587ulong16 __ovld __cnfn convert_ulong16_rtn(float16);
4588ulong16 __ovld __cnfn convert_ulong16_sat_rtn(float16);
4589ulong16 __ovld __cnfn convert_ulong16(float16);
4590ulong16 __ovld __cnfn convert_ulong16_sat(float16);
4591float16 __ovld __cnfn convert_float16_rte(char16);
4592float16 __ovld __cnfn convert_float16_rtz(char16);
4593float16 __ovld __cnfn convert_float16_rtp(char16);
4594float16 __ovld __cnfn convert_float16_rtn(char16);
4595float16 __ovld __cnfn convert_float16(char16);
4596float16 __ovld __cnfn convert_float16_rte(uchar16);
4597float16 __ovld __cnfn convert_float16_rtz(uchar16);
4598float16 __ovld __cnfn convert_float16_rtp(uchar16);
4599float16 __ovld __cnfn convert_float16_rtn(uchar16);
4600float16 __ovld __cnfn convert_float16(uchar16);
4601float16 __ovld __cnfn convert_float16_rte(short16);
4602float16 __ovld __cnfn convert_float16_rtz(short16);
4603float16 __ovld __cnfn convert_float16_rtp(short16);
4604float16 __ovld __cnfn convert_float16_rtn(short16);
4605float16 __ovld __cnfn convert_float16(short16);
4606float16 __ovld __cnfn convert_float16_rte(ushort16);
4607float16 __ovld __cnfn convert_float16_rtz(ushort16);
4608float16 __ovld __cnfn convert_float16_rtp(ushort16);
4609float16 __ovld __cnfn convert_float16_rtn(ushort16);
4610float16 __ovld __cnfn convert_float16(ushort16);
4611float16 __ovld __cnfn convert_float16_rte(int16);
4612float16 __ovld __cnfn convert_float16_rtz(int16);
4613float16 __ovld __cnfn convert_float16_rtp(int16);
4614float16 __ovld __cnfn convert_float16_rtn(int16);
4615float16 __ovld __cnfn convert_float16(int16);
4616float16 __ovld __cnfn convert_float16_rte(uint16);
4617float16 __ovld __cnfn convert_float16_rtz(uint16);
4618float16 __ovld __cnfn convert_float16_rtp(uint16);
4619float16 __ovld __cnfn convert_float16_rtn(uint16);
4620float16 __ovld __cnfn convert_float16(uint16);
4621float16 __ovld __cnfn convert_float16_rte(long16);
4622float16 __ovld __cnfn convert_float16_rtz(long16);
4623float16 __ovld __cnfn convert_float16_rtp(long16);
4624float16 __ovld __cnfn convert_float16_rtn(long16);
4625float16 __ovld __cnfn convert_float16(long16);
4626float16 __ovld __cnfn convert_float16_rte(ulong16);
4627float16 __ovld __cnfn convert_float16_rtz(ulong16);
4628float16 __ovld __cnfn convert_float16_rtp(ulong16);
4629float16 __ovld __cnfn convert_float16_rtn(ulong16);
4630float16 __ovld __cnfn convert_float16(ulong16);
4631float16 __ovld __cnfn convert_float16_rte(float16);
4632float16 __ovld __cnfn convert_float16_rtz(float16);
4633float16 __ovld __cnfn convert_float16_rtp(float16);
4634float16 __ovld __cnfn convert_float16_rtn(float16);
4635float16 __ovld __cnfn convert_float16(float16);
4636
4637// Conversions with double data type parameters or return value.
4638
4639#ifdef cl_khr_fp64
4640#pragma OPENCL EXTENSION cl_khr_fp64 : enable
4641char __ovld __cnfn convert_char(double);
4642char __ovld __cnfn convert_char_rte(double);
4643char __ovld __cnfn convert_char_rtn(double);
4644char __ovld __cnfn convert_char_rtp(double);
4645char __ovld __cnfn convert_char_rtz(double);
4646char __ovld __cnfn convert_char_sat(double);
4647char __ovld __cnfn convert_char_sat_rte(double);
4648char __ovld __cnfn convert_char_sat_rtn(double);
4649char __ovld __cnfn convert_char_sat_rtp(double);
4650char __ovld __cnfn convert_char_sat_rtz(double);
4651char2 __ovld __cnfn convert_char2(double2);
4652char2 __ovld __cnfn convert_char2_rte(double2);
4653char2 __ovld __cnfn convert_char2_rtn(double2);
4654char2 __ovld __cnfn convert_char2_rtp(double2);
4655char2 __ovld __cnfn convert_char2_rtz(double2);
4656char2 __ovld __cnfn convert_char2_sat(double2);
4657char2 __ovld __cnfn convert_char2_sat_rte(double2);
4658char2 __ovld __cnfn convert_char2_sat_rtn(double2);
4659char2 __ovld __cnfn convert_char2_sat_rtp(double2);
4660char2 __ovld __cnfn convert_char2_sat_rtz(double2);
4661char3 __ovld __cnfn convert_char3(double3);
4662char3 __ovld __cnfn convert_char3_rte(double3);
4663char3 __ovld __cnfn convert_char3_rtn(double3);
4664char3 __ovld __cnfn convert_char3_rtp(double3);
4665char3 __ovld __cnfn convert_char3_rtz(double3);
4666char3 __ovld __cnfn convert_char3_sat(double3);
4667char3 __ovld __cnfn convert_char3_sat_rte(double3);
4668char3 __ovld __cnfn convert_char3_sat_rtn(double3);
4669char3 __ovld __cnfn convert_char3_sat_rtp(double3);
4670char3 __ovld __cnfn convert_char3_sat_rtz(double3);
4671char4 __ovld __cnfn convert_char4(double4);
4672char4 __ovld __cnfn convert_char4_rte(double4);
4673char4 __ovld __cnfn convert_char4_rtn(double4);
4674char4 __ovld __cnfn convert_char4_rtp(double4);
4675char4 __ovld __cnfn convert_char4_rtz(double4);
4676char4 __ovld __cnfn convert_char4_sat(double4);
4677char4 __ovld __cnfn convert_char4_sat_rte(double4);
4678char4 __ovld __cnfn convert_char4_sat_rtn(double4);
4679char4 __ovld __cnfn convert_char4_sat_rtp(double4);
4680char4 __ovld __cnfn convert_char4_sat_rtz(double4);
4681char8 __ovld __cnfn convert_char8(double8);
4682char8 __ovld __cnfn convert_char8_rte(double8);
4683char8 __ovld __cnfn convert_char8_rtn(double8);
4684char8 __ovld __cnfn convert_char8_rtp(double8);
4685char8 __ovld __cnfn convert_char8_rtz(double8);
4686char8 __ovld __cnfn convert_char8_sat(double8);
4687char8 __ovld __cnfn convert_char8_sat_rte(double8);
4688char8 __ovld __cnfn convert_char8_sat_rtn(double8);
4689char8 __ovld __cnfn convert_char8_sat_rtp(double8);
4690char8 __ovld __cnfn convert_char8_sat_rtz(double8);
4691char16 __ovld __cnfn convert_char16(double16);
4692char16 __ovld __cnfn convert_char16_rte(double16);
4693char16 __ovld __cnfn convert_char16_rtn(double16);
4694char16 __ovld __cnfn convert_char16_rtp(double16);
4695char16 __ovld __cnfn convert_char16_rtz(double16);
4696char16 __ovld __cnfn convert_char16_sat(double16);
4697char16 __ovld __cnfn convert_char16_sat_rte(double16);
4698char16 __ovld __cnfn convert_char16_sat_rtn(double16);
4699char16 __ovld __cnfn convert_char16_sat_rtp(double16);
4700char16 __ovld __cnfn convert_char16_sat_rtz(double16);
4701
4702uchar __ovld __cnfn convert_uchar(double);
4703uchar __ovld __cnfn convert_uchar_rte(double);
4704uchar __ovld __cnfn convert_uchar_rtn(double);
4705uchar __ovld __cnfn convert_uchar_rtp(double);
4706uchar __ovld __cnfn convert_uchar_rtz(double);
4707uchar __ovld __cnfn convert_uchar_sat(double);
4708uchar __ovld __cnfn convert_uchar_sat_rte(double);
4709uchar __ovld __cnfn convert_uchar_sat_rtn(double);
4710uchar __ovld __cnfn convert_uchar_sat_rtp(double);
4711uchar __ovld __cnfn convert_uchar_sat_rtz(double);
4712uchar2 __ovld __cnfn convert_uchar2(double2);
4713uchar2 __ovld __cnfn convert_uchar2_rte(double2);
4714uchar2 __ovld __cnfn convert_uchar2_rtn(double2);
4715uchar2 __ovld __cnfn convert_uchar2_rtp(double2);
4716uchar2 __ovld __cnfn convert_uchar2_rtz(double2);
4717uchar2 __ovld __cnfn convert_uchar2_sat(double2);
4718uchar2 __ovld __cnfn convert_uchar2_sat_rte(double2);
4719uchar2 __ovld __cnfn convert_uchar2_sat_rtn(double2);
4720uchar2 __ovld __cnfn convert_uchar2_sat_rtp(double2);
4721uchar2 __ovld __cnfn convert_uchar2_sat_rtz(double2);
4722uchar3 __ovld __cnfn convert_uchar3(double3);
4723uchar3 __ovld __cnfn convert_uchar3_rte(double3);
4724uchar3 __ovld __cnfn convert_uchar3_rtn(double3);
4725uchar3 __ovld __cnfn convert_uchar3_rtp(double3);
4726uchar3 __ovld __cnfn convert_uchar3_rtz(double3);
4727uchar3 __ovld __cnfn convert_uchar3_sat(double3);
4728uchar3 __ovld __cnfn convert_uchar3_sat_rte(double3);
4729uchar3 __ovld __cnfn convert_uchar3_sat_rtn(double3);
4730uchar3 __ovld __cnfn convert_uchar3_sat_rtp(double3);
4731uchar3 __ovld __cnfn convert_uchar3_sat_rtz(double3);
4732uchar4 __ovld __cnfn convert_uchar4(double4);
4733uchar4 __ovld __cnfn convert_uchar4_rte(double4);
4734uchar4 __ovld __cnfn convert_uchar4_rtn(double4);
4735uchar4 __ovld __cnfn convert_uchar4_rtp(double4);
4736uchar4 __ovld __cnfn convert_uchar4_rtz(double4);
4737uchar4 __ovld __cnfn convert_uchar4_sat(double4);
4738uchar4 __ovld __cnfn convert_uchar4_sat_rte(double4);
4739uchar4 __ovld __cnfn convert_uchar4_sat_rtn(double4);
4740uchar4 __ovld __cnfn convert_uchar4_sat_rtp(double4);
4741uchar4 __ovld __cnfn convert_uchar4_sat_rtz(double4);
4742uchar8 __ovld __cnfn convert_uchar8(double8);
4743uchar8 __ovld __cnfn convert_uchar8_rte(double8);
4744uchar8 __ovld __cnfn convert_uchar8_rtn(double8);
4745uchar8 __ovld __cnfn convert_uchar8_rtp(double8);
4746uchar8 __ovld __cnfn convert_uchar8_rtz(double8);
4747uchar8 __ovld __cnfn convert_uchar8_sat(double8);
4748uchar8 __ovld __cnfn convert_uchar8_sat_rte(double8);
4749uchar8 __ovld __cnfn convert_uchar8_sat_rtn(double8);
4750uchar8 __ovld __cnfn convert_uchar8_sat_rtp(double8);
4751uchar8 __ovld __cnfn convert_uchar8_sat_rtz(double8);
4752uchar16 __ovld __cnfn convert_uchar16(double16);
4753uchar16 __ovld __cnfn convert_uchar16_rte(double16);
4754uchar16 __ovld __cnfn convert_uchar16_rtn(double16);
4755uchar16 __ovld __cnfn convert_uchar16_rtp(double16);
4756uchar16 __ovld __cnfn convert_uchar16_rtz(double16);
4757uchar16 __ovld __cnfn convert_uchar16_sat(double16);
4758uchar16 __ovld __cnfn convert_uchar16_sat_rte(double16);
4759uchar16 __ovld __cnfn convert_uchar16_sat_rtn(double16);
4760uchar16 __ovld __cnfn convert_uchar16_sat_rtp(double16);
4761uchar16 __ovld __cnfn convert_uchar16_sat_rtz(double16);
4762
4763short __ovld __cnfn convert_short(double);
4764short __ovld __cnfn convert_short_rte(double);
4765short __ovld __cnfn convert_short_rtn(double);
4766short __ovld __cnfn convert_short_rtp(double);
4767short __ovld __cnfn convert_short_rtz(double);
4768short __ovld __cnfn convert_short_sat(double);
4769short __ovld __cnfn convert_short_sat_rte(double);
4770short __ovld __cnfn convert_short_sat_rtn(double);
4771short __ovld __cnfn convert_short_sat_rtp(double);
4772short __ovld __cnfn convert_short_sat_rtz(double);
4773short2 __ovld __cnfn convert_short2(double2);
4774short2 __ovld __cnfn convert_short2_rte(double2);
4775short2 __ovld __cnfn convert_short2_rtn(double2);
4776short2 __ovld __cnfn convert_short2_rtp(double2);
4777short2 __ovld __cnfn convert_short2_rtz(double2);
4778short2 __ovld __cnfn convert_short2_sat(double2);
4779short2 __ovld __cnfn convert_short2_sat_rte(double2);
4780short2 __ovld __cnfn convert_short2_sat_rtn(double2);
4781short2 __ovld __cnfn convert_short2_sat_rtp(double2);
4782short2 __ovld __cnfn convert_short2_sat_rtz(double2);
4783short3 __ovld __cnfn convert_short3(double3);
4784short3 __ovld __cnfn convert_short3_rte(double3);
4785short3 __ovld __cnfn convert_short3_rtn(double3);
4786short3 __ovld __cnfn convert_short3_rtp(double3);
4787short3 __ovld __cnfn convert_short3_rtz(double3);
4788short3 __ovld __cnfn convert_short3_sat(double3);
4789short3 __ovld __cnfn convert_short3_sat_rte(double3);
4790short3 __ovld __cnfn convert_short3_sat_rtn(double3);
4791short3 __ovld __cnfn convert_short3_sat_rtp(double3);
4792short3 __ovld __cnfn convert_short3_sat_rtz(double3);
4793short4 __ovld __cnfn convert_short4(double4);
4794short4 __ovld __cnfn convert_short4_rte(double4);
4795short4 __ovld __cnfn convert_short4_rtn(double4);
4796short4 __ovld __cnfn convert_short4_rtp(double4);
4797short4 __ovld __cnfn convert_short4_rtz(double4);
4798short4 __ovld __cnfn convert_short4_sat(double4);
4799short4 __ovld __cnfn convert_short4_sat_rte(double4);
4800short4 __ovld __cnfn convert_short4_sat_rtn(double4);
4801short4 __ovld __cnfn convert_short4_sat_rtp(double4);
4802short4 __ovld __cnfn convert_short4_sat_rtz(double4);
4803short8 __ovld __cnfn convert_short8(double8);
4804short8 __ovld __cnfn convert_short8_rte(double8);
4805short8 __ovld __cnfn convert_short8_rtn(double8);
4806short8 __ovld __cnfn convert_short8_rtp(double8);
4807short8 __ovld __cnfn convert_short8_rtz(double8);
4808short8 __ovld __cnfn convert_short8_sat(double8);
4809short8 __ovld __cnfn convert_short8_sat_rte(double8);
4810short8 __ovld __cnfn convert_short8_sat_rtn(double8);
4811short8 __ovld __cnfn convert_short8_sat_rtp(double8);
4812short8 __ovld __cnfn convert_short8_sat_rtz(double8);
4813short16 __ovld __cnfn convert_short16(double16);
4814short16 __ovld __cnfn convert_short16_rte(double16);
4815short16 __ovld __cnfn convert_short16_rtn(double16);
4816short16 __ovld __cnfn convert_short16_rtp(double16);
4817short16 __ovld __cnfn convert_short16_rtz(double16);
4818short16 __ovld __cnfn convert_short16_sat(double16);
4819short16 __ovld __cnfn convert_short16_sat_rte(double16);
4820short16 __ovld __cnfn convert_short16_sat_rtn(double16);
4821short16 __ovld __cnfn convert_short16_sat_rtp(double16);
4822short16 __ovld __cnfn convert_short16_sat_rtz(double16);
4823
4824ushort __ovld __cnfn convert_ushort(double);
4825ushort __ovld __cnfn convert_ushort_rte(double);
4826ushort __ovld __cnfn convert_ushort_rtn(double);
4827ushort __ovld __cnfn convert_ushort_rtp(double);
4828ushort __ovld __cnfn convert_ushort_rtz(double);
4829ushort __ovld __cnfn convert_ushort_sat(double);
4830ushort __ovld __cnfn convert_ushort_sat_rte(double);
4831ushort __ovld __cnfn convert_ushort_sat_rtn(double);
4832ushort __ovld __cnfn convert_ushort_sat_rtp(double);
4833ushort __ovld __cnfn convert_ushort_sat_rtz(double);
4834ushort2 __ovld __cnfn convert_ushort2(double2);
4835ushort2 __ovld __cnfn convert_ushort2_rte(double2);
4836ushort2 __ovld __cnfn convert_ushort2_rtn(double2);
4837ushort2 __ovld __cnfn convert_ushort2_rtp(double2);
4838ushort2 __ovld __cnfn convert_ushort2_rtz(double2);
4839ushort2 __ovld __cnfn convert_ushort2_sat(double2);
4840ushort2 __ovld __cnfn convert_ushort2_sat_rte(double2);
4841ushort2 __ovld __cnfn convert_ushort2_sat_rtn(double2);
4842ushort2 __ovld __cnfn convert_ushort2_sat_rtp(double2);
4843ushort2 __ovld __cnfn convert_ushort2_sat_rtz(double2);
4844ushort3 __ovld __cnfn convert_ushort3(double3);
4845ushort3 __ovld __cnfn convert_ushort3_rte(double3);
4846ushort3 __ovld __cnfn convert_ushort3_rtn(double3);
4847ushort3 __ovld __cnfn convert_ushort3_rtp(double3);
4848ushort3 __ovld __cnfn convert_ushort3_rtz(double3);
4849ushort3 __ovld __cnfn convert_ushort3_sat(double3);
4850ushort3 __ovld __cnfn convert_ushort3_sat_rte(double3);
4851ushort3 __ovld __cnfn convert_ushort3_sat_rtn(double3);
4852ushort3 __ovld __cnfn convert_ushort3_sat_rtp(double3);
4853ushort3 __ovld __cnfn convert_ushort3_sat_rtz(double3);
4854ushort4 __ovld __cnfn convert_ushort4(double4);
4855ushort4 __ovld __cnfn convert_ushort4_rte(double4);
4856ushort4 __ovld __cnfn convert_ushort4_rtn(double4);
4857ushort4 __ovld __cnfn convert_ushort4_rtp(double4);
4858ushort4 __ovld __cnfn convert_ushort4_rtz(double4);
4859ushort4 __ovld __cnfn convert_ushort4_sat(double4);
4860ushort4 __ovld __cnfn convert_ushort4_sat_rte(double4);
4861ushort4 __ovld __cnfn convert_ushort4_sat_rtn(double4);
4862ushort4 __ovld __cnfn convert_ushort4_sat_rtp(double4);
4863ushort4 __ovld __cnfn convert_ushort4_sat_rtz(double4);
4864ushort8 __ovld __cnfn convert_ushort8(double8);
4865ushort8 __ovld __cnfn convert_ushort8_rte(double8);
4866ushort8 __ovld __cnfn convert_ushort8_rtn(double8);
4867ushort8 __ovld __cnfn convert_ushort8_rtp(double8);
4868ushort8 __ovld __cnfn convert_ushort8_rtz(double8);
4869ushort8 __ovld __cnfn convert_ushort8_sat(double8);
4870ushort8 __ovld __cnfn convert_ushort8_sat_rte(double8);
4871ushort8 __ovld __cnfn convert_ushort8_sat_rtn(double8);
4872ushort8 __ovld __cnfn convert_ushort8_sat_rtp(double8);
4873ushort8 __ovld __cnfn convert_ushort8_sat_rtz(double8);
4874ushort16 __ovld __cnfn convert_ushort16(double16);
4875ushort16 __ovld __cnfn convert_ushort16_rte(double16);
4876ushort16 __ovld __cnfn convert_ushort16_rtn(double16);
4877ushort16 __ovld __cnfn convert_ushort16_rtp(double16);
4878ushort16 __ovld __cnfn convert_ushort16_rtz(double16);
4879ushort16 __ovld __cnfn convert_ushort16_sat(double16);
4880ushort16 __ovld __cnfn convert_ushort16_sat_rte(double16);
4881ushort16 __ovld __cnfn convert_ushort16_sat_rtn(double16);
4882ushort16 __ovld __cnfn convert_ushort16_sat_rtp(double16);
4883ushort16 __ovld __cnfn convert_ushort16_sat_rtz(double16);
4884
4885int __ovld __cnfn convert_int(double);
4886int __ovld __cnfn convert_int_rte(double);
4887int __ovld __cnfn convert_int_rtn(double);
4888int __ovld __cnfn convert_int_rtp(double);
4889int __ovld __cnfn convert_int_rtz(double);
4890int __ovld __cnfn convert_int_sat(double);
4891int __ovld __cnfn convert_int_sat_rte(double);
4892int __ovld __cnfn convert_int_sat_rtn(double);
4893int __ovld __cnfn convert_int_sat_rtp(double);
4894int __ovld __cnfn convert_int_sat_rtz(double);
4895int2 __ovld __cnfn convert_int2(double2);
4896int2 __ovld __cnfn convert_int2_rte(double2);
4897int2 __ovld __cnfn convert_int2_rtn(double2);
4898int2 __ovld __cnfn convert_int2_rtp(double2);
4899int2 __ovld __cnfn convert_int2_rtz(double2);
4900int2 __ovld __cnfn convert_int2_sat(double2);
4901int2 __ovld __cnfn convert_int2_sat_rte(double2);
4902int2 __ovld __cnfn convert_int2_sat_rtn(double2);
4903int2 __ovld __cnfn convert_int2_sat_rtp(double2);
4904int2 __ovld __cnfn convert_int2_sat_rtz(double2);
4905int3 __ovld __cnfn convert_int3(double3);
4906int3 __ovld __cnfn convert_int3_rte(double3);
4907int3 __ovld __cnfn convert_int3_rtn(double3);
4908int3 __ovld __cnfn convert_int3_rtp(double3);
4909int3 __ovld __cnfn convert_int3_rtz(double3);
4910int3 __ovld __cnfn convert_int3_sat(double3);
4911int3 __ovld __cnfn convert_int3_sat_rte(double3);
4912int3 __ovld __cnfn convert_int3_sat_rtn(double3);
4913int3 __ovld __cnfn convert_int3_sat_rtp(double3);
4914int3 __ovld __cnfn convert_int3_sat_rtz(double3);
4915int4 __ovld __cnfn convert_int4(double4);
4916int4 __ovld __cnfn convert_int4_rte(double4);
4917int4 __ovld __cnfn convert_int4_rtn(double4);
4918int4 __ovld __cnfn convert_int4_rtp(double4);
4919int4 __ovld __cnfn convert_int4_rtz(double4);
4920int4 __ovld __cnfn convert_int4_sat(double4);
4921int4 __ovld __cnfn convert_int4_sat_rte(double4);
4922int4 __ovld __cnfn convert_int4_sat_rtn(double4);
4923int4 __ovld __cnfn convert_int4_sat_rtp(double4);
4924int4 __ovld __cnfn convert_int4_sat_rtz(double4);
4925int8 __ovld __cnfn convert_int8(double8);
4926int8 __ovld __cnfn convert_int8_rte(double8);
4927int8 __ovld __cnfn convert_int8_rtn(double8);
4928int8 __ovld __cnfn convert_int8_rtp(double8);
4929int8 __ovld __cnfn convert_int8_rtz(double8);
4930int8 __ovld __cnfn convert_int8_sat(double8);
4931int8 __ovld __cnfn convert_int8_sat_rte(double8);
4932int8 __ovld __cnfn convert_int8_sat_rtn(double8);
4933int8 __ovld __cnfn convert_int8_sat_rtp(double8);
4934int8 __ovld __cnfn convert_int8_sat_rtz(double8);
4935int16 __ovld __cnfn convert_int16(double16);
4936int16 __ovld __cnfn convert_int16_rte(double16);
4937int16 __ovld __cnfn convert_int16_rtn(double16);
4938int16 __ovld __cnfn convert_int16_rtp(double16);
4939int16 __ovld __cnfn convert_int16_rtz(double16);
4940int16 __ovld __cnfn convert_int16_sat(double16);
4941int16 __ovld __cnfn convert_int16_sat_rte(double16);
4942int16 __ovld __cnfn convert_int16_sat_rtn(double16);
4943int16 __ovld __cnfn convert_int16_sat_rtp(double16);
4944int16 __ovld __cnfn convert_int16_sat_rtz(double16);
4945
4946uint __ovld __cnfn convert_uint(double);
4947uint __ovld __cnfn convert_uint_rte(double);
4948uint __ovld __cnfn convert_uint_rtn(double);
4949uint __ovld __cnfn convert_uint_rtp(double);
4950uint __ovld __cnfn convert_uint_rtz(double);
4951uint __ovld __cnfn convert_uint_sat(double);
4952uint __ovld __cnfn convert_uint_sat_rte(double);
4953uint __ovld __cnfn convert_uint_sat_rtn(double);
4954uint __ovld __cnfn convert_uint_sat_rtp(double);
4955uint __ovld __cnfn convert_uint_sat_rtz(double);
4956uint2 __ovld __cnfn convert_uint2(double2);
4957uint2 __ovld __cnfn convert_uint2_rte(double2);
4958uint2 __ovld __cnfn convert_uint2_rtn(double2);
4959uint2 __ovld __cnfn convert_uint2_rtp(double2);
4960uint2 __ovld __cnfn convert_uint2_rtz(double2);
4961uint2 __ovld __cnfn convert_uint2_sat(double2);
4962uint2 __ovld __cnfn convert_uint2_sat_rte(double2);
4963uint2 __ovld __cnfn convert_uint2_sat_rtn(double2);
4964uint2 __ovld __cnfn convert_uint2_sat_rtp(double2);
4965uint2 __ovld __cnfn convert_uint2_sat_rtz(double2);
4966uint3 __ovld __cnfn convert_uint3(double3);
4967uint3 __ovld __cnfn convert_uint3_rte(double3);
4968uint3 __ovld __cnfn convert_uint3_rtn(double3);
4969uint3 __ovld __cnfn convert_uint3_rtp(double3);
4970uint3 __ovld __cnfn convert_uint3_rtz(double3);
4971uint3 __ovld __cnfn convert_uint3_sat(double3);
4972uint3 __ovld __cnfn convert_uint3_sat_rte(double3);
4973uint3 __ovld __cnfn convert_uint3_sat_rtn(double3);
4974uint3 __ovld __cnfn convert_uint3_sat_rtp(double3);
4975uint3 __ovld __cnfn convert_uint3_sat_rtz(double3);
4976uint4 __ovld __cnfn convert_uint4(double4);
4977uint4 __ovld __cnfn convert_uint4_rte(double4);
4978uint4 __ovld __cnfn convert_uint4_rtn(double4);
4979uint4 __ovld __cnfn convert_uint4_rtp(double4);
4980uint4 __ovld __cnfn convert_uint4_rtz(double4);
4981uint4 __ovld __cnfn convert_uint4_sat(double4);
4982uint4 __ovld __cnfn convert_uint4_sat_rte(double4);
4983uint4 __ovld __cnfn convert_uint4_sat_rtn(double4);
4984uint4 __ovld __cnfn convert_uint4_sat_rtp(double4);
4985uint4 __ovld __cnfn convert_uint4_sat_rtz(double4);
4986uint8 __ovld __cnfn convert_uint8(double8);
4987uint8 __ovld __cnfn convert_uint8_rte(double8);
4988uint8 __ovld __cnfn convert_uint8_rtn(double8);
4989uint8 __ovld __cnfn convert_uint8_rtp(double8);
4990uint8 __ovld __cnfn convert_uint8_rtz(double8);
4991uint8 __ovld __cnfn convert_uint8_sat(double8);
4992uint8 __ovld __cnfn convert_uint8_sat_rte(double8);
4993uint8 __ovld __cnfn convert_uint8_sat_rtn(double8);
4994uint8 __ovld __cnfn convert_uint8_sat_rtp(double8);
4995uint8 __ovld __cnfn convert_uint8_sat_rtz(double8);
4996uint16 __ovld __cnfn convert_uint16(double16);
4997uint16 __ovld __cnfn convert_uint16_rte(double16);
4998uint16 __ovld __cnfn convert_uint16_rtn(double16);
4999uint16 __ovld __cnfn convert_uint16_rtp(double16);
5000uint16 __ovld __cnfn convert_uint16_rtz(double16);
5001uint16 __ovld __cnfn convert_uint16_sat(double16);
5002uint16 __ovld __cnfn convert_uint16_sat_rte(double16);
5003uint16 __ovld __cnfn convert_uint16_sat_rtn(double16);
5004uint16 __ovld __cnfn convert_uint16_sat_rtp(double16);
5005uint16 __ovld __cnfn convert_uint16_sat_rtz(double16);
5006
5007long __ovld __cnfn convert_long(double);
5008long __ovld __cnfn convert_long_rte(double);
5009long __ovld __cnfn convert_long_rtn(double);
5010long __ovld __cnfn convert_long_rtp(double);
5011long __ovld __cnfn convert_long_rtz(double);
5012long __ovld __cnfn convert_long_sat(double);
5013long __ovld __cnfn convert_long_sat_rte(double);
5014long __ovld __cnfn convert_long_sat_rtn(double);
5015long __ovld __cnfn convert_long_sat_rtp(double);
5016long __ovld __cnfn convert_long_sat_rtz(double);
5017long2 __ovld __cnfn convert_long2(double2);
5018long2 __ovld __cnfn convert_long2_rte(double2);
5019long2 __ovld __cnfn convert_long2_rtn(double2);
5020long2 __ovld __cnfn convert_long2_rtp(double2);
5021long2 __ovld __cnfn convert_long2_rtz(double2);
5022long2 __ovld __cnfn convert_long2_sat(double2);
5023long2 __ovld __cnfn convert_long2_sat_rte(double2);
5024long2 __ovld __cnfn convert_long2_sat_rtn(double2);
5025long2 __ovld __cnfn convert_long2_sat_rtp(double2);
5026long2 __ovld __cnfn convert_long2_sat_rtz(double2);
5027long3 __ovld __cnfn convert_long3(double3);
5028long3 __ovld __cnfn convert_long3_rte(double3);
5029long3 __ovld __cnfn convert_long3_rtn(double3);
5030long3 __ovld __cnfn convert_long3_rtp(double3);
5031long3 __ovld __cnfn convert_long3_rtz(double3);
5032long3 __ovld __cnfn convert_long3_sat(double3);
5033long3 __ovld __cnfn convert_long3_sat_rte(double3);
5034long3 __ovld __cnfn convert_long3_sat_rtn(double3);
5035long3 __ovld __cnfn convert_long3_sat_rtp(double3);
5036long3 __ovld __cnfn convert_long3_sat_rtz(double3);
5037long4 __ovld __cnfn convert_long4(double4);
5038long4 __ovld __cnfn convert_long4_rte(double4);
5039long4 __ovld __cnfn convert_long4_rtn(double4);
5040long4 __ovld __cnfn convert_long4_rtp(double4);
5041long4 __ovld __cnfn convert_long4_rtz(double4);
5042long4 __ovld __cnfn convert_long4_sat(double4);
5043long4 __ovld __cnfn convert_long4_sat_rte(double4);
5044long4 __ovld __cnfn convert_long4_sat_rtn(double4);
5045long4 __ovld __cnfn convert_long4_sat_rtp(double4);
5046long4 __ovld __cnfn convert_long4_sat_rtz(double4);
5047long8 __ovld __cnfn convert_long8(double8);
5048long8 __ovld __cnfn convert_long8_rte(double8);
5049long8 __ovld __cnfn convert_long8_rtn(double8);
5050long8 __ovld __cnfn convert_long8_rtp(double8);
5051long8 __ovld __cnfn convert_long8_rtz(double8);
5052long8 __ovld __cnfn convert_long8_sat(double8);
5053long8 __ovld __cnfn convert_long8_sat_rte(double8);
5054long8 __ovld __cnfn convert_long8_sat_rtn(double8);
5055long8 __ovld __cnfn convert_long8_sat_rtp(double8);
5056long8 __ovld __cnfn convert_long8_sat_rtz(double8);
5057long16 __ovld __cnfn convert_long16(double16);
5058long16 __ovld __cnfn convert_long16_rte(double16);
5059long16 __ovld __cnfn convert_long16_rtn(double16);
5060long16 __ovld __cnfn convert_long16_rtp(double16);
5061long16 __ovld __cnfn convert_long16_rtz(double16);
5062long16 __ovld __cnfn convert_long16_sat(double16);
5063long16 __ovld __cnfn convert_long16_sat_rte(double16);
5064long16 __ovld __cnfn convert_long16_sat_rtn(double16);
5065long16 __ovld __cnfn convert_long16_sat_rtp(double16);
5066long16 __ovld __cnfn convert_long16_sat_rtz(double16);
5067
5068ulong __ovld __cnfn convert_ulong(double);
5069ulong __ovld __cnfn convert_ulong_rte(double);
5070ulong __ovld __cnfn convert_ulong_rtn(double);
5071ulong __ovld __cnfn convert_ulong_rtp(double);
5072ulong __ovld __cnfn convert_ulong_rtz(double);
5073ulong __ovld __cnfn convert_ulong_sat(double);
5074ulong __ovld __cnfn convert_ulong_sat_rte(double);
5075ulong __ovld __cnfn convert_ulong_sat_rtn(double);
5076ulong __ovld __cnfn convert_ulong_sat_rtp(double);
5077ulong __ovld __cnfn convert_ulong_sat_rtz(double);
5078ulong2 __ovld __cnfn convert_ulong2(double2);
5079ulong2 __ovld __cnfn convert_ulong2_rte(double2);
5080ulong2 __ovld __cnfn convert_ulong2_rtn(double2);
5081ulong2 __ovld __cnfn convert_ulong2_rtp(double2);
5082ulong2 __ovld __cnfn convert_ulong2_rtz(double2);
5083ulong2 __ovld __cnfn convert_ulong2_sat(double2);
5084ulong2 __ovld __cnfn convert_ulong2_sat_rte(double2);
5085ulong2 __ovld __cnfn convert_ulong2_sat_rtn(double2);
5086ulong2 __ovld __cnfn convert_ulong2_sat_rtp(double2);
5087ulong2 __ovld __cnfn convert_ulong2_sat_rtz(double2);
5088ulong3 __ovld __cnfn convert_ulong3(double3);
5089ulong3 __ovld __cnfn convert_ulong3_rte(double3);
5090ulong3 __ovld __cnfn convert_ulong3_rtn(double3);
5091ulong3 __ovld __cnfn convert_ulong3_rtp(double3);
5092ulong3 __ovld __cnfn convert_ulong3_rtz(double3);
5093ulong3 __ovld __cnfn convert_ulong3_sat(double3);
5094ulong3 __ovld __cnfn convert_ulong3_sat_rte(double3);
5095ulong3 __ovld __cnfn convert_ulong3_sat_rtn(double3);
5096ulong3 __ovld __cnfn convert_ulong3_sat_rtp(double3);
5097ulong3 __ovld __cnfn convert_ulong3_sat_rtz(double3);
5098ulong4 __ovld __cnfn convert_ulong4(double4);
5099ulong4 __ovld __cnfn convert_ulong4_rte(double4);
5100ulong4 __ovld __cnfn convert_ulong4_rtn(double4);
5101ulong4 __ovld __cnfn convert_ulong4_rtp(double4);
5102ulong4 __ovld __cnfn convert_ulong4_rtz(double4);
5103ulong4 __ovld __cnfn convert_ulong4_sat(double4);
5104ulong4 __ovld __cnfn convert_ulong4_sat_rte(double4);
5105ulong4 __ovld __cnfn convert_ulong4_sat_rtn(double4);
5106ulong4 __ovld __cnfn convert_ulong4_sat_rtp(double4);
5107ulong4 __ovld __cnfn convert_ulong4_sat_rtz(double4);
5108ulong8 __ovld __cnfn convert_ulong8(double8);
5109ulong8 __ovld __cnfn convert_ulong8_rte(double8);
5110ulong8 __ovld __cnfn convert_ulong8_rtn(double8);
5111ulong8 __ovld __cnfn convert_ulong8_rtp(double8);
5112ulong8 __ovld __cnfn convert_ulong8_rtz(double8);
5113ulong8 __ovld __cnfn convert_ulong8_sat(double8);
5114ulong8 __ovld __cnfn convert_ulong8_sat_rte(double8);
5115ulong8 __ovld __cnfn convert_ulong8_sat_rtn(double8);
5116ulong8 __ovld __cnfn convert_ulong8_sat_rtp(double8);
5117ulong8 __ovld __cnfn convert_ulong8_sat_rtz(double8);
5118ulong16 __ovld __cnfn convert_ulong16(double16);
5119ulong16 __ovld __cnfn convert_ulong16_rte(double16);
5120ulong16 __ovld __cnfn convert_ulong16_rtn(double16);
5121ulong16 __ovld __cnfn convert_ulong16_rtp(double16);
5122ulong16 __ovld __cnfn convert_ulong16_rtz(double16);
5123ulong16 __ovld __cnfn convert_ulong16_sat(double16);
5124ulong16 __ovld __cnfn convert_ulong16_sat_rte(double16);
5125ulong16 __ovld __cnfn convert_ulong16_sat_rtn(double16);
5126ulong16 __ovld __cnfn convert_ulong16_sat_rtp(double16);
5127ulong16 __ovld __cnfn convert_ulong16_sat_rtz(double16);
5128
5129float __ovld __cnfn convert_float(double);
5130float __ovld __cnfn convert_float_rte(double);
5131float __ovld __cnfn convert_float_rtn(double);
5132float __ovld __cnfn convert_float_rtp(double);
5133float __ovld __cnfn convert_float_rtz(double);
5134float2 __ovld __cnfn convert_float2(double2);
5135float2 __ovld __cnfn convert_float2_rte(double2);
5136float2 __ovld __cnfn convert_float2_rtn(double2);
5137float2 __ovld __cnfn convert_float2_rtp(double2);
5138float2 __ovld __cnfn convert_float2_rtz(double2);
5139float3 __ovld __cnfn convert_float3(double3);
5140float3 __ovld __cnfn convert_float3_rte(double3);
5141float3 __ovld __cnfn convert_float3_rtn(double3);
5142float3 __ovld __cnfn convert_float3_rtp(double3);
5143float3 __ovld __cnfn convert_float3_rtz(double3);
5144float4 __ovld __cnfn convert_float4(double4);
5145float4 __ovld __cnfn convert_float4_rte(double4);
5146float4 __ovld __cnfn convert_float4_rtn(double4);
5147float4 __ovld __cnfn convert_float4_rtp(double4);
5148float4 __ovld __cnfn convert_float4_rtz(double4);
5149float8 __ovld __cnfn convert_float8(double8);
5150float8 __ovld __cnfn convert_float8_rte(double8);
5151float8 __ovld __cnfn convert_float8_rtn(double8);
5152float8 __ovld __cnfn convert_float8_rtp(double8);
5153float8 __ovld __cnfn convert_float8_rtz(double8);
5154float16 __ovld __cnfn convert_float16(double16);
5155float16 __ovld __cnfn convert_float16_rte(double16);
5156float16 __ovld __cnfn convert_float16_rtn(double16);
5157float16 __ovld __cnfn convert_float16_rtp(double16);
5158float16 __ovld __cnfn convert_float16_rtz(double16);
5159
5160double __ovld __cnfn convert_double(char);
5161double __ovld __cnfn convert_double(double);
5162double __ovld __cnfn convert_double(float);
5163double __ovld __cnfn convert_double(int);
5164double __ovld __cnfn convert_double(long);
5165double __ovld __cnfn convert_double(short);
5166double __ovld __cnfn convert_double(uchar);
5167double __ovld __cnfn convert_double(uint);
5168double __ovld __cnfn convert_double(ulong);
5169double __ovld __cnfn convert_double(ushort);
5170double __ovld __cnfn convert_double_rte(char);
5171double __ovld __cnfn convert_double_rte(double);
5172double __ovld __cnfn convert_double_rte(float);
5173double __ovld __cnfn convert_double_rte(int);
5174double __ovld __cnfn convert_double_rte(long);
5175double __ovld __cnfn convert_double_rte(short);
5176double __ovld __cnfn convert_double_rte(uchar);
5177double __ovld __cnfn convert_double_rte(uint);
5178double __ovld __cnfn convert_double_rte(ulong);
5179double __ovld __cnfn convert_double_rte(ushort);
5180double __ovld __cnfn convert_double_rtn(char);
5181double __ovld __cnfn convert_double_rtn(double);
5182double __ovld __cnfn convert_double_rtn(float);
5183double __ovld __cnfn convert_double_rtn(int);
5184double __ovld __cnfn convert_double_rtn(long);
5185double __ovld __cnfn convert_double_rtn(short);
5186double __ovld __cnfn convert_double_rtn(uchar);
5187double __ovld __cnfn convert_double_rtn(uint);
5188double __ovld __cnfn convert_double_rtn(ulong);
5189double __ovld __cnfn convert_double_rtn(ushort);
5190double __ovld __cnfn convert_double_rtp(char);
5191double __ovld __cnfn convert_double_rtp(double);
5192double __ovld __cnfn convert_double_rtp(float);
5193double __ovld __cnfn convert_double_rtp(int);
5194double __ovld __cnfn convert_double_rtp(long);
5195double __ovld __cnfn convert_double_rtp(short);
5196double __ovld __cnfn convert_double_rtp(uchar);
5197double __ovld __cnfn convert_double_rtp(uint);
5198double __ovld __cnfn convert_double_rtp(ulong);
5199double __ovld __cnfn convert_double_rtp(ushort);
5200double __ovld __cnfn convert_double_rtz(char);
5201double __ovld __cnfn convert_double_rtz(double);
5202double __ovld __cnfn convert_double_rtz(float);
5203double __ovld __cnfn convert_double_rtz(int);
5204double __ovld __cnfn convert_double_rtz(long);
5205double __ovld __cnfn convert_double_rtz(short);
5206double __ovld __cnfn convert_double_rtz(uchar);
5207double __ovld __cnfn convert_double_rtz(uint);
5208double __ovld __cnfn convert_double_rtz(ulong);
5209double __ovld __cnfn convert_double_rtz(ushort);
5210double2 __ovld __cnfn convert_double2(char2);
5211double2 __ovld __cnfn convert_double2(double2);
5212double2 __ovld __cnfn convert_double2(float2);
5213double2 __ovld __cnfn convert_double2(int2);
5214double2 __ovld __cnfn convert_double2(long2);
5215double2 __ovld __cnfn convert_double2(short2);
5216double2 __ovld __cnfn convert_double2(uchar2);
5217double2 __ovld __cnfn convert_double2(uint2);
5218double2 __ovld __cnfn convert_double2(ulong2);
5219double2 __ovld __cnfn convert_double2(ushort2);
5220double2 __ovld __cnfn convert_double2_rte(char2);
5221double2 __ovld __cnfn convert_double2_rte(double2);
5222double2 __ovld __cnfn convert_double2_rte(float2);
5223double2 __ovld __cnfn convert_double2_rte(int2);
5224double2 __ovld __cnfn convert_double2_rte(long2);
5225double2 __ovld __cnfn convert_double2_rte(short2);
5226double2 __ovld __cnfn convert_double2_rte(uchar2);
5227double2 __ovld __cnfn convert_double2_rte(uint2);
5228double2 __ovld __cnfn convert_double2_rte(ulong2);
5229double2 __ovld __cnfn convert_double2_rte(ushort2);
5230double2 __ovld __cnfn convert_double2_rtn(char2);
5231double2 __ovld __cnfn convert_double2_rtn(double2);
5232double2 __ovld __cnfn convert_double2_rtn(float2);
5233double2 __ovld __cnfn convert_double2_rtn(int2);
5234double2 __ovld __cnfn convert_double2_rtn(long2);
5235double2 __ovld __cnfn convert_double2_rtn(short2);
5236double2 __ovld __cnfn convert_double2_rtn(uchar2);
5237double2 __ovld __cnfn convert_double2_rtn(uint2);
5238double2 __ovld __cnfn convert_double2_rtn(ulong2);
5239double2 __ovld __cnfn convert_double2_rtn(ushort2);
5240double2 __ovld __cnfn convert_double2_rtp(char2);
5241double2 __ovld __cnfn convert_double2_rtp(double2);
5242double2 __ovld __cnfn convert_double2_rtp(float2);
5243double2 __ovld __cnfn convert_double2_rtp(int2);
5244double2 __ovld __cnfn convert_double2_rtp(long2);
5245double2 __ovld __cnfn convert_double2_rtp(short2);
5246double2 __ovld __cnfn convert_double2_rtp(uchar2);
5247double2 __ovld __cnfn convert_double2_rtp(uint2);
5248double2 __ovld __cnfn convert_double2_rtp(ulong2);
5249double2 __ovld __cnfn convert_double2_rtp(ushort2);
5250double2 __ovld __cnfn convert_double2_rtz(char2);
5251double2 __ovld __cnfn convert_double2_rtz(double2);
5252double2 __ovld __cnfn convert_double2_rtz(float2);
5253double2 __ovld __cnfn convert_double2_rtz(int2);
5254double2 __ovld __cnfn convert_double2_rtz(long2);
5255double2 __ovld __cnfn convert_double2_rtz(short2);
5256double2 __ovld __cnfn convert_double2_rtz(uchar2);
5257double2 __ovld __cnfn convert_double2_rtz(uint2);
5258double2 __ovld __cnfn convert_double2_rtz(ulong2);
5259double2 __ovld __cnfn convert_double2_rtz(ushort2);
5260double3 __ovld __cnfn convert_double3(char3);
5261double3 __ovld __cnfn convert_double3(double3);
5262double3 __ovld __cnfn convert_double3(float3);
5263double3 __ovld __cnfn convert_double3(int3);
5264double3 __ovld __cnfn convert_double3(long3);
5265double3 __ovld __cnfn convert_double3(short3);
5266double3 __ovld __cnfn convert_double3(uchar3);
5267double3 __ovld __cnfn convert_double3(uint3);
5268double3 __ovld __cnfn convert_double3(ulong3);
5269double3 __ovld __cnfn convert_double3(ushort3);
5270double3 __ovld __cnfn convert_double3_rte(char3);
5271double3 __ovld __cnfn convert_double3_rte(double3);
5272double3 __ovld __cnfn convert_double3_rte(float3);
5273double3 __ovld __cnfn convert_double3_rte(int3);
5274double3 __ovld __cnfn convert_double3_rte(long3);
5275double3 __ovld __cnfn convert_double3_rte(short3);
5276double3 __ovld __cnfn convert_double3_rte(uchar3);
5277double3 __ovld __cnfn convert_double3_rte(uint3);
5278double3 __ovld __cnfn convert_double3_rte(ulong3);
5279double3 __ovld __cnfn convert_double3_rte(ushort3);
5280double3 __ovld __cnfn convert_double3_rtn(char3);
5281double3 __ovld __cnfn convert_double3_rtn(double3);
5282double3 __ovld __cnfn convert_double3_rtn(float3);
5283double3 __ovld __cnfn convert_double3_rtn(int3);
5284double3 __ovld __cnfn convert_double3_rtn(long3);
5285double3 __ovld __cnfn convert_double3_rtn(short3);
5286double3 __ovld __cnfn convert_double3_rtn(uchar3);
5287double3 __ovld __cnfn convert_double3_rtn(uint3);
5288double3 __ovld __cnfn convert_double3_rtn(ulong3);
5289double3 __ovld __cnfn convert_double3_rtn(ushort3);
5290double3 __ovld __cnfn convert_double3_rtp(char3);
5291double3 __ovld __cnfn convert_double3_rtp(double3);
5292double3 __ovld __cnfn convert_double3_rtp(float3);
5293double3 __ovld __cnfn convert_double3_rtp(int3);
5294double3 __ovld __cnfn convert_double3_rtp(long3);
5295double3 __ovld __cnfn convert_double3_rtp(short3);
5296double3 __ovld __cnfn convert_double3_rtp(uchar3);
5297double3 __ovld __cnfn convert_double3_rtp(uint3);
5298double3 __ovld __cnfn convert_double3_rtp(ulong3);
5299double3 __ovld __cnfn convert_double3_rtp(ushort3);
5300double3 __ovld __cnfn convert_double3_rtz(char3);
5301double3 __ovld __cnfn convert_double3_rtz(double3);
5302double3 __ovld __cnfn convert_double3_rtz(float3);
5303double3 __ovld __cnfn convert_double3_rtz(int3);
5304double3 __ovld __cnfn convert_double3_rtz(long3);
5305double3 __ovld __cnfn convert_double3_rtz(short3);
5306double3 __ovld __cnfn convert_double3_rtz(uchar3);
5307double3 __ovld __cnfn convert_double3_rtz(uint3);
5308double3 __ovld __cnfn convert_double3_rtz(ulong3);
5309double3 __ovld __cnfn convert_double3_rtz(ushort3);
5310double4 __ovld __cnfn convert_double4(char4);
5311double4 __ovld __cnfn convert_double4(double4);
5312double4 __ovld __cnfn convert_double4(float4);
5313double4 __ovld __cnfn convert_double4(int4);
5314double4 __ovld __cnfn convert_double4(long4);
5315double4 __ovld __cnfn convert_double4(short4);
5316double4 __ovld __cnfn convert_double4(uchar4);
5317double4 __ovld __cnfn convert_double4(uint4);
5318double4 __ovld __cnfn convert_double4(ulong4);
5319double4 __ovld __cnfn convert_double4(ushort4);
5320double4 __ovld __cnfn convert_double4_rte(char4);
5321double4 __ovld __cnfn convert_double4_rte(double4);
5322double4 __ovld __cnfn convert_double4_rte(float4);
5323double4 __ovld __cnfn convert_double4_rte(int4);
5324double4 __ovld __cnfn convert_double4_rte(long4);
5325double4 __ovld __cnfn convert_double4_rte(short4);
5326double4 __ovld __cnfn convert_double4_rte(uchar4);
5327double4 __ovld __cnfn convert_double4_rte(uint4);
5328double4 __ovld __cnfn convert_double4_rte(ulong4);
5329double4 __ovld __cnfn convert_double4_rte(ushort4);
5330double4 __ovld __cnfn convert_double4_rtn(char4);
5331double4 __ovld __cnfn convert_double4_rtn(double4);
5332double4 __ovld __cnfn convert_double4_rtn(float4);
5333double4 __ovld __cnfn convert_double4_rtn(int4);
5334double4 __ovld __cnfn convert_double4_rtn(long4);
5335double4 __ovld __cnfn convert_double4_rtn(short4);
5336double4 __ovld __cnfn convert_double4_rtn(uchar4);
5337double4 __ovld __cnfn convert_double4_rtn(uint4);
5338double4 __ovld __cnfn convert_double4_rtn(ulong4);
5339double4 __ovld __cnfn convert_double4_rtn(ushort4);
5340double4 __ovld __cnfn convert_double4_rtp(char4);
5341double4 __ovld __cnfn convert_double4_rtp(double4);
5342double4 __ovld __cnfn convert_double4_rtp(float4);
5343double4 __ovld __cnfn convert_double4_rtp(int4);
5344double4 __ovld __cnfn convert_double4_rtp(long4);
5345double4 __ovld __cnfn convert_double4_rtp(short4);
5346double4 __ovld __cnfn convert_double4_rtp(uchar4);
5347double4 __ovld __cnfn convert_double4_rtp(uint4);
5348double4 __ovld __cnfn convert_double4_rtp(ulong4);
5349double4 __ovld __cnfn convert_double4_rtp(ushort4);
5350double4 __ovld __cnfn convert_double4_rtz(char4);
5351double4 __ovld __cnfn convert_double4_rtz(double4);
5352double4 __ovld __cnfn convert_double4_rtz(float4);
5353double4 __ovld __cnfn convert_double4_rtz(int4);
5354double4 __ovld __cnfn convert_double4_rtz(long4);
5355double4 __ovld __cnfn convert_double4_rtz(short4);
5356double4 __ovld __cnfn convert_double4_rtz(uchar4);
5357double4 __ovld __cnfn convert_double4_rtz(uint4);
5358double4 __ovld __cnfn convert_double4_rtz(ulong4);
5359double4 __ovld __cnfn convert_double4_rtz(ushort4);
5360double8 __ovld __cnfn convert_double8(char8);
5361double8 __ovld __cnfn convert_double8(double8);
5362double8 __ovld __cnfn convert_double8(float8);
5363double8 __ovld __cnfn convert_double8(int8);
5364double8 __ovld __cnfn convert_double8(long8);
5365double8 __ovld __cnfn convert_double8(short8);
5366double8 __ovld __cnfn convert_double8(uchar8);
5367double8 __ovld __cnfn convert_double8(uint8);
5368double8 __ovld __cnfn convert_double8(ulong8);
5369double8 __ovld __cnfn convert_double8(ushort8);
5370double8 __ovld __cnfn convert_double8_rte(char8);
5371double8 __ovld __cnfn convert_double8_rte(double8);
5372double8 __ovld __cnfn convert_double8_rte(float8);
5373double8 __ovld __cnfn convert_double8_rte(int8);
5374double8 __ovld __cnfn convert_double8_rte(long8);
5375double8 __ovld __cnfn convert_double8_rte(short8);
5376double8 __ovld __cnfn convert_double8_rte(uchar8);
5377double8 __ovld __cnfn convert_double8_rte(uint8);
5378double8 __ovld __cnfn convert_double8_rte(ulong8);
5379double8 __ovld __cnfn convert_double8_rte(ushort8);
5380double8 __ovld __cnfn convert_double8_rtn(char8);
5381double8 __ovld __cnfn convert_double8_rtn(double8);
5382double8 __ovld __cnfn convert_double8_rtn(float8);
5383double8 __ovld __cnfn convert_double8_rtn(int8);
5384double8 __ovld __cnfn convert_double8_rtn(long8);
5385double8 __ovld __cnfn convert_double8_rtn(short8);
5386double8 __ovld __cnfn convert_double8_rtn(uchar8);
5387double8 __ovld __cnfn convert_double8_rtn(uint8);
5388double8 __ovld __cnfn convert_double8_rtn(ulong8);
5389double8 __ovld __cnfn convert_double8_rtn(ushort8);
5390double8 __ovld __cnfn convert_double8_rtp(char8);
5391double8 __ovld __cnfn convert_double8_rtp(double8);
5392double8 __ovld __cnfn convert_double8_rtp(float8);
5393double8 __ovld __cnfn convert_double8_rtp(int8);
5394double8 __ovld __cnfn convert_double8_rtp(long8);
5395double8 __ovld __cnfn convert_double8_rtp(short8);
5396double8 __ovld __cnfn convert_double8_rtp(uchar8);
5397double8 __ovld __cnfn convert_double8_rtp(uint8);
5398double8 __ovld __cnfn convert_double8_rtp(ulong8);
5399double8 __ovld __cnfn convert_double8_rtp(ushort8);
5400double8 __ovld __cnfn convert_double8_rtz(char8);
5401double8 __ovld __cnfn convert_double8_rtz(double8);
5402double8 __ovld __cnfn convert_double8_rtz(float8);
5403double8 __ovld __cnfn convert_double8_rtz(int8);
5404double8 __ovld __cnfn convert_double8_rtz(long8);
5405double8 __ovld __cnfn convert_double8_rtz(short8);
5406double8 __ovld __cnfn convert_double8_rtz(uchar8);
5407double8 __ovld __cnfn convert_double8_rtz(uint8);
5408double8 __ovld __cnfn convert_double8_rtz(ulong8);
5409double8 __ovld __cnfn convert_double8_rtz(ushort8);
5410double16 __ovld __cnfn convert_double16(char16);
5411double16 __ovld __cnfn convert_double16(double16);
5412double16 __ovld __cnfn convert_double16(float16);
5413double16 __ovld __cnfn convert_double16(int16);
5414double16 __ovld __cnfn convert_double16(long16);
5415double16 __ovld __cnfn convert_double16(short16);
5416double16 __ovld __cnfn convert_double16(uchar16);
5417double16 __ovld __cnfn convert_double16(uint16);
5418double16 __ovld __cnfn convert_double16(ulong16);
5419double16 __ovld __cnfn convert_double16(ushort16);
5420double16 __ovld __cnfn convert_double16_rte(char16);
5421double16 __ovld __cnfn convert_double16_rte(double16);
5422double16 __ovld __cnfn convert_double16_rte(float16);
5423double16 __ovld __cnfn convert_double16_rte(int16);
5424double16 __ovld __cnfn convert_double16_rte(long16);
5425double16 __ovld __cnfn convert_double16_rte(short16);
5426double16 __ovld __cnfn convert_double16_rte(uchar16);
5427double16 __ovld __cnfn convert_double16_rte(uint16);
5428double16 __ovld __cnfn convert_double16_rte(ulong16);
5429double16 __ovld __cnfn convert_double16_rte(ushort16);
5430double16 __ovld __cnfn convert_double16_rtn(char16);
5431double16 __ovld __cnfn convert_double16_rtn(double16);
5432double16 __ovld __cnfn convert_double16_rtn(float16);
5433double16 __ovld __cnfn convert_double16_rtn(int16);
5434double16 __ovld __cnfn convert_double16_rtn(long16);
5435double16 __ovld __cnfn convert_double16_rtn(short16);
5436double16 __ovld __cnfn convert_double16_rtn(uchar16);
5437double16 __ovld __cnfn convert_double16_rtn(uint16);
5438double16 __ovld __cnfn convert_double16_rtn(ulong16);
5439double16 __ovld __cnfn convert_double16_rtn(ushort16);
5440double16 __ovld __cnfn convert_double16_rtp(char16);
5441double16 __ovld __cnfn convert_double16_rtp(double16);
5442double16 __ovld __cnfn convert_double16_rtp(float16);
5443double16 __ovld __cnfn convert_double16_rtp(int16);
5444double16 __ovld __cnfn convert_double16_rtp(long16);
5445double16 __ovld __cnfn convert_double16_rtp(short16);
5446double16 __ovld __cnfn convert_double16_rtp(uchar16);
5447double16 __ovld __cnfn convert_double16_rtp(uint16);
5448double16 __ovld __cnfn convert_double16_rtp(ulong16);
5449double16 __ovld __cnfn convert_double16_rtp(ushort16);
5450double16 __ovld __cnfn convert_double16_rtz(char16);
5451double16 __ovld __cnfn convert_double16_rtz(double16);
5452double16 __ovld __cnfn convert_double16_rtz(float16);
5453double16 __ovld __cnfn convert_double16_rtz(int16);
5454double16 __ovld __cnfn convert_double16_rtz(long16);
5455double16 __ovld __cnfn convert_double16_rtz(short16);
5456double16 __ovld __cnfn convert_double16_rtz(uchar16);
5457double16 __ovld __cnfn convert_double16_rtz(uint16);
5458double16 __ovld __cnfn convert_double16_rtz(ulong16);
5459double16 __ovld __cnfn convert_double16_rtz(ushort16);
5460#endif //cl_khr_fp64
5461
5462#ifdef cl_khr_fp16
5463#pragma OPENCL EXTENSION cl_khr_fp16 : enable
5464// Convert half types to non-double types.
5465uchar __ovld __cnfn convert_uchar(half);
5466uchar __ovld __cnfn convert_uchar_rte(half);
5467uchar __ovld __cnfn convert_uchar_rtp(half);
5468uchar __ovld __cnfn convert_uchar_rtn(half);
5469uchar __ovld __cnfn convert_uchar_rtz(half);
5470uchar __ovld __cnfn convert_uchar_sat(half);
5471uchar __ovld __cnfn convert_uchar_sat_rte(half);
5472uchar __ovld __cnfn convert_uchar_sat_rtp(half);
5473uchar __ovld __cnfn convert_uchar_sat_rtn(half);
5474uchar __ovld __cnfn convert_uchar_sat_rtz(half);
5475uchar2 __ovld __cnfn convert_uchar2(half2);
5476uchar2 __ovld __cnfn convert_uchar2_rte(half2);
5477uchar2 __ovld __cnfn convert_uchar2_rtp(half2);
5478uchar2 __ovld __cnfn convert_uchar2_rtn(half2);
5479uchar2 __ovld __cnfn convert_uchar2_rtz(half2);
5480uchar2 __ovld __cnfn convert_uchar2_sat(half2);
5481uchar2 __ovld __cnfn convert_uchar2_sat_rte(half2);
5482uchar2 __ovld __cnfn convert_uchar2_sat_rtp(half2);
5483uchar2 __ovld __cnfn convert_uchar2_sat_rtn(half2);
5484uchar2 __ovld __cnfn convert_uchar2_sat_rtz(half2);
5485uchar3 __ovld __cnfn convert_uchar3(half3);
5486uchar3 __ovld __cnfn convert_uchar3_rte(half3);
5487uchar3 __ovld __cnfn convert_uchar3_rtp(half3);
5488uchar3 __ovld __cnfn convert_uchar3_rtn(half3);
5489uchar3 __ovld __cnfn convert_uchar3_rtz(half3);
5490uchar3 __ovld __cnfn convert_uchar3_sat(half3);
5491uchar3 __ovld __cnfn convert_uchar3_sat_rte(half3);
5492uchar3 __ovld __cnfn convert_uchar3_sat_rtp(half3);
5493uchar3 __ovld __cnfn convert_uchar3_sat_rtn(half3);
5494uchar3 __ovld __cnfn convert_uchar3_sat_rtz(half3);
5495uchar4 __ovld __cnfn convert_uchar4(half4);
5496uchar4 __ovld __cnfn convert_uchar4_rte(half4);
5497uchar4 __ovld __cnfn convert_uchar4_rtp(half4);
5498uchar4 __ovld __cnfn convert_uchar4_rtn(half4);
5499uchar4 __ovld __cnfn convert_uchar4_rtz(half4);
5500uchar4 __ovld __cnfn convert_uchar4_sat(half4);
5501uchar4 __ovld __cnfn convert_uchar4_sat_rte(half4);
5502uchar4 __ovld __cnfn convert_uchar4_sat_rtp(half4);
5503uchar4 __ovld __cnfn convert_uchar4_sat_rtn(half4);
5504uchar4 __ovld __cnfn convert_uchar4_sat_rtz(half4);
5505uchar8 __ovld __cnfn convert_uchar8(half8);
5506uchar8 __ovld __cnfn convert_uchar8_rte(half8);
5507uchar8 __ovld __cnfn convert_uchar8_rtp(half8);
5508uchar8 __ovld __cnfn convert_uchar8_rtn(half8);
5509uchar8 __ovld __cnfn convert_uchar8_rtz(half8);
5510uchar8 __ovld __cnfn convert_uchar8_sat(half8);
5511uchar8 __ovld __cnfn convert_uchar8_sat_rte(half8);
5512uchar8 __ovld __cnfn convert_uchar8_sat_rtp(half8);
5513uchar8 __ovld __cnfn convert_uchar8_sat_rtn(half8);
5514uchar8 __ovld __cnfn convert_uchar8_sat_rtz(half8);
5515uchar16 __ovld __cnfn convert_uchar16(half16);
5516uchar16 __ovld __cnfn convert_uchar16_rte(half16);
5517uchar16 __ovld __cnfn convert_uchar16_rtp(half16);
5518uchar16 __ovld __cnfn convert_uchar16_rtn(half16);
5519uchar16 __ovld __cnfn convert_uchar16_rtz(half16);
5520uchar16 __ovld __cnfn convert_uchar16_sat(half16);
5521uchar16 __ovld __cnfn convert_uchar16_sat_rte(half16);
5522uchar16 __ovld __cnfn convert_uchar16_sat_rtp(half16);
5523uchar16 __ovld __cnfn convert_uchar16_sat_rtn(half16);
5524uchar16 __ovld __cnfn convert_uchar16_sat_rtz(half16);
5525ushort __ovld __cnfn convert_ushort(half);
5526ushort __ovld __cnfn convert_ushort_rte(half);
5527ushort __ovld __cnfn convert_ushort_rtp(half);
5528ushort __ovld __cnfn convert_ushort_rtn(half);
5529ushort __ovld __cnfn convert_ushort_rtz(half);
5530ushort __ovld __cnfn convert_ushort_sat(half);
5531ushort __ovld __cnfn convert_ushort_sat_rte(half);
5532ushort __ovld __cnfn convert_ushort_sat_rtp(half);
5533ushort __ovld __cnfn convert_ushort_sat_rtn(half);
5534ushort __ovld __cnfn convert_ushort_sat_rtz(half);
5535ushort2 __ovld __cnfn convert_ushort2(half2);
5536ushort2 __ovld __cnfn convert_ushort2_rte(half2);
5537ushort2 __ovld __cnfn convert_ushort2_rtp(half2);
5538ushort2 __ovld __cnfn convert_ushort2_rtn(half2);
5539ushort2 __ovld __cnfn convert_ushort2_rtz(half2);
5540ushort2 __ovld __cnfn convert_ushort2_sat(half2);
5541ushort2 __ovld __cnfn convert_ushort2_sat_rte(half2);
5542ushort2 __ovld __cnfn convert_ushort2_sat_rtp(half2);
5543ushort2 __ovld __cnfn convert_ushort2_sat_rtn(half2);
5544ushort2 __ovld __cnfn convert_ushort2_sat_rtz(half2);
5545ushort3 __ovld __cnfn convert_ushort3(half3);
5546ushort3 __ovld __cnfn convert_ushort3_rte(half3);
5547ushort3 __ovld __cnfn convert_ushort3_rtp(half3);
5548ushort3 __ovld __cnfn convert_ushort3_rtn(half3);
5549ushort3 __ovld __cnfn convert_ushort3_rtz(half3);
5550ushort3 __ovld __cnfn convert_ushort3_sat(half3);
5551ushort3 __ovld __cnfn convert_ushort3_sat_rte(half3);
5552ushort3 __ovld __cnfn convert_ushort3_sat_rtp(half3);
5553ushort3 __ovld __cnfn convert_ushort3_sat_rtn(half3);
5554ushort3 __ovld __cnfn convert_ushort3_sat_rtz(half3);
5555ushort4 __ovld __cnfn convert_ushort4(half4);
5556ushort4 __ovld __cnfn convert_ushort4_rte(half4);
5557ushort4 __ovld __cnfn convert_ushort4_rtp(half4);
5558ushort4 __ovld __cnfn convert_ushort4_rtn(half4);
5559ushort4 __ovld __cnfn convert_ushort4_rtz(half4);
5560ushort4 __ovld __cnfn convert_ushort4_sat(half4);
5561ushort4 __ovld __cnfn convert_ushort4_sat_rte(half4);
5562ushort4 __ovld __cnfn convert_ushort4_sat_rtp(half4);
5563ushort4 __ovld __cnfn convert_ushort4_sat_rtn(half4);
5564ushort4 __ovld __cnfn convert_ushort4_sat_rtz(half4);
5565ushort8 __ovld __cnfn convert_ushort8(half8);
5566ushort8 __ovld __cnfn convert_ushort8_rte(half8);
5567ushort8 __ovld __cnfn convert_ushort8_rtp(half8);
5568ushort8 __ovld __cnfn convert_ushort8_rtn(half8);
5569ushort8 __ovld __cnfn convert_ushort8_rtz(half8);
5570ushort8 __ovld __cnfn convert_ushort8_sat(half8);
5571ushort8 __ovld __cnfn convert_ushort8_sat_rte(half8);
5572ushort8 __ovld __cnfn convert_ushort8_sat_rtp(half8);
5573ushort8 __ovld __cnfn convert_ushort8_sat_rtn(half8);
5574ushort8 __ovld __cnfn convert_ushort8_sat_rtz(half8);
5575ushort16 __ovld __cnfn convert_ushort16(half16);
5576ushort16 __ovld __cnfn convert_ushort16_rte(half16);
5577ushort16 __ovld __cnfn convert_ushort16_rtp(half16);
5578ushort16 __ovld __cnfn convert_ushort16_rtn(half16);
5579ushort16 __ovld __cnfn convert_ushort16_rtz(half16);
5580ushort16 __ovld __cnfn convert_ushort16_sat(half16);
5581ushort16 __ovld __cnfn convert_ushort16_sat_rte(half16);
5582ushort16 __ovld __cnfn convert_ushort16_sat_rtp(half16);
5583ushort16 __ovld __cnfn convert_ushort16_sat_rtn(half16);
5584ushort16 __ovld __cnfn convert_ushort16_sat_rtz(half16);
5585uint __ovld __cnfn convert_uint(half);
5586uint __ovld __cnfn convert_uint_rte(half);
5587uint __ovld __cnfn convert_uint_rtp(half);
5588uint __ovld __cnfn convert_uint_rtn(half);
5589uint __ovld __cnfn convert_uint_rtz(half);
5590uint __ovld __cnfn convert_uint_sat(half);
5591uint __ovld __cnfn convert_uint_sat_rte(half);
5592uint __ovld __cnfn convert_uint_sat_rtp(half);
5593uint __ovld __cnfn convert_uint_sat_rtn(half);
5594uint __ovld __cnfn convert_uint_sat_rtz(half);
5595uint2 __ovld __cnfn convert_uint2(half2);
5596uint2 __ovld __cnfn convert_uint2_rte(half2);
5597uint2 __ovld __cnfn convert_uint2_rtp(half2);
5598uint2 __ovld __cnfn convert_uint2_rtn(half2);
5599uint2 __ovld __cnfn convert_uint2_rtz(half2);
5600uint2 __ovld __cnfn convert_uint2_sat(half2);
5601uint2 __ovld __cnfn convert_uint2_sat_rte(half2);
5602uint2 __ovld __cnfn convert_uint2_sat_rtp(half2);
5603uint2 __ovld __cnfn convert_uint2_sat_rtn(half2);
5604uint2 __ovld __cnfn convert_uint2_sat_rtz(half2);
5605uint3 __ovld __cnfn convert_uint3(half3);
5606uint3 __ovld __cnfn convert_uint3_rte(half3);
5607uint3 __ovld __cnfn convert_uint3_rtp(half3);
5608uint3 __ovld __cnfn convert_uint3_rtn(half3);
5609uint3 __ovld __cnfn convert_uint3_rtz(half3);
5610uint3 __ovld __cnfn convert_uint3_sat(half3);
5611uint3 __ovld __cnfn convert_uint3_sat_rte(half3);
5612uint3 __ovld __cnfn convert_uint3_sat_rtp(half3);
5613uint3 __ovld __cnfn convert_uint3_sat_rtn(half3);
5614uint3 __ovld __cnfn convert_uint3_sat_rtz(half3);
5615uint4 __ovld __cnfn convert_uint4(half4);
5616uint4 __ovld __cnfn convert_uint4_rte(half4);
5617uint4 __ovld __cnfn convert_uint4_rtp(half4);
5618uint4 __ovld __cnfn convert_uint4_rtn(half4);
5619uint4 __ovld __cnfn convert_uint4_rtz(half4);
5620uint4 __ovld __cnfn convert_uint4_sat(half4);
5621uint4 __ovld __cnfn convert_uint4_sat_rte(half4);
5622uint4 __ovld __cnfn convert_uint4_sat_rtp(half4);
5623uint4 __ovld __cnfn convert_uint4_sat_rtn(half4);
5624uint4 __ovld __cnfn convert_uint4_sat_rtz(half4);
5625uint8 __ovld __cnfn convert_uint8(half8);
5626uint8 __ovld __cnfn convert_uint8_rte(half8);
5627uint8 __ovld __cnfn convert_uint8_rtp(half8);
5628uint8 __ovld __cnfn convert_uint8_rtn(half8);
5629uint8 __ovld __cnfn convert_uint8_rtz(half8);
5630uint8 __ovld __cnfn convert_uint8_sat(half8);
5631uint8 __ovld __cnfn convert_uint8_sat_rte(half8);
5632uint8 __ovld __cnfn convert_uint8_sat_rtp(half8);
5633uint8 __ovld __cnfn convert_uint8_sat_rtn(half8);
5634uint8 __ovld __cnfn convert_uint8_sat_rtz(half8);
5635uint16 __ovld __cnfn convert_uint16(half16);
5636uint16 __ovld __cnfn convert_uint16_rte(half16);
5637uint16 __ovld __cnfn convert_uint16_rtp(half16);
5638uint16 __ovld __cnfn convert_uint16_rtn(half16);
5639uint16 __ovld __cnfn convert_uint16_rtz(half16);
5640uint16 __ovld __cnfn convert_uint16_sat(half16);
5641uint16 __ovld __cnfn convert_uint16_sat_rte(half16);
5642uint16 __ovld __cnfn convert_uint16_sat_rtp(half16);
5643uint16 __ovld __cnfn convert_uint16_sat_rtn(half16);
5644uint16 __ovld __cnfn convert_uint16_sat_rtz(half16);
5645ulong __ovld __cnfn convert_ulong(half);
5646ulong __ovld __cnfn convert_ulong_rte(half);
5647ulong __ovld __cnfn convert_ulong_rtp(half);
5648ulong __ovld __cnfn convert_ulong_rtn(half);
5649ulong __ovld __cnfn convert_ulong_rtz(half);
5650ulong __ovld __cnfn convert_ulong_sat(half);
5651ulong __ovld __cnfn convert_ulong_sat_rte(half);
5652ulong __ovld __cnfn convert_ulong_sat_rtp(half);
5653ulong __ovld __cnfn convert_ulong_sat_rtn(half);
5654ulong __ovld __cnfn convert_ulong_sat_rtz(half);
5655ulong2 __ovld __cnfn convert_ulong2(half2);
5656ulong2 __ovld __cnfn convert_ulong2_rte(half2);
5657ulong2 __ovld __cnfn convert_ulong2_rtp(half2);
5658ulong2 __ovld __cnfn convert_ulong2_rtn(half2);
5659ulong2 __ovld __cnfn convert_ulong2_rtz(half2);
5660ulong2 __ovld __cnfn convert_ulong2_sat(half2);
5661ulong2 __ovld __cnfn convert_ulong2_sat_rte(half2);
5662ulong2 __ovld __cnfn convert_ulong2_sat_rtp(half2);
5663ulong2 __ovld __cnfn convert_ulong2_sat_rtn(half2);
5664ulong2 __ovld __cnfn convert_ulong2_sat_rtz(half2);
5665ulong3 __ovld __cnfn convert_ulong3(half3);
5666ulong3 __ovld __cnfn convert_ulong3_rte(half3);
5667ulong3 __ovld __cnfn convert_ulong3_rtp(half3);
5668ulong3 __ovld __cnfn convert_ulong3_rtn(half3);
5669ulong3 __ovld __cnfn convert_ulong3_rtz(half3);
5670ulong3 __ovld __cnfn convert_ulong3_sat(half3);
5671ulong3 __ovld __cnfn convert_ulong3_sat_rte(half3);
5672ulong3 __ovld __cnfn convert_ulong3_sat_rtp(half3);
5673ulong3 __ovld __cnfn convert_ulong3_sat_rtn(half3);
5674ulong3 __ovld __cnfn convert_ulong3_sat_rtz(half3);
5675ulong4 __ovld __cnfn convert_ulong4(half4);
5676ulong4 __ovld __cnfn convert_ulong4_rte(half4);
5677ulong4 __ovld __cnfn convert_ulong4_rtp(half4);
5678ulong4 __ovld __cnfn convert_ulong4_rtn(half4);
5679ulong4 __ovld __cnfn convert_ulong4_rtz(half4);
5680ulong4 __ovld __cnfn convert_ulong4_sat(half4);
5681ulong4 __ovld __cnfn convert_ulong4_sat_rte(half4);
5682ulong4 __ovld __cnfn convert_ulong4_sat_rtp(half4);
5683ulong4 __ovld __cnfn convert_ulong4_sat_rtn(half4);
5684ulong4 __ovld __cnfn convert_ulong4_sat_rtz(half4);
5685ulong8 __ovld __cnfn convert_ulong8(half8);
5686ulong8 __ovld __cnfn convert_ulong8_rte(half8);
5687ulong8 __ovld __cnfn convert_ulong8_rtp(half8);
5688ulong8 __ovld __cnfn convert_ulong8_rtn(half8);
5689ulong8 __ovld __cnfn convert_ulong8_rtz(half8);
5690ulong8 __ovld __cnfn convert_ulong8_sat(half8);
5691ulong8 __ovld __cnfn convert_ulong8_sat_rte(half8);
5692ulong8 __ovld __cnfn convert_ulong8_sat_rtp(half8);
5693ulong8 __ovld __cnfn convert_ulong8_sat_rtn(half8);
5694ulong8 __ovld __cnfn convert_ulong8_sat_rtz(half8);
5695ulong16 __ovld __cnfn convert_ulong16(half16);
5696ulong16 __ovld __cnfn convert_ulong16_rte(half16);
5697ulong16 __ovld __cnfn convert_ulong16_rtp(half16);
5698ulong16 __ovld __cnfn convert_ulong16_rtn(half16);
5699ulong16 __ovld __cnfn convert_ulong16_rtz(half16);
5700ulong16 __ovld __cnfn convert_ulong16_sat(half16);
5701ulong16 __ovld __cnfn convert_ulong16_sat_rte(half16);
5702ulong16 __ovld __cnfn convert_ulong16_sat_rtp(half16);
5703ulong16 __ovld __cnfn convert_ulong16_sat_rtn(half16);
5704ulong16 __ovld __cnfn convert_ulong16_sat_rtz(half16);
5705char __ovld __cnfn convert_char(half);
5706char __ovld __cnfn convert_char_rte(half);
5707char __ovld __cnfn convert_char_rtp(half);
5708char __ovld __cnfn convert_char_rtn(half);
5709char __ovld __cnfn convert_char_rtz(half);
5710char __ovld __cnfn convert_char_sat(half);
5711char __ovld __cnfn convert_char_sat_rte(half);
5712char __ovld __cnfn convert_char_sat_rtp(half);
5713char __ovld __cnfn convert_char_sat_rtn(half);
5714char __ovld __cnfn convert_char_sat_rtz(half);
5715char2 __ovld __cnfn convert_char2(half2);
5716char2 __ovld __cnfn convert_char2_rte(half2);
5717char2 __ovld __cnfn convert_char2_rtp(half2);
5718char2 __ovld __cnfn convert_char2_rtn(half2);
5719char2 __ovld __cnfn convert_char2_rtz(half2);
5720char2 __ovld __cnfn convert_char2_sat(half2);
5721char2 __ovld __cnfn convert_char2_sat_rte(half2);
5722char2 __ovld __cnfn convert_char2_sat_rtp(half2);
5723char2 __ovld __cnfn convert_char2_sat_rtn(half2);
5724char2 __ovld __cnfn convert_char2_sat_rtz(half2);
5725char3 __ovld __cnfn convert_char3(half3);
5726char3 __ovld __cnfn convert_char3_rte(half3);
5727char3 __ovld __cnfn convert_char3_rtp(half3);
5728char3 __ovld __cnfn convert_char3_rtn(half3);
5729char3 __ovld __cnfn convert_char3_rtz(half3);
5730char3 __ovld __cnfn convert_char3_sat(half3);
5731char3 __ovld __cnfn convert_char3_sat_rte(half3);
5732char3 __ovld __cnfn convert_char3_sat_rtp(half3);
5733char3 __ovld __cnfn convert_char3_sat_rtn(half3);
5734char3 __ovld __cnfn convert_char3_sat_rtz(half3);
5735char4 __ovld __cnfn convert_char4(half4);
5736char4 __ovld __cnfn convert_char4_rte(half4);
5737char4 __ovld __cnfn convert_char4_rtp(half4);
5738char4 __ovld __cnfn convert_char4_rtn(half4);
5739char4 __ovld __cnfn convert_char4_rtz(half4);
5740char4 __ovld __cnfn convert_char4_sat(half4);
5741char4 __ovld __cnfn convert_char4_sat_rte(half4);
5742char4 __ovld __cnfn convert_char4_sat_rtp(half4);
5743char4 __ovld __cnfn convert_char4_sat_rtn(half4);
5744char4 __ovld __cnfn convert_char4_sat_rtz(half4);
5745char8 __ovld __cnfn convert_char8(half8);
5746char8 __ovld __cnfn convert_char8_rte(half8);
5747char8 __ovld __cnfn convert_char8_rtp(half8);
5748char8 __ovld __cnfn convert_char8_rtn(half8);
5749char8 __ovld __cnfn convert_char8_rtz(half8);
5750char8 __ovld __cnfn convert_char8_sat(half8);
5751char8 __ovld __cnfn convert_char8_sat_rte(half8);
5752char8 __ovld __cnfn convert_char8_sat_rtp(half8);
5753char8 __ovld __cnfn convert_char8_sat_rtn(half8);
5754char8 __ovld __cnfn convert_char8_sat_rtz(half8);
5755char16 __ovld __cnfn convert_char16(half16);
5756char16 __ovld __cnfn convert_char16_rte(half16);
5757char16 __ovld __cnfn convert_char16_rtp(half16);
5758char16 __ovld __cnfn convert_char16_rtn(half16);
5759char16 __ovld __cnfn convert_char16_rtz(half16);
5760char16 __ovld __cnfn convert_char16_sat(half16);
5761char16 __ovld __cnfn convert_char16_sat_rte(half16);
5762char16 __ovld __cnfn convert_char16_sat_rtp(half16);
5763char16 __ovld __cnfn convert_char16_sat_rtn(half16);
5764char16 __ovld __cnfn convert_char16_sat_rtz(half16);
5765short __ovld __cnfn convert_short(half);
5766short __ovld __cnfn convert_short_rte(half);
5767short __ovld __cnfn convert_short_rtp(half);
5768short __ovld __cnfn convert_short_rtn(half);
5769short __ovld __cnfn convert_short_rtz(half);
5770short __ovld __cnfn convert_short_sat(half);
5771short __ovld __cnfn convert_short_sat_rte(half);
5772short __ovld __cnfn convert_short_sat_rtp(half);
5773short __ovld __cnfn convert_short_sat_rtn(half);
5774short __ovld __cnfn convert_short_sat_rtz(half);
5775short2 __ovld __cnfn convert_short2(half2);
5776short2 __ovld __cnfn convert_short2_rte(half2);
5777short2 __ovld __cnfn convert_short2_rtp(half2);
5778short2 __ovld __cnfn convert_short2_rtn(half2);
5779short2 __ovld __cnfn convert_short2_rtz(half2);
5780short2 __ovld __cnfn convert_short2_sat(half2);
5781short2 __ovld __cnfn convert_short2_sat_rte(half2);
5782short2 __ovld __cnfn convert_short2_sat_rtp(half2);
5783short2 __ovld __cnfn convert_short2_sat_rtn(half2);
5784short2 __ovld __cnfn convert_short2_sat_rtz(half2);
5785short3 __ovld __cnfn convert_short3(half3);
5786short3 __ovld __cnfn convert_short3_rte(half3);
5787short3 __ovld __cnfn convert_short3_rtp(half3);
5788short3 __ovld __cnfn convert_short3_rtn(half3);
5789short3 __ovld __cnfn convert_short3_rtz(half3);
5790short3 __ovld __cnfn convert_short3_sat(half3);
5791short3 __ovld __cnfn convert_short3_sat_rte(half3);
5792short3 __ovld __cnfn convert_short3_sat_rtp(half3);
5793short3 __ovld __cnfn convert_short3_sat_rtn(half3);
5794short3 __ovld __cnfn convert_short3_sat_rtz(half3);
5795short4 __ovld __cnfn convert_short4(half4);
5796short4 __ovld __cnfn convert_short4_rte(half4);
5797short4 __ovld __cnfn convert_short4_rtp(half4);
5798short4 __ovld __cnfn convert_short4_rtn(half4);
5799short4 __ovld __cnfn convert_short4_rtz(half4);
5800short4 __ovld __cnfn convert_short4_sat(half4);
5801short4 __ovld __cnfn convert_short4_sat_rte(half4);
5802short4 __ovld __cnfn convert_short4_sat_rtp(half4);
5803short4 __ovld __cnfn convert_short4_sat_rtn(half4);
5804short4 __ovld __cnfn convert_short4_sat_rtz(half4);
5805short8 __ovld __cnfn convert_short8(half8);
5806short8 __ovld __cnfn convert_short8_rte(half8);
5807short8 __ovld __cnfn convert_short8_rtp(half8);
5808short8 __ovld __cnfn convert_short8_rtn(half8);
5809short8 __ovld __cnfn convert_short8_rtz(half8);
5810short8 __ovld __cnfn convert_short8_sat(half8);
5811short8 __ovld __cnfn convert_short8_sat_rte(half8);
5812short8 __ovld __cnfn convert_short8_sat_rtp(half8);
5813short8 __ovld __cnfn convert_short8_sat_rtn(half8);
5814short8 __ovld __cnfn convert_short8_sat_rtz(half8);
5815short16 __ovld __cnfn convert_short16(half16);
5816short16 __ovld __cnfn convert_short16_rte(half16);
5817short16 __ovld __cnfn convert_short16_rtp(half16);
5818short16 __ovld __cnfn convert_short16_rtn(half16);
5819short16 __ovld __cnfn convert_short16_rtz(half16);
5820short16 __ovld __cnfn convert_short16_sat(half16);
5821short16 __ovld __cnfn convert_short16_sat_rte(half16);
5822short16 __ovld __cnfn convert_short16_sat_rtp(half16);
5823short16 __ovld __cnfn convert_short16_sat_rtn(half16);
5824short16 __ovld __cnfn convert_short16_sat_rtz(half16);
5825int __ovld __cnfn convert_int(half);
5826int __ovld __cnfn convert_int_rte(half);
5827int __ovld __cnfn convert_int_rtp(half);
5828int __ovld __cnfn convert_int_rtn(half);
5829int __ovld __cnfn convert_int_rtz(half);
5830int __ovld __cnfn convert_int_sat(half);
5831int __ovld __cnfn convert_int_sat_rte(half);
5832int __ovld __cnfn convert_int_sat_rtp(half);
5833int __ovld __cnfn convert_int_sat_rtn(half);
5834int __ovld __cnfn convert_int_sat_rtz(half);
5835int2 __ovld __cnfn convert_int2(half2);
5836int2 __ovld __cnfn convert_int2_rte(half2);
5837int2 __ovld __cnfn convert_int2_rtp(half2);
5838int2 __ovld __cnfn convert_int2_rtn(half2);
5839int2 __ovld __cnfn convert_int2_rtz(half2);
5840int2 __ovld __cnfn convert_int2_sat(half2);
5841int2 __ovld __cnfn convert_int2_sat_rte(half2);
5842int2 __ovld __cnfn convert_int2_sat_rtp(half2);
5843int2 __ovld __cnfn convert_int2_sat_rtn(half2);
5844int2 __ovld __cnfn convert_int2_sat_rtz(half2);
5845int3 __ovld __cnfn convert_int3(half3);
5846int3 __ovld __cnfn convert_int3_rte(half3);
5847int3 __ovld __cnfn convert_int3_rtp(half3);
5848int3 __ovld __cnfn convert_int3_rtn(half3);
5849int3 __ovld __cnfn convert_int3_rtz(half3);
5850int3 __ovld __cnfn convert_int3_sat(half3);
5851int3 __ovld __cnfn convert_int3_sat_rte(half3);
5852int3 __ovld __cnfn convert_int3_sat_rtp(half3);
5853int3 __ovld __cnfn convert_int3_sat_rtn(half3);
5854int3 __ovld __cnfn convert_int3_sat_rtz(half3);
5855int4 __ovld __cnfn convert_int4(half4);
5856int4 __ovld __cnfn convert_int4_rte(half4);
5857int4 __ovld __cnfn convert_int4_rtp(half4);
5858int4 __ovld __cnfn convert_int4_rtn(half4);
5859int4 __ovld __cnfn convert_int4_rtz(half4);
5860int4 __ovld __cnfn convert_int4_sat(half4);
5861int4 __ovld __cnfn convert_int4_sat_rte(half4);
5862int4 __ovld __cnfn convert_int4_sat_rtp(half4);
5863int4 __ovld __cnfn convert_int4_sat_rtn(half4);
5864int4 __ovld __cnfn convert_int4_sat_rtz(half4);
5865int8 __ovld __cnfn convert_int8(half8);
5866int8 __ovld __cnfn convert_int8_rte(half8);
5867int8 __ovld __cnfn convert_int8_rtp(half8);
5868int8 __ovld __cnfn convert_int8_rtn(half8);
5869int8 __ovld __cnfn convert_int8_rtz(half8);
5870int8 __ovld __cnfn convert_int8_sat(half8);
5871int8 __ovld __cnfn convert_int8_sat_rte(half8);
5872int8 __ovld __cnfn convert_int8_sat_rtp(half8);
5873int8 __ovld __cnfn convert_int8_sat_rtn(half8);
5874int8 __ovld __cnfn convert_int8_sat_rtz(half8);
5875int16 __ovld __cnfn convert_int16(half16);
5876int16 __ovld __cnfn convert_int16_rte(half16);
5877int16 __ovld __cnfn convert_int16_rtp(half16);
5878int16 __ovld __cnfn convert_int16_rtn(half16);
5879int16 __ovld __cnfn convert_int16_rtz(half16);
5880int16 __ovld __cnfn convert_int16_sat(half16);
5881int16 __ovld __cnfn convert_int16_sat_rte(half16);
5882int16 __ovld __cnfn convert_int16_sat_rtp(half16);
5883int16 __ovld __cnfn convert_int16_sat_rtn(half16);
5884int16 __ovld __cnfn convert_int16_sat_rtz(half16);
5885long __ovld __cnfn convert_long(half);
5886long __ovld __cnfn convert_long_rte(half);
5887long __ovld __cnfn convert_long_rtp(half);
5888long __ovld __cnfn convert_long_rtn(half);
5889long __ovld __cnfn convert_long_rtz(half);
5890long __ovld __cnfn convert_long_sat(half);
5891long __ovld __cnfn convert_long_sat_rte(half);
5892long __ovld __cnfn convert_long_sat_rtp(half);
5893long __ovld __cnfn convert_long_sat_rtn(half);
5894long __ovld __cnfn convert_long_sat_rtz(half);
5895long2 __ovld __cnfn convert_long2(half2);
5896long2 __ovld __cnfn convert_long2_rte(half2);
5897long2 __ovld __cnfn convert_long2_rtp(half2);
5898long2 __ovld __cnfn convert_long2_rtn(half2);
5899long2 __ovld __cnfn convert_long2_rtz(half2);
5900long2 __ovld __cnfn convert_long2_sat(half2);
5901long2 __ovld __cnfn convert_long2_sat_rte(half2);
5902long2 __ovld __cnfn convert_long2_sat_rtp(half2);
5903long2 __ovld __cnfn convert_long2_sat_rtn(half2);
5904long2 __ovld __cnfn convert_long2_sat_rtz(half2);
5905long3 __ovld __cnfn convert_long3(half3);
5906long3 __ovld __cnfn convert_long3_rte(half3);
5907long3 __ovld __cnfn convert_long3_rtp(half3);
5908long3 __ovld __cnfn convert_long3_rtn(half3);
5909long3 __ovld __cnfn convert_long3_rtz(half3);
5910long3 __ovld __cnfn convert_long3_sat(half3);
5911long3 __ovld __cnfn convert_long3_sat_rte(half3);
5912long3 __ovld __cnfn convert_long3_sat_rtp(half3);
5913long3 __ovld __cnfn convert_long3_sat_rtn(half3);
5914long3 __ovld __cnfn convert_long3_sat_rtz(half3);
5915long4 __ovld __cnfn convert_long4(half4);
5916long4 __ovld __cnfn convert_long4_rte(half4);
5917long4 __ovld __cnfn convert_long4_rtp(half4);
5918long4 __ovld __cnfn convert_long4_rtn(half4);
5919long4 __ovld __cnfn convert_long4_rtz(half4);
5920long4 __ovld __cnfn convert_long4_sat(half4);
5921long4 __ovld __cnfn convert_long4_sat_rte(half4);
5922long4 __ovld __cnfn convert_long4_sat_rtp(half4);
5923long4 __ovld __cnfn convert_long4_sat_rtn(half4);
5924long4 __ovld __cnfn convert_long4_sat_rtz(half4);
5925long8 __ovld __cnfn convert_long8(half8);
5926long8 __ovld __cnfn convert_long8_rte(half8);
5927long8 __ovld __cnfn convert_long8_rtp(half8);
5928long8 __ovld __cnfn convert_long8_rtn(half8);
5929long8 __ovld __cnfn convert_long8_rtz(half8);
5930long8 __ovld __cnfn convert_long8_sat(half8);
5931long8 __ovld __cnfn convert_long8_sat_rte(half8);
5932long8 __ovld __cnfn convert_long8_sat_rtp(half8);
5933long8 __ovld __cnfn convert_long8_sat_rtn(half8);
5934long8 __ovld __cnfn convert_long8_sat_rtz(half8);
5935long16 __ovld __cnfn convert_long16(half16);
5936long16 __ovld __cnfn convert_long16_rte(half16);
5937long16 __ovld __cnfn convert_long16_rtp(half16);
5938long16 __ovld __cnfn convert_long16_rtn(half16);
5939long16 __ovld __cnfn convert_long16_rtz(half16);
5940long16 __ovld __cnfn convert_long16_sat(half16);
5941long16 __ovld __cnfn convert_long16_sat_rte(half16);
5942long16 __ovld __cnfn convert_long16_sat_rtp(half16);
5943long16 __ovld __cnfn convert_long16_sat_rtn(half16);
5944long16 __ovld __cnfn convert_long16_sat_rtz(half16);
5945float __ovld __cnfn convert_float(half);
5946float __ovld __cnfn convert_float_rte(half);
5947float __ovld __cnfn convert_float_rtp(half);
5948float __ovld __cnfn convert_float_rtn(half);
5949float __ovld __cnfn convert_float_rtz(half);
5950float2 __ovld __cnfn convert_float2(half2);
5951float2 __ovld __cnfn convert_float2_rte(half2);
5952float2 __ovld __cnfn convert_float2_rtp(half2);
5953float2 __ovld __cnfn convert_float2_rtn(half2);
5954float2 __ovld __cnfn convert_float2_rtz(half2);
5955float3 __ovld __cnfn convert_float3(half3);
5956float3 __ovld __cnfn convert_float3_rte(half3);
5957float3 __ovld __cnfn convert_float3_rtp(half3);
5958float3 __ovld __cnfn convert_float3_rtn(half3);
5959float3 __ovld __cnfn convert_float3_rtz(half3);
5960float4 __ovld __cnfn convert_float4(half4);
5961float4 __ovld __cnfn convert_float4_rte(half4);
5962float4 __ovld __cnfn convert_float4_rtp(half4);
5963float4 __ovld __cnfn convert_float4_rtn(half4);
5964float4 __ovld __cnfn convert_float4_rtz(half4);
5965float8 __ovld __cnfn convert_float8(half8);
5966float8 __ovld __cnfn convert_float8_rte(half8);
5967float8 __ovld __cnfn convert_float8_rtp(half8);
5968float8 __ovld __cnfn convert_float8_rtn(half8);
5969float8 __ovld __cnfn convert_float8_rtz(half8);
5970float16 __ovld __cnfn convert_float16(half16);
5971float16 __ovld __cnfn convert_float16_rte(half16);
5972float16 __ovld __cnfn convert_float16_rtp(half16);
5973float16 __ovld __cnfn convert_float16_rtn(half16);
5974float16 __ovld __cnfn convert_float16_rtz(half16);
5975
5976// Convert non-double types to half types.
5977half __ovld __cnfn convert_half(uchar);
5978half __ovld __cnfn convert_half(ushort);
5979half __ovld __cnfn convert_half(uint);
5980half __ovld __cnfn convert_half(ulong);
5981half __ovld __cnfn convert_half(char);
5982half __ovld __cnfn convert_half(short);
5983half __ovld __cnfn convert_half(int);
5984half __ovld __cnfn convert_half(long);
5985half __ovld __cnfn convert_half(float);
5986half __ovld __cnfn convert_half(half);
5987half __ovld __cnfn convert_half_rte(uchar);
5988half __ovld __cnfn convert_half_rte(ushort);
5989half __ovld __cnfn convert_half_rte(uint);
5990half __ovld __cnfn convert_half_rte(ulong);
5991half __ovld __cnfn convert_half_rte(char);
5992half __ovld __cnfn convert_half_rte(short);
5993half __ovld __cnfn convert_half_rte(int);
5994half __ovld __cnfn convert_half_rte(long);
5995half __ovld __cnfn convert_half_rte(float);
5996half __ovld __cnfn convert_half_rte(half);
5997half __ovld __cnfn convert_half_rtp(uchar);
5998half __ovld __cnfn convert_half_rtp(ushort);
5999half __ovld __cnfn convert_half_rtp(uint);
6000half __ovld __cnfn convert_half_rtp(ulong);
6001half __ovld __cnfn convert_half_rtp(char);
6002half __ovld __cnfn convert_half_rtp(short);
6003half __ovld __cnfn convert_half_rtp(int);
6004half __ovld __cnfn convert_half_rtp(long);
6005half __ovld __cnfn convert_half_rtp(float);
6006half __ovld __cnfn convert_half_rtp(half);
6007half __ovld __cnfn convert_half_rtn(uchar);
6008half __ovld __cnfn convert_half_rtn(ushort);
6009half __ovld __cnfn convert_half_rtn(uint);
6010half __ovld __cnfn convert_half_rtn(ulong);
6011half __ovld __cnfn convert_half_rtn(char);
6012half __ovld __cnfn convert_half_rtn(short);
6013half __ovld __cnfn convert_half_rtn(int);
6014half __ovld __cnfn convert_half_rtn(long);
6015half __ovld __cnfn convert_half_rtn(float);
6016half __ovld __cnfn convert_half_rtn(half);
6017half __ovld __cnfn convert_half_rtz(uchar);
6018half __ovld __cnfn convert_half_rtz(ushort);
6019half __ovld __cnfn convert_half_rtz(uint);
6020half __ovld __cnfn convert_half_rtz(ulong);
6021half __ovld __cnfn convert_half_rtz(char);
6022half __ovld __cnfn convert_half_rtz(short);
6023half __ovld __cnfn convert_half_rtz(int);
6024half __ovld __cnfn convert_half_rtz(long);
6025half __ovld __cnfn convert_half_rtz(float);
6026half __ovld __cnfn convert_half_rtz(half);
6027half2 __ovld __cnfn convert_half2(char2);
6028half2 __ovld __cnfn convert_half2(uchar2);
6029half2 __ovld __cnfn convert_half2(short2);
6030half2 __ovld __cnfn convert_half2(ushort2);
6031half2 __ovld __cnfn convert_half2(int2);
6032half2 __ovld __cnfn convert_half2(uint2);
6033half2 __ovld __cnfn convert_half2(long2);
6034half2 __ovld __cnfn convert_half2(ulong2);
6035half2 __ovld __cnfn convert_half2(float2);
6036half2 __ovld __cnfn convert_half2(half2);
6037half2 __ovld __cnfn convert_half2_rte(char2);
6038half2 __ovld __cnfn convert_half2_rte(uchar2);
6039half2 __ovld __cnfn convert_half2_rte(short2);
6040half2 __ovld __cnfn convert_half2_rte(ushort2);
6041half2 __ovld __cnfn convert_half2_rte(int2);
6042half2 __ovld __cnfn convert_half2_rte(uint2);
6043half2 __ovld __cnfn convert_half2_rte(long2);
6044half2 __ovld __cnfn convert_half2_rte(ulong2);
6045half2 __ovld __cnfn convert_half2_rte(float2);
6046half2 __ovld __cnfn convert_half2_rte(half2);
6047half2 __ovld __cnfn convert_half2_rtp(char2);
6048half2 __ovld __cnfn convert_half2_rtp(uchar2);
6049half2 __ovld __cnfn convert_half2_rtp(short2);
6050half2 __ovld __cnfn convert_half2_rtp(ushort2);
6051half2 __ovld __cnfn convert_half2_rtp(int2);
6052half2 __ovld __cnfn convert_half2_rtp(uint2);
6053half2 __ovld __cnfn convert_half2_rtp(long2);
6054half2 __ovld __cnfn convert_half2_rtp(ulong2);
6055half2 __ovld __cnfn convert_half2_rtp(float2);
6056half2 __ovld __cnfn convert_half2_rtp(half2);
6057half2 __ovld __cnfn convert_half2_rtn(char2);
6058half2 __ovld __cnfn convert_half2_rtn(uchar2);
6059half2 __ovld __cnfn convert_half2_rtn(short2);
6060half2 __ovld __cnfn convert_half2_rtn(ushort2);
6061half2 __ovld __cnfn convert_half2_rtn(int2);
6062half2 __ovld __cnfn convert_half2_rtn(uint2);
6063half2 __ovld __cnfn convert_half2_rtn(long2);
6064half2 __ovld __cnfn convert_half2_rtn(ulong2);
6065half2 __ovld __cnfn convert_half2_rtn(float2);
6066half2 __ovld __cnfn convert_half2_rtn(half2);
6067half2 __ovld __cnfn convert_half2_rtz(char2);
6068half2 __ovld __cnfn convert_half2_rtz(uchar2);
6069half2 __ovld __cnfn convert_half2_rtz(short2);
6070half2 __ovld __cnfn convert_half2_rtz(ushort2);
6071half2 __ovld __cnfn convert_half2_rtz(int2);
6072half2 __ovld __cnfn convert_half2_rtz(uint2);
6073half2 __ovld __cnfn convert_half2_rtz(long2);
6074half2 __ovld __cnfn convert_half2_rtz(ulong2);
6075half2 __ovld __cnfn convert_half2_rtz(float2);
6076half2 __ovld __cnfn convert_half2_rtz(half2);
6077half3 __ovld __cnfn convert_half3(char3);
6078half3 __ovld __cnfn convert_half3(uchar3);
6079half3 __ovld __cnfn convert_half3(short3);
6080half3 __ovld __cnfn convert_half3(ushort3);
6081half3 __ovld __cnfn convert_half3(int3);
6082half3 __ovld __cnfn convert_half3(uint3);
6083half3 __ovld __cnfn convert_half3(long3);
6084half3 __ovld __cnfn convert_half3(ulong3);
6085half3 __ovld __cnfn convert_half3(float3);
6086half3 __ovld __cnfn convert_half3(half3);
6087half3 __ovld __cnfn convert_half3_rte(char3);
6088half3 __ovld __cnfn convert_half3_rte(uchar3);
6089half3 __ovld __cnfn convert_half3_rte(short3);
6090half3 __ovld __cnfn convert_half3_rte(ushort3);
6091half3 __ovld __cnfn convert_half3_rte(int3);
6092half3 __ovld __cnfn convert_half3_rte(uint3);
6093half3 __ovld __cnfn convert_half3_rte(long3);
6094half3 __ovld __cnfn convert_half3_rte(ulong3);
6095half3 __ovld __cnfn convert_half3_rte(float3);
6096half3 __ovld __cnfn convert_half3_rte(half3);
6097half3 __ovld __cnfn convert_half3_rtp(char3);
6098half3 __ovld __cnfn convert_half3_rtp(uchar3);
6099half3 __ovld __cnfn convert_half3_rtp(short3);
6100half3 __ovld __cnfn convert_half3_rtp(ushort3);
6101half3 __ovld __cnfn convert_half3_rtp(int3);
6102half3 __ovld __cnfn convert_half3_rtp(uint3);
6103half3 __ovld __cnfn convert_half3_rtp(long3);
6104half3 __ovld __cnfn convert_half3_rtp(ulong3);
6105half3 __ovld __cnfn convert_half3_rtp(float3);
6106half3 __ovld __cnfn convert_half3_rtp(half3);
6107half3 __ovld __cnfn convert_half3_rtn(char3);
6108half3 __ovld __cnfn convert_half3_rtn(uchar3);
6109half3 __ovld __cnfn convert_half3_rtn(short3);
6110half3 __ovld __cnfn convert_half3_rtn(ushort3);
6111half3 __ovld __cnfn convert_half3_rtn(int3);
6112half3 __ovld __cnfn convert_half3_rtn(uint3);
6113half3 __ovld __cnfn convert_half3_rtn(long3);
6114half3 __ovld __cnfn convert_half3_rtn(ulong3);
6115half3 __ovld __cnfn convert_half3_rtn(float3);
6116half3 __ovld __cnfn convert_half3_rtn(half3);
6117half3 __ovld __cnfn convert_half3_rtz(char3);
6118half3 __ovld __cnfn convert_half3_rtz(uchar3);
6119half3 __ovld __cnfn convert_half3_rtz(short3);
6120half3 __ovld __cnfn convert_half3_rtz(ushort3);
6121half3 __ovld __cnfn convert_half3_rtz(int3);
6122half3 __ovld __cnfn convert_half3_rtz(uint3);
6123half3 __ovld __cnfn convert_half3_rtz(long3);
6124half3 __ovld __cnfn convert_half3_rtz(ulong3);
6125half3 __ovld __cnfn convert_half3_rtz(float3);
6126half3 __ovld __cnfn convert_half3_rtz(half3);
6127half4 __ovld __cnfn convert_half4(char4);
6128half4 __ovld __cnfn convert_half4(uchar4);
6129half4 __ovld __cnfn convert_half4(short4);
6130half4 __ovld __cnfn convert_half4(ushort4);
6131half4 __ovld __cnfn convert_half4(int4);
6132half4 __ovld __cnfn convert_half4(uint4);
6133half4 __ovld __cnfn convert_half4(long4);
6134half4 __ovld __cnfn convert_half4(ulong4);
6135half4 __ovld __cnfn convert_half4(float4);
6136half4 __ovld __cnfn convert_half4(half4);
6137half4 __ovld __cnfn convert_half4_rte(char4);
6138half4 __ovld __cnfn convert_half4_rte(uchar4);
6139half4 __ovld __cnfn convert_half4_rte(short4);
6140half4 __ovld __cnfn convert_half4_rte(ushort4);
6141half4 __ovld __cnfn convert_half4_rte(int4);
6142half4 __ovld __cnfn convert_half4_rte(uint4);
6143half4 __ovld __cnfn convert_half4_rte(long4);
6144half4 __ovld __cnfn convert_half4_rte(ulong4);
6145half4 __ovld __cnfn convert_half4_rte(float4);
6146half4 __ovld __cnfn convert_half4_rte(half4);
6147half4 __ovld __cnfn convert_half4_rtp(char4);
6148half4 __ovld __cnfn convert_half4_rtp(uchar4);
6149half4 __ovld __cnfn convert_half4_rtp(short4);
6150half4 __ovld __cnfn convert_half4_rtp(ushort4);
6151half4 __ovld __cnfn convert_half4_rtp(int4);
6152half4 __ovld __cnfn convert_half4_rtp(uint4);
6153half4 __ovld __cnfn convert_half4_rtp(long4);
6154half4 __ovld __cnfn convert_half4_rtp(ulong4);
6155half4 __ovld __cnfn convert_half4_rtp(float4);
6156half4 __ovld __cnfn convert_half4_rtp(half4);
6157half4 __ovld __cnfn convert_half4_rtn(char4);
6158half4 __ovld __cnfn convert_half4_rtn(uchar4);
6159half4 __ovld __cnfn convert_half4_rtn(short4);
6160half4 __ovld __cnfn convert_half4_rtn(ushort4);
6161half4 __ovld __cnfn convert_half4_rtn(int4);
6162half4 __ovld __cnfn convert_half4_rtn(uint4);
6163half4 __ovld __cnfn convert_half4_rtn(long4);
6164half4 __ovld __cnfn convert_half4_rtn(ulong4);
6165half4 __ovld __cnfn convert_half4_rtn(float4);
6166half4 __ovld __cnfn convert_half4_rtn(half4);
6167half4 __ovld __cnfn convert_half4_rtz(char4);
6168half4 __ovld __cnfn convert_half4_rtz(uchar4);
6169half4 __ovld __cnfn convert_half4_rtz(short4);
6170half4 __ovld __cnfn convert_half4_rtz(ushort4);
6171half4 __ovld __cnfn convert_half4_rtz(int4);
6172half4 __ovld __cnfn convert_half4_rtz(uint4);
6173half4 __ovld __cnfn convert_half4_rtz(long4);
6174half4 __ovld __cnfn convert_half4_rtz(ulong4);
6175half4 __ovld __cnfn convert_half4_rtz(float4);
6176half4 __ovld __cnfn convert_half4_rtz(half4);
6177half8 __ovld __cnfn convert_half8(char8);
6178half8 __ovld __cnfn convert_half8(uchar8);
6179half8 __ovld __cnfn convert_half8(short8);
6180half8 __ovld __cnfn convert_half8(ushort8);
6181half8 __ovld __cnfn convert_half8(int8);
6182half8 __ovld __cnfn convert_half8(uint8);
6183half8 __ovld __cnfn convert_half8(long8);
6184half8 __ovld __cnfn convert_half8(ulong8);
6185half8 __ovld __cnfn convert_half8(float8);
6186half8 __ovld __cnfn convert_half8(half8);
6187half8 __ovld __cnfn convert_half8_rte(char8);
6188half8 __ovld __cnfn convert_half8_rte(uchar8);
6189half8 __ovld __cnfn convert_half8_rte(short8);
6190half8 __ovld __cnfn convert_half8_rte(ushort8);
6191half8 __ovld __cnfn convert_half8_rte(int8);
6192half8 __ovld __cnfn convert_half8_rte(uint8);
6193half8 __ovld __cnfn convert_half8_rte(long8);
6194half8 __ovld __cnfn convert_half8_rte(ulong8);
6195half8 __ovld __cnfn convert_half8_rte(float8);
6196half8 __ovld __cnfn convert_half8_rte(half8);
6197half8 __ovld __cnfn convert_half8_rtp(char8);
6198half8 __ovld __cnfn convert_half8_rtp(uchar8);
6199half8 __ovld __cnfn convert_half8_rtp(short8);
6200half8 __ovld __cnfn convert_half8_rtp(ushort8);
6201half8 __ovld __cnfn convert_half8_rtp(int8);
6202half8 __ovld __cnfn convert_half8_rtp(uint8);
6203half8 __ovld __cnfn convert_half8_rtp(long8);
6204half8 __ovld __cnfn convert_half8_rtp(ulong8);
6205half8 __ovld __cnfn convert_half8_rtp(float8);
6206half8 __ovld __cnfn convert_half8_rtp(half8);
6207half8 __ovld __cnfn convert_half8_rtn(char8);
6208half8 __ovld __cnfn convert_half8_rtn(uchar8);
6209half8 __ovld __cnfn convert_half8_rtn(short8);
6210half8 __ovld __cnfn convert_half8_rtn(ushort8);
6211half8 __ovld __cnfn convert_half8_rtn(int8);
6212half8 __ovld __cnfn convert_half8_rtn(uint8);
6213half8 __ovld __cnfn convert_half8_rtn(long8);
6214half8 __ovld __cnfn convert_half8_rtn(ulong8);
6215half8 __ovld __cnfn convert_half8_rtn(float8);
6216half8 __ovld __cnfn convert_half8_rtn(half8);
6217half8 __ovld __cnfn convert_half8_rtz(char8);
6218half8 __ovld __cnfn convert_half8_rtz(uchar8);
6219half8 __ovld __cnfn convert_half8_rtz(short8);
6220half8 __ovld __cnfn convert_half8_rtz(ushort8);
6221half8 __ovld __cnfn convert_half8_rtz(int8);
6222half8 __ovld __cnfn convert_half8_rtz(uint8);
6223half8 __ovld __cnfn convert_half8_rtz(long8);
6224half8 __ovld __cnfn convert_half8_rtz(ulong8);
6225half8 __ovld __cnfn convert_half8_rtz(float8);
6226half8 __ovld __cnfn convert_half8_rtz(half8);
6227half16 __ovld __cnfn convert_half16(char16);
6228half16 __ovld __cnfn convert_half16(uchar16);
6229half16 __ovld __cnfn convert_half16(short16);
6230half16 __ovld __cnfn convert_half16(ushort16);
6231half16 __ovld __cnfn convert_half16(int16);
6232half16 __ovld __cnfn convert_half16(uint16);
6233half16 __ovld __cnfn convert_half16(long16);
6234half16 __ovld __cnfn convert_half16(ulong16);
6235half16 __ovld __cnfn convert_half16(float16);
6236half16 __ovld __cnfn convert_half16(half16);
6237half16 __ovld __cnfn convert_half16_rte(char16);
6238half16 __ovld __cnfn convert_half16_rte(uchar16);
6239half16 __ovld __cnfn convert_half16_rte(short16);
6240half16 __ovld __cnfn convert_half16_rte(ushort16);
6241half16 __ovld __cnfn convert_half16_rte(int16);
6242half16 __ovld __cnfn convert_half16_rte(uint16);
6243half16 __ovld __cnfn convert_half16_rte(long16);
6244half16 __ovld __cnfn convert_half16_rte(ulong16);
6245half16 __ovld __cnfn convert_half16_rte(float16);
6246half16 __ovld __cnfn convert_half16_rte(half16);
6247half16 __ovld __cnfn convert_half16_rtp(char16);
6248half16 __ovld __cnfn convert_half16_rtp(uchar16);
6249half16 __ovld __cnfn convert_half16_rtp(short16);
6250half16 __ovld __cnfn convert_half16_rtp(ushort16);
6251half16 __ovld __cnfn convert_half16_rtp(int16);
6252half16 __ovld __cnfn convert_half16_rtp(uint16);
6253half16 __ovld __cnfn convert_half16_rtp(long16);
6254half16 __ovld __cnfn convert_half16_rtp(ulong16);
6255half16 __ovld __cnfn convert_half16_rtp(float16);
6256half16 __ovld __cnfn convert_half16_rtp(half16);
6257half16 __ovld __cnfn convert_half16_rtn(char16);
6258half16 __ovld __cnfn convert_half16_rtn(uchar16);
6259half16 __ovld __cnfn convert_half16_rtn(short16);
6260half16 __ovld __cnfn convert_half16_rtn(ushort16);
6261half16 __ovld __cnfn convert_half16_rtn(int16);
6262half16 __ovld __cnfn convert_half16_rtn(uint16);
6263half16 __ovld __cnfn convert_half16_rtn(long16);
6264half16 __ovld __cnfn convert_half16_rtn(ulong16);
6265half16 __ovld __cnfn convert_half16_rtn(float16);
6266half16 __ovld __cnfn convert_half16_rtn(half16);
6267half16 __ovld __cnfn convert_half16_rtz(char16);
6268half16 __ovld __cnfn convert_half16_rtz(uchar16);
6269half16 __ovld __cnfn convert_half16_rtz(short16);
6270half16 __ovld __cnfn convert_half16_rtz(ushort16);
6271half16 __ovld __cnfn convert_half16_rtz(int16);
6272half16 __ovld __cnfn convert_half16_rtz(uint16);
6273half16 __ovld __cnfn convert_half16_rtz(long16);
6274half16 __ovld __cnfn convert_half16_rtz(ulong16);
6275half16 __ovld __cnfn convert_half16_rtz(float16);
6276half16 __ovld __cnfn convert_half16_rtz(half16);
6277
6278// Convert half types to double types.
6279#ifdef cl_khr_fp64
6280double __ovld __cnfn convert_double(half);
6281double __ovld __cnfn convert_double_rte(half);
6282double __ovld __cnfn convert_double_rtp(half);
6283double __ovld __cnfn convert_double_rtn(half);
6284double __ovld __cnfn convert_double_rtz(half);
6285double2 __ovld __cnfn convert_double2(half2);
6286double2 __ovld __cnfn convert_double2_rte(half2);
6287double2 __ovld __cnfn convert_double2_rtp(half2);
6288double2 __ovld __cnfn convert_double2_rtn(half2);
6289double2 __ovld __cnfn convert_double2_rtz(half2);
6290double3 __ovld __cnfn convert_double3(half3);
6291double3 __ovld __cnfn convert_double3_rte(half3);
6292double3 __ovld __cnfn convert_double3_rtp(half3);
6293double3 __ovld __cnfn convert_double3_rtn(half3);
6294double3 __ovld __cnfn convert_double3_rtz(half3);
6295double4 __ovld __cnfn convert_double4(half4);
6296double4 __ovld __cnfn convert_double4_rte(half4);
6297double4 __ovld __cnfn convert_double4_rtp(half4);
6298double4 __ovld __cnfn convert_double4_rtn(half4);
6299double4 __ovld __cnfn convert_double4_rtz(half4);
6300double8 __ovld __cnfn convert_double8(half8);
6301double8 __ovld __cnfn convert_double8_rte(half8);
6302double8 __ovld __cnfn convert_double8_rtp(half8);
6303double8 __ovld __cnfn convert_double8_rtn(half8);
6304double8 __ovld __cnfn convert_double8_rtz(half8);
6305double16 __ovld __cnfn convert_double16(half16);
6306double16 __ovld __cnfn convert_double16_rte(half16);
6307double16 __ovld __cnfn convert_double16_rtp(half16);
6308double16 __ovld __cnfn convert_double16_rtn(half16);
6309double16 __ovld __cnfn convert_double16_rtz(half16);
6310
6311// Convert double types to half types.
6312half __ovld __cnfn convert_half(double);
6313half __ovld __cnfn convert_half_rte(double);
6314half __ovld __cnfn convert_half_rtp(double);
6315half __ovld __cnfn convert_half_rtn(double);
6316half __ovld __cnfn convert_half_rtz(double);
6317half2 __ovld __cnfn convert_half2(double2);
6318half2 __ovld __cnfn convert_half2_rte(double2);
6319half2 __ovld __cnfn convert_half2_rtp(double2);
6320half2 __ovld __cnfn convert_half2_rtn(double2);
6321half2 __ovld __cnfn convert_half2_rtz(double2);
6322half3 __ovld __cnfn convert_half3(double3);
6323half3 __ovld __cnfn convert_half3_rte(double3);
6324half3 __ovld __cnfn convert_half3_rtp(double3);
6325half3 __ovld __cnfn convert_half3_rtn(double3);
6326half3 __ovld __cnfn convert_half3_rtz(double3);
6327half4 __ovld __cnfn convert_half4(double4);
6328half4 __ovld __cnfn convert_half4_rte(double4);
6329half4 __ovld __cnfn convert_half4_rtp(double4);
6330half4 __ovld __cnfn convert_half4_rtn(double4);
6331half4 __ovld __cnfn convert_half4_rtz(double4);
6332half8 __ovld __cnfn convert_half8(double8);
6333half8 __ovld __cnfn convert_half8_rte(double8);
6334half8 __ovld __cnfn convert_half8_rtp(double8);
6335half8 __ovld __cnfn convert_half8_rtn(double8);
6336half8 __ovld __cnfn convert_half8_rtz(double8);
6337half16 __ovld __cnfn convert_half16(double16);
6338half16 __ovld __cnfn convert_half16_rte(double16);
6339half16 __ovld __cnfn convert_half16_rtp(double16);
6340half16 __ovld __cnfn convert_half16_rtn(double16);
6341half16 __ovld __cnfn convert_half16_rtz(double16);
6342#endif //cl_khr_fp64
6343
6344#endif // cl_khr_fp16
6345
6346// OpenCL v1.1 s6.11.1, v1.2 s6.12.1, v2.0 s6.13.1 - Work-item Functions
6347
6348/**
6349 * Returns the number of dimensions in use. This is the
6350 * value given to the work_dim argument specified in
6351 * clEnqueueNDRangeKernel.
6352 * For clEnqueueTask, this returns 1.
6353 */
6354uint __ovld __cnfn get_work_dim(void);
6355
6356/**
6357 * Returns the number of global work-items specified for
6358 * dimension identified by dimindx. This value is given by
6359 * the global_work_size argument to
6360 * clEnqueueNDRangeKernel. Valid values of dimindx
6361 * are 0 to get_work_dim() - 1. For other values of
6362 * dimindx, get_global_size() returns 1.
6363 * For clEnqueueTask, this always returns 1.
6364 */
6365size_t __ovld __cnfn get_global_size(uint);
6366
6367/**
6368 * Returns the unique global work-item ID value for
6369 * dimension identified by dimindx. The global work-item
6370 * ID specifies the work-item ID based on the number of
6371 * global work-items specified to execute the kernel. Valid
6372 * values of dimindx are 0 to get_work_dim() - 1. For
6373 * other values of dimindx, get_global_id() returns 0.
6374 * For clEnqueueTask, this returns 0.
6375 */
6376size_t __ovld __cnfn get_global_id(uint);
6377
6378/**
6379 * Returns the number of local work-items specified in
6380 * dimension identified by dimindx. This value is given by
6381 * the local_work_size argument to
6382 * clEnqueueNDRangeKernel if local_work_size is not
6383 * NULL; otherwise the OpenCL implementation chooses
6384 * an appropriate local_work_size value which is returned
6385 * by this function. Valid values of dimindx are 0 to
6386 * get_work_dim() - 1. For other values of dimindx,
6387 * get_local_size() returns 1.
6388 * For clEnqueueTask, this always returns 1.
6389 */
6390size_t __ovld __cnfn get_local_size(uint);
6391
6392/**
6393 * Returns the unique local work-item ID i.e. a work-item
6394 * within a specific work-group for dimension identified by
6395 * dimindx. Valid values of dimindx are 0 to
6396 * get_work_dim() - 1. For other values of dimindx,
6397 * get_local_id() returns 0.
6398 * For clEnqueueTask, this returns 0.
6399 */
6400size_t __ovld __cnfn get_local_id(uint);
6401
6402/**
6403 * Returns the number of work-groups that will execute a
6404 * kernel for dimension identified by dimindx.
6405 * Valid values of dimindx are 0 to get_work_dim() - 1.
6406 * For other values of dimindx, get_num_groups() returns 1.
6407 * For clEnqueueTask, this always returns 1.
6408 */
6409size_t __ovld __cnfn get_num_groups(uint);
6410
6411/**
6412 * get_group_id returns the work-group ID which is a
6413 * number from 0 .. get_num_groups(dimindx) - 1.
6414 * Valid values of dimindx are 0 to get_work_dim() - 1.
6415 * For other values, get_group_id() returns 0.
6416 * For clEnqueueTask, this returns 0.
6417 */
6418size_t __ovld __cnfn get_group_id(uint);
6419
6420/**
6421 * get_global_offset returns the offset values specified in
6422 * global_work_offset argument to
6423 * clEnqueueNDRangeKernel.
6424 * Valid values of dimindx are 0 to get_work_dim() - 1.
6425 * For other values, get_global_offset() returns 0.
6426 * For clEnqueueTask, this returns 0.
6427 */
6428size_t __ovld __cnfn get_global_offset(uint);
6429
6430#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
6431size_t __ovld get_enqueued_local_size(uint);
6432size_t __ovld get_global_linear_id(void);
6433size_t __ovld get_local_linear_id(void);
6434#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
6435
6436// OpenCL v1.1 s6.11.2, v1.2 s6.12.2, v2.0 s6.13.2 - Math functions
6437
6438/**
6439 * Arc cosine function.
6440 */
6441float __ovld __cnfn acos(float);
6442float2 __ovld __cnfn acos(float2);
6443float3 __ovld __cnfn acos(float3);
6444float4 __ovld __cnfn acos(float4);
6445float8 __ovld __cnfn acos(float8);
6446float16 __ovld __cnfn acos(float16);
6447#ifdef cl_khr_fp64
6448double __ovld __cnfn acos(double);
6449double2 __ovld __cnfn acos(double2);
6450double3 __ovld __cnfn acos(double3);
6451double4 __ovld __cnfn acos(double4);
6452double8 __ovld __cnfn acos(double8);
6453double16 __ovld __cnfn acos(double16);
6454#endif //cl_khr_fp64
6455#ifdef cl_khr_fp16
6456half __ovld __cnfn acos(half);
6457half2 __ovld __cnfn acos(half2);
6458half3 __ovld __cnfn acos(half3);
6459half4 __ovld __cnfn acos(half4);
6460half8 __ovld __cnfn acos(half8);
6461half16 __ovld __cnfn acos(half16);
6462#endif //cl_khr_fp16
6463
6464/**
6465 * Inverse hyperbolic cosine.
6466 */
6467float __ovld __cnfn acosh(float);
6468float2 __ovld __cnfn acosh(float2);
6469float3 __ovld __cnfn acosh(float3);
6470float4 __ovld __cnfn acosh(float4);
6471float8 __ovld __cnfn acosh(float8);
6472float16 __ovld __cnfn acosh(float16);
6473#ifdef cl_khr_fp64
6474double __ovld __cnfn acosh(double);
6475double2 __ovld __cnfn acosh(double2);
6476double3 __ovld __cnfn acosh(double3);
6477double4 __ovld __cnfn acosh(double4);
6478double8 __ovld __cnfn acosh(double8);
6479double16 __ovld __cnfn acosh(double16);
6480#endif //cl_khr_fp64
6481#ifdef cl_khr_fp16
6482half __ovld __cnfn acosh(half);
6483half2 __ovld __cnfn acosh(half2);
6484half3 __ovld __cnfn acosh(half3);
6485half4 __ovld __cnfn acosh(half4);
6486half8 __ovld __cnfn acosh(half8);
6487half16 __ovld __cnfn acosh(half16);
6488#endif //cl_khr_fp16
6489
6490/**
6491 * Compute acos (x) / PI.
6492 */
6493float __ovld __cnfn acospi(float);
6494float2 __ovld __cnfn acospi(float2);
6495float3 __ovld __cnfn acospi(float3);
6496float4 __ovld __cnfn acospi(float4);
6497float8 __ovld __cnfn acospi(float8);
6498float16 __ovld __cnfn acospi(float16);
6499#ifdef cl_khr_fp64
6500double __ovld __cnfn acospi(double);
6501double2 __ovld __cnfn acospi(double2);
6502double3 __ovld __cnfn acospi(double3);
6503double4 __ovld __cnfn acospi(double4);
6504double8 __ovld __cnfn acospi(double8);
6505double16 __ovld __cnfn acospi(double16);
6506#endif //cl_khr_fp64
6507#ifdef cl_khr_fp16
6508half __ovld __cnfn acospi(half);
6509half2 __ovld __cnfn acospi(half2);
6510half3 __ovld __cnfn acospi(half3);
6511half4 __ovld __cnfn acospi(half4);
6512half8 __ovld __cnfn acospi(half8);
6513half16 __ovld __cnfn acospi(half16);
6514#endif //cl_khr_fp16
6515
6516/**
6517 * Arc sine function.
6518 */
6519float __ovld __cnfn asin(float);
6520float2 __ovld __cnfn asin(float2);
6521float3 __ovld __cnfn asin(float3);
6522float4 __ovld __cnfn asin(float4);
6523float8 __ovld __cnfn asin(float8);
6524float16 __ovld __cnfn asin(float16);
6525#ifdef cl_khr_fp64
6526double __ovld __cnfn asin(double);
6527double2 __ovld __cnfn asin(double2);
6528double3 __ovld __cnfn asin(double3);
6529double4 __ovld __cnfn asin(double4);
6530double8 __ovld __cnfn asin(double8);
6531double16 __ovld __cnfn asin(double16);
6532#endif //cl_khr_fp64
6533#ifdef cl_khr_fp16
6534half __ovld __cnfn asin(half);
6535half2 __ovld __cnfn asin(half2);
6536half3 __ovld __cnfn asin(half3);
6537half4 __ovld __cnfn asin(half4);
6538half8 __ovld __cnfn asin(half8);
6539half16 __ovld __cnfn asin(half16);
6540#endif //cl_khr_fp16
6541
6542/**
6543 * Inverse hyperbolic sine.
6544 */
6545float __ovld __cnfn asinh(float);
6546float2 __ovld __cnfn asinh(float2);
6547float3 __ovld __cnfn asinh(float3);
6548float4 __ovld __cnfn asinh(float4);
6549float8 __ovld __cnfn asinh(float8);
6550float16 __ovld __cnfn asinh(float16);
6551#ifdef cl_khr_fp64
6552double __ovld __cnfn asinh(double);
6553double2 __ovld __cnfn asinh(double2);
6554double3 __ovld __cnfn asinh(double3);
6555double4 __ovld __cnfn asinh(double4);
6556double8 __ovld __cnfn asinh(double8);
6557double16 __ovld __cnfn asinh(double16);
6558#endif //cl_khr_fp64
6559#ifdef cl_khr_fp16
6560half __ovld __cnfn asinh(half);
6561half2 __ovld __cnfn asinh(half2);
6562half3 __ovld __cnfn asinh(half3);
6563half4 __ovld __cnfn asinh(half4);
6564half8 __ovld __cnfn asinh(half8);
6565half16 __ovld __cnfn asinh(half16);
6566#endif //cl_khr_fp16
6567
6568/**
6569 * Compute asin (x) / PI.
6570 */
6571float __ovld __cnfn asinpi(float);
6572float2 __ovld __cnfn asinpi(float2);
6573float3 __ovld __cnfn asinpi(float3);
6574float4 __ovld __cnfn asinpi(float4);
6575float8 __ovld __cnfn asinpi(float8);
6576float16 __ovld __cnfn asinpi(float16);
6577#ifdef cl_khr_fp64
6578double __ovld __cnfn asinpi(double);
6579double2 __ovld __cnfn asinpi(double2);
6580double3 __ovld __cnfn asinpi(double3);
6581double4 __ovld __cnfn asinpi(double4);
6582double8 __ovld __cnfn asinpi(double8);
6583double16 __ovld __cnfn asinpi(double16);
6584#endif //cl_khr_fp64
6585#ifdef cl_khr_fp16
6586half __ovld __cnfn asinpi(half);
6587half2 __ovld __cnfn asinpi(half2);
6588half3 __ovld __cnfn asinpi(half3);
6589half4 __ovld __cnfn asinpi(half4);
6590half8 __ovld __cnfn asinpi(half8);
6591half16 __ovld __cnfn asinpi(half16);
6592#endif //cl_khr_fp16
6593
6594/**
6595 * Arc tangent function.
6596 */
6597float __ovld __cnfn atan(float);
6598float2 __ovld __cnfn atan(float2);
6599float3 __ovld __cnfn atan(float3);
6600float4 __ovld __cnfn atan(float4);
6601float8 __ovld __cnfn atan(float8);
6602float16 __ovld __cnfn atan(float16);
6603#ifdef cl_khr_fp64
6604double __ovld __cnfn atan(double);
6605double2 __ovld __cnfn atan(double2);
6606double3 __ovld __cnfn atan(double3);
6607double4 __ovld __cnfn atan(double4);
6608double8 __ovld __cnfn atan(double8);
6609double16 __ovld __cnfn atan(double16);
6610#endif //cl_khr_fp64
6611#ifdef cl_khr_fp16
6612half __ovld __cnfn atan(half);
6613half2 __ovld __cnfn atan(half2);
6614half3 __ovld __cnfn atan(half3);
6615half4 __ovld __cnfn atan(half4);
6616half8 __ovld __cnfn atan(half8);
6617half16 __ovld __cnfn atan(half16);
6618#endif //cl_khr_fp16
6619
6620/**
6621 * Arc tangent of y / x.
6622 */
6623float __ovld __cnfn atan2(float, float);
6624float2 __ovld __cnfn atan2(float2, float2);
6625float3 __ovld __cnfn atan2(float3, float3);
6626float4 __ovld __cnfn atan2(float4, float4);
6627float8 __ovld __cnfn atan2(float8, float8);
6628float16 __ovld __cnfn atan2(float16, float16);
6629#ifdef cl_khr_fp64
6630double __ovld __cnfn atan2(double, double);
6631double2 __ovld __cnfn atan2(double2, double2);
6632double3 __ovld __cnfn atan2(double3, double3);
6633double4 __ovld __cnfn atan2(double4, double4);
6634double8 __ovld __cnfn atan2(double8, double8);
6635double16 __ovld __cnfn atan2(double16, double16);
6636#endif //cl_khr_fp64
6637#ifdef cl_khr_fp16
6638half __ovld __cnfn atan2(half, half);
6639half2 __ovld __cnfn atan2(half2, half2);
6640half3 __ovld __cnfn atan2(half3, half3);
6641half4 __ovld __cnfn atan2(half4, half4);
6642half8 __ovld __cnfn atan2(half8, half8);
6643half16 __ovld __cnfn atan2(half16, half16);
6644#endif //cl_khr_fp16
6645
6646/**
6647 * Hyperbolic arc tangent.
6648 */
6649float __ovld __cnfn atanh(float);
6650float2 __ovld __cnfn atanh(float2);
6651float3 __ovld __cnfn atanh(float3);
6652float4 __ovld __cnfn atanh(float4);
6653float8 __ovld __cnfn atanh(float8);
6654float16 __ovld __cnfn atanh(float16);
6655#ifdef cl_khr_fp64
6656double __ovld __cnfn atanh(double);
6657double2 __ovld __cnfn atanh(double2);
6658double3 __ovld __cnfn atanh(double3);
6659double4 __ovld __cnfn atanh(double4);
6660double8 __ovld __cnfn atanh(double8);
6661double16 __ovld __cnfn atanh(double16);
6662#endif //cl_khr_fp64
6663#ifdef cl_khr_fp16
6664half __ovld __cnfn atanh(half);
6665half2 __ovld __cnfn atanh(half2);
6666half3 __ovld __cnfn atanh(half3);
6667half4 __ovld __cnfn atanh(half4);
6668half8 __ovld __cnfn atanh(half8);
6669half16 __ovld __cnfn atanh(half16);
6670#endif //cl_khr_fp16
6671
6672/**
6673 * Compute atan (x) / PI.
6674 */
6675float __ovld __cnfn atanpi(float);
6676float2 __ovld __cnfn atanpi(float2);
6677float3 __ovld __cnfn atanpi(float3);
6678float4 __ovld __cnfn atanpi(float4);
6679float8 __ovld __cnfn atanpi(float8);
6680float16 __ovld __cnfn atanpi(float16);
6681#ifdef cl_khr_fp64
6682double __ovld __cnfn atanpi(double);
6683double2 __ovld __cnfn atanpi(double2);
6684double3 __ovld __cnfn atanpi(double3);
6685double4 __ovld __cnfn atanpi(double4);
6686double8 __ovld __cnfn atanpi(double8);
6687double16 __ovld __cnfn atanpi(double16);
6688#endif //cl_khr_fp64
6689#ifdef cl_khr_fp16
6690half __ovld __cnfn atanpi(half);
6691half2 __ovld __cnfn atanpi(half2);
6692half3 __ovld __cnfn atanpi(half3);
6693half4 __ovld __cnfn atanpi(half4);
6694half8 __ovld __cnfn atanpi(half8);
6695half16 __ovld __cnfn atanpi(half16);
6696#endif //cl_khr_fp16
6697
6698/**
6699 * Compute atan2 (y, x) / PI.
6700 */
6701float __ovld __cnfn atan2pi(float, float);
6702float2 __ovld __cnfn atan2pi(float2, float2);
6703float3 __ovld __cnfn atan2pi(float3, float3);
6704float4 __ovld __cnfn atan2pi(float4, float4);
6705float8 __ovld __cnfn atan2pi(float8, float8);
6706float16 __ovld __cnfn atan2pi(float16, float16);
6707#ifdef cl_khr_fp64
6708double __ovld __cnfn atan2pi(double, double);
6709double2 __ovld __cnfn atan2pi(double2, double2);
6710double3 __ovld __cnfn atan2pi(double3, double3);
6711double4 __ovld __cnfn atan2pi(double4, double4);
6712double8 __ovld __cnfn atan2pi(double8, double8);
6713double16 __ovld __cnfn atan2pi(double16, double16);
6714#endif //cl_khr_fp64
6715#ifdef cl_khr_fp16
6716half __ovld __cnfn atan2pi(half, half);
6717half2 __ovld __cnfn atan2pi(half2, half2);
6718half3 __ovld __cnfn atan2pi(half3, half3);
6719half4 __ovld __cnfn atan2pi(half4, half4);
6720half8 __ovld __cnfn atan2pi(half8, half8);
6721half16 __ovld __cnfn atan2pi(half16, half16);
6722#endif //cl_khr_fp16
6723
6724/**
6725 * Compute cube-root.
6726 */
6727float __ovld __cnfn cbrt(float);
6728float2 __ovld __cnfn cbrt(float2);
6729float3 __ovld __cnfn cbrt(float3);
6730float4 __ovld __cnfn cbrt(float4);
6731float8 __ovld __cnfn cbrt(float8);
6732float16 __ovld __cnfn cbrt(float16);
6733#ifdef cl_khr_fp64
6734double __ovld __cnfn cbrt(double);
6735double2 __ovld __cnfn cbrt(double2);
6736double3 __ovld __cnfn cbrt(double3);
6737double4 __ovld __cnfn cbrt(double4);
6738double8 __ovld __cnfn cbrt(double8);
6739double16 __ovld __cnfn cbrt(double16);
6740#endif //cl_khr_fp64
6741#ifdef cl_khr_fp16
6742half __ovld __cnfn cbrt(half);
6743half2 __ovld __cnfn cbrt(half2);
6744half3 __ovld __cnfn cbrt(half3);
6745half4 __ovld __cnfn cbrt(half4);
6746half8 __ovld __cnfn cbrt(half8);
6747half16 __ovld __cnfn cbrt(half16);
6748#endif //cl_khr_fp16
6749
6750/**
6751 * Round to integral value using the round to positive
6752 * infinity rounding mode.
6753 */
6754float __ovld __cnfn ceil(float);
6755float2 __ovld __cnfn ceil(float2);
6756float3 __ovld __cnfn ceil(float3);
6757float4 __ovld __cnfn ceil(float4);
6758float8 __ovld __cnfn ceil(float8);
6759float16 __ovld __cnfn ceil(float16);
6760#ifdef cl_khr_fp64
6761double __ovld __cnfn ceil(double);
6762double2 __ovld __cnfn ceil(double2);
6763double3 __ovld __cnfn ceil(double3);
6764double4 __ovld __cnfn ceil(double4);
6765double8 __ovld __cnfn ceil(double8);
6766double16 __ovld __cnfn ceil(double16);
6767#endif //cl_khr_fp64
6768#ifdef cl_khr_fp16
6769half __ovld __cnfn ceil(half);
6770half2 __ovld __cnfn ceil(half2);
6771half3 __ovld __cnfn ceil(half3);
6772half4 __ovld __cnfn ceil(half4);
6773half8 __ovld __cnfn ceil(half8);
6774half16 __ovld __cnfn ceil(half16);
6775#endif //cl_khr_fp16
6776
6777/**
6778 * Returns x with its sign changed to match the sign of y.
6779 */
6780float __ovld __cnfn copysign(float, float);
6781float2 __ovld __cnfn copysign(float2, float2);
6782float3 __ovld __cnfn copysign(float3, float3);
6783float4 __ovld __cnfn copysign(float4, float4);
6784float8 __ovld __cnfn copysign(float8, float8);
6785float16 __ovld __cnfn copysign(float16, float16);
6786#ifdef cl_khr_fp64
6787double __ovld __cnfn copysign(double, double);
6788double2 __ovld __cnfn copysign(double2, double2);
6789double3 __ovld __cnfn copysign(double3, double3);
6790double4 __ovld __cnfn copysign(double4, double4);
6791double8 __ovld __cnfn copysign(double8, double8);
6792double16 __ovld __cnfn copysign(double16, double16);
6793#endif //cl_khr_fp64
6794#ifdef cl_khr_fp16
6795half __ovld __cnfn copysign(half, half);
6796half2 __ovld __cnfn copysign(half2, half2);
6797half3 __ovld __cnfn copysign(half3, half3);
6798half4 __ovld __cnfn copysign(half4, half4);
6799half8 __ovld __cnfn copysign(half8, half8);
6800half16 __ovld __cnfn copysign(half16, half16);
6801#endif //cl_khr_fp16
6802
6803/**
6804 * Compute cosine.
6805 */
6806float __ovld __cnfn cos(float);
6807float2 __ovld __cnfn cos(float2);
6808float3 __ovld __cnfn cos(float3);
6809float4 __ovld __cnfn cos(float4);
6810float8 __ovld __cnfn cos(float8);
6811float16 __ovld __cnfn cos(float16);
6812#ifdef cl_khr_fp64
6813double __ovld __cnfn cos(double);
6814double2 __ovld __cnfn cos(double2);
6815double3 __ovld __cnfn cos(double3);
6816double4 __ovld __cnfn cos(double4);
6817double8 __ovld __cnfn cos(double8);
6818double16 __ovld __cnfn cos(double16);
6819#endif //cl_khr_fp64
6820#ifdef cl_khr_fp16
6821half __ovld __cnfn cos(half);
6822half2 __ovld __cnfn cos(half2);
6823half3 __ovld __cnfn cos(half3);
6824half4 __ovld __cnfn cos(half4);
6825half8 __ovld __cnfn cos(half8);
6826half16 __ovld __cnfn cos(half16);
6827#endif //cl_khr_fp16
6828
6829/**
6830 * Compute hyperbolic cosine.
6831 */
6832float __ovld __cnfn cosh(float);
6833float2 __ovld __cnfn cosh(float2);
6834float3 __ovld __cnfn cosh(float3);
6835float4 __ovld __cnfn cosh(float4);
6836float8 __ovld __cnfn cosh(float8);
6837float16 __ovld __cnfn cosh(float16);
6838#ifdef cl_khr_fp64
6839double __ovld __cnfn cosh(double);
6840double2 __ovld __cnfn cosh(double2);
6841double3 __ovld __cnfn cosh(double3);
6842double4 __ovld __cnfn cosh(double4);
6843double8 __ovld __cnfn cosh(double8);
6844double16 __ovld __cnfn cosh(double16);
6845#endif //cl_khr_fp64
6846#ifdef cl_khr_fp16
6847half __ovld __cnfn cosh(half);
6848half2 __ovld __cnfn cosh(half2);
6849half3 __ovld __cnfn cosh(half3);
6850half4 __ovld __cnfn cosh(half4);
6851half8 __ovld __cnfn cosh(half8);
6852half16 __ovld __cnfn cosh(half16);
6853#endif //cl_khr_fp16
6854
6855/**
6856 * Compute cos (PI * x).
6857 */
6858float __ovld __cnfn cospi(float);
6859float2 __ovld __cnfn cospi(float2);
6860float3 __ovld __cnfn cospi(float3);
6861float4 __ovld __cnfn cospi(float4);
6862float8 __ovld __cnfn cospi(float8);
6863float16 __ovld __cnfn cospi(float16);
6864#ifdef cl_khr_fp64
6865double __ovld __cnfn cospi(double);
6866double2 __ovld __cnfn cospi(double2);
6867double3 __ovld __cnfn cospi(double3);
6868double4 __ovld __cnfn cospi(double4);
6869double8 __ovld __cnfn cospi(double8);
6870double16 __ovld __cnfn cospi(double16);
6871#endif //cl_khr_fp64
6872#ifdef cl_khr_fp16
6873half __ovld __cnfn cospi(half);
6874half2 __ovld __cnfn cospi(half2);
6875half3 __ovld __cnfn cospi(half3);
6876half4 __ovld __cnfn cospi(half4);
6877half8 __ovld __cnfn cospi(half8);
6878half16 __ovld __cnfn cospi(half16);
6879#endif //cl_khr_fp16
6880
6881/**
6882 * Complementary error function.
6883 */
6884float __ovld __cnfn erfc(float);
6885float2 __ovld __cnfn erfc(float2);
6886float3 __ovld __cnfn erfc(float3);
6887float4 __ovld __cnfn erfc(float4);
6888float8 __ovld __cnfn erfc(float8);
6889float16 __ovld __cnfn erfc(float16);
6890#ifdef cl_khr_fp64
6891double __ovld __cnfn erfc(double);
6892double2 __ovld __cnfn erfc(double2);
6893double3 __ovld __cnfn erfc(double3);
6894double4 __ovld __cnfn erfc(double4);
6895double8 __ovld __cnfn erfc(double8);
6896double16 __ovld __cnfn erfc(double16);
6897#endif //cl_khr_fp64
6898#ifdef cl_khr_fp16
6899half __ovld __cnfn erfc(half);
6900half2 __ovld __cnfn erfc(half2);
6901half3 __ovld __cnfn erfc(half3);
6902half4 __ovld __cnfn erfc(half4);
6903half8 __ovld __cnfn erfc(half8);
6904half16 __ovld __cnfn erfc(half16);
6905#endif //cl_khr_fp16
6906
6907/**
6908 * Error function encountered in integrating the
6909 * normal distribution.
6910 */
6911float __ovld __cnfn erf(float);
6912float2 __ovld __cnfn erf(float2);
6913float3 __ovld __cnfn erf(float3);
6914float4 __ovld __cnfn erf(float4);
6915float8 __ovld __cnfn erf(float8);
6916float16 __ovld __cnfn erf(float16);
6917#ifdef cl_khr_fp64
6918double __ovld __cnfn erf(double);
6919double2 __ovld __cnfn erf(double2);
6920double3 __ovld __cnfn erf(double3);
6921double4 __ovld __cnfn erf(double4);
6922double8 __ovld __cnfn erf(double8);
6923double16 __ovld __cnfn erf(double16);
6924#endif //cl_khr_fp64
6925#ifdef cl_khr_fp16
6926half __ovld __cnfn erf(half);
6927half2 __ovld __cnfn erf(half2);
6928half3 __ovld __cnfn erf(half3);
6929half4 __ovld __cnfn erf(half4);
6930half8 __ovld __cnfn erf(half8);
6931half16 __ovld __cnfn erf(half16);
6932#endif //cl_khr_fp16
6933
6934/**
6935 * Compute the base e exponential function of x.
6936 */
6937float __ovld __cnfn exp(float);
6938float2 __ovld __cnfn exp(float2);
6939float3 __ovld __cnfn exp(float3);
6940float4 __ovld __cnfn exp(float4);
6941float8 __ovld __cnfn exp(float8);
6942float16 __ovld __cnfn exp(float16);
6943#ifdef cl_khr_fp64
6944double __ovld __cnfn exp(double);
6945double2 __ovld __cnfn exp(double2);
6946double3 __ovld __cnfn exp(double3);
6947double4 __ovld __cnfn exp(double4);
6948double8 __ovld __cnfn exp(double8);
6949double16 __ovld __cnfn exp(double16);
6950#endif //cl_khr_fp64
6951#ifdef cl_khr_fp16
6952half __ovld __cnfn exp(half);
6953half2 __ovld __cnfn exp(half2);
6954half3 __ovld __cnfn exp(half3);
6955half4 __ovld __cnfn exp(half4);
6956half8 __ovld __cnfn exp(half8);
6957half16 __ovld __cnfn exp(half16);
6958#endif //cl_khr_fp16
6959
6960/**
6961 * Exponential base 2 function.
6962 */
6963float __ovld __cnfn exp2(float);
6964float2 __ovld __cnfn exp2(float2);
6965float3 __ovld __cnfn exp2(float3);
6966float4 __ovld __cnfn exp2(float4);
6967float8 __ovld __cnfn exp2(float8);
6968float16 __ovld __cnfn exp2(float16);
6969#ifdef cl_khr_fp64
6970double __ovld __cnfn exp2(double);
6971double2 __ovld __cnfn exp2(double2);
6972double3 __ovld __cnfn exp2(double3);
6973double4 __ovld __cnfn exp2(double4);
6974double8 __ovld __cnfn exp2(double8);
6975double16 __ovld __cnfn exp2(double16);
6976#endif //cl_khr_fp64
6977#ifdef cl_khr_fp16
6978half __ovld __cnfn exp2(half);
6979half2 __ovld __cnfn exp2(half2);
6980half3 __ovld __cnfn exp2(half3);
6981half4 __ovld __cnfn exp2(half4);
6982half8 __ovld __cnfn exp2(half8);
6983half16 __ovld __cnfn exp2(half16);
6984#endif //cl_khr_fp16
6985
6986/**
6987 * Exponential base 10 function.
6988 */
6989float __ovld __cnfn exp10(float);
6990float2 __ovld __cnfn exp10(float2);
6991float3 __ovld __cnfn exp10(float3);
6992float4 __ovld __cnfn exp10(float4);
6993float8 __ovld __cnfn exp10(float8);
6994float16 __ovld __cnfn exp10(float16);
6995#ifdef cl_khr_fp64
6996double __ovld __cnfn exp10(double);
6997double2 __ovld __cnfn exp10(double2);
6998double3 __ovld __cnfn exp10(double3);
6999double4 __ovld __cnfn exp10(double4);
7000double8 __ovld __cnfn exp10(double8);
7001double16 __ovld __cnfn exp10(double16);
7002#endif //cl_khr_fp64
7003#ifdef cl_khr_fp16
7004half __ovld __cnfn exp10(half);
7005half2 __ovld __cnfn exp10(half2);
7006half3 __ovld __cnfn exp10(half3);
7007half4 __ovld __cnfn exp10(half4);
7008half8 __ovld __cnfn exp10(half8);
7009half16 __ovld __cnfn exp10(half16);
7010#endif //cl_khr_fp16
7011
7012/**
7013 * Compute e^x- 1.0.
7014 */
7015float __ovld __cnfn expm1(float);
7016float2 __ovld __cnfn expm1(float2);
7017float3 __ovld __cnfn expm1(float3);
7018float4 __ovld __cnfn expm1(float4);
7019float8 __ovld __cnfn expm1(float8);
7020float16 __ovld __cnfn expm1(float16);
7021#ifdef cl_khr_fp64
7022double __ovld __cnfn expm1(double);
7023double2 __ovld __cnfn expm1(double2);
7024double3 __ovld __cnfn expm1(double3);
7025double4 __ovld __cnfn expm1(double4);
7026double8 __ovld __cnfn expm1(double8);
7027double16 __ovld __cnfn expm1(double16);
7028#endif //cl_khr_fp64
7029#ifdef cl_khr_fp16
7030half __ovld __cnfn expm1(half);
7031half2 __ovld __cnfn expm1(half2);
7032half3 __ovld __cnfn expm1(half3);
7033half4 __ovld __cnfn expm1(half4);
7034half8 __ovld __cnfn expm1(half8);
7035half16 __ovld __cnfn expm1(half16);
7036#endif //cl_khr_fp16
7037
7038/**
7039 * Compute absolute value of a floating-point number.
7040 */
7041float __ovld __cnfn fabs(float);
7042float2 __ovld __cnfn fabs(float2);
7043float3 __ovld __cnfn fabs(float3);
7044float4 __ovld __cnfn fabs(float4);
7045float8 __ovld __cnfn fabs(float8);
7046float16 __ovld __cnfn fabs(float16);
7047#ifdef cl_khr_fp64
7048double __ovld __cnfn fabs(double);
7049double2 __ovld __cnfn fabs(double2);
7050double3 __ovld __cnfn fabs(double3);
7051double4 __ovld __cnfn fabs(double4);
7052double8 __ovld __cnfn fabs(double8);
7053double16 __ovld __cnfn fabs(double16);
7054#endif //cl_khr_fp64
7055#ifdef cl_khr_fp16
7056half __ovld __cnfn fabs(half);
7057half2 __ovld __cnfn fabs(half2);
7058half3 __ovld __cnfn fabs(half3);
7059half4 __ovld __cnfn fabs(half4);
7060half8 __ovld __cnfn fabs(half8);
7061half16 __ovld __cnfn fabs(half16);
7062#endif //cl_khr_fp16
7063
7064/**
7065 * x - y if x > y, +0 if x is less than or equal to y.
7066 */
7067float __ovld __cnfn fdim(float, float);
7068float2 __ovld __cnfn fdim(float2, float2);
7069float3 __ovld __cnfn fdim(float3, float3);
7070float4 __ovld __cnfn fdim(float4, float4);
7071float8 __ovld __cnfn fdim(float8, float8);
7072float16 __ovld __cnfn fdim(float16, float16);
7073#ifdef cl_khr_fp64
7074double __ovld __cnfn fdim(double, double);
7075double2 __ovld __cnfn fdim(double2, double2);
7076double3 __ovld __cnfn fdim(double3, double3);
7077double4 __ovld __cnfn fdim(double4, double4);
7078double8 __ovld __cnfn fdim(double8, double8);
7079double16 __ovld __cnfn fdim(double16, double16);
7080#endif //cl_khr_fp64
7081#ifdef cl_khr_fp16
7082half __ovld __cnfn fdim(half, half);
7083half2 __ovld __cnfn fdim(half2, half2);
7084half3 __ovld __cnfn fdim(half3, half3);
7085half4 __ovld __cnfn fdim(half4, half4);
7086half8 __ovld __cnfn fdim(half8, half8);
7087half16 __ovld __cnfn fdim(half16, half16);
7088#endif //cl_khr_fp16
7089
7090/**
7091 * Round to integral value using the round to -ve
7092 * infinity rounding mode.
7093 */
7094float __ovld __cnfn floor(float);
7095float2 __ovld __cnfn floor(float2);
7096float3 __ovld __cnfn floor(float3);
7097float4 __ovld __cnfn floor(float4);
7098float8 __ovld __cnfn floor(float8);
7099float16 __ovld __cnfn floor(float16);
7100#ifdef cl_khr_fp64
7101double __ovld __cnfn floor(double);
7102double2 __ovld __cnfn floor(double2);
7103double3 __ovld __cnfn floor(double3);
7104double4 __ovld __cnfn floor(double4);
7105double8 __ovld __cnfn floor(double8);
7106double16 __ovld __cnfn floor(double16);
7107#endif //cl_khr_fp64
7108#ifdef cl_khr_fp16
7109half __ovld __cnfn floor(half);
7110half2 __ovld __cnfn floor(half2);
7111half3 __ovld __cnfn floor(half3);
7112half4 __ovld __cnfn floor(half4);
7113half8 __ovld __cnfn floor(half8);
7114half16 __ovld __cnfn floor(half16);
7115#endif //cl_khr_fp16
7116
7117/**
7118 * Returns the correctly rounded floating-point
7119 * representation of the sum of c with the infinitely
7120 * precise product of a and b. Rounding of
7121 * intermediate products shall not occur. Edge case
7122 * behavior is per the IEEE 754-2008 standard.
7123 */
7124float __ovld __cnfn fma(float, float, float);
7125float2 __ovld __cnfn fma(float2, float2, float2);
7126float3 __ovld __cnfn fma(float3, float3, float3);
7127float4 __ovld __cnfn fma(float4, float4, float4);
7128float8 __ovld __cnfn fma(float8, float8, float8);
7129float16 __ovld __cnfn fma(float16, float16, float16);
7130#ifdef cl_khr_fp64
7131double __ovld __cnfn fma(double, double, double);
7132double2 __ovld __cnfn fma(double2, double2, double2);
7133double3 __ovld __cnfn fma(double3, double3, double3);
7134double4 __ovld __cnfn fma(double4, double4, double4);
7135double8 __ovld __cnfn fma(double8, double8, double8);
7136double16 __ovld __cnfn fma(double16, double16, double16);
7137#endif //cl_khr_fp64
7138#ifdef cl_khr_fp16
7139half __ovld __cnfn fma(half, half, half);
7140half2 __ovld __cnfn fma(half2, half2, half2);
7141half3 __ovld __cnfn fma(half3, half3, half3);
7142half4 __ovld __cnfn fma(half4, half4, half4);
7143half8 __ovld __cnfn fma(half8, half8, half8);
7144half16 __ovld __cnfn fma(half16, half16, half16);
7145#endif //cl_khr_fp16
7146
7147/**
7148 * Returns y if x < y, otherwise it returns x. If one
7149 * argument is a NaN, fmax() returns the other
7150 * argument. If both arguments are NaNs, fmax()
7151 * returns a NaN.
7152 */
7153float __ovld __cnfn fmax(float, float);
7154float2 __ovld __cnfn fmax(float2, float2);
7155float3 __ovld __cnfn fmax(float3, float3);
7156float4 __ovld __cnfn fmax(float4, float4);
7157float8 __ovld __cnfn fmax(float8, float8);
7158float16 __ovld __cnfn fmax(float16, float16);
7159float2 __ovld __cnfn fmax(float2, float);
7160float3 __ovld __cnfn fmax(float3, float);
7161float4 __ovld __cnfn fmax(float4, float);
7162float8 __ovld __cnfn fmax(float8, float);
7163float16 __ovld __cnfn fmax(float16, float);
7164#ifdef cl_khr_fp64
7165double __ovld __cnfn fmax(double, double);
7166double2 __ovld __cnfn fmax(double2, double2);
7167double3 __ovld __cnfn fmax(double3, double3);
7168double4 __ovld __cnfn fmax(double4, double4);
7169double8 __ovld __cnfn fmax(double8, double8);
7170double16 __ovld __cnfn fmax(double16, double16);
7171double2 __ovld __cnfn fmax(double2, double);
7172double3 __ovld __cnfn fmax(double3, double);
7173double4 __ovld __cnfn fmax(double4, double);
7174double8 __ovld __cnfn fmax(double8, double);
7175double16 __ovld __cnfn fmax(double16, double);
7176#endif //cl_khr_fp64
7177#ifdef cl_khr_fp16
7178half __ovld __cnfn fmax(half, half);
7179half2 __ovld __cnfn fmax(half2, half2);
7180half3 __ovld __cnfn fmax(half3, half3);
7181half4 __ovld __cnfn fmax(half4, half4);
7182half8 __ovld __cnfn fmax(half8, half8);
7183half16 __ovld __cnfn fmax(half16, half16);
7184half2 __ovld __cnfn fmax(half2, half);
7185half3 __ovld __cnfn fmax(half3, half);
7186half4 __ovld __cnfn fmax(half4, half);
7187half8 __ovld __cnfn fmax(half8, half);
7188half16 __ovld __cnfn fmax(half16, half);
7189#endif //cl_khr_fp16
7190
7191/**
7192 * Returns y if y < x, otherwise it returns x. If one
7193 * argument is a NaN, fmin() returns the other
7194 * argument. If both arguments are NaNs, fmin()
7195 * returns a NaN.
7196 */
7197float __ovld __cnfn fmin(float, float);
7198float2 __ovld __cnfn fmin(float2, float2);
7199float3 __ovld __cnfn fmin(float3, float3);
7200float4 __ovld __cnfn fmin(float4, float4);
7201float8 __ovld __cnfn fmin(float8, float8);
7202float16 __ovld __cnfn fmin(float16, float16);
7203float2 __ovld __cnfn fmin(float2, float);
7204float3 __ovld __cnfn fmin(float3, float);
7205float4 __ovld __cnfn fmin(float4, float);
7206float8 __ovld __cnfn fmin(float8, float);
7207float16 __ovld __cnfn fmin(float16, float);
7208#ifdef cl_khr_fp64
7209double __ovld __cnfn fmin(double, double);
7210double2 __ovld __cnfn fmin(double2, double2);
7211double3 __ovld __cnfn fmin(double3, double3);
7212double4 __ovld __cnfn fmin(double4, double4);
7213double8 __ovld __cnfn fmin(double8, double8);
7214double16 __ovld __cnfn fmin(double16, double16);
7215double2 __ovld __cnfn fmin(double2, double);
7216double3 __ovld __cnfn fmin(double3, double);
7217double4 __ovld __cnfn fmin(double4, double);
7218double8 __ovld __cnfn fmin(double8, double);
7219double16 __ovld __cnfn fmin(double16, double);
7220#endif //cl_khr_fp64
7221#ifdef cl_khr_fp16
7222half __ovld __cnfn fmin(half, half);
7223half2 __ovld __cnfn fmin(half2, half2);
7224half3 __ovld __cnfn fmin(half3, half3);
7225half4 __ovld __cnfn fmin(half4, half4);
7226half8 __ovld __cnfn fmin(half8, half8);
7227half16 __ovld __cnfn fmin(half16, half16);
7228half2 __ovld __cnfn fmin(half2, half);
7229half3 __ovld __cnfn fmin(half3, half);
7230half4 __ovld __cnfn fmin(half4, half);
7231half8 __ovld __cnfn fmin(half8, half);
7232half16 __ovld __cnfn fmin(half16, half);
7233#endif //cl_khr_fp16
7234
7235/**
7236 * Modulus. Returns x - y * trunc (x/y).
7237 */
7238float __ovld __cnfn fmod(float, float);
7239float2 __ovld __cnfn fmod(float2, float2);
7240float3 __ovld __cnfn fmod(float3, float3);
7241float4 __ovld __cnfn fmod(float4, float4);
7242float8 __ovld __cnfn fmod(float8, float8);
7243float16 __ovld __cnfn fmod(float16, float16);
7244#ifdef cl_khr_fp64
7245double __ovld __cnfn fmod(double, double);
7246double2 __ovld __cnfn fmod(double2, double2);
7247double3 __ovld __cnfn fmod(double3, double3);
7248double4 __ovld __cnfn fmod(double4, double4);
7249double8 __ovld __cnfn fmod(double8, double8);
7250double16 __ovld __cnfn fmod(double16, double16);
7251#endif //cl_khr_fp64
7252#ifdef cl_khr_fp16
7253half __ovld __cnfn fmod(half, half);
7254half2 __ovld __cnfn fmod(half2, half2);
7255half3 __ovld __cnfn fmod(half3, half3);
7256half4 __ovld __cnfn fmod(half4, half4);
7257half8 __ovld __cnfn fmod(half8, half8);
7258half16 __ovld __cnfn fmod(half16, half16);
7259#endif //cl_khr_fp16
7260
7261/**
7262 * Returns fmin(x - floor (x), 0x1.fffffep-1f ).
7263 * floor(x) is returned in iptr.
7264 */
7265#if defined(__opencl_c_generic_address_space)
7266float __ovld fract(float, float *);
7267float2 __ovld fract(float2, float2 *);
7268float3 __ovld fract(float3, float3 *);
7269float4 __ovld fract(float4, float4 *);
7270float8 __ovld fract(float8, float8 *);
7271float16 __ovld fract(float16, float16 *);
7272#ifdef cl_khr_fp64
7273double __ovld fract(double, double *);
7274double2 __ovld fract(double2, double2 *);
7275double3 __ovld fract(double3, double3 *);
7276double4 __ovld fract(double4, double4 *);
7277double8 __ovld fract(double8, double8 *);
7278double16 __ovld fract(double16, double16 *);
7279#endif //cl_khr_fp64
7280#ifdef cl_khr_fp16
7281half __ovld fract(half, half *);
7282half2 __ovld fract(half2, half2 *);
7283half3 __ovld fract(half3, half3 *);
7284half4 __ovld fract(half4, half4 *);
7285half8 __ovld fract(half8, half8 *);
7286half16 __ovld fract(half16, half16 *);
7287#endif //cl_khr_fp16
7288#endif //defined(__opencl_c_generic_address_space)
7289
7290#if defined(__opencl_c_named_address_space_builtins)
7291float __ovld fract(float, __global float *);
7292float2 __ovld fract(float2, __global float2 *);
7293float3 __ovld fract(float3, __global float3 *);
7294float4 __ovld fract(float4, __global float4 *);
7295float8 __ovld fract(float8, __global float8 *);
7296float16 __ovld fract(float16, __global float16 *);
7297float __ovld fract(float, __local float *);
7298float2 __ovld fract(float2, __local float2 *);
7299float3 __ovld fract(float3, __local float3 *);
7300float4 __ovld fract(float4, __local float4 *);
7301float8 __ovld fract(float8, __local float8 *);
7302float16 __ovld fract(float16, __local float16 *);
7303float __ovld fract(float, __private float *);
7304float2 __ovld fract(float2, __private float2 *);
7305float3 __ovld fract(float3, __private float3 *);
7306float4 __ovld fract(float4, __private float4 *);
7307float8 __ovld fract(float8, __private float8 *);
7308float16 __ovld fract(float16, __private float16 *);
7309#ifdef cl_khr_fp64
7310double __ovld fract(double, __global double *);
7311double2 __ovld fract(double2, __global double2 *);
7312double3 __ovld fract(double3, __global double3 *);
7313double4 __ovld fract(double4, __global double4 *);
7314double8 __ovld fract(double8, __global double8 *);
7315double16 __ovld fract(double16, __global double16 *);
7316double __ovld fract(double, __local double *);
7317double2 __ovld fract(double2, __local double2 *);
7318double3 __ovld fract(double3, __local double3 *);
7319double4 __ovld fract(double4, __local double4 *);
7320double8 __ovld fract(double8, __local double8 *);
7321double16 __ovld fract(double16, __local double16 *);
7322double __ovld fract(double, __private double *);
7323double2 __ovld fract(double2, __private double2 *);
7324double3 __ovld fract(double3, __private double3 *);
7325double4 __ovld fract(double4, __private double4 *);
7326double8 __ovld fract(double8, __private double8 *);
7327double16 __ovld fract(double16, __private double16 *);
7328#endif //cl_khr_fp64
7329#ifdef cl_khr_fp16
7330half __ovld fract(half, __global half *);
7331half2 __ovld fract(half2, __global half2 *);
7332half3 __ovld fract(half3, __global half3 *);
7333half4 __ovld fract(half4, __global half4 *);
7334half8 __ovld fract(half8, __global half8 *);
7335half16 __ovld fract(half16, __global half16 *);
7336half __ovld fract(half, __local half *);
7337half2 __ovld fract(half2, __local half2 *);
7338half3 __ovld fract(half3, __local half3 *);
7339half4 __ovld fract(half4, __local half4 *);
7340half8 __ovld fract(half8, __local half8 *);
7341half16 __ovld fract(half16, __local half16 *);
7342half __ovld fract(half, __private half *);
7343half2 __ovld fract(half2, __private half2 *);
7344half3 __ovld fract(half3, __private half3 *);
7345half4 __ovld fract(half4, __private half4 *);
7346half8 __ovld fract(half8, __private half8 *);
7347half16 __ovld fract(half16, __private half16 *);
7348#endif //cl_khr_fp16
7349#endif //defined(__opencl_c_named_address_space_builtins)
7350
7351/**
7352 * Extract mantissa and exponent from x. For each
7353 * component the mantissa returned is a float with
7354 * magnitude in the interval [1/2, 1) or 0. Each
7355 * component of x equals mantissa returned * 2^exp.
7356 */
7357#if defined(__opencl_c_generic_address_space)
7358float __ovld frexp(float, int *);
7359float2 __ovld frexp(float2, int2 *);
7360float3 __ovld frexp(float3, int3 *);
7361float4 __ovld frexp(float4, int4 *);
7362float8 __ovld frexp(float8, int8 *);
7363float16 __ovld frexp(float16, int16 *);
7364#ifdef cl_khr_fp64
7365double __ovld frexp(double, int *);
7366double2 __ovld frexp(double2, int2 *);
7367double3 __ovld frexp(double3, int3 *);
7368double4 __ovld frexp(double4, int4 *);
7369double8 __ovld frexp(double8, int8 *);
7370double16 __ovld frexp(double16, int16 *);
7371#endif //cl_khr_fp64
7372#ifdef cl_khr_fp16
7373half __ovld frexp(half, int *);
7374half2 __ovld frexp(half2, int2 *);
7375half3 __ovld frexp(half3, int3 *);
7376half4 __ovld frexp(half4, int4 *);
7377half8 __ovld frexp(half8, int8 *);
7378half16 __ovld frexp(half16, int16 *);
7379#endif //cl_khr_fp16
7380#endif //defined(__opencl_c_generic_address_space)
7381
7382#if defined(__opencl_c_named_address_space_builtins)
7383float __ovld frexp(float, __global int *);
7384float2 __ovld frexp(float2, __global int2 *);
7385float3 __ovld frexp(float3, __global int3 *);
7386float4 __ovld frexp(float4, __global int4 *);
7387float8 __ovld frexp(float8, __global int8 *);
7388float16 __ovld frexp(float16, __global int16 *);
7389float __ovld frexp(float, __local int *);
7390float2 __ovld frexp(float2, __local int2 *);
7391float3 __ovld frexp(float3, __local int3 *);
7392float4 __ovld frexp(float4, __local int4 *);
7393float8 __ovld frexp(float8, __local int8 *);
7394float16 __ovld frexp(float16, __local int16 *);
7395float __ovld frexp(float, __private int *);
7396float2 __ovld frexp(float2, __private int2 *);
7397float3 __ovld frexp(float3, __private int3 *);
7398float4 __ovld frexp(float4, __private int4 *);
7399float8 __ovld frexp(float8, __private int8 *);
7400float16 __ovld frexp(float16, __private int16 *);
7401#ifdef cl_khr_fp64
7402double __ovld frexp(double, __global int *);
7403double2 __ovld frexp(double2, __global int2 *);
7404double3 __ovld frexp(double3, __global int3 *);
7405double4 __ovld frexp(double4, __global int4 *);
7406double8 __ovld frexp(double8, __global int8 *);
7407double16 __ovld frexp(double16, __global int16 *);
7408double __ovld frexp(double, __local int *);
7409double2 __ovld frexp(double2, __local int2 *);
7410double3 __ovld frexp(double3, __local int3 *);
7411double4 __ovld frexp(double4, __local int4 *);
7412double8 __ovld frexp(double8, __local int8 *);
7413double16 __ovld frexp(double16, __local int16 *);
7414double __ovld frexp(double, __private int *);
7415double2 __ovld frexp(double2, __private int2 *);
7416double3 __ovld frexp(double3, __private int3 *);
7417double4 __ovld frexp(double4, __private int4 *);
7418double8 __ovld frexp(double8, __private int8 *);
7419double16 __ovld frexp(double16, __private int16 *);
7420#endif //cl_khr_fp64
7421#ifdef cl_khr_fp16
7422half __ovld frexp(half, __global int *);
7423half2 __ovld frexp(half2, __global int2 *);
7424half3 __ovld frexp(half3, __global int3 *);
7425half4 __ovld frexp(half4, __global int4 *);
7426half8 __ovld frexp(half8, __global int8 *);
7427half16 __ovld frexp(half16, __global int16 *);
7428half __ovld frexp(half, __local int *);
7429half2 __ovld frexp(half2, __local int2 *);
7430half3 __ovld frexp(half3, __local int3 *);
7431half4 __ovld frexp(half4, __local int4 *);
7432half8 __ovld frexp(half8, __local int8 *);
7433half16 __ovld frexp(half16, __local int16 *);
7434half __ovld frexp(half, __private int *);
7435half2 __ovld frexp(half2, __private int2 *);
7436half3 __ovld frexp(half3, __private int3 *);
7437half4 __ovld frexp(half4, __private int4 *);
7438half8 __ovld frexp(half8, __private int8 *);
7439half16 __ovld frexp(half16, __private int16 *);
7440#endif //cl_khr_fp16
7441#endif //defined(__opencl_c_named_address_space_builtins)
7442
7443/**
7444 * Compute the value of the square root of x^2 + y^2
7445 * without undue overflow or underflow.
7446 */
7447float __ovld __cnfn hypot(float, float);
7448float2 __ovld __cnfn hypot(float2, float2);
7449float3 __ovld __cnfn hypot(float3, float3);
7450float4 __ovld __cnfn hypot(float4, float4);
7451float8 __ovld __cnfn hypot(float8, float8);
7452float16 __ovld __cnfn hypot(float16, float16);
7453#ifdef cl_khr_fp64
7454double __ovld __cnfn hypot(double, double);
7455double2 __ovld __cnfn hypot(double2, double2);
7456double3 __ovld __cnfn hypot(double3, double3);
7457double4 __ovld __cnfn hypot(double4, double4);
7458double8 __ovld __cnfn hypot(double8, double8);
7459double16 __ovld __cnfn hypot(double16, double16);
7460#endif //cl_khr_fp64
7461#ifdef cl_khr_fp16
7462half __ovld __cnfn hypot(half, half);
7463half2 __ovld __cnfn hypot(half2, half2);
7464half3 __ovld __cnfn hypot(half3, half3);
7465half4 __ovld __cnfn hypot(half4, half4);
7466half8 __ovld __cnfn hypot(half8, half8);
7467half16 __ovld __cnfn hypot(half16, half16);
7468#endif //cl_khr_fp16
7469
7470/**
7471 * Return the exponent as an integer value.
7472 */
7473int __ovld __cnfn ilogb(float);
7474int2 __ovld __cnfn ilogb(float2);
7475int3 __ovld __cnfn ilogb(float3);
7476int4 __ovld __cnfn ilogb(float4);
7477int8 __ovld __cnfn ilogb(float8);
7478int16 __ovld __cnfn ilogb(float16);
7479#ifdef cl_khr_fp64
7480int __ovld __cnfn ilogb(double);
7481int2 __ovld __cnfn ilogb(double2);
7482int3 __ovld __cnfn ilogb(double3);
7483int4 __ovld __cnfn ilogb(double4);
7484int8 __ovld __cnfn ilogb(double8);
7485int16 __ovld __cnfn ilogb(double16);
7486#endif //cl_khr_fp64
7487#ifdef cl_khr_fp16
7488int __ovld __cnfn ilogb(half);
7489int2 __ovld __cnfn ilogb(half2);
7490int3 __ovld __cnfn ilogb(half3);
7491int4 __ovld __cnfn ilogb(half4);
7492int8 __ovld __cnfn ilogb(half8);
7493int16 __ovld __cnfn ilogb(half16);
7494#endif //cl_khr_fp16
7495
7496/**
7497 * Multiply x by 2 to the power n.
7498 */
7499float __ovld __cnfn ldexp(float, int);
7500float2 __ovld __cnfn ldexp(float2, int2);
7501float3 __ovld __cnfn ldexp(float3, int3);
7502float4 __ovld __cnfn ldexp(float4, int4);
7503float8 __ovld __cnfn ldexp(float8, int8);
7504float16 __ovld __cnfn ldexp(float16, int16);
7505float2 __ovld __cnfn ldexp(float2, int);
7506float3 __ovld __cnfn ldexp(float3, int);
7507float4 __ovld __cnfn ldexp(float4, int);
7508float8 __ovld __cnfn ldexp(float8, int);
7509float16 __ovld __cnfn ldexp(float16, int);
7510#ifdef cl_khr_fp64
7511double __ovld __cnfn ldexp(double, int);
7512double2 __ovld __cnfn ldexp(double2, int2);
7513double3 __ovld __cnfn ldexp(double3, int3);
7514double4 __ovld __cnfn ldexp(double4, int4);
7515double8 __ovld __cnfn ldexp(double8, int8);
7516double16 __ovld __cnfn ldexp(double16, int16);
7517double2 __ovld __cnfn ldexp(double2, int);
7518double3 __ovld __cnfn ldexp(double3, int);
7519double4 __ovld __cnfn ldexp(double4, int);
7520double8 __ovld __cnfn ldexp(double8, int);
7521double16 __ovld __cnfn ldexp(double16, int);
7522#endif //cl_khr_fp64
7523#ifdef cl_khr_fp16
7524half __ovld __cnfn ldexp(half, int);
7525half2 __ovld __cnfn ldexp(half2, int2);
7526half3 __ovld __cnfn ldexp(half3, int3);
7527half4 __ovld __cnfn ldexp(half4, int4);
7528half8 __ovld __cnfn ldexp(half8, int8);
7529half16 __ovld __cnfn ldexp(half16, int16);
7530half2 __ovld __cnfn ldexp(half2, int);
7531half3 __ovld __cnfn ldexp(half3, int);
7532half4 __ovld __cnfn ldexp(half4, int);
7533half8 __ovld __cnfn ldexp(half8, int);
7534half16 __ovld __cnfn ldexp(half16, int);
7535#endif //cl_khr_fp16
7536
7537/**
7538 * Log gamma function. Returns the natural
7539 * logarithm of the absolute value of the gamma
7540 * function. The sign of the gamma function is
7541 * returned in the signp argument of lgamma_r.
7542 */
7543float __ovld __cnfn lgamma(float);
7544float2 __ovld __cnfn lgamma(float2);
7545float3 __ovld __cnfn lgamma(float3);
7546float4 __ovld __cnfn lgamma(float4);
7547float8 __ovld __cnfn lgamma(float8);
7548float16 __ovld __cnfn lgamma(float16);
7549#ifdef cl_khr_fp64
7550double __ovld __cnfn lgamma(double);
7551double2 __ovld __cnfn lgamma(double2);
7552double3 __ovld __cnfn lgamma(double3);
7553double4 __ovld __cnfn lgamma(double4);
7554double8 __ovld __cnfn lgamma(double8);
7555double16 __ovld __cnfn lgamma(double16);
7556#endif //cl_khr_fp64
7557#ifdef cl_khr_fp16
7558half __ovld __cnfn lgamma(half);
7559half2 __ovld __cnfn lgamma(half2);
7560half3 __ovld __cnfn lgamma(half3);
7561half4 __ovld __cnfn lgamma(half4);
7562half8 __ovld __cnfn lgamma(half8);
7563half16 __ovld __cnfn lgamma(half16);
7564#endif //cl_khr_fp16
7565
7566#if defined(__opencl_c_generic_address_space)
7567float __ovld lgamma_r(float, int *);
7568float2 __ovld lgamma_r(float2, int2 *);
7569float3 __ovld lgamma_r(float3, int3 *);
7570float4 __ovld lgamma_r(float4, int4 *);
7571float8 __ovld lgamma_r(float8, int8 *);
7572float16 __ovld lgamma_r(float16, int16 *);
7573#ifdef cl_khr_fp64
7574double __ovld lgamma_r(double, int *);
7575double2 __ovld lgamma_r(double2, int2 *);
7576double3 __ovld lgamma_r(double3, int3 *);
7577double4 __ovld lgamma_r(double4, int4 *);
7578double8 __ovld lgamma_r(double8, int8 *);
7579double16 __ovld lgamma_r(double16, int16 *);
7580#endif //cl_khr_fp64
7581#ifdef cl_khr_fp16
7582half __ovld lgamma_r(half, int *);
7583half2 __ovld lgamma_r(half2, int2 *);
7584half3 __ovld lgamma_r(half3, int3 *);
7585half4 __ovld lgamma_r(half4, int4 *);
7586half8 __ovld lgamma_r(half8, int8 *);
7587half16 __ovld lgamma_r(half16, int16 *);
7588#endif //cl_khr_fp16
7589#endif //defined(__opencl_c_generic_address_space)
7590
7591#if defined(__opencl_c_named_address_space_builtins)
7592float __ovld lgamma_r(float, __global int *);
7593float2 __ovld lgamma_r(float2, __global int2 *);
7594float3 __ovld lgamma_r(float3, __global int3 *);
7595float4 __ovld lgamma_r(float4, __global int4 *);
7596float8 __ovld lgamma_r(float8, __global int8 *);
7597float16 __ovld lgamma_r(float16, __global int16 *);
7598float __ovld lgamma_r(float, __local int *);
7599float2 __ovld lgamma_r(float2, __local int2 *);
7600float3 __ovld lgamma_r(float3, __local int3 *);
7601float4 __ovld lgamma_r(float4, __local int4 *);
7602float8 __ovld lgamma_r(float8, __local int8 *);
7603float16 __ovld lgamma_r(float16, __local int16 *);
7604float __ovld lgamma_r(float, __private int *);
7605float2 __ovld lgamma_r(float2, __private int2 *);
7606float3 __ovld lgamma_r(float3, __private int3 *);
7607float4 __ovld lgamma_r(float4, __private int4 *);
7608float8 __ovld lgamma_r(float8, __private int8 *);
7609float16 __ovld lgamma_r(float16, __private int16 *);
7610#ifdef cl_khr_fp64
7611double __ovld lgamma_r(double, __global int *);
7612double2 __ovld lgamma_r(double2, __global int2 *);
7613double3 __ovld lgamma_r(double3, __global int3 *);
7614double4 __ovld lgamma_r(double4, __global int4 *);
7615double8 __ovld lgamma_r(double8, __global int8 *);
7616double16 __ovld lgamma_r(double16, __global int16 *);
7617double __ovld lgamma_r(double, __local int *);
7618double2 __ovld lgamma_r(double2, __local int2 *);
7619double3 __ovld lgamma_r(double3, __local int3 *);
7620double4 __ovld lgamma_r(double4, __local int4 *);
7621double8 __ovld lgamma_r(double8, __local int8 *);
7622double16 __ovld lgamma_r(double16, __local int16 *);
7623double __ovld lgamma_r(double, __private int *);
7624double2 __ovld lgamma_r(double2, __private int2 *);
7625double3 __ovld lgamma_r(double3, __private int3 *);
7626double4 __ovld lgamma_r(double4, __private int4 *);
7627double8 __ovld lgamma_r(double8, __private int8 *);
7628double16 __ovld lgamma_r(double16, __private int16 *);
7629#endif //cl_khr_fp64
7630#ifdef cl_khr_fp16
7631half __ovld lgamma_r(half, __global int *);
7632half2 __ovld lgamma_r(half2, __global int2 *);
7633half3 __ovld lgamma_r(half3, __global int3 *);
7634half4 __ovld lgamma_r(half4, __global int4 *);
7635half8 __ovld lgamma_r(half8, __global int8 *);
7636half16 __ovld lgamma_r(half16, __global int16 *);
7637half __ovld lgamma_r(half, __local int *);
7638half2 __ovld lgamma_r(half2, __local int2 *);
7639half3 __ovld lgamma_r(half3, __local int3 *);
7640half4 __ovld lgamma_r(half4, __local int4 *);
7641half8 __ovld lgamma_r(half8, __local int8 *);
7642half16 __ovld lgamma_r(half16, __local int16 *);
7643half __ovld lgamma_r(half, __private int *);
7644half2 __ovld lgamma_r(half2, __private int2 *);
7645half3 __ovld lgamma_r(half3, __private int3 *);
7646half4 __ovld lgamma_r(half4, __private int4 *);
7647half8 __ovld lgamma_r(half8, __private int8 *);
7648half16 __ovld lgamma_r(half16, __private int16 *);
7649#endif //cl_khr_fp16
7650#endif //defined(__opencl_c_named_address_space_builtins)
7651
7652/**
7653 * Compute natural logarithm.
7654 */
7655float __ovld __cnfn log(float);
7656float2 __ovld __cnfn log(float2);
7657float3 __ovld __cnfn log(float3);
7658float4 __ovld __cnfn log(float4);
7659float8 __ovld __cnfn log(float8);
7660float16 __ovld __cnfn log(float16);
7661#ifdef cl_khr_fp64
7662double __ovld __cnfn log(double);
7663double2 __ovld __cnfn log(double2);
7664double3 __ovld __cnfn log(double3);
7665double4 __ovld __cnfn log(double4);
7666double8 __ovld __cnfn log(double8);
7667double16 __ovld __cnfn log(double16);
7668#endif //cl_khr_fp64
7669#ifdef cl_khr_fp16
7670half __ovld __cnfn log(half);
7671half2 __ovld __cnfn log(half2);
7672half3 __ovld __cnfn log(half3);
7673half4 __ovld __cnfn log(half4);
7674half8 __ovld __cnfn log(half8);
7675half16 __ovld __cnfn log(half16);
7676#endif //cl_khr_fp16
7677
7678/**
7679 * Compute a base 2 logarithm.
7680 */
7681float __ovld __cnfn log2(float);
7682float2 __ovld __cnfn log2(float2);
7683float3 __ovld __cnfn log2(float3);
7684float4 __ovld __cnfn log2(float4);
7685float8 __ovld __cnfn log2(float8);
7686float16 __ovld __cnfn log2(float16);
7687#ifdef cl_khr_fp64
7688double __ovld __cnfn log2(double);
7689double2 __ovld __cnfn log2(double2);
7690double3 __ovld __cnfn log2(double3);
7691double4 __ovld __cnfn log2(double4);
7692double8 __ovld __cnfn log2(double8);
7693double16 __ovld __cnfn log2(double16);
7694#endif //cl_khr_fp64
7695#ifdef cl_khr_fp16
7696half __ovld __cnfn log2(half);
7697half2 __ovld __cnfn log2(half2);
7698half3 __ovld __cnfn log2(half3);
7699half4 __ovld __cnfn log2(half4);
7700half8 __ovld __cnfn log2(half8);
7701half16 __ovld __cnfn log2(half16);
7702#endif //cl_khr_fp16
7703
7704/**
7705 * Compute a base 10 logarithm.
7706 */
7707float __ovld __cnfn log10(float);
7708float2 __ovld __cnfn log10(float2);
7709float3 __ovld __cnfn log10(float3);
7710float4 __ovld __cnfn log10(float4);
7711float8 __ovld __cnfn log10(float8);
7712float16 __ovld __cnfn log10(float16);
7713#ifdef cl_khr_fp64
7714double __ovld __cnfn log10(double);
7715double2 __ovld __cnfn log10(double2);
7716double3 __ovld __cnfn log10(double3);
7717double4 __ovld __cnfn log10(double4);
7718double8 __ovld __cnfn log10(double8);
7719double16 __ovld __cnfn log10(double16);
7720#endif //cl_khr_fp64
7721#ifdef cl_khr_fp16
7722half __ovld __cnfn log10(half);
7723half2 __ovld __cnfn log10(half2);
7724half3 __ovld __cnfn log10(half3);
7725half4 __ovld __cnfn log10(half4);
7726half8 __ovld __cnfn log10(half8);
7727half16 __ovld __cnfn log10(half16);
7728#endif //cl_khr_fp16
7729
7730/**
7731 * Compute a base e logarithm of (1.0 + x).
7732 */
7733float __ovld __cnfn log1p(float);
7734float2 __ovld __cnfn log1p(float2);
7735float3 __ovld __cnfn log1p(float3);
7736float4 __ovld __cnfn log1p(float4);
7737float8 __ovld __cnfn log1p(float8);
7738float16 __ovld __cnfn log1p(float16);
7739#ifdef cl_khr_fp64
7740double __ovld __cnfn log1p(double);
7741double2 __ovld __cnfn log1p(double2);
7742double3 __ovld __cnfn log1p(double3);
7743double4 __ovld __cnfn log1p(double4);
7744double8 __ovld __cnfn log1p(double8);
7745double16 __ovld __cnfn log1p(double16);
7746#endif //cl_khr_fp64
7747#ifdef cl_khr_fp16
7748half __ovld __cnfn log1p(half);
7749half2 __ovld __cnfn log1p(half2);
7750half3 __ovld __cnfn log1p(half3);
7751half4 __ovld __cnfn log1p(half4);
7752half8 __ovld __cnfn log1p(half8);
7753half16 __ovld __cnfn log1p(half16);
7754#endif //cl_khr_fp16
7755
7756/**
7757 * Compute the exponent of x, which is the integral
7758 * part of logr | x |.
7759 */
7760float __ovld __cnfn logb(float);
7761float2 __ovld __cnfn logb(float2);
7762float3 __ovld __cnfn logb(float3);
7763float4 __ovld __cnfn logb(float4);
7764float8 __ovld __cnfn logb(float8);
7765float16 __ovld __cnfn logb(float16);
7766#ifdef cl_khr_fp64
7767double __ovld __cnfn logb(double);
7768double2 __ovld __cnfn logb(double2);
7769double3 __ovld __cnfn logb(double3);
7770double4 __ovld __cnfn logb(double4);
7771double8 __ovld __cnfn logb(double8);
7772double16 __ovld __cnfn logb(double16);
7773#endif //cl_khr_fp64
7774#ifdef cl_khr_fp16
7775half __ovld __cnfn logb(half);
7776half2 __ovld __cnfn logb(half2);
7777half3 __ovld __cnfn logb(half3);
7778half4 __ovld __cnfn logb(half4);
7779half8 __ovld __cnfn logb(half8);
7780half16 __ovld __cnfn logb(half16);
7781#endif //cl_khr_fp16
7782
7783/**
7784 * mad approximates a * b + c. Whether or how the
7785 * product of a * b is rounded and how supernormal or
7786 * subnormal intermediate products are handled is not
7787 * defined. mad is intended to be used where speed is
7788 * preferred over accuracy.
7789 */
7790float __ovld __cnfn mad(float, float, float);
7791float2 __ovld __cnfn mad(float2, float2, float2);
7792float3 __ovld __cnfn mad(float3, float3, float3);
7793float4 __ovld __cnfn mad(float4, float4, float4);
7794float8 __ovld __cnfn mad(float8, float8, float8);
7795float16 __ovld __cnfn mad(float16, float16, float16);
7796#ifdef cl_khr_fp64
7797double __ovld __cnfn mad(double, double, double);
7798double2 __ovld __cnfn mad(double2, double2, double2);
7799double3 __ovld __cnfn mad(double3, double3, double3);
7800double4 __ovld __cnfn mad(double4, double4, double4);
7801double8 __ovld __cnfn mad(double8, double8, double8);
7802double16 __ovld __cnfn mad(double16, double16, double16);
7803#endif //cl_khr_fp64
7804#ifdef cl_khr_fp16
7805half __ovld __cnfn mad(half, half, half);
7806half2 __ovld __cnfn mad(half2, half2, half2);
7807half3 __ovld __cnfn mad(half3, half3, half3);
7808half4 __ovld __cnfn mad(half4, half4, half4);
7809half8 __ovld __cnfn mad(half8, half8, half8);
7810half16 __ovld __cnfn mad(half16, half16, half16);
7811#endif //cl_khr_fp16
7812
7813/**
7814 * Returns x if | x | > | y |, y if | y | > | x |, otherwise
7815 * fmax(x, y).
7816 */
7817float __ovld __cnfn maxmag(float, float);
7818float2 __ovld __cnfn maxmag(float2, float2);
7819float3 __ovld __cnfn maxmag(float3, float3);
7820float4 __ovld __cnfn maxmag(float4, float4);
7821float8 __ovld __cnfn maxmag(float8, float8);
7822float16 __ovld __cnfn maxmag(float16, float16);
7823#ifdef cl_khr_fp64
7824double __ovld __cnfn maxmag(double, double);
7825double2 __ovld __cnfn maxmag(double2, double2);
7826double3 __ovld __cnfn maxmag(double3, double3);
7827double4 __ovld __cnfn maxmag(double4, double4);
7828double8 __ovld __cnfn maxmag(double8, double8);
7829double16 __ovld __cnfn maxmag(double16, double16);
7830#endif //cl_khr_fp64
7831#ifdef cl_khr_fp16
7832half __ovld __cnfn maxmag(half, half);
7833half2 __ovld __cnfn maxmag(half2, half2);
7834half3 __ovld __cnfn maxmag(half3, half3);
7835half4 __ovld __cnfn maxmag(half4, half4);
7836half8 __ovld __cnfn maxmag(half8, half8);
7837half16 __ovld __cnfn maxmag(half16, half16);
7838#endif //cl_khr_fp16
7839
7840/**
7841 * Returns x if | x | < | y |, y if | y | < | x |, otherwise
7842 * fmin(x, y).
7843 */
7844float __ovld __cnfn minmag(float, float);
7845float2 __ovld __cnfn minmag(float2, float2);
7846float3 __ovld __cnfn minmag(float3, float3);
7847float4 __ovld __cnfn minmag(float4, float4);
7848float8 __ovld __cnfn minmag(float8, float8);
7849float16 __ovld __cnfn minmag(float16, float16);
7850#ifdef cl_khr_fp64
7851double __ovld __cnfn minmag(double, double);
7852double2 __ovld __cnfn minmag(double2, double2);
7853double3 __ovld __cnfn minmag(double3, double3);
7854double4 __ovld __cnfn minmag(double4, double4);
7855double8 __ovld __cnfn minmag(double8, double8);
7856double16 __ovld __cnfn minmag(double16, double16);
7857#endif //cl_khr_fp64
7858#ifdef cl_khr_fp16
7859half __ovld __cnfn minmag(half, half);
7860half2 __ovld __cnfn minmag(half2, half2);
7861half3 __ovld __cnfn minmag(half3, half3);
7862half4 __ovld __cnfn minmag(half4, half4);
7863half8 __ovld __cnfn minmag(half8, half8);
7864half16 __ovld __cnfn minmag(half16, half16);
7865#endif //cl_khr_fp16
7866
7867/**
7868 * Decompose a floating-point number. The modf
7869 * function breaks the argument x into integral and
7870 * fractional parts, each of which has the same sign as
7871 * the argument. It stores the integral part in the object
7872 * pointed to by iptr.
7873 */
7874#if defined(__opencl_c_generic_address_space)
7875float __ovld modf(float, float *);
7876float2 __ovld modf(float2, float2 *);
7877float3 __ovld modf(float3, float3 *);
7878float4 __ovld modf(float4, float4 *);
7879float8 __ovld modf(float8, float8 *);
7880float16 __ovld modf(float16, float16 *);
7881#ifdef cl_khr_fp64
7882double __ovld modf(double, double *);
7883double2 __ovld modf(double2, double2 *);
7884double3 __ovld modf(double3, double3 *);
7885double4 __ovld modf(double4, double4 *);
7886double8 __ovld modf(double8, double8 *);
7887double16 __ovld modf(double16, double16 *);
7888#endif //cl_khr_fp64
7889#ifdef cl_khr_fp16
7890half __ovld modf(half, half *);
7891half2 __ovld modf(half2, half2 *);
7892half3 __ovld modf(half3, half3 *);
7893half4 __ovld modf(half4, half4 *);
7894half8 __ovld modf(half8, half8 *);
7895half16 __ovld modf(half16, half16 *);
7896#endif //cl_khr_fp16
7897#endif //defined(__opencl_c_generic_address_space)
7898
7899#if defined(__opencl_c_named_address_space_builtins)
7900float __ovld modf(float, __global float *);
7901float2 __ovld modf(float2, __global float2 *);
7902float3 __ovld modf(float3, __global float3 *);
7903float4 __ovld modf(float4, __global float4 *);
7904float8 __ovld modf(float8, __global float8 *);
7905float16 __ovld modf(float16, __global float16 *);
7906float __ovld modf(float, __local float *);
7907float2 __ovld modf(float2, __local float2 *);
7908float3 __ovld modf(float3, __local float3 *);
7909float4 __ovld modf(float4, __local float4 *);
7910float8 __ovld modf(float8, __local float8 *);
7911float16 __ovld modf(float16, __local float16 *);
7912float __ovld modf(float, __private float *);
7913float2 __ovld modf(float2, __private float2 *);
7914float3 __ovld modf(float3, __private float3 *);
7915float4 __ovld modf(float4, __private float4 *);
7916float8 __ovld modf(float8, __private float8 *);
7917float16 __ovld modf(float16, __private float16 *);
7918#ifdef cl_khr_fp64
7919double __ovld modf(double, __global double *);
7920double2 __ovld modf(double2, __global double2 *);
7921double3 __ovld modf(double3, __global double3 *);
7922double4 __ovld modf(double4, __global double4 *);
7923double8 __ovld modf(double8, __global double8 *);
7924double16 __ovld modf(double16, __global double16 *);
7925double __ovld modf(double, __local double *);
7926double2 __ovld modf(double2, __local double2 *);
7927double3 __ovld modf(double3, __local double3 *);
7928double4 __ovld modf(double4, __local double4 *);
7929double8 __ovld modf(double8, __local double8 *);
7930double16 __ovld modf(double16, __local double16 *);
7931double __ovld modf(double, __private double *);
7932double2 __ovld modf(double2, __private double2 *);
7933double3 __ovld modf(double3, __private double3 *);
7934double4 __ovld modf(double4, __private double4 *);
7935double8 __ovld modf(double8, __private double8 *);
7936double16 __ovld modf(double16, __private double16 *);
7937#endif //cl_khr_fp64
7938#ifdef cl_khr_fp16
7939half __ovld modf(half, __global half *);
7940half2 __ovld modf(half2, __global half2 *);
7941half3 __ovld modf(half3, __global half3 *);
7942half4 __ovld modf(half4, __global half4 *);
7943half8 __ovld modf(half8, __global half8 *);
7944half16 __ovld modf(half16, __global half16 *);
7945half __ovld modf(half, __local half *);
7946half2 __ovld modf(half2, __local half2 *);
7947half3 __ovld modf(half3, __local half3 *);
7948half4 __ovld modf(half4, __local half4 *);
7949half8 __ovld modf(half8, __local half8 *);
7950half16 __ovld modf(half16, __local half16 *);
7951half __ovld modf(half, __private half *);
7952half2 __ovld modf(half2, __private half2 *);
7953half3 __ovld modf(half3, __private half3 *);
7954half4 __ovld modf(half4, __private half4 *);
7955half8 __ovld modf(half8, __private half8 *);
7956half16 __ovld modf(half16, __private half16 *);
7957#endif //cl_khr_fp16
7958#endif //defined(__opencl_c_named_address_space_builtins)
7959
7960/**
7961 * Returns a quiet NaN. The nancode may be placed
7962 * in the significand of the resulting NaN.
7963 */
7964float __ovld __cnfn nan(uint);
7965float2 __ovld __cnfn nan(uint2);
7966float3 __ovld __cnfn nan(uint3);
7967float4 __ovld __cnfn nan(uint4);
7968float8 __ovld __cnfn nan(uint8);
7969float16 __ovld __cnfn nan(uint16);
7970#ifdef cl_khr_fp64
7971double __ovld __cnfn nan(ulong);
7972double2 __ovld __cnfn nan(ulong2);
7973double3 __ovld __cnfn nan(ulong3);
7974double4 __ovld __cnfn nan(ulong4);
7975double8 __ovld __cnfn nan(ulong8);
7976double16 __ovld __cnfn nan(ulong16);
7977#endif //cl_khr_fp64
7978#ifdef cl_khr_fp16
7979half __ovld __cnfn nan(ushort);
7980half2 __ovld __cnfn nan(ushort2);
7981half3 __ovld __cnfn nan(ushort3);
7982half4 __ovld __cnfn nan(ushort4);
7983half8 __ovld __cnfn nan(ushort8);
7984half16 __ovld __cnfn nan(ushort16);
7985#endif //cl_khr_fp16
7986
7987/**
7988 * Computes the next representable single-precision
7989 * floating-point value following x in the direction of
7990 * y. Thus, if y is less than x, nextafter() returns the
7991 * largest representable floating-point number less
7992 * than x.
7993 */
7994float __ovld __cnfn nextafter(float, float);
7995float2 __ovld __cnfn nextafter(float2, float2);
7996float3 __ovld __cnfn nextafter(float3, float3);
7997float4 __ovld __cnfn nextafter(float4, float4);
7998float8 __ovld __cnfn nextafter(float8, float8);
7999float16 __ovld __cnfn nextafter(float16, float16);
8000#ifdef cl_khr_fp64
8001double __ovld __cnfn nextafter(double, double);
8002double2 __ovld __cnfn nextafter(double2, double2);
8003double3 __ovld __cnfn nextafter(double3, double3);
8004double4 __ovld __cnfn nextafter(double4, double4);
8005double8 __ovld __cnfn nextafter(double8, double8);
8006double16 __ovld __cnfn nextafter(double16, double16);
8007#endif //cl_khr_fp64
8008#ifdef cl_khr_fp16
8009half __ovld __cnfn nextafter(half, half);
8010half2 __ovld __cnfn nextafter(half2, half2);
8011half3 __ovld __cnfn nextafter(half3, half3);
8012half4 __ovld __cnfn nextafter(half4, half4);
8013half8 __ovld __cnfn nextafter(half8, half8);
8014half16 __ovld __cnfn nextafter(half16, half16);
8015#endif //cl_khr_fp16
8016
8017/**
8018 * Compute x to the power y.
8019 */
8020float __ovld __cnfn pow(float, float);
8021float2 __ovld __cnfn pow(float2, float2);
8022float3 __ovld __cnfn pow(float3, float3);
8023float4 __ovld __cnfn pow(float4, float4);
8024float8 __ovld __cnfn pow(float8, float8);
8025float16 __ovld __cnfn pow(float16, float16);
8026#ifdef cl_khr_fp64
8027double __ovld __cnfn pow(double, double);
8028double2 __ovld __cnfn pow(double2, double2);
8029double3 __ovld __cnfn pow(double3, double3);
8030double4 __ovld __cnfn pow(double4, double4);
8031double8 __ovld __cnfn pow(double8, double8);
8032double16 __ovld __cnfn pow(double16, double16);
8033#endif //cl_khr_fp64
8034#ifdef cl_khr_fp16
8035half __ovld __cnfn pow(half, half);
8036half2 __ovld __cnfn pow(half2, half2);
8037half3 __ovld __cnfn pow(half3, half3);
8038half4 __ovld __cnfn pow(half4, half4);
8039half8 __ovld __cnfn pow(half8, half8);
8040half16 __ovld __cnfn pow(half16, half16);
8041#endif //cl_khr_fp16
8042
8043/**
8044 * Compute x to the power y, where y is an integer.
8045 */
8046float __ovld __cnfn pown(float, int);
8047float2 __ovld __cnfn pown(float2, int2);
8048float3 __ovld __cnfn pown(float3, int3);
8049float4 __ovld __cnfn pown(float4, int4);
8050float8 __ovld __cnfn pown(float8, int8);
8051float16 __ovld __cnfn pown(float16, int16);
8052#ifdef cl_khr_fp64
8053double __ovld __cnfn pown(double, int);
8054double2 __ovld __cnfn pown(double2, int2);
8055double3 __ovld __cnfn pown(double3, int3);
8056double4 __ovld __cnfn pown(double4, int4);
8057double8 __ovld __cnfn pown(double8, int8);
8058double16 __ovld __cnfn pown(double16, int16);
8059#endif //cl_khr_fp64
8060#ifdef cl_khr_fp16
8061half __ovld __cnfn pown(half, int);
8062half2 __ovld __cnfn pown(half2, int2);
8063half3 __ovld __cnfn pown(half3, int3);
8064half4 __ovld __cnfn pown(half4, int4);
8065half8 __ovld __cnfn pown(half8, int8);
8066half16 __ovld __cnfn pown(half16, int16);
8067#endif //cl_khr_fp16
8068
8069/**
8070 * Compute x to the power y, where x is >= 0.
8071 */
8072float __ovld __cnfn powr(float, float);
8073float2 __ovld __cnfn powr(float2, float2);
8074float3 __ovld __cnfn powr(float3, float3);
8075float4 __ovld __cnfn powr(float4, float4);
8076float8 __ovld __cnfn powr(float8, float8);
8077float16 __ovld __cnfn powr(float16, float16);
8078#ifdef cl_khr_fp64
8079double __ovld __cnfn powr(double, double);
8080double2 __ovld __cnfn powr(double2, double2);
8081double3 __ovld __cnfn powr(double3, double3);
8082double4 __ovld __cnfn powr(double4, double4);
8083double8 __ovld __cnfn powr(double8, double8);
8084double16 __ovld __cnfn powr(double16, double16);
8085#endif //cl_khr_fp64
8086#ifdef cl_khr_fp16
8087half __ovld __cnfn powr(half, half);
8088half2 __ovld __cnfn powr(half2, half2);
8089half3 __ovld __cnfn powr(half3, half3);
8090half4 __ovld __cnfn powr(half4, half4);
8091half8 __ovld __cnfn powr(half8, half8);
8092half16 __ovld __cnfn powr(half16, half16);
8093#endif //cl_khr_fp16
8094
8095/**
8096 * Compute the value r such that r = x - n*y, where n
8097 * is the integer nearest the exact value of x/y. If there
8098 * are two integers closest to x/y, n shall be the even
8099 * one. If r is zero, it is given the same sign as x.
8100 */
8101float __ovld __cnfn remainder(float, float);
8102float2 __ovld __cnfn remainder(float2, float2);
8103float3 __ovld __cnfn remainder(float3, float3);
8104float4 __ovld __cnfn remainder(float4, float4);
8105float8 __ovld __cnfn remainder(float8, float8);
8106float16 __ovld __cnfn remainder(float16, float16);
8107#ifdef cl_khr_fp64
8108double __ovld __cnfn remainder(double, double);
8109double2 __ovld __cnfn remainder(double2, double2);
8110double3 __ovld __cnfn remainder(double3, double3);
8111double4 __ovld __cnfn remainder(double4, double4);
8112double8 __ovld __cnfn remainder(double8, double8);
8113double16 __ovld __cnfn remainder(double16, double16);
8114#endif //cl_khr_fp64
8115#ifdef cl_khr_fp16
8116half __ovld __cnfn remainder(half, half);
8117half2 __ovld __cnfn remainder(half2, half2);
8118half3 __ovld __cnfn remainder(half3, half3);
8119half4 __ovld __cnfn remainder(half4, half4);
8120half8 __ovld __cnfn remainder(half8, half8);
8121half16 __ovld __cnfn remainder(half16, half16);
8122#endif //cl_khr_fp16
8123
8124/**
8125 * The remquo function computes the value r such
8126 * that r = x - n*y, where n is the integer nearest the
8127 * exact value of x/y. If there are two integers closest
8128 * to x/y, n shall be the even one. If r is zero, it is
8129 * given the same sign as x. This is the same value
8130 * that is returned by the remainder function.
8131 * remquo also calculates the lower seven bits of the
8132 * integral quotient x/y, and gives that value the same
8133 * sign as x/y. It stores this signed value in the object
8134 * pointed to by quo.
8135 */
8136#if defined(__opencl_c_generic_address_space)
8137float __ovld remquo(float, float, int *);
8138float2 __ovld remquo(float2, float2, int2 *);
8139float3 __ovld remquo(float3, float3, int3 *);
8140float4 __ovld remquo(float4, float4, int4 *);
8141float8 __ovld remquo(float8, float8, int8 *);
8142float16 __ovld remquo(float16, float16, int16 *);
8143#ifdef cl_khr_fp64
8144double __ovld remquo(double, double, int *);
8145double2 __ovld remquo(double2, double2, int2 *);
8146double3 __ovld remquo(double3, double3, int3 *);
8147double4 __ovld remquo(double4, double4, int4 *);
8148double8 __ovld remquo(double8, double8, int8 *);
8149double16 __ovld remquo(double16, double16, int16 *);
8150#endif //cl_khr_fp64
8151#ifdef cl_khr_fp16
8152half __ovld remquo(half, half, int *);
8153half2 __ovld remquo(half2, half2, int2 *);
8154half3 __ovld remquo(half3, half3, int3 *);
8155half4 __ovld remquo(half4, half4, int4 *);
8156half8 __ovld remquo(half8, half8, int8 *);
8157half16 __ovld remquo(half16, half16, int16 *);
8158#endif //cl_khr_fp16
8159#endif //defined(__opencl_c_generic_address_space)
8160
8161#if defined(__opencl_c_named_address_space_builtins)
8162float __ovld remquo(float, float, __global int *);
8163float2 __ovld remquo(float2, float2, __global int2 *);
8164float3 __ovld remquo(float3, float3, __global int3 *);
8165float4 __ovld remquo(float4, float4, __global int4 *);
8166float8 __ovld remquo(float8, float8, __global int8 *);
8167float16 __ovld remquo(float16, float16, __global int16 *);
8168float __ovld remquo(float, float, __local int *);
8169float2 __ovld remquo(float2, float2, __local int2 *);
8170float3 __ovld remquo(float3, float3, __local int3 *);
8171float4 __ovld remquo(float4, float4, __local int4 *);
8172float8 __ovld remquo(float8, float8, __local int8 *);
8173float16 __ovld remquo(float16, float16, __local int16 *);
8174float __ovld remquo(float, float, __private int *);
8175float2 __ovld remquo(float2, float2, __private int2 *);
8176float3 __ovld remquo(float3, float3, __private int3 *);
8177float4 __ovld remquo(float4, float4, __private int4 *);
8178float8 __ovld remquo(float8, float8, __private int8 *);
8179float16 __ovld remquo(float16, float16, __private int16 *);
8180#ifdef cl_khr_fp64
8181double __ovld remquo(double, double, __global int *);
8182double2 __ovld remquo(double2, double2, __global int2 *);
8183double3 __ovld remquo(double3, double3, __global int3 *);
8184double4 __ovld remquo(double4, double4, __global int4 *);
8185double8 __ovld remquo(double8, double8, __global int8 *);
8186double16 __ovld remquo(double16, double16, __global int16 *);
8187double __ovld remquo(double, double, __local int *);
8188double2 __ovld remquo(double2, double2, __local int2 *);
8189double3 __ovld remquo(double3, double3, __local int3 *);
8190double4 __ovld remquo(double4, double4, __local int4 *);
8191double8 __ovld remquo(double8, double8, __local int8 *);
8192double16 __ovld remquo(double16, double16, __local int16 *);
8193double __ovld remquo(double, double, __private int *);
8194double2 __ovld remquo(double2, double2, __private int2 *);
8195double3 __ovld remquo(double3, double3, __private int3 *);
8196double4 __ovld remquo(double4, double4, __private int4 *);
8197double8 __ovld remquo(double8, double8, __private int8 *);
8198double16 __ovld remquo(double16, double16, __private int16 *);
8199#endif //cl_khr_fp64
8200#ifdef cl_khr_fp16
8201half __ovld remquo(half, half, __global int *);
8202half2 __ovld remquo(half2, half2, __global int2 *);
8203half3 __ovld remquo(half3, half3, __global int3 *);
8204half4 __ovld remquo(half4, half4, __global int4 *);
8205half8 __ovld remquo(half8, half8, __global int8 *);
8206half16 __ovld remquo(half16, half16, __global int16 *);
8207half __ovld remquo(half, half, __local int *);
8208half2 __ovld remquo(half2, half2, __local int2 *);
8209half3 __ovld remquo(half3, half3, __local int3 *);
8210half4 __ovld remquo(half4, half4, __local int4 *);
8211half8 __ovld remquo(half8, half8, __local int8 *);
8212half16 __ovld remquo(half16, half16, __local int16 *);
8213half __ovld remquo(half, half, __private int *);
8214half2 __ovld remquo(half2, half2, __private int2 *);
8215half3 __ovld remquo(half3, half3, __private int3 *);
8216half4 __ovld remquo(half4, half4, __private int4 *);
8217half8 __ovld remquo(half8, half8, __private int8 *);
8218half16 __ovld remquo(half16, half16, __private int16 *);
8219#endif //cl_khr_fp16
8220#endif //defined(__opencl_c_named_address_space_builtins)
8221/**
8222 * Round to integral value (using round to nearest
8223 * even rounding mode) in floating-point format.
8224 * Refer to section 7.1 for description of rounding
8225 * modes.
8226 */
8227float __ovld __cnfn rint(float);
8228float2 __ovld __cnfn rint(float2);
8229float3 __ovld __cnfn rint(float3);
8230float4 __ovld __cnfn rint(float4);
8231float8 __ovld __cnfn rint(float8);
8232float16 __ovld __cnfn rint(float16);
8233#ifdef cl_khr_fp64
8234double __ovld __cnfn rint(double);
8235double2 __ovld __cnfn rint(double2);
8236double3 __ovld __cnfn rint(double3);
8237double4 __ovld __cnfn rint(double4);
8238double8 __ovld __cnfn rint(double8);
8239double16 __ovld __cnfn rint(double16);
8240#endif //cl_khr_fp64
8241#ifdef cl_khr_fp16
8242half __ovld __cnfn rint(half);
8243half2 __ovld __cnfn rint(half2);
8244half3 __ovld __cnfn rint(half3);
8245half4 __ovld __cnfn rint(half4);
8246half8 __ovld __cnfn rint(half8);
8247half16 __ovld __cnfn rint(half16);
8248#endif //cl_khr_fp16
8249
8250/**
8251 * Compute x to the power 1/y.
8252 */
8253float __ovld __cnfn rootn(float, int);
8254float2 __ovld __cnfn rootn(float2, int2);
8255float3 __ovld __cnfn rootn(float3, int3);
8256float4 __ovld __cnfn rootn(float4, int4);
8257float8 __ovld __cnfn rootn(float8, int8);
8258float16 __ovld __cnfn rootn(float16, int16);
8259#ifdef cl_khr_fp64
8260double __ovld __cnfn rootn(double, int);
8261double2 __ovld __cnfn rootn(double2, int2);
8262double3 __ovld __cnfn rootn(double3, int3);
8263double4 __ovld __cnfn rootn(double4, int4);
8264double8 __ovld __cnfn rootn(double8, int8);
8265double16 __ovld __cnfn rootn(double16, int16);
8266#endif //cl_khr_fp64
8267#ifdef cl_khr_fp16
8268half __ovld __cnfn rootn(half, int);
8269half2 __ovld __cnfn rootn(half2, int2);
8270half3 __ovld __cnfn rootn(half3, int3);
8271half4 __ovld __cnfn rootn(half4, int4);
8272half8 __ovld __cnfn rootn(half8, int8);
8273half16 __ovld __cnfn rootn(half16, int16);
8274#endif //cl_khr_fp16
8275
8276/**
8277 * Return the integral value nearest to x rounding
8278 * halfway cases away from zero, regardless of the
8279 * current rounding direction.
8280 */
8281float __ovld __cnfn round(float);
8282float2 __ovld __cnfn round(float2);
8283float3 __ovld __cnfn round(float3);
8284float4 __ovld __cnfn round(float4);
8285float8 __ovld __cnfn round(float8);
8286float16 __ovld __cnfn round(float16);
8287#ifdef cl_khr_fp64
8288double __ovld __cnfn round(double);
8289double2 __ovld __cnfn round(double2);
8290double3 __ovld __cnfn round(double3);
8291double4 __ovld __cnfn round(double4);
8292double8 __ovld __cnfn round(double8);
8293double16 __ovld __cnfn round(double16);
8294#endif //cl_khr_fp64
8295#ifdef cl_khr_fp16
8296half __ovld __cnfn round(half);
8297half2 __ovld __cnfn round(half2);
8298half3 __ovld __cnfn round(half3);
8299half4 __ovld __cnfn round(half4);
8300half8 __ovld __cnfn round(half8);
8301half16 __ovld __cnfn round(half16);
8302#endif //cl_khr_fp16
8303
8304/**
8305 * Compute inverse square root.
8306 */
8307float __ovld __cnfn rsqrt(float);
8308float2 __ovld __cnfn rsqrt(float2);
8309float3 __ovld __cnfn rsqrt(float3);
8310float4 __ovld __cnfn rsqrt(float4);
8311float8 __ovld __cnfn rsqrt(float8);
8312float16 __ovld __cnfn rsqrt(float16);
8313#ifdef cl_khr_fp64
8314double __ovld __cnfn rsqrt(double);
8315double2 __ovld __cnfn rsqrt(double2);
8316double3 __ovld __cnfn rsqrt(double3);
8317double4 __ovld __cnfn rsqrt(double4);
8318double8 __ovld __cnfn rsqrt(double8);
8319double16 __ovld __cnfn rsqrt(double16);
8320#endif //cl_khr_fp64
8321#ifdef cl_khr_fp16
8322half __ovld __cnfn rsqrt(half);
8323half2 __ovld __cnfn rsqrt(half2);
8324half3 __ovld __cnfn rsqrt(half3);
8325half4 __ovld __cnfn rsqrt(half4);
8326half8 __ovld __cnfn rsqrt(half8);
8327half16 __ovld __cnfn rsqrt(half16);
8328#endif //cl_khr_fp16
8329
8330/**
8331 * Compute sine.
8332 */
8333float __ovld __cnfn sin(float);
8334float2 __ovld __cnfn sin(float2);
8335float3 __ovld __cnfn sin(float3);
8336float4 __ovld __cnfn sin(float4);
8337float8 __ovld __cnfn sin(float8);
8338float16 __ovld __cnfn sin(float16);
8339#ifdef cl_khr_fp64
8340double __ovld __cnfn sin(double);
8341double2 __ovld __cnfn sin(double2);
8342double3 __ovld __cnfn sin(double3);
8343double4 __ovld __cnfn sin(double4);
8344double8 __ovld __cnfn sin(double8);
8345double16 __ovld __cnfn sin(double16);
8346#endif //cl_khr_fp64
8347#ifdef cl_khr_fp16
8348half __ovld __cnfn sin(half);
8349half2 __ovld __cnfn sin(half2);
8350half3 __ovld __cnfn sin(half3);
8351half4 __ovld __cnfn sin(half4);
8352half8 __ovld __cnfn sin(half8);
8353half16 __ovld __cnfn sin(half16);
8354#endif //cl_khr_fp16
8355
8356/**
8357 * Compute sine and cosine of x. The computed sine
8358 * is the return value and computed cosine is returned
8359 * in cosval.
8360 */
8361#if defined(__opencl_c_generic_address_space)
8362float __ovld sincos(float, float *);
8363float2 __ovld sincos(float2, float2 *);
8364float3 __ovld sincos(float3, float3 *);
8365float4 __ovld sincos(float4, float4 *);
8366float8 __ovld sincos(float8, float8 *);
8367float16 __ovld sincos(float16, float16 *);
8368#ifdef cl_khr_fp64
8369double __ovld sincos(double, double *);
8370double2 __ovld sincos(double2, double2 *);
8371double3 __ovld sincos(double3, double3 *);
8372double4 __ovld sincos(double4, double4 *);
8373double8 __ovld sincos(double8, double8 *);
8374double16 __ovld sincos(double16, double16 *);
8375#endif //cl_khr_fp64
8376#ifdef cl_khr_fp16
8377half __ovld sincos(half, half *);
8378half2 __ovld sincos(half2, half2 *);
8379half3 __ovld sincos(half3, half3 *);
8380half4 __ovld sincos(half4, half4 *);
8381half8 __ovld sincos(half8, half8 *);
8382half16 __ovld sincos(half16, half16 *);
8383#endif //cl_khr_fp16
8384#endif //defined(__opencl_c_generic_address_space)
8385
8386#if defined(__opencl_c_named_address_space_builtins)
8387float __ovld sincos(float, __global float *);
8388float2 __ovld sincos(float2, __global float2 *);
8389float3 __ovld sincos(float3, __global float3 *);
8390float4 __ovld sincos(float4, __global float4 *);
8391float8 __ovld sincos(float8, __global float8 *);
8392float16 __ovld sincos(float16, __global float16 *);
8393float __ovld sincos(float, __local float *);
8394float2 __ovld sincos(float2, __local float2 *);
8395float3 __ovld sincos(float3, __local float3 *);
8396float4 __ovld sincos(float4, __local float4 *);
8397float8 __ovld sincos(float8, __local float8 *);
8398float16 __ovld sincos(float16, __local float16 *);
8399float __ovld sincos(float, __private float *);
8400float2 __ovld sincos(float2, __private float2 *);
8401float3 __ovld sincos(float3, __private float3 *);
8402float4 __ovld sincos(float4, __private float4 *);
8403float8 __ovld sincos(float8, __private float8 *);
8404float16 __ovld sincos(float16, __private float16 *);
8405#ifdef cl_khr_fp64
8406double __ovld sincos(double, __global double *);
8407double2 __ovld sincos(double2, __global double2 *);
8408double3 __ovld sincos(double3, __global double3 *);
8409double4 __ovld sincos(double4, __global double4 *);
8410double8 __ovld sincos(double8, __global double8 *);
8411double16 __ovld sincos(double16, __global double16 *);
8412double __ovld sincos(double, __local double *);
8413double2 __ovld sincos(double2, __local double2 *);
8414double3 __ovld sincos(double3, __local double3 *);
8415double4 __ovld sincos(double4, __local double4 *);
8416double8 __ovld sincos(double8, __local double8 *);
8417double16 __ovld sincos(double16, __local double16 *);
8418double __ovld sincos(double, __private double *);
8419double2 __ovld sincos(double2, __private double2 *);
8420double3 __ovld sincos(double3, __private double3 *);
8421double4 __ovld sincos(double4, __private double4 *);
8422double8 __ovld sincos(double8, __private double8 *);
8423double16 __ovld sincos(double16, __private double16 *);
8424#endif //cl_khr_fp64
8425#ifdef cl_khr_fp16
8426half __ovld sincos(half, __global half *);
8427half2 __ovld sincos(half2, __global half2 *);
8428half3 __ovld sincos(half3, __global half3 *);
8429half4 __ovld sincos(half4, __global half4 *);
8430half8 __ovld sincos(half8, __global half8 *);
8431half16 __ovld sincos(half16, __global half16 *);
8432half __ovld sincos(half, __local half *);
8433half2 __ovld sincos(half2, __local half2 *);
8434half3 __ovld sincos(half3, __local half3 *);
8435half4 __ovld sincos(half4, __local half4 *);
8436half8 __ovld sincos(half8, __local half8 *);
8437half16 __ovld sincos(half16, __local half16 *);
8438half __ovld sincos(half, __private half *);
8439half2 __ovld sincos(half2, __private half2 *);
8440half3 __ovld sincos(half3, __private half3 *);
8441half4 __ovld sincos(half4, __private half4 *);
8442half8 __ovld sincos(half8, __private half8 *);
8443half16 __ovld sincos(half16, __private half16 *);
8444#endif //cl_khr_fp16
8445#endif //defined(__opencl_c_named_address_space_builtins)
8446
8447/**
8448 * Compute hyperbolic sine.
8449 */
8450float __ovld __cnfn sinh(float);
8451float2 __ovld __cnfn sinh(float2);
8452float3 __ovld __cnfn sinh(float3);
8453float4 __ovld __cnfn sinh(float4);
8454float8 __ovld __cnfn sinh(float8);
8455float16 __ovld __cnfn sinh(float16);
8456#ifdef cl_khr_fp64
8457double __ovld __cnfn sinh(double);
8458double2 __ovld __cnfn sinh(double2);
8459double3 __ovld __cnfn sinh(double3);
8460double4 __ovld __cnfn sinh(double4);
8461double8 __ovld __cnfn sinh(double8);
8462double16 __ovld __cnfn sinh(double16);
8463#endif //cl_khr_fp64
8464#ifdef cl_khr_fp16
8465half __ovld __cnfn sinh(half);
8466half2 __ovld __cnfn sinh(half2);
8467half3 __ovld __cnfn sinh(half3);
8468half4 __ovld __cnfn sinh(half4);
8469half8 __ovld __cnfn sinh(half8);
8470half16 __ovld __cnfn sinh(half16);
8471#endif //cl_khr_fp16
8472
8473/**
8474 * Compute sin (PI * x).
8475 */
8476float __ovld __cnfn sinpi(float);
8477float2 __ovld __cnfn sinpi(float2);
8478float3 __ovld __cnfn sinpi(float3);
8479float4 __ovld __cnfn sinpi(float4);
8480float8 __ovld __cnfn sinpi(float8);
8481float16 __ovld __cnfn sinpi(float16);
8482#ifdef cl_khr_fp64
8483double __ovld __cnfn sinpi(double);
8484double2 __ovld __cnfn sinpi(double2);
8485double3 __ovld __cnfn sinpi(double3);
8486double4 __ovld __cnfn sinpi(double4);
8487double8 __ovld __cnfn sinpi(double8);
8488double16 __ovld __cnfn sinpi(double16);
8489#endif //cl_khr_fp64
8490#ifdef cl_khr_fp16
8491half __ovld __cnfn sinpi(half);
8492half2 __ovld __cnfn sinpi(half2);
8493half3 __ovld __cnfn sinpi(half3);
8494half4 __ovld __cnfn sinpi(half4);
8495half8 __ovld __cnfn sinpi(half8);
8496half16 __ovld __cnfn sinpi(half16);
8497#endif //cl_khr_fp16
8498
8499/**
8500 * Compute square root.
8501 */
8502float __ovld __cnfn sqrt(float);
8503float2 __ovld __cnfn sqrt(float2);
8504float3 __ovld __cnfn sqrt(float3);
8505float4 __ovld __cnfn sqrt(float4);
8506float8 __ovld __cnfn sqrt(float8);
8507float16 __ovld __cnfn sqrt(float16);
8508#ifdef cl_khr_fp64
8509double __ovld __cnfn sqrt(double);
8510double2 __ovld __cnfn sqrt(double2);
8511double3 __ovld __cnfn sqrt(double3);
8512double4 __ovld __cnfn sqrt(double4);
8513double8 __ovld __cnfn sqrt(double8);
8514double16 __ovld __cnfn sqrt(double16);
8515#endif //cl_khr_fp64
8516#ifdef cl_khr_fp16
8517half __ovld __cnfn sqrt(half);
8518half2 __ovld __cnfn sqrt(half2);
8519half3 __ovld __cnfn sqrt(half3);
8520half4 __ovld __cnfn sqrt(half4);
8521half8 __ovld __cnfn sqrt(half8);
8522half16 __ovld __cnfn sqrt(half16);
8523#endif //cl_khr_fp16
8524
8525/**
8526 * Compute tangent.
8527 */
8528float __ovld __cnfn tan(float);
8529float2 __ovld __cnfn tan(float2);
8530float3 __ovld __cnfn tan(float3);
8531float4 __ovld __cnfn tan(float4);
8532float8 __ovld __cnfn tan(float8);
8533float16 __ovld __cnfn tan(float16);
8534#ifdef cl_khr_fp64
8535double __ovld __cnfn tan(double);
8536double2 __ovld __cnfn tan(double2);
8537double3 __ovld __cnfn tan(double3);
8538double4 __ovld __cnfn tan(double4);
8539double8 __ovld __cnfn tan(double8);
8540double16 __ovld __cnfn tan(double16);
8541#endif //cl_khr_fp64
8542#ifdef cl_khr_fp16
8543half __ovld __cnfn tan(half);
8544half2 __ovld __cnfn tan(half2);
8545half3 __ovld __cnfn tan(half3);
8546half4 __ovld __cnfn tan(half4);
8547half8 __ovld __cnfn tan(half8);
8548half16 __ovld __cnfn tan(half16);
8549#endif //cl_khr_fp16
8550
8551/**
8552 * Compute hyperbolic tangent.
8553 */
8554float __ovld __cnfn tanh(float);
8555float2 __ovld __cnfn tanh(float2);
8556float3 __ovld __cnfn tanh(float3);
8557float4 __ovld __cnfn tanh(float4);
8558float8 __ovld __cnfn tanh(float8);
8559float16 __ovld __cnfn tanh(float16);
8560#ifdef cl_khr_fp64
8561double __ovld __cnfn tanh(double);
8562double2 __ovld __cnfn tanh(double2);
8563double3 __ovld __cnfn tanh(double3);
8564double4 __ovld __cnfn tanh(double4);
8565double8 __ovld __cnfn tanh(double8);
8566double16 __ovld __cnfn tanh(double16);
8567#endif //cl_khr_fp64
8568#ifdef cl_khr_fp16
8569half __ovld __cnfn tanh(half);
8570half2 __ovld __cnfn tanh(half2);
8571half3 __ovld __cnfn tanh(half3);
8572half4 __ovld __cnfn tanh(half4);
8573half8 __ovld __cnfn tanh(half8);
8574half16 __ovld __cnfn tanh(half16);
8575#endif //cl_khr_fp16
8576
8577/**
8578 * Compute tan (PI * x).
8579 */
8580float __ovld __cnfn tanpi(float);
8581float2 __ovld __cnfn tanpi(float2);
8582float3 __ovld __cnfn tanpi(float3);
8583float4 __ovld __cnfn tanpi(float4);
8584float8 __ovld __cnfn tanpi(float8);
8585float16 __ovld __cnfn tanpi(float16);
8586#ifdef cl_khr_fp64
8587double __ovld __cnfn tanpi(double);
8588double2 __ovld __cnfn tanpi(double2);
8589double3 __ovld __cnfn tanpi(double3);
8590double4 __ovld __cnfn tanpi(double4);
8591double8 __ovld __cnfn tanpi(double8);
8592double16 __ovld __cnfn tanpi(double16);
8593#endif //cl_khr_fp64
8594#ifdef cl_khr_fp16
8595half __ovld __cnfn tanpi(half);
8596half2 __ovld __cnfn tanpi(half2);
8597half3 __ovld __cnfn tanpi(half3);
8598half4 __ovld __cnfn tanpi(half4);
8599half8 __ovld __cnfn tanpi(half8);
8600half16 __ovld __cnfn tanpi(half16);
8601#endif //cl_khr_fp16
8602
8603/**
8604 * Compute the gamma function.
8605 */
8606float __ovld __cnfn tgamma(float);
8607float2 __ovld __cnfn tgamma(float2);
8608float3 __ovld __cnfn tgamma(float3);
8609float4 __ovld __cnfn tgamma(float4);
8610float8 __ovld __cnfn tgamma(float8);
8611float16 __ovld __cnfn tgamma(float16);
8612#ifdef cl_khr_fp64
8613double __ovld __cnfn tgamma(double);
8614double2 __ovld __cnfn tgamma(double2);
8615double3 __ovld __cnfn tgamma(double3);
8616double4 __ovld __cnfn tgamma(double4);
8617double8 __ovld __cnfn tgamma(double8);
8618double16 __ovld __cnfn tgamma(double16);
8619#endif //cl_khr_fp64
8620#ifdef cl_khr_fp16
8621half __ovld __cnfn tgamma(half);
8622half2 __ovld __cnfn tgamma(half2);
8623half3 __ovld __cnfn tgamma(half3);
8624half4 __ovld __cnfn tgamma(half4);
8625half8 __ovld __cnfn tgamma(half8);
8626half16 __ovld __cnfn tgamma(half16);
8627#endif //cl_khr_fp16
8628
8629/**
8630 * Round to integral value using the round to zero
8631 * rounding mode.
8632 */
8633float __ovld __cnfn trunc(float);
8634float2 __ovld __cnfn trunc(float2);
8635float3 __ovld __cnfn trunc(float3);
8636float4 __ovld __cnfn trunc(float4);
8637float8 __ovld __cnfn trunc(float8);
8638float16 __ovld __cnfn trunc(float16);
8639#ifdef cl_khr_fp64
8640double __ovld __cnfn trunc(double);
8641double2 __ovld __cnfn trunc(double2);
8642double3 __ovld __cnfn trunc(double3);
8643double4 __ovld __cnfn trunc(double4);
8644double8 __ovld __cnfn trunc(double8);
8645double16 __ovld __cnfn trunc(double16);
8646#endif //cl_khr_fp64
8647#ifdef cl_khr_fp16
8648half __ovld __cnfn trunc(half);
8649half2 __ovld __cnfn trunc(half2);
8650half3 __ovld __cnfn trunc(half3);
8651half4 __ovld __cnfn trunc(half4);
8652half8 __ovld __cnfn trunc(half8);
8653half16 __ovld __cnfn trunc(half16);
8654#endif //cl_khr_fp16
8655
8656/**
8657 * Compute cosine. x must be in the range -2^16 ... +2^16.
8658 */
8659float __ovld __cnfn half_cos(float);
8660float2 __ovld __cnfn half_cos(float2);
8661float3 __ovld __cnfn half_cos(float3);
8662float4 __ovld __cnfn half_cos(float4);
8663float8 __ovld __cnfn half_cos(float8);
8664float16 __ovld __cnfn half_cos(float16);
8665
8666/**
8667 * Compute x / y.
8668 */
8669float __ovld __cnfn half_divide(float, float);
8670float2 __ovld __cnfn half_divide(float2, float2);
8671float3 __ovld __cnfn half_divide(float3, float3);
8672float4 __ovld __cnfn half_divide(float4, float4);
8673float8 __ovld __cnfn half_divide(float8, float8);
8674float16 __ovld __cnfn half_divide(float16, float16);
8675
8676/**
8677 * Compute the base- e exponential of x.
8678 */
8679float __ovld __cnfn half_exp(float);
8680float2 __ovld __cnfn half_exp(float2);
8681float3 __ovld __cnfn half_exp(float3);
8682float4 __ovld __cnfn half_exp(float4);
8683float8 __ovld __cnfn half_exp(float8);
8684float16 __ovld __cnfn half_exp(float16);
8685
8686/**
8687 * Compute the base- 2 exponential of x.
8688 */
8689float __ovld __cnfn half_exp2(float);
8690float2 __ovld __cnfn half_exp2(float2);
8691float3 __ovld __cnfn half_exp2(float3);
8692float4 __ovld __cnfn half_exp2(float4);
8693float8 __ovld __cnfn half_exp2(float8);
8694float16 __ovld __cnfn half_exp2(float16);
8695
8696/**
8697 * Compute the base- 10 exponential of x.
8698 */
8699float __ovld __cnfn half_exp10(float);
8700float2 __ovld __cnfn half_exp10(float2);
8701float3 __ovld __cnfn half_exp10(float3);
8702float4 __ovld __cnfn half_exp10(float4);
8703float8 __ovld __cnfn half_exp10(float8);
8704float16 __ovld __cnfn half_exp10(float16);
8705
8706/**
8707 * Compute natural logarithm.
8708 */
8709float __ovld __cnfn half_log(float);
8710float2 __ovld __cnfn half_log(float2);
8711float3 __ovld __cnfn half_log(float3);
8712float4 __ovld __cnfn half_log(float4);
8713float8 __ovld __cnfn half_log(float8);
8714float16 __ovld __cnfn half_log(float16);
8715
8716/**
8717 * Compute a base 2 logarithm.
8718 */
8719float __ovld __cnfn half_log2(float);
8720float2 __ovld __cnfn half_log2(float2);
8721float3 __ovld __cnfn half_log2(float3);
8722float4 __ovld __cnfn half_log2(float4);
8723float8 __ovld __cnfn half_log2(float8);
8724float16 __ovld __cnfn half_log2(float16);
8725
8726/**
8727 * Compute a base 10 logarithm.
8728 */
8729float __ovld __cnfn half_log10(float);
8730float2 __ovld __cnfn half_log10(float2);
8731float3 __ovld __cnfn half_log10(float3);
8732float4 __ovld __cnfn half_log10(float4);
8733float8 __ovld __cnfn half_log10(float8);
8734float16 __ovld __cnfn half_log10(float16);
8735
8736/**
8737 * Compute x to the power y, where x is >= 0.
8738 */
8739float __ovld __cnfn half_powr(float, float);
8740float2 __ovld __cnfn half_powr(float2, float2);
8741float3 __ovld __cnfn half_powr(float3, float3);
8742float4 __ovld __cnfn half_powr(float4, float4);
8743float8 __ovld __cnfn half_powr(float8, float8);
8744float16 __ovld __cnfn half_powr(float16, float16);
8745
8746/**
8747 * Compute reciprocal.
8748 */
8749float __ovld __cnfn half_recip(float);
8750float2 __ovld __cnfn half_recip(float2);
8751float3 __ovld __cnfn half_recip(float3);
8752float4 __ovld __cnfn half_recip(float4);
8753float8 __ovld __cnfn half_recip(float8);
8754float16 __ovld __cnfn half_recip(float16);
8755
8756/**
8757 * Compute inverse square root.
8758 */
8759float __ovld __cnfn half_rsqrt(float);
8760float2 __ovld __cnfn half_rsqrt(float2);
8761float3 __ovld __cnfn half_rsqrt(float3);
8762float4 __ovld __cnfn half_rsqrt(float4);
8763float8 __ovld __cnfn half_rsqrt(float8);
8764float16 __ovld __cnfn half_rsqrt(float16);
8765
8766/**
8767 * Compute sine. x must be in the range -2^16 ... +2^16.
8768 */
8769float __ovld __cnfn half_sin(float);
8770float2 __ovld __cnfn half_sin(float2);
8771float3 __ovld __cnfn half_sin(float3);
8772float4 __ovld __cnfn half_sin(float4);
8773float8 __ovld __cnfn half_sin(float8);
8774float16 __ovld __cnfn half_sin(float16);
8775
8776/**
8777 * Compute square root.
8778 */
8779float __ovld __cnfn half_sqrt(float);
8780float2 __ovld __cnfn half_sqrt(float2);
8781float3 __ovld __cnfn half_sqrt(float3);
8782float4 __ovld __cnfn half_sqrt(float4);
8783float8 __ovld __cnfn half_sqrt(float8);
8784float16 __ovld __cnfn half_sqrt(float16);
8785
8786/**
8787 * Compute tangent. x must be in the range -216 ... +216.
8788 */
8789float __ovld __cnfn half_tan(float);
8790float2 __ovld __cnfn half_tan(float2);
8791float3 __ovld __cnfn half_tan(float3);
8792float4 __ovld __cnfn half_tan(float4);
8793float8 __ovld __cnfn half_tan(float8);
8794float16 __ovld __cnfn half_tan(float16);
8795
8796/**
8797 * Compute cosine over an implementation-defined range.
8798 * The maximum error is implementation-defined.
8799 */
8800float __ovld __cnfn native_cos(float);
8801float2 __ovld __cnfn native_cos(float2);
8802float3 __ovld __cnfn native_cos(float3);
8803float4 __ovld __cnfn native_cos(float4);
8804float8 __ovld __cnfn native_cos(float8);
8805float16 __ovld __cnfn native_cos(float16);
8806
8807/**
8808 * Compute x / y over an implementation-defined range.
8809 * The maximum error is implementation-defined.
8810 */
8811float __ovld __cnfn native_divide(float, float);
8812float2 __ovld __cnfn native_divide(float2, float2);
8813float3 __ovld __cnfn native_divide(float3, float3);
8814float4 __ovld __cnfn native_divide(float4, float4);
8815float8 __ovld __cnfn native_divide(float8, float8);
8816float16 __ovld __cnfn native_divide(float16, float16);
8817
8818/**
8819 * Compute the base- e exponential of x over an
8820 * implementation-defined range. The maximum error is
8821 * implementation-defined.
8822 */
8823float __ovld __cnfn native_exp(float);
8824float2 __ovld __cnfn native_exp(float2);
8825float3 __ovld __cnfn native_exp(float3);
8826float4 __ovld __cnfn native_exp(float4);
8827float8 __ovld __cnfn native_exp(float8);
8828float16 __ovld __cnfn native_exp(float16);
8829
8830/**
8831 * Compute the base- 2 exponential of x over an
8832 * implementation-defined range. The maximum error is
8833 * implementation-defined.
8834 */
8835float __ovld __cnfn native_exp2(float);
8836float2 __ovld __cnfn native_exp2(float2);
8837float3 __ovld __cnfn native_exp2(float3);
8838float4 __ovld __cnfn native_exp2(float4);
8839float8 __ovld __cnfn native_exp2(float8);
8840float16 __ovld __cnfn native_exp2(float16);
8841
8842/**
8843 * Compute the base- 10 exponential of x over an
8844 * implementation-defined range. The maximum error is
8845 * implementation-defined.
8846 */
8847float __ovld __cnfn native_exp10(float);
8848float2 __ovld __cnfn native_exp10(float2);
8849float3 __ovld __cnfn native_exp10(float3);
8850float4 __ovld __cnfn native_exp10(float4);
8851float8 __ovld __cnfn native_exp10(float8);
8852float16 __ovld __cnfn native_exp10(float16);
8853
8854/**
8855 * Compute natural logarithm over an implementationdefined
8856 * range. The maximum error is implementation
8857 * defined.
8858 */
8859float __ovld __cnfn native_log(float);
8860float2 __ovld __cnfn native_log(float2);
8861float3 __ovld __cnfn native_log(float3);
8862float4 __ovld __cnfn native_log(float4);
8863float8 __ovld __cnfn native_log(float8);
8864float16 __ovld __cnfn native_log(float16);
8865
8866/**
8867 * Compute a base 2 logarithm over an implementationdefined
8868 * range. The maximum error is implementationdefined.
8869 */
8870float __ovld __cnfn native_log2(float);
8871float2 __ovld __cnfn native_log2(float2);
8872float3 __ovld __cnfn native_log2(float3);
8873float4 __ovld __cnfn native_log2(float4);
8874float8 __ovld __cnfn native_log2(float8);
8875float16 __ovld __cnfn native_log2(float16);
8876
8877/**
8878 * Compute a base 10 logarithm over an implementationdefined
8879 * range. The maximum error is implementationdefined.
8880 */
8881float __ovld __cnfn native_log10(float);
8882float2 __ovld __cnfn native_log10(float2);
8883float3 __ovld __cnfn native_log10(float3);
8884float4 __ovld __cnfn native_log10(float4);
8885float8 __ovld __cnfn native_log10(float8);
8886float16 __ovld __cnfn native_log10(float16);
8887
8888/**
8889 * Compute x to the power y, where x is >= 0. The range of
8890 * x and y are implementation-defined. The maximum error
8891 * is implementation-defined.
8892 */
8893float __ovld __cnfn native_powr(float, float);
8894float2 __ovld __cnfn native_powr(float2, float2);
8895float3 __ovld __cnfn native_powr(float3, float3);
8896float4 __ovld __cnfn native_powr(float4, float4);
8897float8 __ovld __cnfn native_powr(float8, float8);
8898float16 __ovld __cnfn native_powr(float16, float16);
8899
8900/**
8901 * Compute reciprocal over an implementation-defined
8902 * range. The maximum error is implementation-defined.
8903 */
8904float __ovld __cnfn native_recip(float);
8905float2 __ovld __cnfn native_recip(float2);
8906float3 __ovld __cnfn native_recip(float3);
8907float4 __ovld __cnfn native_recip(float4);
8908float8 __ovld __cnfn native_recip(float8);
8909float16 __ovld __cnfn native_recip(float16);
8910
8911/**
8912 * Compute inverse square root over an implementationdefined
8913 * range. The maximum error is implementationdefined.
8914 */
8915float __ovld __cnfn native_rsqrt(float);
8916float2 __ovld __cnfn native_rsqrt(float2);
8917float3 __ovld __cnfn native_rsqrt(float3);
8918float4 __ovld __cnfn native_rsqrt(float4);
8919float8 __ovld __cnfn native_rsqrt(float8);
8920float16 __ovld __cnfn native_rsqrt(float16);
8921
8922/**
8923 * Compute sine over an implementation-defined range.
8924 * The maximum error is implementation-defined.
8925 */
8926float __ovld __cnfn native_sin(float);
8927float2 __ovld __cnfn native_sin(float2);
8928float3 __ovld __cnfn native_sin(float3);
8929float4 __ovld __cnfn native_sin(float4);
8930float8 __ovld __cnfn native_sin(float8);
8931float16 __ovld __cnfn native_sin(float16);
8932
8933/**
8934 * Compute square root over an implementation-defined
8935 * range. The maximum error is implementation-defined.
8936 */
8937float __ovld __cnfn native_sqrt(float);
8938float2 __ovld __cnfn native_sqrt(float2);
8939float3 __ovld __cnfn native_sqrt(float3);
8940float4 __ovld __cnfn native_sqrt(float4);
8941float8 __ovld __cnfn native_sqrt(float8);
8942float16 __ovld __cnfn native_sqrt(float16);
8943
8944/**
8945 * Compute tangent over an implementation-defined range.
8946 * The maximum error is implementation-defined.
8947 */
8948float __ovld __cnfn native_tan(float);
8949float2 __ovld __cnfn native_tan(float2);
8950float3 __ovld __cnfn native_tan(float3);
8951float4 __ovld __cnfn native_tan(float4);
8952float8 __ovld __cnfn native_tan(float8);
8953float16 __ovld __cnfn native_tan(float16);
8954
8955// OpenCL v1.1 s6.11.3, v1.2 s6.12.3, v2.0 s6.13.3 - Integer Functions
8956
8957/**
8958 * Returns | x |.
8959 */
8960uchar __ovld __cnfn abs(char);
8961uchar __ovld __cnfn abs(uchar);
8962uchar2 __ovld __cnfn abs(char2);
8963uchar2 __ovld __cnfn abs(uchar2);
8964uchar3 __ovld __cnfn abs(char3);
8965uchar3 __ovld __cnfn abs(uchar3);
8966uchar4 __ovld __cnfn abs(char4);
8967uchar4 __ovld __cnfn abs(uchar4);
8968uchar8 __ovld __cnfn abs(char8);
8969uchar8 __ovld __cnfn abs(uchar8);
8970uchar16 __ovld __cnfn abs(char16);
8971uchar16 __ovld __cnfn abs(uchar16);
8972ushort __ovld __cnfn abs(short);
8973ushort __ovld __cnfn abs(ushort);
8974ushort2 __ovld __cnfn abs(short2);
8975ushort2 __ovld __cnfn abs(ushort2);
8976ushort3 __ovld __cnfn abs(short3);
8977ushort3 __ovld __cnfn abs(ushort3);
8978ushort4 __ovld __cnfn abs(short4);
8979ushort4 __ovld __cnfn abs(ushort4);
8980ushort8 __ovld __cnfn abs(short8);
8981ushort8 __ovld __cnfn abs(ushort8);
8982ushort16 __ovld __cnfn abs(short16);
8983ushort16 __ovld __cnfn abs(ushort16);
8984uint __ovld __cnfn abs(int);
8985uint __ovld __cnfn abs(uint);
8986uint2 __ovld __cnfn abs(int2);
8987uint2 __ovld __cnfn abs(uint2);
8988uint3 __ovld __cnfn abs(int3);
8989uint3 __ovld __cnfn abs(uint3);
8990uint4 __ovld __cnfn abs(int4);
8991uint4 __ovld __cnfn abs(uint4);
8992uint8 __ovld __cnfn abs(int8);
8993uint8 __ovld __cnfn abs(uint8);
8994uint16 __ovld __cnfn abs(int16);
8995uint16 __ovld __cnfn abs(uint16);
8996ulong __ovld __cnfn abs(long);
8997ulong __ovld __cnfn abs(ulong);
8998ulong2 __ovld __cnfn abs(long2);
8999ulong2 __ovld __cnfn abs(ulong2);
9000ulong3 __ovld __cnfn abs(long3);
9001ulong3 __ovld __cnfn abs(ulong3);
9002ulong4 __ovld __cnfn abs(long4);
9003ulong4 __ovld __cnfn abs(ulong4);
9004ulong8 __ovld __cnfn abs(long8);
9005ulong8 __ovld __cnfn abs(ulong8);
9006ulong16 __ovld __cnfn abs(long16);
9007ulong16 __ovld __cnfn abs(ulong16);
9008
9009/**
9010 * Returns | x - y | without modulo overflow.
9011 */
9012uchar __ovld __cnfn abs_diff(char, char);
9013uchar __ovld __cnfn abs_diff(uchar, uchar);
9014uchar2 __ovld __cnfn abs_diff(char2, char2);
9015uchar2 __ovld __cnfn abs_diff(uchar2, uchar2);
9016uchar3 __ovld __cnfn abs_diff(char3, char3);
9017uchar3 __ovld __cnfn abs_diff(uchar3, uchar3);
9018uchar4 __ovld __cnfn abs_diff(char4, char4);
9019uchar4 __ovld __cnfn abs_diff(uchar4, uchar4);
9020uchar8 __ovld __cnfn abs_diff(char8, char8);
9021uchar8 __ovld __cnfn abs_diff(uchar8, uchar8);
9022uchar16 __ovld __cnfn abs_diff(char16, char16);
9023uchar16 __ovld __cnfn abs_diff(uchar16, uchar16);
9024ushort __ovld __cnfn abs_diff(short, short);
9025ushort __ovld __cnfn abs_diff(ushort, ushort);
9026ushort2 __ovld __cnfn abs_diff(short2, short2);
9027ushort2 __ovld __cnfn abs_diff(ushort2, ushort2);
9028ushort3 __ovld __cnfn abs_diff(short3, short3);
9029ushort3 __ovld __cnfn abs_diff(ushort3, ushort3);
9030ushort4 __ovld __cnfn abs_diff(short4, short4);
9031ushort4 __ovld __cnfn abs_diff(ushort4, ushort4);
9032ushort8 __ovld __cnfn abs_diff(short8, short8);
9033ushort8 __ovld __cnfn abs_diff(ushort8, ushort8);
9034ushort16 __ovld __cnfn abs_diff(short16, short16);
9035ushort16 __ovld __cnfn abs_diff(ushort16, ushort16);
9036uint __ovld __cnfn abs_diff(int, int);
9037uint __ovld __cnfn abs_diff(uint, uint);
9038uint2 __ovld __cnfn abs_diff(int2, int2);
9039uint2 __ovld __cnfn abs_diff(uint2, uint2);
9040uint3 __ovld __cnfn abs_diff(int3, int3);
9041uint3 __ovld __cnfn abs_diff(uint3, uint3);
9042uint4 __ovld __cnfn abs_diff(int4, int4);
9043uint4 __ovld __cnfn abs_diff(uint4, uint4);
9044uint8 __ovld __cnfn abs_diff(int8, int8);
9045uint8 __ovld __cnfn abs_diff(uint8, uint8);
9046uint16 __ovld __cnfn abs_diff(int16, int16);
9047uint16 __ovld __cnfn abs_diff(uint16, uint16);
9048ulong __ovld __cnfn abs_diff(long, long);
9049ulong __ovld __cnfn abs_diff(ulong, ulong);
9050ulong2 __ovld __cnfn abs_diff(long2, long2);
9051ulong2 __ovld __cnfn abs_diff(ulong2, ulong2);
9052ulong3 __ovld __cnfn abs_diff(long3, long3);
9053ulong3 __ovld __cnfn abs_diff(ulong3, ulong3);
9054ulong4 __ovld __cnfn abs_diff(long4, long4);
9055ulong4 __ovld __cnfn abs_diff(ulong4, ulong4);
9056ulong8 __ovld __cnfn abs_diff(long8, long8);
9057ulong8 __ovld __cnfn abs_diff(ulong8, ulong8);
9058ulong16 __ovld __cnfn abs_diff(long16, long16);
9059ulong16 __ovld __cnfn abs_diff(ulong16, ulong16);
9060
9061/**
9062 * Returns x + y and saturates the result.
9063 */
9064char __ovld __cnfn add_sat(char, char);
9065uchar __ovld __cnfn add_sat(uchar, uchar);
9066char2 __ovld __cnfn add_sat(char2, char2);
9067uchar2 __ovld __cnfn add_sat(uchar2, uchar2);
9068char3 __ovld __cnfn add_sat(char3, char3);
9069uchar3 __ovld __cnfn add_sat(uchar3, uchar3);
9070char4 __ovld __cnfn add_sat(char4, char4);
9071uchar4 __ovld __cnfn add_sat(uchar4, uchar4);
9072char8 __ovld __cnfn add_sat(char8, char8);
9073uchar8 __ovld __cnfn add_sat(uchar8, uchar8);
9074char16 __ovld __cnfn add_sat(char16, char16);
9075uchar16 __ovld __cnfn add_sat(uchar16, uchar16);
9076short __ovld __cnfn add_sat(short, short);
9077ushort __ovld __cnfn add_sat(ushort, ushort);
9078short2 __ovld __cnfn add_sat(short2, short2);
9079ushort2 __ovld __cnfn add_sat(ushort2, ushort2);
9080short3 __ovld __cnfn add_sat(short3, short3);
9081ushort3 __ovld __cnfn add_sat(ushort3, ushort3);
9082short4 __ovld __cnfn add_sat(short4, short4);
9083ushort4 __ovld __cnfn add_sat(ushort4, ushort4);
9084short8 __ovld __cnfn add_sat(short8, short8);
9085ushort8 __ovld __cnfn add_sat(ushort8, ushort8);
9086short16 __ovld __cnfn add_sat(short16, short16);
9087ushort16 __ovld __cnfn add_sat(ushort16, ushort16);
9088int __ovld __cnfn add_sat(int, int);
9089uint __ovld __cnfn add_sat(uint, uint);
9090int2 __ovld __cnfn add_sat(int2, int2);
9091uint2 __ovld __cnfn add_sat(uint2, uint2);
9092int3 __ovld __cnfn add_sat(int3, int3);
9093uint3 __ovld __cnfn add_sat(uint3, uint3);
9094int4 __ovld __cnfn add_sat(int4, int4);
9095uint4 __ovld __cnfn add_sat(uint4, uint4);
9096int8 __ovld __cnfn add_sat(int8, int8);
9097uint8 __ovld __cnfn add_sat(uint8, uint8);
9098int16 __ovld __cnfn add_sat(int16, int16);
9099uint16 __ovld __cnfn add_sat(uint16, uint16);
9100long __ovld __cnfn add_sat(long, long);
9101ulong __ovld __cnfn add_sat(ulong, ulong);
9102long2 __ovld __cnfn add_sat(long2, long2);
9103ulong2 __ovld __cnfn add_sat(ulong2, ulong2);
9104long3 __ovld __cnfn add_sat(long3, long3);
9105ulong3 __ovld __cnfn add_sat(ulong3, ulong3);
9106long4 __ovld __cnfn add_sat(long4, long4);
9107ulong4 __ovld __cnfn add_sat(ulong4, ulong4);
9108long8 __ovld __cnfn add_sat(long8, long8);
9109ulong8 __ovld __cnfn add_sat(ulong8, ulong8);
9110long16 __ovld __cnfn add_sat(long16, long16);
9111ulong16 __ovld __cnfn add_sat(ulong16, ulong16);
9112
9113/**
9114 * Returns (x + y) >> 1. The intermediate sum does
9115 * not modulo overflow.
9116 */
9117char __ovld __cnfn hadd(char, char);
9118uchar __ovld __cnfn hadd(uchar, uchar);
9119char2 __ovld __cnfn hadd(char2, char2);
9120uchar2 __ovld __cnfn hadd(uchar2, uchar2);
9121char3 __ovld __cnfn hadd(char3, char3);
9122uchar3 __ovld __cnfn hadd(uchar3, uchar3);
9123char4 __ovld __cnfn hadd(char4, char4);
9124uchar4 __ovld __cnfn hadd(uchar4, uchar4);
9125char8 __ovld __cnfn hadd(char8, char8);
9126uchar8 __ovld __cnfn hadd(uchar8, uchar8);
9127char16 __ovld __cnfn hadd(char16, char16);
9128uchar16 __ovld __cnfn hadd(uchar16, uchar16);
9129short __ovld __cnfn hadd(short, short);
9130ushort __ovld __cnfn hadd(ushort, ushort);
9131short2 __ovld __cnfn hadd(short2, short2);
9132ushort2 __ovld __cnfn hadd(ushort2, ushort2);
9133short3 __ovld __cnfn hadd(short3, short3);
9134ushort3 __ovld __cnfn hadd(ushort3, ushort3);
9135short4 __ovld __cnfn hadd(short4, short4);
9136ushort4 __ovld __cnfn hadd(ushort4, ushort4);
9137short8 __ovld __cnfn hadd(short8, short8);
9138ushort8 __ovld __cnfn hadd(ushort8, ushort8);
9139short16 __ovld __cnfn hadd(short16, short16);
9140ushort16 __ovld __cnfn hadd(ushort16, ushort16);
9141int __ovld __cnfn hadd(int, int);
9142uint __ovld __cnfn hadd(uint, uint);
9143int2 __ovld __cnfn hadd(int2, int2);
9144uint2 __ovld __cnfn hadd(uint2, uint2);
9145int3 __ovld __cnfn hadd(int3, int3);
9146uint3 __ovld __cnfn hadd(uint3, uint3);
9147int4 __ovld __cnfn hadd(int4, int4);
9148uint4 __ovld __cnfn hadd(uint4, uint4);
9149int8 __ovld __cnfn hadd(int8, int8);
9150uint8 __ovld __cnfn hadd(uint8, uint8);
9151int16 __ovld __cnfn hadd(int16, int16);
9152uint16 __ovld __cnfn hadd(uint16, uint16);
9153long __ovld __cnfn hadd(long, long);
9154ulong __ovld __cnfn hadd(ulong, ulong);
9155long2 __ovld __cnfn hadd(long2, long2);
9156ulong2 __ovld __cnfn hadd(ulong2, ulong2);
9157long3 __ovld __cnfn hadd(long3, long3);
9158ulong3 __ovld __cnfn hadd(ulong3, ulong3);
9159long4 __ovld __cnfn hadd(long4, long4);
9160ulong4 __ovld __cnfn hadd(ulong4, ulong4);
9161long8 __ovld __cnfn hadd(long8, long8);
9162ulong8 __ovld __cnfn hadd(ulong8, ulong8);
9163long16 __ovld __cnfn hadd(long16, long16);
9164ulong16 __ovld __cnfn hadd(ulong16, ulong16);
9165
9166/**
9167 * Returns (x + y + 1) >> 1. The intermediate sum
9168 * does not modulo overflow.
9169 */
9170char __ovld __cnfn rhadd(char, char);
9171uchar __ovld __cnfn rhadd(uchar, uchar);
9172char2 __ovld __cnfn rhadd(char2, char2);
9173uchar2 __ovld __cnfn rhadd(uchar2, uchar2);
9174char3 __ovld __cnfn rhadd(char3, char3);
9175uchar3 __ovld __cnfn rhadd(uchar3, uchar3);
9176char4 __ovld __cnfn rhadd(char4, char4);
9177uchar4 __ovld __cnfn rhadd(uchar4, uchar4);
9178char8 __ovld __cnfn rhadd(char8, char8);
9179uchar8 __ovld __cnfn rhadd(uchar8, uchar8);
9180char16 __ovld __cnfn rhadd(char16, char16);
9181uchar16 __ovld __cnfn rhadd(uchar16, uchar16);
9182short __ovld __cnfn rhadd(short, short);
9183ushort __ovld __cnfn rhadd(ushort, ushort);
9184short2 __ovld __cnfn rhadd(short2, short2);
9185ushort2 __ovld __cnfn rhadd(ushort2, ushort2);
9186short3 __ovld __cnfn rhadd(short3, short3);
9187ushort3 __ovld __cnfn rhadd(ushort3, ushort3);
9188short4 __ovld __cnfn rhadd(short4, short4);
9189ushort4 __ovld __cnfn rhadd(ushort4, ushort4);
9190short8 __ovld __cnfn rhadd(short8, short8);
9191ushort8 __ovld __cnfn rhadd(ushort8, ushort8);
9192short16 __ovld __cnfn rhadd(short16, short16);
9193ushort16 __ovld __cnfn rhadd(ushort16, ushort16);
9194int __ovld __cnfn rhadd(int, int);
9195uint __ovld __cnfn rhadd(uint, uint);
9196int2 __ovld __cnfn rhadd(int2, int2);
9197uint2 __ovld __cnfn rhadd(uint2, uint2);
9198int3 __ovld __cnfn rhadd(int3, int3);
9199uint3 __ovld __cnfn rhadd(uint3, uint3);
9200int4 __ovld __cnfn rhadd(int4, int4);
9201uint4 __ovld __cnfn rhadd(uint4, uint4);
9202int8 __ovld __cnfn rhadd(int8, int8);
9203uint8 __ovld __cnfn rhadd(uint8, uint8);
9204int16 __ovld __cnfn rhadd(int16, int16);
9205uint16 __ovld __cnfn rhadd(uint16, uint16);
9206long __ovld __cnfn rhadd(long, long);
9207ulong __ovld __cnfn rhadd(ulong, ulong);
9208long2 __ovld __cnfn rhadd(long2, long2);
9209ulong2 __ovld __cnfn rhadd(ulong2, ulong2);
9210long3 __ovld __cnfn rhadd(long3, long3);
9211ulong3 __ovld __cnfn rhadd(ulong3, ulong3);
9212long4 __ovld __cnfn rhadd(long4, long4);
9213ulong4 __ovld __cnfn rhadd(ulong4, ulong4);
9214long8 __ovld __cnfn rhadd(long8, long8);
9215ulong8 __ovld __cnfn rhadd(ulong8, ulong8);
9216long16 __ovld __cnfn rhadd(long16, long16);
9217ulong16 __ovld __cnfn rhadd(ulong16, ulong16);
9218
9219/**
9220 * Returns min(max(x, minval), maxval).
9221 * Results are undefined if minval > maxval.
9222 */
9223char __ovld __cnfn clamp(char, char, char);
9224uchar __ovld __cnfn clamp(uchar, uchar, uchar);
9225char2 __ovld __cnfn clamp(char2, char2, char2);
9226uchar2 __ovld __cnfn clamp(uchar2, uchar2, uchar2);
9227char3 __ovld __cnfn clamp(char3, char3, char3);
9228uchar3 __ovld __cnfn clamp(uchar3, uchar3, uchar3);
9229char4 __ovld __cnfn clamp(char4, char4, char4);
9230uchar4 __ovld __cnfn clamp(uchar4, uchar4, uchar4);
9231char8 __ovld __cnfn clamp(char8, char8, char8);
9232uchar8 __ovld __cnfn clamp(uchar8, uchar8, uchar8);
9233char16 __ovld __cnfn clamp(char16, char16, char16);
9234uchar16 __ovld __cnfn clamp(uchar16, uchar16, uchar16);
9235short __ovld __cnfn clamp(short, short, short);
9236ushort __ovld __cnfn clamp(ushort, ushort, ushort);
9237short2 __ovld __cnfn clamp(short2, short2, short2);
9238ushort2 __ovld __cnfn clamp(ushort2, ushort2, ushort2);
9239short3 __ovld __cnfn clamp(short3, short3, short3);
9240ushort3 __ovld __cnfn clamp(ushort3, ushort3, ushort3);
9241short4 __ovld __cnfn clamp(short4, short4, short4);
9242ushort4 __ovld __cnfn clamp(ushort4, ushort4, ushort4);
9243short8 __ovld __cnfn clamp(short8, short8, short8);
9244ushort8 __ovld __cnfn clamp(ushort8, ushort8, ushort8);
9245short16 __ovld __cnfn clamp(short16, short16, short16);
9246ushort16 __ovld __cnfn clamp(ushort16, ushort16, ushort16);
9247int __ovld __cnfn clamp(int, int, int);
9248uint __ovld __cnfn clamp(uint, uint, uint);
9249int2 __ovld __cnfn clamp(int2, int2, int2);
9250uint2 __ovld __cnfn clamp(uint2, uint2, uint2);
9251int3 __ovld __cnfn clamp(int3, int3, int3);
9252uint3 __ovld __cnfn clamp(uint3, uint3, uint3);
9253int4 __ovld __cnfn clamp(int4, int4, int4);
9254uint4 __ovld __cnfn clamp(uint4, uint4, uint4);
9255int8 __ovld __cnfn clamp(int8, int8, int8);
9256uint8 __ovld __cnfn clamp(uint8, uint8, uint8);
9257int16 __ovld __cnfn clamp(int16, int16, int16);
9258uint16 __ovld __cnfn clamp(uint16, uint16, uint16);
9259long __ovld __cnfn clamp(long, long, long);
9260ulong __ovld __cnfn clamp(ulong, ulong, ulong);
9261long2 __ovld __cnfn clamp(long2, long2, long2);
9262ulong2 __ovld __cnfn clamp(ulong2, ulong2, ulong2);
9263long3 __ovld __cnfn clamp(long3, long3, long3);
9264ulong3 __ovld __cnfn clamp(ulong3, ulong3, ulong3);
9265long4 __ovld __cnfn clamp(long4, long4, long4);
9266ulong4 __ovld __cnfn clamp(ulong4, ulong4, ulong4);
9267long8 __ovld __cnfn clamp(long8, long8, long8);
9268ulong8 __ovld __cnfn clamp(ulong8, ulong8, ulong8);
9269long16 __ovld __cnfn clamp(long16, long16, long16);
9270ulong16 __ovld __cnfn clamp(ulong16, ulong16, ulong16);
9271char2 __ovld __cnfn clamp(char2, char, char);
9272uchar2 __ovld __cnfn clamp(uchar2, uchar, uchar);
9273char3 __ovld __cnfn clamp(char3, char, char);
9274uchar3 __ovld __cnfn clamp(uchar3, uchar, uchar);
9275char4 __ovld __cnfn clamp(char4, char, char);
9276uchar4 __ovld __cnfn clamp(uchar4, uchar, uchar);
9277char8 __ovld __cnfn clamp(char8, char, char);
9278uchar8 __ovld __cnfn clamp(uchar8, uchar, uchar);
9279char16 __ovld __cnfn clamp(char16, char, char);
9280uchar16 __ovld __cnfn clamp(uchar16, uchar, uchar);
9281short2 __ovld __cnfn clamp(short2, short, short);
9282ushort2 __ovld __cnfn clamp(ushort2, ushort, ushort);
9283short3 __ovld __cnfn clamp(short3, short, short);
9284ushort3 __ovld __cnfn clamp(ushort3, ushort, ushort);
9285short4 __ovld __cnfn clamp(short4, short, short);
9286ushort4 __ovld __cnfn clamp(ushort4, ushort, ushort);
9287short8 __ovld __cnfn clamp(short8, short, short);
9288ushort8 __ovld __cnfn clamp(ushort8, ushort, ushort);
9289short16 __ovld __cnfn clamp(short16, short, short);
9290ushort16 __ovld __cnfn clamp(ushort16, ushort, ushort);
9291int2 __ovld __cnfn clamp(int2, int, int);
9292uint2 __ovld __cnfn clamp(uint2, uint, uint);
9293int3 __ovld __cnfn clamp(int3, int, int);
9294uint3 __ovld __cnfn clamp(uint3, uint, uint);
9295int4 __ovld __cnfn clamp(int4, int, int);
9296uint4 __ovld __cnfn clamp(uint4, uint, uint);
9297int8 __ovld __cnfn clamp(int8, int, int);
9298uint8 __ovld __cnfn clamp(uint8, uint, uint);
9299int16 __ovld __cnfn clamp(int16, int, int);
9300uint16 __ovld __cnfn clamp(uint16, uint, uint);
9301long2 __ovld __cnfn clamp(long2, long, long);
9302ulong2 __ovld __cnfn clamp(ulong2, ulong, ulong);
9303long3 __ovld __cnfn clamp(long3, long, long);
9304ulong3 __ovld __cnfn clamp(ulong3, ulong, ulong);
9305long4 __ovld __cnfn clamp(long4, long, long);
9306ulong4 __ovld __cnfn clamp(ulong4, ulong, ulong);
9307long8 __ovld __cnfn clamp(long8, long, long);
9308ulong8 __ovld __cnfn clamp(ulong8, ulong, ulong);
9309long16 __ovld __cnfn clamp(long16, long, long);
9310ulong16 __ovld __cnfn clamp(ulong16, ulong, ulong);
9311
9312/**
9313 * Returns the number of leading 0-bits in x, starting
9314 * at the most significant bit position.
9315 */
9316char __ovld __cnfn clz(char);
9317uchar __ovld __cnfn clz(uchar);
9318char2 __ovld __cnfn clz(char2);
9319uchar2 __ovld __cnfn clz(uchar2);
9320char3 __ovld __cnfn clz(char3);
9321uchar3 __ovld __cnfn clz(uchar3);
9322char4 __ovld __cnfn clz(char4);
9323uchar4 __ovld __cnfn clz(uchar4);
9324char8 __ovld __cnfn clz(char8);
9325uchar8 __ovld __cnfn clz(uchar8);
9326char16 __ovld __cnfn clz(char16);
9327uchar16 __ovld __cnfn clz(uchar16);
9328short __ovld __cnfn clz(short);
9329ushort __ovld __cnfn clz(ushort);
9330short2 __ovld __cnfn clz(short2);
9331ushort2 __ovld __cnfn clz(ushort2);
9332short3 __ovld __cnfn clz(short3);
9333ushort3 __ovld __cnfn clz(ushort3);
9334short4 __ovld __cnfn clz(short4);
9335ushort4 __ovld __cnfn clz(ushort4);
9336short8 __ovld __cnfn clz(short8);
9337ushort8 __ovld __cnfn clz(ushort8);
9338short16 __ovld __cnfn clz(short16);
9339ushort16 __ovld __cnfn clz(ushort16);
9340int __ovld __cnfn clz(int);
9341uint __ovld __cnfn clz(uint);
9342int2 __ovld __cnfn clz(int2);
9343uint2 __ovld __cnfn clz(uint2);
9344int3 __ovld __cnfn clz(int3);
9345uint3 __ovld __cnfn clz(uint3);
9346int4 __ovld __cnfn clz(int4);
9347uint4 __ovld __cnfn clz(uint4);
9348int8 __ovld __cnfn clz(int8);
9349uint8 __ovld __cnfn clz(uint8);
9350int16 __ovld __cnfn clz(int16);
9351uint16 __ovld __cnfn clz(uint16);
9352long __ovld __cnfn clz(long);
9353ulong __ovld __cnfn clz(ulong);
9354long2 __ovld __cnfn clz(long2);
9355ulong2 __ovld __cnfn clz(ulong2);
9356long3 __ovld __cnfn clz(long3);
9357ulong3 __ovld __cnfn clz(ulong3);
9358long4 __ovld __cnfn clz(long4);
9359ulong4 __ovld __cnfn clz(ulong4);
9360long8 __ovld __cnfn clz(long8);
9361ulong8 __ovld __cnfn clz(ulong8);
9362long16 __ovld __cnfn clz(long16);
9363ulong16 __ovld __cnfn clz(ulong16);
9364
9365/**
9366 * Returns the count of trailing 0-bits in x. If x is 0,
9367 * returns the size in bits of the type of x or
9368 * component type of x, if x is a vector.
9369 */
9370#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
9371char __ovld __cnfn ctz(char);
9372uchar __ovld __cnfn ctz(uchar);
9373char2 __ovld __cnfn ctz(char2);
9374uchar2 __ovld __cnfn ctz(uchar2);
9375char3 __ovld __cnfn ctz(char3);
9376uchar3 __ovld __cnfn ctz(uchar3);
9377char4 __ovld __cnfn ctz(char4);
9378uchar4 __ovld __cnfn ctz(uchar4);
9379char8 __ovld __cnfn ctz(char8);
9380uchar8 __ovld __cnfn ctz(uchar8);
9381char16 __ovld __cnfn ctz(char16);
9382uchar16 __ovld __cnfn ctz(uchar16);
9383short __ovld __cnfn ctz(short);
9384ushort __ovld __cnfn ctz(ushort);
9385short2 __ovld __cnfn ctz(short2);
9386ushort2 __ovld __cnfn ctz(ushort2);
9387short3 __ovld __cnfn ctz(short3);
9388ushort3 __ovld __cnfn ctz(ushort3);
9389short4 __ovld __cnfn ctz(short4);
9390ushort4 __ovld __cnfn ctz(ushort4);
9391short8 __ovld __cnfn ctz(short8);
9392ushort8 __ovld __cnfn ctz(ushort8);
9393short16 __ovld __cnfn ctz(short16);
9394ushort16 __ovld __cnfn ctz(ushort16);
9395int __ovld __cnfn ctz(int);
9396uint __ovld __cnfn ctz(uint);
9397int2 __ovld __cnfn ctz(int2);
9398uint2 __ovld __cnfn ctz(uint2);
9399int3 __ovld __cnfn ctz(int3);
9400uint3 __ovld __cnfn ctz(uint3);
9401int4 __ovld __cnfn ctz(int4);
9402uint4 __ovld __cnfn ctz(uint4);
9403int8 __ovld __cnfn ctz(int8);
9404uint8 __ovld __cnfn ctz(uint8);
9405int16 __ovld __cnfn ctz(int16);
9406uint16 __ovld __cnfn ctz(uint16);
9407long __ovld __cnfn ctz(long);
9408ulong __ovld __cnfn ctz(ulong);
9409long2 __ovld __cnfn ctz(long2);
9410ulong2 __ovld __cnfn ctz(ulong2);
9411long3 __ovld __cnfn ctz(long3);
9412ulong3 __ovld __cnfn ctz(ulong3);
9413long4 __ovld __cnfn ctz(long4);
9414ulong4 __ovld __cnfn ctz(ulong4);
9415long8 __ovld __cnfn ctz(long8);
9416ulong8 __ovld __cnfn ctz(ulong8);
9417long16 __ovld __cnfn ctz(long16);
9418ulong16 __ovld __cnfn ctz(ulong16);
9419#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
9420
9421/**
9422 * Returns mul_hi(a, b) + c.
9423 */
9424char __ovld __cnfn mad_hi(char, char, char);
9425uchar __ovld __cnfn mad_hi(uchar, uchar, uchar);
9426char2 __ovld __cnfn mad_hi(char2, char2, char2);
9427uchar2 __ovld __cnfn mad_hi(uchar2, uchar2, uchar2);
9428char3 __ovld __cnfn mad_hi(char3, char3, char3);
9429uchar3 __ovld __cnfn mad_hi(uchar3, uchar3, uchar3);
9430char4 __ovld __cnfn mad_hi(char4, char4, char4);
9431uchar4 __ovld __cnfn mad_hi(uchar4, uchar4, uchar4);
9432char8 __ovld __cnfn mad_hi(char8, char8, char8);
9433uchar8 __ovld __cnfn mad_hi(uchar8, uchar8, uchar8);
9434char16 __ovld __cnfn mad_hi(char16, char16, char16);
9435uchar16 __ovld __cnfn mad_hi(uchar16, uchar16, uchar16);
9436short __ovld __cnfn mad_hi(short, short, short);
9437ushort __ovld __cnfn mad_hi(ushort, ushort, ushort);
9438short2 __ovld __cnfn mad_hi(short2, short2, short2);
9439ushort2 __ovld __cnfn mad_hi(ushort2, ushort2, ushort2);
9440short3 __ovld __cnfn mad_hi(short3, short3, short3);
9441ushort3 __ovld __cnfn mad_hi(ushort3, ushort3, ushort3);
9442short4 __ovld __cnfn mad_hi(short4, short4, short4);
9443ushort4 __ovld __cnfn mad_hi(ushort4, ushort4, ushort4);
9444short8 __ovld __cnfn mad_hi(short8, short8, short8);
9445ushort8 __ovld __cnfn mad_hi(ushort8, ushort8, ushort8);
9446short16 __ovld __cnfn mad_hi(short16, short16, short16);
9447ushort16 __ovld __cnfn mad_hi(ushort16, ushort16, ushort16);
9448int __ovld __cnfn mad_hi(int, int, int);
9449uint __ovld __cnfn mad_hi(uint, uint, uint);
9450int2 __ovld __cnfn mad_hi(int2, int2, int2);
9451uint2 __ovld __cnfn mad_hi(uint2, uint2, uint2);
9452int3 __ovld __cnfn mad_hi(int3, int3, int3);
9453uint3 __ovld __cnfn mad_hi(uint3, uint3, uint3);
9454int4 __ovld __cnfn mad_hi(int4, int4, int4);
9455uint4 __ovld __cnfn mad_hi(uint4, uint4, uint4);
9456int8 __ovld __cnfn mad_hi(int8, int8, int8);
9457uint8 __ovld __cnfn mad_hi(uint8, uint8, uint8);
9458int16 __ovld __cnfn mad_hi(int16, int16, int16);
9459uint16 __ovld __cnfn mad_hi(uint16, uint16, uint16);
9460long __ovld __cnfn mad_hi(long, long, long);
9461ulong __ovld __cnfn mad_hi(ulong, ulong, ulong);
9462long2 __ovld __cnfn mad_hi(long2, long2, long2);
9463ulong2 __ovld __cnfn mad_hi(ulong2, ulong2, ulong2);
9464long3 __ovld __cnfn mad_hi(long3, long3, long3);
9465ulong3 __ovld __cnfn mad_hi(ulong3, ulong3, ulong3);
9466long4 __ovld __cnfn mad_hi(long4, long4, long4);
9467ulong4 __ovld __cnfn mad_hi(ulong4, ulong4, ulong4);
9468long8 __ovld __cnfn mad_hi(long8, long8, long8);
9469ulong8 __ovld __cnfn mad_hi(ulong8, ulong8, ulong8);
9470long16 __ovld __cnfn mad_hi(long16, long16, long16);
9471ulong16 __ovld __cnfn mad_hi(ulong16, ulong16, ulong16);
9472
9473/**
9474 * Returns a * b + c and saturates the result.
9475 */
9476char __ovld __cnfn mad_sat(char, char, char);
9477uchar __ovld __cnfn mad_sat(uchar, uchar, uchar);
9478char2 __ovld __cnfn mad_sat(char2, char2, char2);
9479uchar2 __ovld __cnfn mad_sat(uchar2, uchar2, uchar2);
9480char3 __ovld __cnfn mad_sat(char3, char3, char3);
9481uchar3 __ovld __cnfn mad_sat(uchar3, uchar3, uchar3);
9482char4 __ovld __cnfn mad_sat(char4, char4, char4);
9483uchar4 __ovld __cnfn mad_sat(uchar4, uchar4, uchar4);
9484char8 __ovld __cnfn mad_sat(char8, char8, char8);
9485uchar8 __ovld __cnfn mad_sat(uchar8, uchar8, uchar8);
9486char16 __ovld __cnfn mad_sat(char16, char16, char16);
9487uchar16 __ovld __cnfn mad_sat(uchar16, uchar16, uchar16);
9488short __ovld __cnfn mad_sat(short, short, short);
9489ushort __ovld __cnfn mad_sat(ushort, ushort, ushort);
9490short2 __ovld __cnfn mad_sat(short2, short2, short2);
9491ushort2 __ovld __cnfn mad_sat(ushort2, ushort2, ushort2);
9492short3 __ovld __cnfn mad_sat(short3, short3, short3);
9493ushort3 __ovld __cnfn mad_sat(ushort3, ushort3, ushort3);
9494short4 __ovld __cnfn mad_sat(short4, short4, short4);
9495ushort4 __ovld __cnfn mad_sat(ushort4, ushort4, ushort4);
9496short8 __ovld __cnfn mad_sat(short8, short8, short8);
9497ushort8 __ovld __cnfn mad_sat(ushort8, ushort8, ushort8);
9498short16 __ovld __cnfn mad_sat(short16, short16, short16);
9499ushort16 __ovld __cnfn mad_sat(ushort16, ushort16, ushort16);
9500int __ovld __cnfn mad_sat(int, int, int);
9501uint __ovld __cnfn mad_sat(uint, uint, uint);
9502int2 __ovld __cnfn mad_sat(int2, int2, int2);
9503uint2 __ovld __cnfn mad_sat(uint2, uint2, uint2);
9504int3 __ovld __cnfn mad_sat(int3, int3, int3);
9505uint3 __ovld __cnfn mad_sat(uint3, uint3, uint3);
9506int4 __ovld __cnfn mad_sat(int4, int4, int4);
9507uint4 __ovld __cnfn mad_sat(uint4, uint4, uint4);
9508int8 __ovld __cnfn mad_sat(int8, int8, int8);
9509uint8 __ovld __cnfn mad_sat(uint8, uint8, uint8);
9510int16 __ovld __cnfn mad_sat(int16, int16, int16);
9511uint16 __ovld __cnfn mad_sat(uint16, uint16, uint16);
9512long __ovld __cnfn mad_sat(long, long, long);
9513ulong __ovld __cnfn mad_sat(ulong, ulong, ulong);
9514long2 __ovld __cnfn mad_sat(long2, long2, long2);
9515ulong2 __ovld __cnfn mad_sat(ulong2, ulong2, ulong2);
9516long3 __ovld __cnfn mad_sat(long3, long3, long3);
9517ulong3 __ovld __cnfn mad_sat(ulong3, ulong3, ulong3);
9518long4 __ovld __cnfn mad_sat(long4, long4, long4);
9519ulong4 __ovld __cnfn mad_sat(ulong4, ulong4, ulong4);
9520long8 __ovld __cnfn mad_sat(long8, long8, long8);
9521ulong8 __ovld __cnfn mad_sat(ulong8, ulong8, ulong8);
9522long16 __ovld __cnfn mad_sat(long16, long16, long16);
9523ulong16 __ovld __cnfn mad_sat(ulong16, ulong16, ulong16);
9524
9525/**
9526 * Returns y if x < y, otherwise it returns x.
9527 */
9528char __ovld __cnfn max(char, char);
9529uchar __ovld __cnfn max(uchar, uchar);
9530char2 __ovld __cnfn max(char2, char2);
9531uchar2 __ovld __cnfn max(uchar2, uchar2);
9532char3 __ovld __cnfn max(char3, char3);
9533uchar3 __ovld __cnfn max(uchar3, uchar3);
9534char4 __ovld __cnfn max(char4, char4);
9535uchar4 __ovld __cnfn max(uchar4, uchar4);
9536char8 __ovld __cnfn max(char8, char8);
9537uchar8 __ovld __cnfn max(uchar8, uchar8);
9538char16 __ovld __cnfn max(char16, char16);
9539uchar16 __ovld __cnfn max(uchar16, uchar16);
9540short __ovld __cnfn max(short, short);
9541ushort __ovld __cnfn max(ushort, ushort);
9542short2 __ovld __cnfn max(short2, short2);
9543ushort2 __ovld __cnfn max(ushort2, ushort2);
9544short3 __ovld __cnfn max(short3, short3);
9545ushort3 __ovld __cnfn max(ushort3, ushort3);
9546short4 __ovld __cnfn max(short4, short4);
9547ushort4 __ovld __cnfn max(ushort4, ushort4);
9548short8 __ovld __cnfn max(short8, short8);
9549ushort8 __ovld __cnfn max(ushort8, ushort8);
9550short16 __ovld __cnfn max(short16, short16);
9551ushort16 __ovld __cnfn max(ushort16, ushort16);
9552int __ovld __cnfn max(int, int);
9553uint __ovld __cnfn max(uint, uint);
9554int2 __ovld __cnfn max(int2, int2);
9555uint2 __ovld __cnfn max(uint2, uint2);
9556int3 __ovld __cnfn max(int3, int3);
9557uint3 __ovld __cnfn max(uint3, uint3);
9558int4 __ovld __cnfn max(int4, int4);
9559uint4 __ovld __cnfn max(uint4, uint4);
9560int8 __ovld __cnfn max(int8, int8);
9561uint8 __ovld __cnfn max(uint8, uint8);
9562int16 __ovld __cnfn max(int16, int16);
9563uint16 __ovld __cnfn max(uint16, uint16);
9564long __ovld __cnfn max(long, long);
9565ulong __ovld __cnfn max(ulong, ulong);
9566long2 __ovld __cnfn max(long2, long2);
9567ulong2 __ovld __cnfn max(ulong2, ulong2);
9568long3 __ovld __cnfn max(long3, long3);
9569ulong3 __ovld __cnfn max(ulong3, ulong3);
9570long4 __ovld __cnfn max(long4, long4);
9571ulong4 __ovld __cnfn max(ulong4, ulong4);
9572long8 __ovld __cnfn max(long8, long8);
9573ulong8 __ovld __cnfn max(ulong8, ulong8);
9574long16 __ovld __cnfn max(long16, long16);
9575ulong16 __ovld __cnfn max(ulong16, ulong16);
9576char2 __ovld __cnfn max(char2, char);
9577uchar2 __ovld __cnfn max(uchar2, uchar);
9578char3 __ovld __cnfn max(char3, char);
9579uchar3 __ovld __cnfn max(uchar3, uchar);
9580char4 __ovld __cnfn max(char4, char);
9581uchar4 __ovld __cnfn max(uchar4, uchar);
9582char8 __ovld __cnfn max(char8, char);
9583uchar8 __ovld __cnfn max(uchar8, uchar);
9584char16 __ovld __cnfn max(char16, char);
9585uchar16 __ovld __cnfn max(uchar16, uchar);
9586short2 __ovld __cnfn max(short2, short);
9587ushort2 __ovld __cnfn max(ushort2, ushort);
9588short3 __ovld __cnfn max(short3, short);
9589ushort3 __ovld __cnfn max(ushort3, ushort);
9590short4 __ovld __cnfn max(short4, short);
9591ushort4 __ovld __cnfn max(ushort4, ushort);
9592short8 __ovld __cnfn max(short8, short);
9593ushort8 __ovld __cnfn max(ushort8, ushort);
9594short16 __ovld __cnfn max(short16, short);
9595ushort16 __ovld __cnfn max(ushort16, ushort);
9596int2 __ovld __cnfn max(int2, int);
9597uint2 __ovld __cnfn max(uint2, uint);
9598int3 __ovld __cnfn max(int3, int);
9599uint3 __ovld __cnfn max(uint3, uint);
9600int4 __ovld __cnfn max(int4, int);
9601uint4 __ovld __cnfn max(uint4, uint);
9602int8 __ovld __cnfn max(int8, int);
9603uint8 __ovld __cnfn max(uint8, uint);
9604int16 __ovld __cnfn max(int16, int);
9605uint16 __ovld __cnfn max(uint16, uint);
9606long2 __ovld __cnfn max(long2, long);
9607ulong2 __ovld __cnfn max(ulong2, ulong);
9608long3 __ovld __cnfn max(long3, long);
9609ulong3 __ovld __cnfn max(ulong3, ulong);
9610long4 __ovld __cnfn max(long4, long);
9611ulong4 __ovld __cnfn max(ulong4, ulong);
9612long8 __ovld __cnfn max(long8, long);
9613ulong8 __ovld __cnfn max(ulong8, ulong);
9614long16 __ovld __cnfn max(long16, long);
9615ulong16 __ovld __cnfn max(ulong16, ulong);
9616
9617/**
9618 * Returns y if y < x, otherwise it returns x.
9619 */
9620char __ovld __cnfn min(char, char);
9621uchar __ovld __cnfn min(uchar, uchar);
9622char2 __ovld __cnfn min(char2, char2);
9623uchar2 __ovld __cnfn min(uchar2, uchar2);
9624char3 __ovld __cnfn min(char3, char3);
9625uchar3 __ovld __cnfn min(uchar3, uchar3);
9626char4 __ovld __cnfn min(char4, char4);
9627uchar4 __ovld __cnfn min(uchar4, uchar4);
9628char8 __ovld __cnfn min(char8, char8);
9629uchar8 __ovld __cnfn min(uchar8, uchar8);
9630char16 __ovld __cnfn min(char16, char16);
9631uchar16 __ovld __cnfn min(uchar16, uchar16);
9632short __ovld __cnfn min(short, short);
9633ushort __ovld __cnfn min(ushort, ushort);
9634short2 __ovld __cnfn min(short2, short2);
9635ushort2 __ovld __cnfn min(ushort2, ushort2);
9636short3 __ovld __cnfn min(short3, short3);
9637ushort3 __ovld __cnfn min(ushort3, ushort3);
9638short4 __ovld __cnfn min(short4, short4);
9639ushort4 __ovld __cnfn min(ushort4, ushort4);
9640short8 __ovld __cnfn min(short8, short8);
9641ushort8 __ovld __cnfn min(ushort8, ushort8);
9642short16 __ovld __cnfn min(short16, short16);
9643ushort16 __ovld __cnfn min(ushort16, ushort16);
9644int __ovld __cnfn min(int, int);
9645uint __ovld __cnfn min(uint, uint);
9646int2 __ovld __cnfn min(int2, int2);
9647uint2 __ovld __cnfn min(uint2, uint2);
9648int3 __ovld __cnfn min(int3, int3);
9649uint3 __ovld __cnfn min(uint3, uint3);
9650int4 __ovld __cnfn min(int4, int4);
9651uint4 __ovld __cnfn min(uint4, uint4);
9652int8 __ovld __cnfn min(int8, int8);
9653uint8 __ovld __cnfn min(uint8, uint8);
9654int16 __ovld __cnfn min(int16, int16);
9655uint16 __ovld __cnfn min(uint16, uint16);
9656long __ovld __cnfn min(long, long);
9657ulong __ovld __cnfn min(ulong, ulong);
9658long2 __ovld __cnfn min(long2, long2);
9659ulong2 __ovld __cnfn min(ulong2, ulong2);
9660long3 __ovld __cnfn min(long3, long3);
9661ulong3 __ovld __cnfn min(ulong3, ulong3);
9662long4 __ovld __cnfn min(long4, long4);
9663ulong4 __ovld __cnfn min(ulong4, ulong4);
9664long8 __ovld __cnfn min(long8, long8);
9665ulong8 __ovld __cnfn min(ulong8, ulong8);
9666long16 __ovld __cnfn min(long16, long16);
9667ulong16 __ovld __cnfn min(ulong16, ulong16);
9668char2 __ovld __cnfn min(char2, char);
9669uchar2 __ovld __cnfn min(uchar2, uchar);
9670char3 __ovld __cnfn min(char3, char);
9671uchar3 __ovld __cnfn min(uchar3, uchar);
9672char4 __ovld __cnfn min(char4, char);
9673uchar4 __ovld __cnfn min(uchar4, uchar);
9674char8 __ovld __cnfn min(char8, char);
9675uchar8 __ovld __cnfn min(uchar8, uchar);
9676char16 __ovld __cnfn min(char16, char);
9677uchar16 __ovld __cnfn min(uchar16, uchar);
9678short2 __ovld __cnfn min(short2, short);
9679ushort2 __ovld __cnfn min(ushort2, ushort);
9680short3 __ovld __cnfn min(short3, short);
9681ushort3 __ovld __cnfn min(ushort3, ushort);
9682short4 __ovld __cnfn min(short4, short);
9683ushort4 __ovld __cnfn min(ushort4, ushort);
9684short8 __ovld __cnfn min(short8, short);
9685ushort8 __ovld __cnfn min(ushort8, ushort);
9686short16 __ovld __cnfn min(short16, short);
9687ushort16 __ovld __cnfn min(ushort16, ushort);
9688int2 __ovld __cnfn min(int2, int);
9689uint2 __ovld __cnfn min(uint2, uint);
9690int3 __ovld __cnfn min(int3, int);
9691uint3 __ovld __cnfn min(uint3, uint);
9692int4 __ovld __cnfn min(int4, int);
9693uint4 __ovld __cnfn min(uint4, uint);
9694int8 __ovld __cnfn min(int8, int);
9695uint8 __ovld __cnfn min(uint8, uint);
9696int16 __ovld __cnfn min(int16, int);
9697uint16 __ovld __cnfn min(uint16, uint);
9698long2 __ovld __cnfn min(long2, long);
9699ulong2 __ovld __cnfn min(ulong2, ulong);
9700long3 __ovld __cnfn min(long3, long);
9701ulong3 __ovld __cnfn min(ulong3, ulong);
9702long4 __ovld __cnfn min(long4, long);
9703ulong4 __ovld __cnfn min(ulong4, ulong);
9704long8 __ovld __cnfn min(long8, long);
9705ulong8 __ovld __cnfn min(ulong8, ulong);
9706long16 __ovld __cnfn min(long16, long);
9707ulong16 __ovld __cnfn min(ulong16, ulong);
9708
9709/**
9710 * Computes x * y and returns the high half of the
9711 * product of x and y.
9712 */
9713char __ovld __cnfn mul_hi(char, char);
9714uchar __ovld __cnfn mul_hi(uchar, uchar);
9715char2 __ovld __cnfn mul_hi(char2, char2);
9716uchar2 __ovld __cnfn mul_hi(uchar2, uchar2);
9717char3 __ovld __cnfn mul_hi(char3, char3);
9718uchar3 __ovld __cnfn mul_hi(uchar3, uchar3);
9719char4 __ovld __cnfn mul_hi(char4, char4);
9720uchar4 __ovld __cnfn mul_hi(uchar4, uchar4);
9721char8 __ovld __cnfn mul_hi(char8, char8);
9722uchar8 __ovld __cnfn mul_hi(uchar8, uchar8);
9723char16 __ovld __cnfn mul_hi(char16, char16);
9724uchar16 __ovld __cnfn mul_hi(uchar16, uchar16);
9725short __ovld __cnfn mul_hi(short, short);
9726ushort __ovld __cnfn mul_hi(ushort, ushort);
9727short2 __ovld __cnfn mul_hi(short2, short2);
9728ushort2 __ovld __cnfn mul_hi(ushort2, ushort2);
9729short3 __ovld __cnfn mul_hi(short3, short3);
9730ushort3 __ovld __cnfn mul_hi(ushort3, ushort3);
9731short4 __ovld __cnfn mul_hi(short4, short4);
9732ushort4 __ovld __cnfn mul_hi(ushort4, ushort4);
9733short8 __ovld __cnfn mul_hi(short8, short8);
9734ushort8 __ovld __cnfn mul_hi(ushort8, ushort8);
9735short16 __ovld __cnfn mul_hi(short16, short16);
9736ushort16 __ovld __cnfn mul_hi(ushort16, ushort16);
9737int __ovld __cnfn mul_hi(int, int);
9738uint __ovld __cnfn mul_hi(uint, uint);
9739int2 __ovld __cnfn mul_hi(int2, int2);
9740uint2 __ovld __cnfn mul_hi(uint2, uint2);
9741int3 __ovld __cnfn mul_hi(int3, int3);
9742uint3 __ovld __cnfn mul_hi(uint3, uint3);
9743int4 __ovld __cnfn mul_hi(int4, int4);
9744uint4 __ovld __cnfn mul_hi(uint4, uint4);
9745int8 __ovld __cnfn mul_hi(int8, int8);
9746uint8 __ovld __cnfn mul_hi(uint8, uint8);
9747int16 __ovld __cnfn mul_hi(int16, int16);
9748uint16 __ovld __cnfn mul_hi(uint16, uint16);
9749long __ovld __cnfn mul_hi(long, long);
9750ulong __ovld __cnfn mul_hi(ulong, ulong);
9751long2 __ovld __cnfn mul_hi(long2, long2);
9752ulong2 __ovld __cnfn mul_hi(ulong2, ulong2);
9753long3 __ovld __cnfn mul_hi(long3, long3);
9754ulong3 __ovld __cnfn mul_hi(ulong3, ulong3);
9755long4 __ovld __cnfn mul_hi(long4, long4);
9756ulong4 __ovld __cnfn mul_hi(ulong4, ulong4);
9757long8 __ovld __cnfn mul_hi(long8, long8);
9758ulong8 __ovld __cnfn mul_hi(ulong8, ulong8);
9759long16 __ovld __cnfn mul_hi(long16, long16);
9760ulong16 __ovld __cnfn mul_hi(ulong16, ulong16);
9761
9762/**
9763 * For each element in v, the bits are shifted left by
9764 * the number of bits given by the corresponding
9765 * element in i (subject to usual shift modulo rules
9766 * described in section 6.3). Bits shifted off the left
9767 * side of the element are shifted back in from the
9768 * right.
9769 */
9770char __ovld __cnfn rotate(char, char);
9771uchar __ovld __cnfn rotate(uchar, uchar);
9772char2 __ovld __cnfn rotate(char2, char2);
9773uchar2 __ovld __cnfn rotate(uchar2, uchar2);
9774char3 __ovld __cnfn rotate(char3, char3);
9775uchar3 __ovld __cnfn rotate(uchar3, uchar3);
9776char4 __ovld __cnfn rotate(char4, char4);
9777uchar4 __ovld __cnfn rotate(uchar4, uchar4);
9778char8 __ovld __cnfn rotate(char8, char8);
9779uchar8 __ovld __cnfn rotate(uchar8, uchar8);
9780char16 __ovld __cnfn rotate(char16, char16);
9781uchar16 __ovld __cnfn rotate(uchar16, uchar16);
9782short __ovld __cnfn rotate(short, short);
9783ushort __ovld __cnfn rotate(ushort, ushort);
9784short2 __ovld __cnfn rotate(short2, short2);
9785ushort2 __ovld __cnfn rotate(ushort2, ushort2);
9786short3 __ovld __cnfn rotate(short3, short3);
9787ushort3 __ovld __cnfn rotate(ushort3, ushort3);
9788short4 __ovld __cnfn rotate(short4, short4);
9789ushort4 __ovld __cnfn rotate(ushort4, ushort4);
9790short8 __ovld __cnfn rotate(short8, short8);
9791ushort8 __ovld __cnfn rotate(ushort8, ushort8);
9792short16 __ovld __cnfn rotate(short16, short16);
9793ushort16 __ovld __cnfn rotate(ushort16, ushort16);
9794int __ovld __cnfn rotate(int, int);
9795uint __ovld __cnfn rotate(uint, uint);
9796int2 __ovld __cnfn rotate(int2, int2);
9797uint2 __ovld __cnfn rotate(uint2, uint2);
9798int3 __ovld __cnfn rotate(int3, int3);
9799uint3 __ovld __cnfn rotate(uint3, uint3);
9800int4 __ovld __cnfn rotate(int4, int4);
9801uint4 __ovld __cnfn rotate(uint4, uint4);
9802int8 __ovld __cnfn rotate(int8, int8);
9803uint8 __ovld __cnfn rotate(uint8, uint8);
9804int16 __ovld __cnfn rotate(int16, int16);
9805uint16 __ovld __cnfn rotate(uint16, uint16);
9806long __ovld __cnfn rotate(long, long);
9807ulong __ovld __cnfn rotate(ulong, ulong);
9808long2 __ovld __cnfn rotate(long2, long2);
9809ulong2 __ovld __cnfn rotate(ulong2, ulong2);
9810long3 __ovld __cnfn rotate(long3, long3);
9811ulong3 __ovld __cnfn rotate(ulong3, ulong3);
9812long4 __ovld __cnfn rotate(long4, long4);
9813ulong4 __ovld __cnfn rotate(ulong4, ulong4);
9814long8 __ovld __cnfn rotate(long8, long8);
9815ulong8 __ovld __cnfn rotate(ulong8, ulong8);
9816long16 __ovld __cnfn rotate(long16, long16);
9817ulong16 __ovld __cnfn rotate(ulong16, ulong16);
9818
9819/**
9820 * Returns x - y and saturates the result.
9821 */
9822char __ovld __cnfn sub_sat(char, char);
9823uchar __ovld __cnfn sub_sat(uchar, uchar);
9824char2 __ovld __cnfn sub_sat(char2, char2);
9825uchar2 __ovld __cnfn sub_sat(uchar2, uchar2);
9826char3 __ovld __cnfn sub_sat(char3, char3);
9827uchar3 __ovld __cnfn sub_sat(uchar3, uchar3);
9828char4 __ovld __cnfn sub_sat(char4, char4);
9829uchar4 __ovld __cnfn sub_sat(uchar4, uchar4);
9830char8 __ovld __cnfn sub_sat(char8, char8);
9831uchar8 __ovld __cnfn sub_sat(uchar8, uchar8);
9832char16 __ovld __cnfn sub_sat(char16, char16);
9833uchar16 __ovld __cnfn sub_sat(uchar16, uchar16);
9834short __ovld __cnfn sub_sat(short, short);
9835ushort __ovld __cnfn sub_sat(ushort, ushort);
9836short2 __ovld __cnfn sub_sat(short2, short2);
9837ushort2 __ovld __cnfn sub_sat(ushort2, ushort2);
9838short3 __ovld __cnfn sub_sat(short3, short3);
9839ushort3 __ovld __cnfn sub_sat(ushort3, ushort3);
9840short4 __ovld __cnfn sub_sat(short4, short4);
9841ushort4 __ovld __cnfn sub_sat(ushort4, ushort4);
9842short8 __ovld __cnfn sub_sat(short8, short8);
9843ushort8 __ovld __cnfn sub_sat(ushort8, ushort8);
9844short16 __ovld __cnfn sub_sat(short16, short16);
9845ushort16 __ovld __cnfn sub_sat(ushort16, ushort16);
9846int __ovld __cnfn sub_sat(int, int);
9847uint __ovld __cnfn sub_sat(uint, uint);
9848int2 __ovld __cnfn sub_sat(int2, int2);
9849uint2 __ovld __cnfn sub_sat(uint2, uint2);
9850int3 __ovld __cnfn sub_sat(int3, int3);
9851uint3 __ovld __cnfn sub_sat(uint3, uint3);
9852int4 __ovld __cnfn sub_sat(int4, int4);
9853uint4 __ovld __cnfn sub_sat(uint4, uint4);
9854int8 __ovld __cnfn sub_sat(int8, int8);
9855uint8 __ovld __cnfn sub_sat(uint8, uint8);
9856int16 __ovld __cnfn sub_sat(int16, int16);
9857uint16 __ovld __cnfn sub_sat(uint16, uint16);
9858long __ovld __cnfn sub_sat(long, long);
9859ulong __ovld __cnfn sub_sat(ulong, ulong);
9860long2 __ovld __cnfn sub_sat(long2, long2);
9861ulong2 __ovld __cnfn sub_sat(ulong2, ulong2);
9862long3 __ovld __cnfn sub_sat(long3, long3);
9863ulong3 __ovld __cnfn sub_sat(ulong3, ulong3);
9864long4 __ovld __cnfn sub_sat(long4, long4);
9865ulong4 __ovld __cnfn sub_sat(ulong4, ulong4);
9866long8 __ovld __cnfn sub_sat(long8, long8);
9867ulong8 __ovld __cnfn sub_sat(ulong8, ulong8);
9868long16 __ovld __cnfn sub_sat(long16, long16);
9869ulong16 __ovld __cnfn sub_sat(ulong16, ulong16);
9870
9871/**
9872 * result[i] = ((short)hi[i] << 8) | lo[i]
9873 * result[i] = ((ushort)hi[i] << 8) | lo[i]
9874 */
9875short __ovld __cnfn upsample(char, uchar);
9876ushort __ovld __cnfn upsample(uchar, uchar);
9877short2 __ovld __cnfn upsample(char2, uchar2);
9878short3 __ovld __cnfn upsample(char3, uchar3);
9879short4 __ovld __cnfn upsample(char4, uchar4);
9880short8 __ovld __cnfn upsample(char8, uchar8);
9881short16 __ovld __cnfn upsample(char16, uchar16);
9882ushort2 __ovld __cnfn upsample(uchar2, uchar2);
9883ushort3 __ovld __cnfn upsample(uchar3, uchar3);
9884ushort4 __ovld __cnfn upsample(uchar4, uchar4);
9885ushort8 __ovld __cnfn upsample(uchar8, uchar8);
9886ushort16 __ovld __cnfn upsample(uchar16, uchar16);
9887
9888/**
9889 * result[i] = ((int)hi[i] << 16) | lo[i]
9890 * result[i] = ((uint)hi[i] << 16) | lo[i]
9891 */
9892int __ovld __cnfn upsample(short, ushort);
9893uint __ovld __cnfn upsample(ushort, ushort);
9894int2 __ovld __cnfn upsample(short2, ushort2);
9895int3 __ovld __cnfn upsample(short3, ushort3);
9896int4 __ovld __cnfn upsample(short4, ushort4);
9897int8 __ovld __cnfn upsample(short8, ushort8);
9898int16 __ovld __cnfn upsample(short16, ushort16);
9899uint2 __ovld __cnfn upsample(ushort2, ushort2);
9900uint3 __ovld __cnfn upsample(ushort3, ushort3);
9901uint4 __ovld __cnfn upsample(ushort4, ushort4);
9902uint8 __ovld __cnfn upsample(ushort8, ushort8);
9903uint16 __ovld __cnfn upsample(ushort16, ushort16);
9904/**
9905 * result[i] = ((long)hi[i] << 32) | lo[i]
9906 * result[i] = ((ulong)hi[i] << 32) | lo[i]
9907 */
9908long __ovld __cnfn upsample(int, uint);
9909ulong __ovld __cnfn upsample(uint, uint);
9910long2 __ovld __cnfn upsample(int2, uint2);
9911long3 __ovld __cnfn upsample(int3, uint3);
9912long4 __ovld __cnfn upsample(int4, uint4);
9913long8 __ovld __cnfn upsample(int8, uint8);
9914long16 __ovld __cnfn upsample(int16, uint16);
9915ulong2 __ovld __cnfn upsample(uint2, uint2);
9916ulong3 __ovld __cnfn upsample(uint3, uint3);
9917ulong4 __ovld __cnfn upsample(uint4, uint4);
9918ulong8 __ovld __cnfn upsample(uint8, uint8);
9919ulong16 __ovld __cnfn upsample(uint16, uint16);
9920
9921/*
9922 * popcount(x): returns the number of set bit in x
9923 */
9924#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_1_2)
9925char __ovld __cnfn popcount(char);
9926uchar __ovld __cnfn popcount(uchar);
9927char2 __ovld __cnfn popcount(char2);
9928uchar2 __ovld __cnfn popcount(uchar2);
9929char3 __ovld __cnfn popcount(char3);
9930uchar3 __ovld __cnfn popcount(uchar3);
9931char4 __ovld __cnfn popcount(char4);
9932uchar4 __ovld __cnfn popcount(uchar4);
9933char8 __ovld __cnfn popcount(char8);
9934uchar8 __ovld __cnfn popcount(uchar8);
9935char16 __ovld __cnfn popcount(char16);
9936uchar16 __ovld __cnfn popcount(uchar16);
9937short __ovld __cnfn popcount(short);
9938ushort __ovld __cnfn popcount(ushort);
9939short2 __ovld __cnfn popcount(short2);
9940ushort2 __ovld __cnfn popcount(ushort2);
9941short3 __ovld __cnfn popcount(short3);
9942ushort3 __ovld __cnfn popcount(ushort3);
9943short4 __ovld __cnfn popcount(short4);
9944ushort4 __ovld __cnfn popcount(ushort4);
9945short8 __ovld __cnfn popcount(short8);
9946ushort8 __ovld __cnfn popcount(ushort8);
9947short16 __ovld __cnfn popcount(short16);
9948ushort16 __ovld __cnfn popcount(ushort16);
9949int __ovld __cnfn popcount(int);
9950uint __ovld __cnfn popcount(uint);
9951int2 __ovld __cnfn popcount(int2);
9952uint2 __ovld __cnfn popcount(uint2);
9953int3 __ovld __cnfn popcount(int3);
9954uint3 __ovld __cnfn popcount(uint3);
9955int4 __ovld __cnfn popcount(int4);
9956uint4 __ovld __cnfn popcount(uint4);
9957int8 __ovld __cnfn popcount(int8);
9958uint8 __ovld __cnfn popcount(uint8);
9959int16 __ovld __cnfn popcount(int16);
9960uint16 __ovld __cnfn popcount(uint16);
9961long __ovld __cnfn popcount(long);
9962ulong __ovld __cnfn popcount(ulong);
9963long2 __ovld __cnfn popcount(long2);
9964ulong2 __ovld __cnfn popcount(ulong2);
9965long3 __ovld __cnfn popcount(long3);
9966ulong3 __ovld __cnfn popcount(ulong3);
9967long4 __ovld __cnfn popcount(long4);
9968ulong4 __ovld __cnfn popcount(ulong4);
9969long8 __ovld __cnfn popcount(long8);
9970ulong8 __ovld __cnfn popcount(ulong8);
9971long16 __ovld __cnfn popcount(long16);
9972ulong16 __ovld __cnfn popcount(ulong16);
9973#endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_1_2)
9974
9975/**
9976 * Multiply two 24-bit integer values x and y and add
9977 * the 32-bit integer result to the 32-bit integer z.
9978 * Refer to definition of mul24 to see how the 24-bit
9979 * integer multiplication is performed.
9980 */
9981int __ovld __cnfn mad24(int, int, int);
9982uint __ovld __cnfn mad24(uint, uint, uint);
9983int2 __ovld __cnfn mad24(int2, int2, int2);
9984uint2 __ovld __cnfn mad24(uint2, uint2, uint2);
9985int3 __ovld __cnfn mad24(int3, int3, int3);
9986uint3 __ovld __cnfn mad24(uint3, uint3, uint3);
9987int4 __ovld __cnfn mad24(int4, int4, int4);
9988uint4 __ovld __cnfn mad24(uint4, uint4, uint4);
9989int8 __ovld __cnfn mad24(int8, int8, int8);
9990uint8 __ovld __cnfn mad24(uint8, uint8, uint8);
9991int16 __ovld __cnfn mad24(int16, int16, int16);
9992uint16 __ovld __cnfn mad24(uint16, uint16, uint16);
9993
9994/**
9995 * Multiply two 24-bit integer values x and y. x and y
9996 * are 32-bit integers but only the low 24-bits are used
9997 * to perform the multiplication. mul24 should only
9998 * be used when values in x and y are in the range [-
9999 * 2^23, 2^23-1] if x and y are signed integers and in the
10000 * range [0, 2^24-1] if x and y are unsigned integers. If
10001 * x and y are not in this range, the multiplication
10002 * result is implementation-defined.
10003 */
10004int __ovld __cnfn mul24(int, int);
10005uint __ovld __cnfn mul24(uint, uint);
10006int2 __ovld __cnfn mul24(int2, int2);
10007uint2 __ovld __cnfn mul24(uint2, uint2);
10008int3 __ovld __cnfn mul24(int3, int3);
10009uint3 __ovld __cnfn mul24(uint3, uint3);
10010int4 __ovld __cnfn mul24(int4, int4);
10011uint4 __ovld __cnfn mul24(uint4, uint4);
10012int8 __ovld __cnfn mul24(int8, int8);
10013uint8 __ovld __cnfn mul24(uint8, uint8);
10014int16 __ovld __cnfn mul24(int16, int16);
10015uint16 __ovld __cnfn mul24(uint16, uint16);
10016
10017// OpenCL v1.1 s6.11.4, v1.2 s6.12.4, v2.0 s6.13.4 - Common Functions
10018
10019/**
10020 * Returns fmin(fmax(x, minval), maxval).
10021 * Results are undefined if minval > maxval.
10022 */
10023float __ovld __cnfn clamp(float, float, float);
10024float2 __ovld __cnfn clamp(float2, float2, float2);
10025float3 __ovld __cnfn clamp(float3, float3, float3);
10026float4 __ovld __cnfn clamp(float4, float4, float4);
10027float8 __ovld __cnfn clamp(float8, float8, float8);
10028float16 __ovld __cnfn clamp(float16, float16, float16);
10029float2 __ovld __cnfn clamp(float2, float, float);
10030float3 __ovld __cnfn clamp(float3, float, float);
10031float4 __ovld __cnfn clamp(float4, float, float);
10032float8 __ovld __cnfn clamp(float8, float, float);
10033float16 __ovld __cnfn clamp(float16, float, float);
10034#ifdef cl_khr_fp64
10035double __ovld __cnfn clamp(double, double, double);
10036double2 __ovld __cnfn clamp(double2, double2, double2);
10037double3 __ovld __cnfn clamp(double3, double3, double3);
10038double4 __ovld __cnfn clamp(double4, double4, double4);
10039double8 __ovld __cnfn clamp(double8, double8, double8);
10040double16 __ovld __cnfn clamp(double16, double16, double16);
10041double2 __ovld __cnfn clamp(double2, double, double);
10042double3 __ovld __cnfn clamp(double3, double, double);
10043double4 __ovld __cnfn clamp(double4, double, double);
10044double8 __ovld __cnfn clamp(double8, double, double);
10045double16 __ovld __cnfn clamp(double16, double, double);
10046#endif //cl_khr_fp64
10047#ifdef cl_khr_fp16
10048half __ovld __cnfn clamp(half, half, half);
10049half2 __ovld __cnfn clamp(half2, half2, half2);
10050half3 __ovld __cnfn clamp(half3, half3, half3);
10051half4 __ovld __cnfn clamp(half4, half4, half4);
10052half8 __ovld __cnfn clamp(half8, half8, half8);
10053half16 __ovld __cnfn clamp(half16, half16, half16);
10054half2 __ovld __cnfn clamp(half2, half, half);
10055half3 __ovld __cnfn clamp(half3, half, half);
10056half4 __ovld __cnfn clamp(half4, half, half);
10057half8 __ovld __cnfn clamp(half8, half, half);
10058half16 __ovld __cnfn clamp(half16, half, half);
10059#endif //cl_khr_fp16
10060
10061/**
10062 * Converts radians to degrees, i.e. (180 / PI) *
10063 * radians.
10064 */
10065float __ovld __cnfn degrees(float);
10066float2 __ovld __cnfn degrees(float2);
10067float3 __ovld __cnfn degrees(float3);
10068float4 __ovld __cnfn degrees(float4);
10069float8 __ovld __cnfn degrees(float8);
10070float16 __ovld __cnfn degrees(float16);
10071#ifdef cl_khr_fp64
10072double __ovld __cnfn degrees(double);
10073double2 __ovld __cnfn degrees(double2);
10074double3 __ovld __cnfn degrees(double3);
10075double4 __ovld __cnfn degrees(double4);
10076double8 __ovld __cnfn degrees(double8);
10077double16 __ovld __cnfn degrees(double16);
10078#endif //cl_khr_fp64
10079#ifdef cl_khr_fp16
10080half __ovld __cnfn degrees(half);
10081half2 __ovld __cnfn degrees(half2);
10082half3 __ovld __cnfn degrees(half3);
10083half4 __ovld __cnfn degrees(half4);
10084half8 __ovld __cnfn degrees(half8);
10085half16 __ovld __cnfn degrees(half16);
10086#endif //cl_khr_fp16
10087
10088/**
10089 * Returns y if x < y, otherwise it returns x. If x and y
10090 * are infinite or NaN, the return values are undefined.
10091 */
10092float __ovld __cnfn max(float, float);
10093float2 __ovld __cnfn max(float2, float2);
10094float3 __ovld __cnfn max(float3, float3);
10095float4 __ovld __cnfn max(float4, float4);
10096float8 __ovld __cnfn max(float8, float8);
10097float16 __ovld __cnfn max(float16, float16);
10098float2 __ovld __cnfn max(float2, float);
10099float3 __ovld __cnfn max(float3, float);
10100float4 __ovld __cnfn max(float4, float);
10101float8 __ovld __cnfn max(float8, float);
10102float16 __ovld __cnfn max(float16, float);
10103#ifdef cl_khr_fp64
10104double __ovld __cnfn max(double, double);
10105double2 __ovld __cnfn max(double2, double2);
10106double3 __ovld __cnfn max(double3, double3);
10107double4 __ovld __cnfn max(double4, double4);
10108double8 __ovld __cnfn max(double8, double8);
10109double16 __ovld __cnfn max(double16, double16);
10110double2 __ovld __cnfn max(double2, double);
10111double3 __ovld __cnfn max(double3, double);
10112double4 __ovld __cnfn max(double4, double);
10113double8 __ovld __cnfn max(double8, double);
10114double16 __ovld __cnfn max(double16, double);
10115#endif //cl_khr_fp64
10116#ifdef cl_khr_fp16
10117half __ovld __cnfn max(half, half);
10118half2 __ovld __cnfn max(half2, half2);
10119half3 __ovld __cnfn max(half3, half3);
10120half4 __ovld __cnfn max(half4, half4);
10121half8 __ovld __cnfn max(half8, half8);
10122half16 __ovld __cnfn max(half16, half16);
10123half2 __ovld __cnfn max(half2, half);
10124half3 __ovld __cnfn max(half3, half);
10125half4 __ovld __cnfn max(half4, half);
10126half8 __ovld __cnfn max(half8, half);
10127half16 __ovld __cnfn max(half16, half);
10128#endif //cl_khr_fp16
10129
10130/**
10131 * Returns y if y < x, otherwise it returns x. If x and y
10132 * are infinite or NaN, the return values are undefined.
10133 */
10134float __ovld __cnfn min(float, float);
10135float2 __ovld __cnfn min(float2, float2);
10136float3 __ovld __cnfn min(float3, float3);
10137float4 __ovld __cnfn min(float4, float4);
10138float8 __ovld __cnfn min(float8, float8);
10139float16 __ovld __cnfn min(float16, float16);
10140float2 __ovld __cnfn min(float2, float);
10141float3 __ovld __cnfn min(float3, float);
10142float4 __ovld __cnfn min(float4, float);
10143float8 __ovld __cnfn min(float8, float);
10144float16 __ovld __cnfn min(float16, float);
10145#ifdef cl_khr_fp64
10146double __ovld __cnfn min(double, double);
10147double2 __ovld __cnfn min(double2, double2);
10148double3 __ovld __cnfn min(double3, double3);
10149double4 __ovld __cnfn min(double4, double4);
10150double8 __ovld __cnfn min(double8, double8);
10151double16 __ovld __cnfn min(double16, double16);
10152double2 __ovld __cnfn min(double2, double);
10153double3 __ovld __cnfn min(double3, double);
10154double4 __ovld __cnfn min(double4, double);
10155double8 __ovld __cnfn min(double8, double);
10156double16 __ovld __cnfn min(double16, double);
10157#endif //cl_khr_fp64
10158#ifdef cl_khr_fp16
10159half __ovld __cnfn min(half, half);
10160half2 __ovld __cnfn min(half2, half2);
10161half3 __ovld __cnfn min(half3, half3);
10162half4 __ovld __cnfn min(half4, half4);
10163half8 __ovld __cnfn min(half8, half8);
10164half16 __ovld __cnfn min(half16, half16);
10165half2 __ovld __cnfn min(half2, half);
10166half3 __ovld __cnfn min(half3, half);
10167half4 __ovld __cnfn min(half4, half);
10168half8 __ovld __cnfn min(half8, half);
10169half16 __ovld __cnfn min(half16, half);
10170#endif //cl_khr_fp16
10171
10172/**
10173 * Returns the linear blend of x & y implemented as:
10174 * x + (y - x) * a
10175 * a must be a value in the range 0.0 ... 1.0. If a is not
10176 * in the range 0.0 ... 1.0, the return values are
10177 * undefined.
10178 */
10179float __ovld __cnfn mix(float, float, float);
10180float2 __ovld __cnfn mix(float2, float2, float2);
10181float3 __ovld __cnfn mix(float3, float3, float3);
10182float4 __ovld __cnfn mix(float4, float4, float4);
10183float8 __ovld __cnfn mix(float8, float8, float8);
10184float16 __ovld __cnfn mix(float16, float16, float16);
10185float2 __ovld __cnfn mix(float2, float2, float);
10186float3 __ovld __cnfn mix(float3, float3, float);
10187float4 __ovld __cnfn mix(float4, float4, float);
10188float8 __ovld __cnfn mix(float8, float8, float);
10189float16 __ovld __cnfn mix(float16, float16, float);
10190#ifdef cl_khr_fp64
10191double __ovld __cnfn mix(double, double, double);
10192double2 __ovld __cnfn mix(double2, double2, double2);
10193double3 __ovld __cnfn mix(double3, double3, double3);
10194double4 __ovld __cnfn mix(double4, double4, double4);
10195double8 __ovld __cnfn mix(double8, double8, double8);
10196double16 __ovld __cnfn mix(double16, double16, double16);
10197double2 __ovld __cnfn mix(double2, double2, double);
10198double3 __ovld __cnfn mix(double3, double3, double);
10199double4 __ovld __cnfn mix(double4, double4, double);
10200double8 __ovld __cnfn mix(double8, double8, double);
10201double16 __ovld __cnfn mix(double16, double16, double);
10202#endif //cl_khr_fp64
10203#ifdef cl_khr_fp16
10204half __ovld __cnfn mix(half, half, half);
10205half2 __ovld __cnfn mix(half2, half2, half2);
10206half3 __ovld __cnfn mix(half3, half3, half3);
10207half4 __ovld __cnfn mix(half4, half4, half4);
10208half8 __ovld __cnfn mix(half8, half8, half8);
10209half16 __ovld __cnfn mix(half16, half16, half16);
10210half2 __ovld __cnfn mix(half2, half2, half);
10211half3 __ovld __cnfn mix(half3, half3, half);
10212half4 __ovld __cnfn mix(half4, half4, half);
10213half8 __ovld __cnfn mix(half8, half8, half);
10214half16 __ovld __cnfn mix(half16, half16, half);
10215#endif //cl_khr_fp16
10216
10217/**
10218 * Converts degrees to radians, i.e. (PI / 180) *
10219 * degrees.
10220 */
10221float __ovld __cnfn radians(float);
10222float2 __ovld __cnfn radians(float2);
10223float3 __ovld __cnfn radians(float3);
10224float4 __ovld __cnfn radians(float4);
10225float8 __ovld __cnfn radians(float8);
10226float16 __ovld __cnfn radians(float16);
10227#ifdef cl_khr_fp64
10228double __ovld __cnfn radians(double);
10229double2 __ovld __cnfn radians(double2);
10230double3 __ovld __cnfn radians(double3);
10231double4 __ovld __cnfn radians(double4);
10232double8 __ovld __cnfn radians(double8);
10233double16 __ovld __cnfn radians(double16);
10234#endif //cl_khr_fp64
10235#ifdef cl_khr_fp16
10236half __ovld __cnfn radians(half);
10237half2 __ovld __cnfn radians(half2);
10238half3 __ovld __cnfn radians(half3);
10239half4 __ovld __cnfn radians(half4);
10240half8 __ovld __cnfn radians(half8);
10241half16 __ovld __cnfn radians(half16);
10242#endif //cl_khr_fp16
10243
10244/**
10245 * Returns 0.0 if x < edge, otherwise it returns 1.0.
10246 */
10247float __ovld __cnfn step(float, float);
10248float2 __ovld __cnfn step(float2, float2);
10249float3 __ovld __cnfn step(float3, float3);
10250float4 __ovld __cnfn step(float4, float4);
10251float8 __ovld __cnfn step(float8, float8);
10252float16 __ovld __cnfn step(float16, float16);
10253float2 __ovld __cnfn step(float, float2);
10254float3 __ovld __cnfn step(float, float3);
10255float4 __ovld __cnfn step(float, float4);
10256float8 __ovld __cnfn step(float, float8);
10257float16 __ovld __cnfn step(float, float16);
10258#ifdef cl_khr_fp64
10259double __ovld __cnfn step(double, double);
10260double2 __ovld __cnfn step(double2, double2);
10261double3 __ovld __cnfn step(double3, double3);
10262double4 __ovld __cnfn step(double4, double4);
10263double8 __ovld __cnfn step(double8, double8);
10264double16 __ovld __cnfn step(double16, double16);
10265double2 __ovld __cnfn step(double, double2);
10266double3 __ovld __cnfn step(double, double3);
10267double4 __ovld __cnfn step(double, double4);
10268double8 __ovld __cnfn step(double, double8);
10269double16 __ovld __cnfn step(double, double16);
10270#endif //cl_khr_fp64
10271#ifdef cl_khr_fp16
10272half __ovld __cnfn step(half, half);
10273half2 __ovld __cnfn step(half2, half2);
10274half3 __ovld __cnfn step(half3, half3);
10275half4 __ovld __cnfn step(half4, half4);
10276half8 __ovld __cnfn step(half8, half8);
10277half16 __ovld __cnfn step(half16, half16);
10278half2 __ovld __cnfn step(half, half2);
10279half3 __ovld __cnfn step(half, half3);
10280half4 __ovld __cnfn step(half, half4);
10281half8 __ovld __cnfn step(half, half8);
10282half16 __ovld __cnfn step(half, half16);
10283#endif //cl_khr_fp16
10284
10285/**
10286 * Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and
10287 * performs smooth Hermite interpolation between 0
10288 * and 1when edge0 < x < edge1. This is useful in
10289 * cases where you would want a threshold function
10290 * with a smooth transition.
10291 * This is equivalent to:
10292 * gentype t;
10293 * t = clamp ((x - edge0) / (edge1 - edge0), 0, 1);
10294 * return t * t * (3 - 2 * t);
10295 * Results are undefined if edge0 >= edge1 or if x,
10296 * edge0 or edge1 is a NaN.
10297 */
10298float __ovld __cnfn smoothstep(float, float, float);
10299float2 __ovld __cnfn smoothstep(float2, float2, float2);
10300float3 __ovld __cnfn smoothstep(float3, float3, float3);
10301float4 __ovld __cnfn smoothstep(float4, float4, float4);
10302float8 __ovld __cnfn smoothstep(float8, float8, float8);
10303float16 __ovld __cnfn smoothstep(float16, float16, float16);
10304float2 __ovld __cnfn smoothstep(float, float, float2);
10305float3 __ovld __cnfn smoothstep(float, float, float3);
10306float4 __ovld __cnfn smoothstep(float, float, float4);
10307float8 __ovld __cnfn smoothstep(float, float, float8);
10308float16 __ovld __cnfn smoothstep(float, float, float16);
10309#ifdef cl_khr_fp64
10310double __ovld __cnfn smoothstep(double, double, double);
10311double2 __ovld __cnfn smoothstep(double2, double2, double2);
10312double3 __ovld __cnfn smoothstep(double3, double3, double3);
10313double4 __ovld __cnfn smoothstep(double4, double4, double4);
10314double8 __ovld __cnfn smoothstep(double8, double8, double8);
10315double16 __ovld __cnfn smoothstep(double16, double16, double16);
10316double2 __ovld __cnfn smoothstep(double, double, double2);
10317double3 __ovld __cnfn smoothstep(double, double, double3);
10318double4 __ovld __cnfn smoothstep(double, double, double4);
10319double8 __ovld __cnfn smoothstep(double, double, double8);
10320double16 __ovld __cnfn smoothstep(double, double, double16);
10321#endif //cl_khr_fp64
10322#ifdef cl_khr_fp16
10323half __ovld __cnfn smoothstep(half, half, half);
10324half2 __ovld __cnfn smoothstep(half2, half2, half2);
10325half3 __ovld __cnfn smoothstep(half3, half3, half3);
10326half4 __ovld __cnfn smoothstep(half4, half4, half4);
10327half8 __ovld __cnfn smoothstep(half8, half8, half8);
10328half16 __ovld __cnfn smoothstep(half16, half16, half16);
10329half2 __ovld __cnfn smoothstep(half, half, half2);
10330half3 __ovld __cnfn smoothstep(half, half, half3);
10331half4 __ovld __cnfn smoothstep(half, half, half4);
10332half8 __ovld __cnfn smoothstep(half, half, half8);
10333half16 __ovld __cnfn smoothstep(half, half, half16);
10334#endif //cl_khr_fp16
10335
10336/**
10337 * Returns 1.0 if x > 0, -0.0 if x = -0.0, +0.0 if x =
10338 * +0.0, or -1.0 if x < 0. Returns 0.0 if x is a NaN.
10339 */
10340float __ovld __cnfn sign(float);
10341float2 __ovld __cnfn sign(float2);
10342float3 __ovld __cnfn sign(float3);
10343float4 __ovld __cnfn sign(float4);
10344float8 __ovld __cnfn sign(float8);
10345float16 __ovld __cnfn sign(float16);
10346#ifdef cl_khr_fp64
10347double __ovld __cnfn sign(double);
10348double2 __ovld __cnfn sign(double2);
10349double3 __ovld __cnfn sign(double3);
10350double4 __ovld __cnfn sign(double4);
10351double8 __ovld __cnfn sign(double8);
10352double16 __ovld __cnfn sign(double16);
10353#endif //cl_khr_fp64
10354#ifdef cl_khr_fp16
10355half __ovld __cnfn sign(half);
10356half2 __ovld __cnfn sign(half2);
10357half3 __ovld __cnfn sign(half3);
10358half4 __ovld __cnfn sign(half4);
10359half8 __ovld __cnfn sign(half8);
10360half16 __ovld __cnfn sign(half16);
10361#endif //cl_khr_fp16
10362
10363// OpenCL v1.1 s6.11.5, v1.2 s6.12.5, v2.0 s6.13.5 - Geometric Functions
10364
10365/**
10366 * Returns the cross product of p0.xyz and p1.xyz. The
10367 * w component of float4 result returned will be 0.0.
10368 */
10369float4 __ovld __cnfn cross(float4, float4);
10370float3 __ovld __cnfn cross(float3, float3);
10371#ifdef cl_khr_fp64
10372double4 __ovld __cnfn cross(double4, double4);
10373double3 __ovld __cnfn cross(double3, double3);
10374#endif //cl_khr_fp64
10375#ifdef cl_khr_fp16
10376half4 __ovld __cnfn cross(half4, half4);
10377half3 __ovld __cnfn cross(half3, half3);
10378#endif //cl_khr_fp16
10379
10380/**
10381 * Compute dot product.
10382 */
10383float __ovld __cnfn dot(float, float);
10384float __ovld __cnfn dot(float2, float2);
10385float __ovld __cnfn dot(float3, float3);
10386float __ovld __cnfn dot(float4, float4);
10387#ifdef cl_khr_fp64
10388double __ovld __cnfn dot(double, double);
10389double __ovld __cnfn dot(double2, double2);
10390double __ovld __cnfn dot(double3, double3);
10391double __ovld __cnfn dot(double4, double4);
10392#endif //cl_khr_fp64
10393#ifdef cl_khr_fp16
10394half __ovld __cnfn dot(half, half);
10395half __ovld __cnfn dot(half2, half2);
10396half __ovld __cnfn dot(half3, half3);
10397half __ovld __cnfn dot(half4, half4);
10398#endif //cl_khr_fp16
10399
10400/**
10401 * Returns the distance between p0 and p1. This is
10402 * calculated as length(p0 - p1).
10403 */
10404float __ovld __cnfn distance(float, float);
10405float __ovld __cnfn distance(float2, float2);
10406float __ovld __cnfn distance(float3, float3);
10407float __ovld __cnfn distance(float4, float4);
10408#ifdef cl_khr_fp64
10409double __ovld __cnfn distance(double, double);
10410double __ovld __cnfn distance(double2, double2);
10411double __ovld __cnfn distance(double3, double3);
10412double __ovld __cnfn distance(double4, double4);
10413#endif //cl_khr_fp64
10414#ifdef cl_khr_fp16
10415half __ovld __cnfn distance(half, half);
10416half __ovld __cnfn distance(half2, half2);
10417half __ovld __cnfn distance(half3, half3);
10418half __ovld __cnfn distance(half4, half4);
10419#endif //cl_khr_fp16
10420
10421/**
10422 * Return the length of vector p, i.e.,
10423 * sqrt(p.x2 + p.y 2 + ...)
10424 */
10425float __ovld __cnfn length(float);
10426float __ovld __cnfn length(float2);
10427float __ovld __cnfn length(float3);
10428float __ovld __cnfn length(float4);
10429#ifdef cl_khr_fp64
10430double __ovld __cnfn length(double);
10431double __ovld __cnfn length(double2);
10432double __ovld __cnfn length(double3);
10433double __ovld __cnfn length(double4);
10434#endif //cl_khr_fp64
10435#ifdef cl_khr_fp16
10436half __ovld __cnfn length(half);
10437half __ovld __cnfn length(half2);
10438half __ovld __cnfn length(half3);
10439half __ovld __cnfn length(half4);
10440#endif //cl_khr_fp16
10441
10442/**
10443 * Returns a vector in the same direction as p but with a
10444 * length of 1.
10445 */
10446float __ovld __cnfn normalize(float);
10447float2 __ovld __cnfn normalize(float2);
10448float3 __ovld __cnfn normalize(float3);
10449float4 __ovld __cnfn normalize(float4);
10450#ifdef cl_khr_fp64
10451double __ovld __cnfn normalize(double);
10452double2 __ovld __cnfn normalize(double2);
10453double3 __ovld __cnfn normalize(double3);
10454double4 __ovld __cnfn normalize(double4);
10455#endif //cl_khr_fp64
10456#ifdef cl_khr_fp16
10457half __ovld __cnfn normalize(half);
10458half2 __ovld __cnfn normalize(half2);
10459half3 __ovld __cnfn normalize(half3);
10460half4 __ovld __cnfn normalize(half4);
10461#endif //cl_khr_fp16
10462
10463/**
10464 * Returns fast_length(p0 - p1).
10465 */
10466float __ovld __cnfn fast_distance(float, float);
10467float __ovld __cnfn fast_distance(float2, float2);
10468float __ovld __cnfn fast_distance(float3, float3);
10469float __ovld __cnfn fast_distance(float4, float4);
10470
10471/**
10472 * Returns the length of vector p computed as:
10473 * half_sqrt(p.x2 + p.y2 + ...)
10474 */
10475float __ovld __cnfn fast_length(float);
10476float __ovld __cnfn fast_length(float2);
10477float __ovld __cnfn fast_length(float3);
10478float __ovld __cnfn fast_length(float4);
10479
10480/**
10481 * Returns a vector in the same direction as p but with a
10482 * length of 1. fast_normalize is computed as:
10483 * p * half_rsqrt (p.x^2 + p.y^2 + ... )
10484 * The result shall be within 8192 ulps error from the
10485 * infinitely precise result of
10486 * if (all(p == 0.0f))
10487 * result = p;
10488 * else
10489 * result = p / sqrt (p.x^2 + p.y^2 + ...);
10490 * with the following exceptions:
10491 * 1) If the sum of squares is greater than FLT_MAX
10492 * then the value of the floating-point values in the
10493 * result vector are undefined.
10494 * 2) If the sum of squares is less than FLT_MIN then
10495 * the implementation may return back p.
10496 * 3) If the device is in "denorms are flushed to zero"
10497 * mode, individual operand elements with magnitude
10498 * less than sqrt(FLT_MIN) may be flushed to zero
10499 * before proceeding with the calculation.
10500 */
10501float __ovld __cnfn fast_normalize(float);
10502float2 __ovld __cnfn fast_normalize(float2);
10503float3 __ovld __cnfn fast_normalize(float3);
10504float4 __ovld __cnfn fast_normalize(float4);
10505
10506// OpenCL v1.1 s6.11.6, v1.2 s6.12.6, v2.0 s6.13.6 - Relational Functions
10507
10508/**
10509 * intn isequal (floatn x, floatn y)
10510 * Returns the component-wise compare of x == y.
10511 */
10512int __ovld __cnfn isequal(float, float);
10513int2 __ovld __cnfn isequal(float2, float2);
10514int3 __ovld __cnfn isequal(float3, float3);
10515int4 __ovld __cnfn isequal(float4, float4);
10516int8 __ovld __cnfn isequal(float8, float8);
10517int16 __ovld __cnfn isequal(float16, float16);
10518#ifdef cl_khr_fp64
10519int __ovld __cnfn isequal(double, double);
10520long2 __ovld __cnfn isequal(double2, double2);
10521long3 __ovld __cnfn isequal(double3, double3);
10522long4 __ovld __cnfn isequal(double4, double4);
10523long8 __ovld __cnfn isequal(double8, double8);
10524long16 __ovld __cnfn isequal(double16, double16);
10525#endif //cl_khr_fp64
10526#ifdef cl_khr_fp16
10527int __ovld __cnfn isequal(half, half);
10528short2 __ovld __cnfn isequal(half2, half2);
10529short3 __ovld __cnfn isequal(half3, half3);
10530short4 __ovld __cnfn isequal(half4, half4);
10531short8 __ovld __cnfn isequal(half8, half8);
10532short16 __ovld __cnfn isequal(half16, half16);
10533#endif //cl_khr_fp16
10534
10535/**
10536 * Returns the component-wise compare of x != y.
10537 */
10538int __ovld __cnfn isnotequal(float, float);
10539int2 __ovld __cnfn isnotequal(float2, float2);
10540int3 __ovld __cnfn isnotequal(float3, float3);
10541int4 __ovld __cnfn isnotequal(float4, float4);
10542int8 __ovld __cnfn isnotequal(float8, float8);
10543int16 __ovld __cnfn isnotequal(float16, float16);
10544#ifdef cl_khr_fp64
10545int __ovld __cnfn isnotequal(double, double);
10546long2 __ovld __cnfn isnotequal(double2, double2);
10547long3 __ovld __cnfn isnotequal(double3, double3);
10548long4 __ovld __cnfn isnotequal(double4, double4);
10549long8 __ovld __cnfn isnotequal(double8, double8);
10550long16 __ovld __cnfn isnotequal(double16, double16);
10551#endif //cl_khr_fp64
10552#ifdef cl_khr_fp16
10553int __ovld __cnfn isnotequal(half, half);
10554short2 __ovld __cnfn isnotequal(half2, half2);
10555short3 __ovld __cnfn isnotequal(half3, half3);
10556short4 __ovld __cnfn isnotequal(half4, half4);
10557short8 __ovld __cnfn isnotequal(half8, half8);
10558short16 __ovld __cnfn isnotequal(half16, half16);
10559#endif //cl_khr_fp16
10560
10561/**
10562 * Returns the component-wise compare of x > y.
10563 */
10564int __ovld __cnfn isgreater(float, float);
10565int2 __ovld __cnfn isgreater(float2, float2);
10566int3 __ovld __cnfn isgreater(float3, float3);
10567int4 __ovld __cnfn isgreater(float4, float4);
10568int8 __ovld __cnfn isgreater(float8, float8);
10569int16 __ovld __cnfn isgreater(float16, float16);
10570#ifdef cl_khr_fp64
10571int __ovld __cnfn isgreater(double, double);
10572long2 __ovld __cnfn isgreater(double2, double2);
10573long3 __ovld __cnfn isgreater(double3, double3);
10574long4 __ovld __cnfn isgreater(double4, double4);
10575long8 __ovld __cnfn isgreater(double8, double8);
10576long16 __ovld __cnfn isgreater(double16, double16);
10577#endif //cl_khr_fp64
10578#ifdef cl_khr_fp16
10579int __ovld __cnfn isgreater(half, half);
10580short2 __ovld __cnfn isgreater(half2, half2);
10581short3 __ovld __cnfn isgreater(half3, half3);
10582short4 __ovld __cnfn isgreater(half4, half4);
10583short8 __ovld __cnfn isgreater(half8, half8);
10584short16 __ovld __cnfn isgreater(half16, half16);
10585#endif //cl_khr_fp16
10586
10587/**
10588 * Returns the component-wise compare of x >= y.
10589 */
10590int __ovld __cnfn isgreaterequal(float, float);
10591int2 __ovld __cnfn isgreaterequal(float2, float2);
10592int3 __ovld __cnfn isgreaterequal(float3, float3);
10593int4 __ovld __cnfn isgreaterequal(float4, float4);
10594int8 __ovld __cnfn isgreaterequal(float8, float8);
10595int16 __ovld __cnfn isgreaterequal(float16, float16);
10596#ifdef cl_khr_fp64
10597int __ovld __cnfn isgreaterequal(double, double);
10598long2 __ovld __cnfn isgreaterequal(double2, double2);
10599long3 __ovld __cnfn isgreaterequal(double3, double3);
10600long4 __ovld __cnfn isgreaterequal(double4, double4);
10601long8 __ovld __cnfn isgreaterequal(double8, double8);
10602long16 __ovld __cnfn isgreaterequal(double16, double16);
10603#endif //cl_khr_fp64
10604#ifdef cl_khr_fp16
10605int __ovld __cnfn isgreaterequal(half, half);
10606short2 __ovld __cnfn isgreaterequal(half2, half2);
10607short3 __ovld __cnfn isgreaterequal(half3, half3);
10608short4 __ovld __cnfn isgreaterequal(half4, half4);
10609short8 __ovld __cnfn isgreaterequal(half8, half8);
10610short16 __ovld __cnfn isgreaterequal(half16, half16);
10611#endif //cl_khr_fp16
10612
10613/**
10614 * Returns the component-wise compare of x < y.
10615 */
10616int __ovld __cnfn isless(float, float);
10617int2 __ovld __cnfn isless(float2, float2);
10618int3 __ovld __cnfn isless(float3, float3);
10619int4 __ovld __cnfn isless(float4, float4);
10620int8 __ovld __cnfn isless(float8, float8);
10621int16 __ovld __cnfn isless(float16, float16);
10622#ifdef cl_khr_fp64
10623int __ovld __cnfn isless(double, double);
10624long2 __ovld __cnfn isless(double2, double2);
10625long3 __ovld __cnfn isless(double3, double3);
10626long4 __ovld __cnfn isless(double4, double4);
10627long8 __ovld __cnfn isless(double8, double8);
10628long16 __ovld __cnfn isless(double16, double16);
10629#endif //cl_khr_fp64
10630#ifdef cl_khr_fp16
10631int __ovld __cnfn isless(half, half);
10632short2 __ovld __cnfn isless(half2, half2);
10633short3 __ovld __cnfn isless(half3, half3);
10634short4 __ovld __cnfn isless(half4, half4);
10635short8 __ovld __cnfn isless(half8, half8);
10636short16 __ovld __cnfn isless(half16, half16);
10637#endif //cl_khr_fp16
10638
10639/**
10640 * Returns the component-wise compare of x <= y.
10641 */
10642int __ovld __cnfn islessequal(float, float);
10643int2 __ovld __cnfn islessequal(float2, float2);
10644int3 __ovld __cnfn islessequal(float3, float3);
10645int4 __ovld __cnfn islessequal(float4, float4);
10646int8 __ovld __cnfn islessequal(float8, float8);
10647int16 __ovld __cnfn islessequal(float16, float16);
10648#ifdef cl_khr_fp64
10649int __ovld __cnfn islessequal(double, double);
10650long2 __ovld __cnfn islessequal(double2, double2);
10651long3 __ovld __cnfn islessequal(double3, double3);
10652long4 __ovld __cnfn islessequal(double4, double4);
10653long8 __ovld __cnfn islessequal(double8, double8);
10654long16 __ovld __cnfn islessequal(double16, double16);
10655#endif //cl_khr_fp64
10656#ifdef cl_khr_fp16
10657int __ovld __cnfn islessequal(half, half);
10658short2 __ovld __cnfn islessequal(half2, half2);
10659short3 __ovld __cnfn islessequal(half3, half3);
10660short4 __ovld __cnfn islessequal(half4, half4);
10661short8 __ovld __cnfn islessequal(half8, half8);
10662short16 __ovld __cnfn islessequal(half16, half16);
10663#endif //cl_khr_fp16
10664
10665/**
10666 * Returns the component-wise compare of
10667 * (x < y) || (x > y) .
10668 */
10669int __ovld __cnfn islessgreater(float, float);
10670int2 __ovld __cnfn islessgreater(float2, float2);
10671int3 __ovld __cnfn islessgreater(float3, float3);
10672int4 __ovld __cnfn islessgreater(float4, float4);
10673int8 __ovld __cnfn islessgreater(float8, float8);
10674int16 __ovld __cnfn islessgreater(float16, float16);
10675#ifdef cl_khr_fp64
10676int __ovld __cnfn islessgreater(double, double);
10677long2 __ovld __cnfn islessgreater(double2, double2);
10678long3 __ovld __cnfn islessgreater(double3, double3);
10679long4 __ovld __cnfn islessgreater(double4, double4);
10680long8 __ovld __cnfn islessgreater(double8, double8);
10681long16 __ovld __cnfn islessgreater(double16, double16);
10682#endif //cl_khr_fp64
10683#ifdef cl_khr_fp16
10684int __ovld __cnfn islessgreater(half, half);
10685short2 __ovld __cnfn islessgreater(half2, half2);
10686short3 __ovld __cnfn islessgreater(half3, half3);
10687short4 __ovld __cnfn islessgreater(half4, half4);
10688short8 __ovld __cnfn islessgreater(half8, half8);
10689short16 __ovld __cnfn islessgreater(half16, half16);
10690#endif //cl_khr_fp16
10691
10692/**
10693 * Test for finite value.
10694 */
10695int __ovld __cnfn isfinite(float);
10696int2 __ovld __cnfn isfinite(float2);
10697int3 __ovld __cnfn isfinite(float3);
10698int4 __ovld __cnfn isfinite(float4);
10699int8 __ovld __cnfn isfinite(float8);
10700int16 __ovld __cnfn isfinite(float16);
10701#ifdef cl_khr_fp64
10702int __ovld __cnfn isfinite(double);
10703long2 __ovld __cnfn isfinite(double2);
10704long3 __ovld __cnfn isfinite(double3);
10705long4 __ovld __cnfn isfinite(double4);
10706long8 __ovld __cnfn isfinite(double8);
10707long16 __ovld __cnfn isfinite(double16);
10708#endif //cl_khr_fp64
10709#ifdef cl_khr_fp16
10710int __ovld __cnfn isfinite(half);
10711short2 __ovld __cnfn isfinite(half2);
10712short3 __ovld __cnfn isfinite(half3);
10713short4 __ovld __cnfn isfinite(half4);
10714short8 __ovld __cnfn isfinite(half8);
10715short16 __ovld __cnfn isfinite(half16);
10716#endif //cl_khr_fp16
10717
10718/**
10719 * Test for infinity value (+ve or -ve) .
10720 */
10721int __ovld __cnfn isinf(float);
10722int2 __ovld __cnfn isinf(float2);
10723int3 __ovld __cnfn isinf(float3);
10724int4 __ovld __cnfn isinf(float4);
10725int8 __ovld __cnfn isinf(float8);
10726int16 __ovld __cnfn isinf(float16);
10727#ifdef cl_khr_fp64
10728int __ovld __cnfn isinf(double);
10729long2 __ovld __cnfn isinf(double2);
10730long3 __ovld __cnfn isinf(double3);
10731long4 __ovld __cnfn isinf(double4);
10732long8 __ovld __cnfn isinf(double8);
10733long16 __ovld __cnfn isinf(double16);
10734#endif //cl_khr_fp64
10735#ifdef cl_khr_fp16
10736int __ovld __cnfn isinf(half);
10737short2 __ovld __cnfn isinf(half2);
10738short3 __ovld __cnfn isinf(half3);
10739short4 __ovld __cnfn isinf(half4);
10740short8 __ovld __cnfn isinf(half8);
10741short16 __ovld __cnfn isinf(half16);
10742#endif //cl_khr_fp16
10743
10744/**
10745 * Test for a NaN.
10746 */
10747int __ovld __cnfn isnan(float);
10748int2 __ovld __cnfn isnan(float2);
10749int3 __ovld __cnfn isnan(float3);
10750int4 __ovld __cnfn isnan(float4);
10751int8 __ovld __cnfn isnan(float8);
10752int16 __ovld __cnfn isnan(float16);
10753#ifdef cl_khr_fp64
10754int __ovld __cnfn isnan(double);
10755long2 __ovld __cnfn isnan(double2);
10756long3 __ovld __cnfn isnan(double3);
10757long4 __ovld __cnfn isnan(double4);
10758long8 __ovld __cnfn isnan(double8);
10759long16 __ovld __cnfn isnan(double16);
10760#endif //cl_khr_fp64
10761#ifdef cl_khr_fp16
10762int __ovld __cnfn isnan(half);
10763short2 __ovld __cnfn isnan(half2);
10764short3 __ovld __cnfn isnan(half3);
10765short4 __ovld __cnfn isnan(half4);
10766short8 __ovld __cnfn isnan(half8);
10767short16 __ovld __cnfn isnan(half16);
10768#endif //cl_khr_fp16
10769
10770/**
10771 * Test for a normal value.
10772 */
10773int __ovld __cnfn isnormal(float);
10774int2 __ovld __cnfn isnormal(float2);
10775int3 __ovld __cnfn isnormal(float3);
10776int4 __ovld __cnfn isnormal(float4);
10777int8 __ovld __cnfn isnormal(float8);
10778int16 __ovld __cnfn isnormal(float16);
10779#ifdef cl_khr_fp64
10780int __ovld __cnfn isnormal(double);
10781long2 __ovld __cnfn isnormal(double2);
10782long3 __ovld __cnfn isnormal(double3);
10783long4 __ovld __cnfn isnormal(double4);
10784long8 __ovld __cnfn isnormal(double8);
10785long16 __ovld __cnfn isnormal(double16);
10786#endif //cl_khr_fp64
10787#ifdef cl_khr_fp16
10788int __ovld __cnfn isnormal(half);
10789short2 __ovld __cnfn isnormal(half2);
10790short3 __ovld __cnfn isnormal(half3);
10791short4 __ovld __cnfn isnormal(half4);
10792short8 __ovld __cnfn isnormal(half8);
10793short16 __ovld __cnfn isnormal(half16);
10794#endif //cl_khr_fp16
10795
10796/**
10797 * Test if arguments are ordered. isordered() takes
10798 * arguments x and y, and returns the result
10799 * isequal(x, x) && isequal(y, y).
10800 */
10801int __ovld __cnfn isordered(float, float);
10802int2 __ovld __cnfn isordered(float2, float2);
10803int3 __ovld __cnfn isordered(float3, float3);
10804int4 __ovld __cnfn isordered(float4, float4);
10805int8 __ovld __cnfn isordered(float8, float8);
10806int16 __ovld __cnfn isordered(float16, float16);
10807#ifdef cl_khr_fp64
10808int __ovld __cnfn isordered(double, double);
10809long2 __ovld __cnfn isordered(double2, double2);
10810long3 __ovld __cnfn isordered(double3, double3);
10811long4 __ovld __cnfn isordered(double4, double4);
10812long8 __ovld __cnfn isordered(double8, double8);
10813long16 __ovld __cnfn isordered(double16, double16);
10814#endif //cl_khr_fp64
10815#ifdef cl_khr_fp16
10816int __ovld __cnfn isordered(half, half);
10817short2 __ovld __cnfn isordered(half2, half2);
10818short3 __ovld __cnfn isordered(half3, half3);
10819short4 __ovld __cnfn isordered(half4, half4);
10820short8 __ovld __cnfn isordered(half8, half8);
10821short16 __ovld __cnfn isordered(half16, half16);
10822#endif //cl_khr_fp16
10823
10824/**
10825 * Test if arguments are unordered. isunordered()
10826 * takes arguments x and y, returning non-zero if x or y
10827 * is NaN, and zero otherwise.
10828 */
10829int __ovld __cnfn isunordered(float, float);
10830int2 __ovld __cnfn isunordered(float2, float2);
10831int3 __ovld __cnfn isunordered(float3, float3);
10832int4 __ovld __cnfn isunordered(float4, float4);
10833int8 __ovld __cnfn isunordered(float8, float8);
10834int16 __ovld __cnfn isunordered(float16, float16);
10835#ifdef cl_khr_fp64
10836int __ovld __cnfn isunordered(double, double);
10837long2 __ovld __cnfn isunordered(double2, double2);
10838long3 __ovld __cnfn isunordered(double3, double3);
10839long4 __ovld __cnfn isunordered(double4, double4);
10840long8 __ovld __cnfn isunordered(double8, double8);
10841long16 __ovld __cnfn isunordered(double16, double16);
10842#endif //cl_khr_fp64
10843#ifdef cl_khr_fp16
10844int __ovld __cnfn isunordered(half, half);
10845short2 __ovld __cnfn isunordered(half2, half2);
10846short3 __ovld __cnfn isunordered(half3, half3);
10847short4 __ovld __cnfn isunordered(half4, half4);
10848short8 __ovld __cnfn isunordered(half8, half8);
10849short16 __ovld __cnfn isunordered(half16, half16);
10850#endif //cl_khr_fp16
10851
10852/**
10853 * Test for sign bit. The scalar version of the function
10854 * returns a 1 if the sign bit in the float is set else returns
10855 * 0. The vector version of the function returns the
10856 * following for each component in floatn: a -1 if the
10857 * sign bit in the float is set else returns 0.
10858 */
10859int __ovld __cnfn signbit(float);
10860int2 __ovld __cnfn signbit(float2);
10861int3 __ovld __cnfn signbit(float3);
10862int4 __ovld __cnfn signbit(float4);
10863int8 __ovld __cnfn signbit(float8);
10864int16 __ovld __cnfn signbit(float16);
10865#ifdef cl_khr_fp64
10866int __ovld __cnfn signbit(double);
10867long2 __ovld __cnfn signbit(double2);
10868long3 __ovld __cnfn signbit(double3);
10869long4 __ovld __cnfn signbit(double4);
10870long8 __ovld __cnfn signbit(double8);
10871long16 __ovld __cnfn signbit(double16);
10872#endif //cl_khr_fp64
10873#ifdef cl_khr_fp16
10874int __ovld __cnfn signbit(half);
10875short2 __ovld __cnfn signbit(half2);
10876short3 __ovld __cnfn signbit(half3);
10877short4 __ovld __cnfn signbit(half4);
10878short8 __ovld __cnfn signbit(half8);
10879short16 __ovld __cnfn signbit(half16);
10880#endif //cl_khr_fp16
10881
10882/**
10883 * Returns 1 if the most significant bit in any component
10884 * of x is set; otherwise returns 0.
10885 */
10886int __ovld __cnfn any(char);
10887int __ovld __cnfn any(char2);
10888int __ovld __cnfn any(char3);
10889int __ovld __cnfn any(char4);
10890int __ovld __cnfn any(char8);
10891int __ovld __cnfn any(char16);
10892int __ovld __cnfn any(short);
10893int __ovld __cnfn any(short2);
10894int __ovld __cnfn any(short3);
10895int __ovld __cnfn any(short4);
10896int __ovld __cnfn any(short8);
10897int __ovld __cnfn any(short16);
10898int __ovld __cnfn any(int);
10899int __ovld __cnfn any(int2);
10900int __ovld __cnfn any(int3);
10901int __ovld __cnfn any(int4);
10902int __ovld __cnfn any(int8);
10903int __ovld __cnfn any(int16);
10904int __ovld __cnfn any(long);
10905int __ovld __cnfn any(long2);
10906int __ovld __cnfn any(long3);
10907int __ovld __cnfn any(long4);
10908int __ovld __cnfn any(long8);
10909int __ovld __cnfn any(long16);
10910
10911/**
10912 * Returns 1 if the most significant bit in all components
10913 * of x is set; otherwise returns 0.
10914 */
10915int __ovld __cnfn all(char);
10916int __ovld __cnfn all(char2);
10917int __ovld __cnfn all(char3);
10918int __ovld __cnfn all(char4);
10919int __ovld __cnfn all(char8);
10920int __ovld __cnfn all(char16);
10921int __ovld __cnfn all(short);
10922int __ovld __cnfn all(short2);
10923int __ovld __cnfn all(short3);
10924int __ovld __cnfn all(short4);
10925int __ovld __cnfn all(short8);
10926int __ovld __cnfn all(short16);
10927int __ovld __cnfn all(int);
10928int __ovld __cnfn all(int2);
10929int __ovld __cnfn all(int3);
10930int __ovld __cnfn all(int4);
10931int __ovld __cnfn all(int8);
10932int __ovld __cnfn all(int16);
10933int __ovld __cnfn all(long);
10934int __ovld __cnfn all(long2);
10935int __ovld __cnfn all(long3);
10936int __ovld __cnfn all(long4);
10937int __ovld __cnfn all(long8);
10938int __ovld __cnfn all(long16);
10939
10940/**
10941 * Each bit of the result is the corresponding bit of a if
10942 * the corresponding bit of c is 0. Otherwise it is the
10943 * corresponding bit of b.
10944 */
10945char __ovld __cnfn bitselect(char, char, char);
10946uchar __ovld __cnfn bitselect(uchar, uchar, uchar);
10947char2 __ovld __cnfn bitselect(char2, char2, char2);
10948uchar2 __ovld __cnfn bitselect(uchar2, uchar2, uchar2);
10949char3 __ovld __cnfn bitselect(char3, char3, char3);
10950uchar3 __ovld __cnfn bitselect(uchar3, uchar3, uchar3);
10951char4 __ovld __cnfn bitselect(char4, char4, char4);
10952uchar4 __ovld __cnfn bitselect(uchar4, uchar4, uchar4);
10953char8 __ovld __cnfn bitselect(char8, char8, char8);
10954uchar8 __ovld __cnfn bitselect(uchar8, uchar8, uchar8);
10955char16 __ovld __cnfn bitselect(char16, char16, char16);
10956uchar16 __ovld __cnfn bitselect(uchar16, uchar16, uchar16);
10957short __ovld __cnfn bitselect(short, short, short);
10958ushort __ovld __cnfn bitselect(ushort, ushort, ushort);
10959short2 __ovld __cnfn bitselect(short2, short2, short2);
10960ushort2 __ovld __cnfn bitselect(ushort2, ushort2, ushort2);
10961short3 __ovld __cnfn bitselect(short3, short3, short3);
10962ushort3 __ovld __cnfn bitselect(ushort3, ushort3, ushort3);
10963short4 __ovld __cnfn bitselect(short4, short4, short4);
10964ushort4 __ovld __cnfn bitselect(ushort4, ushort4, ushort4);
10965short8 __ovld __cnfn bitselect(short8, short8, short8);
10966ushort8 __ovld __cnfn bitselect(ushort8, ushort8, ushort8);
10967short16 __ovld __cnfn bitselect(short16, short16, short16);
10968ushort16 __ovld __cnfn bitselect(ushort16, ushort16, ushort16);
10969int __ovld __cnfn bitselect(int, int, int);
10970uint __ovld __cnfn bitselect(uint, uint, uint);
10971int2 __ovld __cnfn bitselect(int2, int2, int2);
10972uint2 __ovld __cnfn bitselect(uint2, uint2, uint2);
10973int3 __ovld __cnfn bitselect(int3, int3, int3);
10974uint3 __ovld __cnfn bitselect(uint3, uint3, uint3);
10975int4 __ovld __cnfn bitselect(int4, int4, int4);
10976uint4 __ovld __cnfn bitselect(uint4, uint4, uint4);
10977int8 __ovld __cnfn bitselect(int8, int8, int8);
10978uint8 __ovld __cnfn bitselect(uint8, uint8, uint8);
10979int16 __ovld __cnfn bitselect(int16, int16, int16);
10980uint16 __ovld __cnfn bitselect(uint16, uint16, uint16);
10981long __ovld __cnfn bitselect(long, long, long);
10982ulong __ovld __cnfn bitselect(ulong, ulong, ulong);
10983long2 __ovld __cnfn bitselect(long2, long2, long2);
10984ulong2 __ovld __cnfn bitselect(ulong2, ulong2, ulong2);
10985long3 __ovld __cnfn bitselect(long3, long3, long3);
10986ulong3 __ovld __cnfn bitselect(ulong3, ulong3, ulong3);
10987long4 __ovld __cnfn bitselect(long4, long4, long4);
10988ulong4 __ovld __cnfn bitselect(ulong4, ulong4, ulong4);
10989long8 __ovld __cnfn bitselect(long8, long8, long8);
10990ulong8 __ovld __cnfn bitselect(ulong8, ulong8, ulong8);
10991long16 __ovld __cnfn bitselect(long16, long16, long16);
10992ulong16 __ovld __cnfn bitselect(ulong16, ulong16, ulong16);
10993float __ovld __cnfn bitselect(float, float, float);
10994float2 __ovld __cnfn bitselect(float2, float2, float2);
10995float3 __ovld __cnfn bitselect(float3, float3, float3);
10996float4 __ovld __cnfn bitselect(float4, float4, float4);
10997float8 __ovld __cnfn bitselect(float8, float8, float8);
10998float16 __ovld __cnfn bitselect(float16, float16, float16);
10999#ifdef cl_khr_fp64
11000double __ovld __cnfn bitselect(double, double, double);
11001double2 __ovld __cnfn bitselect(double2, double2, double2);
11002double3 __ovld __cnfn bitselect(double3, double3, double3);
11003double4 __ovld __cnfn bitselect(double4, double4, double4);
11004double8 __ovld __cnfn bitselect(double8, double8, double8);
11005double16 __ovld __cnfn bitselect(double16, double16, double16);
11006#endif //cl_khr_fp64
11007#ifdef cl_khr_fp16
11008half __ovld __cnfn bitselect(half, half, half);
11009half2 __ovld __cnfn bitselect(half2, half2, half2);
11010half3 __ovld __cnfn bitselect(half3, half3, half3);
11011half4 __ovld __cnfn bitselect(half4, half4, half4);
11012half8 __ovld __cnfn bitselect(half8, half8, half8);
11013half16 __ovld __cnfn bitselect(half16, half16, half16);
11014#endif //cl_khr_fp16
11015
11016/**
11017 * For each component of a vector type,
11018 * result[i] = if MSB of c[i] is set ? b[i] : a[i].
11019 * For a scalar type, result = c ? b : a.
11020 * b and a must have the same type.
11021 * c must have the same number of elements and bits as a.
11022 */
11023char __ovld __cnfn select(char, char, char);
11024uchar __ovld __cnfn select(uchar, uchar, char);
11025char2 __ovld __cnfn select(char2, char2, char2);
11026uchar2 __ovld __cnfn select(uchar2, uchar2, char2);
11027char3 __ovld __cnfn select(char3, char3, char3);
11028uchar3 __ovld __cnfn select(uchar3, uchar3, char3);
11029char4 __ovld __cnfn select(char4, char4, char4);
11030uchar4 __ovld __cnfn select(uchar4, uchar4, char4);
11031char8 __ovld __cnfn select(char8, char8, char8);
11032uchar8 __ovld __cnfn select(uchar8, uchar8, char8);
11033char16 __ovld __cnfn select(char16, char16, char16);
11034uchar16 __ovld __cnfn select(uchar16, uchar16, char16);
11035
11036short __ovld __cnfn select(short, short, short);
11037ushort __ovld __cnfn select(ushort, ushort, short);
11038short2 __ovld __cnfn select(short2, short2, short2);
11039ushort2 __ovld __cnfn select(ushort2, ushort2, short2);
11040short3 __ovld __cnfn select(short3, short3, short3);
11041ushort3 __ovld __cnfn select(ushort3, ushort3, short3);
11042short4 __ovld __cnfn select(short4, short4, short4);
11043ushort4 __ovld __cnfn select(ushort4, ushort4, short4);
11044short8 __ovld __cnfn select(short8, short8, short8);
11045ushort8 __ovld __cnfn select(ushort8, ushort8, short8);
11046short16 __ovld __cnfn select(short16, short16, short16);
11047ushort16 __ovld __cnfn select(ushort16, ushort16, short16);
11048
11049int __ovld __cnfn select(int, int, int);
11050uint __ovld __cnfn select(uint, uint, int);
11051int2 __ovld __cnfn select(int2, int2, int2);
11052uint2 __ovld __cnfn select(uint2, uint2, int2);
11053int3 __ovld __cnfn select(int3, int3, int3);
11054uint3 __ovld __cnfn select(uint3, uint3, int3);
11055int4 __ovld __cnfn select(int4, int4, int4);
11056uint4 __ovld __cnfn select(uint4, uint4, int4);
11057int8 __ovld __cnfn select(int8, int8, int8);
11058uint8 __ovld __cnfn select(uint8, uint8, int8);
11059int16 __ovld __cnfn select(int16, int16, int16);
11060uint16 __ovld __cnfn select(uint16, uint16, int16);
11061float __ovld __cnfn select(float, float, int);
11062float2 __ovld __cnfn select(float2, float2, int2);
11063float3 __ovld __cnfn select(float3, float3, int3);
11064float4 __ovld __cnfn select(float4, float4, int4);
11065float8 __ovld __cnfn select(float8, float8, int8);
11066float16 __ovld __cnfn select(float16, float16, int16);
11067
11068long __ovld __cnfn select(long, long, long);
11069ulong __ovld __cnfn select(ulong, ulong, long);
11070long2 __ovld __cnfn select(long2, long2, long2);
11071ulong2 __ovld __cnfn select(ulong2, ulong2, long2);
11072long3 __ovld __cnfn select(long3, long3, long3);
11073ulong3 __ovld __cnfn select(ulong3, ulong3, long3);
11074long4 __ovld __cnfn select(long4, long4, long4);
11075ulong4 __ovld __cnfn select(ulong4, ulong4, long4);
11076long8 __ovld __cnfn select(long8, long8, long8);
11077ulong8 __ovld __cnfn select(ulong8, ulong8, long8);
11078long16 __ovld __cnfn select(long16, long16, long16);
11079ulong16 __ovld __cnfn select(ulong16, ulong16, long16);
11080
11081char __ovld __cnfn select(char, char, uchar);
11082uchar __ovld __cnfn select(uchar, uchar, uchar);
11083char2 __ovld __cnfn select(char2, char2, uchar2);
11084uchar2 __ovld __cnfn select(uchar2, uchar2, uchar2);
11085char3 __ovld __cnfn select(char3, char3, uchar3);
11086uchar3 __ovld __cnfn select(uchar3, uchar3, uchar3);
11087char4 __ovld __cnfn select(char4, char4, uchar4);
11088uchar4 __ovld __cnfn select(uchar4, uchar4, uchar4);
11089char8 __ovld __cnfn select(char8, char8, uchar8);
11090uchar8 __ovld __cnfn select(uchar8, uchar8, uchar8);
11091char16 __ovld __cnfn select(char16, char16, uchar16);
11092uchar16 __ovld __cnfn select(uchar16, uchar16, uchar16);
11093
11094short __ovld __cnfn select(short, short, ushort);
11095ushort __ovld __cnfn select(ushort, ushort, ushort);
11096short2 __ovld __cnfn select(short2, short2, ushort2);
11097ushort2 __ovld __cnfn select(ushort2, ushort2, ushort2);
11098short3 __ovld __cnfn select(short3, short3, ushort3);
11099ushort3 __ovld __cnfn select(ushort3, ushort3, ushort3);
11100short4 __ovld __cnfn select(short4, short4, ushort4);
11101ushort4 __ovld __cnfn select(ushort4, ushort4, ushort4);
11102short8 __ovld __cnfn select(short8, short8, ushort8);
11103ushort8 __ovld __cnfn select(ushort8, ushort8, ushort8);
11104short16 __ovld __cnfn select(short16, short16, ushort16);
11105ushort16 __ovld __cnfn select(ushort16, ushort16, ushort16);
11106
11107int __ovld __cnfn select(int, int, uint);
11108uint __ovld __cnfn select(uint, uint, uint);
11109int2 __ovld __cnfn select(int2, int2, uint2);
11110uint2 __ovld __cnfn select(uint2, uint2, uint2);
11111int3 __ovld __cnfn select(int3, int3, uint3);
11112uint3 __ovld __cnfn select(uint3, uint3, uint3);
11113int4 __ovld __cnfn select(int4, int4, uint4);
11114uint4 __ovld __cnfn select(uint4, uint4, uint4);
11115int8 __ovld __cnfn select(int8, int8, uint8);
11116uint8 __ovld __cnfn select(uint8, uint8, uint8);
11117int16 __ovld __cnfn select(int16, int16, uint16);
11118uint16 __ovld __cnfn select(uint16, uint16, uint16);
11119float __ovld __cnfn select(float, float, uint);
11120float2 __ovld __cnfn select(float2, float2, uint2);
11121float3 __ovld __cnfn select(float3, float3, uint3);
11122float4 __ovld __cnfn select(float4, float4, uint4);
11123float8 __ovld __cnfn select(float8, float8, uint8);
11124float16 __ovld __cnfn select(float16, float16, uint16);
11125
11126long __ovld __cnfn select(long, long, ulong);
11127ulong __ovld __cnfn select(ulong, ulong, ulong);
11128long2 __ovld __cnfn select(long2, long2, ulong2);
11129ulong2 __ovld __cnfn select(ulong2, ulong2, ulong2);
11130long3 __ovld __cnfn select(long3, long3, ulong3);
11131ulong3 __ovld __cnfn select(ulong3, ulong3, ulong3);
11132long4 __ovld __cnfn select(long4, long4, ulong4);
11133ulong4 __ovld __cnfn select(ulong4, ulong4, ulong4);
11134long8 __ovld __cnfn select(long8, long8, ulong8);
11135ulong8 __ovld __cnfn select(ulong8, ulong8, ulong8);
11136long16 __ovld __cnfn select(long16, long16, ulong16);
11137ulong16 __ovld __cnfn select(ulong16, ulong16, ulong16);
11138
11139#ifdef cl_khr_fp64
11140double __ovld __cnfn select(double, double, long);
11141double2 __ovld __cnfn select(double2, double2, long2);
11142double3 __ovld __cnfn select(double3, double3, long3);
11143double4 __ovld __cnfn select(double4, double4, long4);
11144double8 __ovld __cnfn select(double8, double8, long8);
11145double16 __ovld __cnfn select(double16, double16, long16);
11146double __ovld __cnfn select(double, double, ulong);
11147double2 __ovld __cnfn select(double2, double2, ulong2);
11148double3 __ovld __cnfn select(double3, double3, ulong3);
11149double4 __ovld __cnfn select(double4, double4, ulong4);
11150double8 __ovld __cnfn select(double8, double8, ulong8);
11151double16 __ovld __cnfn select(double16, double16, ulong16);
11152#endif //cl_khr_fp64
11153#ifdef cl_khr_fp16
11154half __ovld __cnfn select(half, half, short);
11155half2 __ovld __cnfn select(half2, half2, short2);
11156half3 __ovld __cnfn select(half3, half3, short3);
11157half4 __ovld __cnfn select(half4, half4, short4);
11158half8 __ovld __cnfn select(half8, half8, short8);
11159half16 __ovld __cnfn select(half16, half16, short16);
11160half __ovld __cnfn select(half, half, ushort);
11161half2 __ovld __cnfn select(half2, half2, ushort2);
11162half3 __ovld __cnfn select(half3, half3, ushort3);
11163half4 __ovld __cnfn select(half4, half4, ushort4);
11164half8 __ovld __cnfn select(half8, half8, ushort8);
11165half16 __ovld __cnfn select(half16, half16, ushort16);
11166#endif //cl_khr_fp16
11167
11168// OpenCL v1.1 s6.11.7, v1.2 s6.12.7, v2.0 s6.13.7 - Vector Data Load and Store Functions
11169// OpenCL extensions v1.1 s9.6.6, v1.2 s9.5.6, v2.0 s9.4.6 - Vector Data Load and Store Functions for Half Type
11170/**
11171 * Use generic type gentype to indicate the built-in data types
11172 * char, uchar, short, ushort, int, uint, long, ulong, float,
11173 * double or half.
11174 *
11175 * vloadn return sizeof (gentypen) bytes of data read from address (p + (offset * n)).
11176 *
11177 * vstoren write sizeof (gentypen) bytes given by data to address (p + (offset * n)).
11178 *
11179 * The address computed as (p + (offset * n)) must be
11180 * 8-bit aligned if gentype is char, uchar;
11181 * 16-bit aligned if gentype is short, ushort, half;
11182 * 32-bit aligned if gentype is int, uint, float;
11183 * 64-bit aligned if gentype is long, ulong, double.
11184 */
11185
11186char2 __ovld __purefn vload2(size_t, const __constant char *);
11187uchar2 __ovld __purefn vload2(size_t, const __constant uchar *);
11188short2 __ovld __purefn vload2(size_t, const __constant short *);
11189ushort2 __ovld __purefn vload2(size_t, const __constant ushort *);
11190int2 __ovld __purefn vload2(size_t, const __constant int *);
11191uint2 __ovld __purefn vload2(size_t, const __constant uint *);
11192long2 __ovld __purefn vload2(size_t, const __constant long *);
11193ulong2 __ovld __purefn vload2(size_t, const __constant ulong *);
11194float2 __ovld __purefn vload2(size_t, const __constant float *);
11195char3 __ovld __purefn vload3(size_t, const __constant char *);
11196uchar3 __ovld __purefn vload3(size_t, const __constant uchar *);
11197short3 __ovld __purefn vload3(size_t, const __constant short *);
11198ushort3 __ovld __purefn vload3(size_t, const __constant ushort *);
11199int3 __ovld __purefn vload3(size_t, const __constant int *);
11200uint3 __ovld __purefn vload3(size_t, const __constant uint *);
11201long3 __ovld __purefn vload3(size_t, const __constant long *);
11202ulong3 __ovld __purefn vload3(size_t, const __constant ulong *);
11203float3 __ovld __purefn vload3(size_t, const __constant float *);
11204char4 __ovld __purefn vload4(size_t, const __constant char *);
11205uchar4 __ovld __purefn vload4(size_t, const __constant uchar *);
11206short4 __ovld __purefn vload4(size_t, const __constant short *);
11207ushort4 __ovld __purefn vload4(size_t, const __constant ushort *);
11208int4 __ovld __purefn vload4(size_t, const __constant int *);
11209uint4 __ovld __purefn vload4(size_t, const __constant uint *);
11210long4 __ovld __purefn vload4(size_t, const __constant long *);
11211ulong4 __ovld __purefn vload4(size_t, const __constant ulong *);
11212float4 __ovld __purefn vload4(size_t, const __constant float *);
11213char8 __ovld __purefn vload8(size_t, const __constant char *);
11214uchar8 __ovld __purefn vload8(size_t, const __constant uchar *);
11215short8 __ovld __purefn vload8(size_t, const __constant short *);
11216ushort8 __ovld __purefn vload8(size_t, const __constant ushort *);
11217int8 __ovld __purefn vload8(size_t, const __constant int *);
11218uint8 __ovld __purefn vload8(size_t, const __constant uint *);
11219long8 __ovld __purefn vload8(size_t, const __constant long *);
11220ulong8 __ovld __purefn vload8(size_t, const __constant ulong *);
11221float8 __ovld __purefn vload8(size_t, const __constant float *);
11222char16 __ovld __purefn vload16(size_t, const __constant char *);
11223uchar16 __ovld __purefn vload16(size_t, const __constant uchar *);
11224short16 __ovld __purefn vload16(size_t, const __constant short *);
11225ushort16 __ovld __purefn vload16(size_t, const __constant ushort *);
11226int16 __ovld __purefn vload16(size_t, const __constant int *);
11227uint16 __ovld __purefn vload16(size_t, const __constant uint *);
11228long16 __ovld __purefn vload16(size_t, const __constant long *);
11229ulong16 __ovld __purefn vload16(size_t, const __constant ulong *);
11230float16 __ovld __purefn vload16(size_t, const __constant float *);
11231#ifdef cl_khr_fp64
11232double2 __ovld __purefn vload2(size_t, const __constant double *);
11233double3 __ovld __purefn vload3(size_t, const __constant double *);
11234double4 __ovld __purefn vload4(size_t, const __constant double *);
11235double8 __ovld __purefn vload8(size_t, const __constant double *);
11236double16 __ovld __purefn vload16(size_t, const __constant double *);
11237#endif //cl_khr_fp64
11238
11239#ifdef cl_khr_fp16
11240half2 __ovld __purefn vload2(size_t, const __constant half *);
11241half3 __ovld __purefn vload3(size_t, const __constant half *);
11242half4 __ovld __purefn vload4(size_t, const __constant half *);
11243half8 __ovld __purefn vload8(size_t, const __constant half *);
11244half16 __ovld __purefn vload16(size_t, const __constant half *);
11245#endif //cl_khr_fp16
11246
11247#if defined(__opencl_c_generic_address_space)
11248char2 __ovld __purefn vload2(size_t, const char *);
11249uchar2 __ovld __purefn vload2(size_t, const uchar *);
11250short2 __ovld __purefn vload2(size_t, const short *);
11251ushort2 __ovld __purefn vload2(size_t, const ushort *);
11252int2 __ovld __purefn vload2(size_t, const int *);
11253uint2 __ovld __purefn vload2(size_t, const uint *);
11254long2 __ovld __purefn vload2(size_t, const long *);
11255ulong2 __ovld __purefn vload2(size_t, const ulong *);
11256float2 __ovld __purefn vload2(size_t, const float *);
11257char3 __ovld __purefn vload3(size_t, const char *);
11258uchar3 __ovld __purefn vload3(size_t, const uchar *);
11259short3 __ovld __purefn vload3(size_t, const short *);
11260ushort3 __ovld __purefn vload3(size_t, const ushort *);
11261int3 __ovld __purefn vload3(size_t, const int *);
11262uint3 __ovld __purefn vload3(size_t, const uint *);
11263long3 __ovld __purefn vload3(size_t, const long *);
11264ulong3 __ovld __purefn vload3(size_t, const ulong *);
11265float3 __ovld __purefn vload3(size_t, const float *);
11266char4 __ovld __purefn vload4(size_t, const char *);
11267uchar4 __ovld __purefn vload4(size_t, const uchar *);
11268short4 __ovld __purefn vload4(size_t, const short *);
11269ushort4 __ovld __purefn vload4(size_t, const ushort *);
11270int4 __ovld __purefn vload4(size_t, const int *);
11271uint4 __ovld __purefn vload4(size_t, const uint *);
11272long4 __ovld __purefn vload4(size_t, const long *);
11273ulong4 __ovld __purefn vload4(size_t, const ulong *);
11274float4 __ovld __purefn vload4(size_t, const float *);
11275char8 __ovld __purefn vload8(size_t, const char *);
11276uchar8 __ovld __purefn vload8(size_t, const uchar *);
11277short8 __ovld __purefn vload8(size_t, const short *);
11278ushort8 __ovld __purefn vload8(size_t, const ushort *);
11279int8 __ovld __purefn vload8(size_t, const int *);
11280uint8 __ovld __purefn vload8(size_t, const uint *);
11281long8 __ovld __purefn vload8(size_t, const long *);
11282ulong8 __ovld __purefn vload8(size_t, const ulong *);
11283float8 __ovld __purefn vload8(size_t, const float *);
11284char16 __ovld __purefn vload16(size_t, const char *);
11285uchar16 __ovld __purefn vload16(size_t, const uchar *);
11286short16 __ovld __purefn vload16(size_t, const short *);
11287ushort16 __ovld __purefn vload16(size_t, const ushort *);
11288int16 __ovld __purefn vload16(size_t, const int *);
11289uint16 __ovld __purefn vload16(size_t, const uint *);
11290long16 __ovld __purefn vload16(size_t, const long *);
11291ulong16 __ovld __purefn vload16(size_t, const ulong *);
11292float16 __ovld __purefn vload16(size_t, const float *);
11293
11294#ifdef cl_khr_fp64
11295double2 __ovld __purefn vload2(size_t, const double *);
11296double3 __ovld __purefn vload3(size_t, const double *);
11297double4 __ovld __purefn vload4(size_t, const double *);
11298double8 __ovld __purefn vload8(size_t, const double *);
11299double16 __ovld __purefn vload16(size_t, const double *);
11300#endif //cl_khr_fp64
11301
11302#ifdef cl_khr_fp16
11303half2 __ovld __purefn vload2(size_t, const half *);
11304half3 __ovld __purefn vload3(size_t, const half *);
11305half4 __ovld __purefn vload4(size_t, const half *);
11306half8 __ovld __purefn vload8(size_t, const half *);
11307half16 __ovld __purefn vload16(size_t, const half *);
11308#endif //cl_khr_fp16
11309#endif //defined(__opencl_c_generic_address_space)
11310
11311#if defined(__opencl_c_named_address_space_builtins)
11312char2 __ovld __purefn vload2(size_t, const __global char *);
11313uchar2 __ovld __purefn vload2(size_t, const __global uchar *);
11314short2 __ovld __purefn vload2(size_t, const __global short *);
11315ushort2 __ovld __purefn vload2(size_t, const __global ushort *);
11316int2 __ovld __purefn vload2(size_t, const __global int *);
11317uint2 __ovld __purefn vload2(size_t, const __global uint *);
11318long2 __ovld __purefn vload2(size_t, const __global long *);
11319ulong2 __ovld __purefn vload2(size_t, const __global ulong *);
11320float2 __ovld __purefn vload2(size_t, const __global float *);
11321char3 __ovld __purefn vload3(size_t, const __global char *);
11322uchar3 __ovld __purefn vload3(size_t, const __global uchar *);
11323short3 __ovld __purefn vload3(size_t, const __global short *);
11324ushort3 __ovld __purefn vload3(size_t, const __global ushort *);
11325int3 __ovld __purefn vload3(size_t, const __global int *);
11326uint3 __ovld __purefn vload3(size_t, const __global uint *);
11327long3 __ovld __purefn vload3(size_t, const __global long *);
11328ulong3 __ovld __purefn vload3(size_t, const __global ulong *);
11329float3 __ovld __purefn vload3(size_t, const __global float *);
11330char4 __ovld __purefn vload4(size_t, const __global char *);
11331uchar4 __ovld __purefn vload4(size_t, const __global uchar *);
11332short4 __ovld __purefn vload4(size_t, const __global short *);
11333ushort4 __ovld __purefn vload4(size_t, const __global ushort *);
11334int4 __ovld __purefn vload4(size_t, const __global int *);
11335uint4 __ovld __purefn vload4(size_t, const __global uint *);
11336long4 __ovld __purefn vload4(size_t, const __global long *);
11337ulong4 __ovld __purefn vload4(size_t, const __global ulong *);
11338float4 __ovld __purefn vload4(size_t, const __global float *);
11339char8 __ovld __purefn vload8(size_t, const __global char *);
11340uchar8 __ovld __purefn vload8(size_t, const __global uchar *);
11341short8 __ovld __purefn vload8(size_t, const __global short *);
11342ushort8 __ovld __purefn vload8(size_t, const __global ushort *);
11343int8 __ovld __purefn vload8(size_t, const __global int *);
11344uint8 __ovld __purefn vload8(size_t, const __global uint *);
11345long8 __ovld __purefn vload8(size_t, const __global long *);
11346ulong8 __ovld __purefn vload8(size_t, const __global ulong *);
11347float8 __ovld __purefn vload8(size_t, const __global float *);
11348char16 __ovld __purefn vload16(size_t, const __global char *);
11349uchar16 __ovld __purefn vload16(size_t, const __global uchar *);
11350short16 __ovld __purefn vload16(size_t, const __global short *);
11351ushort16 __ovld __purefn vload16(size_t, const __global ushort *);
11352int16 __ovld __purefn vload16(size_t, const __global int *);
11353uint16 __ovld __purefn vload16(size_t, const __global uint *);
11354long16 __ovld __purefn vload16(size_t, const __global long *);
11355ulong16 __ovld __purefn vload16(size_t, const __global ulong *);
11356float16 __ovld __purefn vload16(size_t, const __global float *);
11357char2 __ovld __purefn vload2(size_t, const __local char *);
11358uchar2 __ovld __purefn vload2(size_t, const __local uchar *);
11359short2 __ovld __purefn vload2(size_t, const __local short *);
11360ushort2 __ovld __purefn vload2(size_t, const __local ushort *);
11361int2 __ovld __purefn vload2(size_t, const __local int *);
11362uint2 __ovld __purefn vload2(size_t, const __local uint *);
11363long2 __ovld __purefn vload2(size_t, const __local long *);
11364ulong2 __ovld __purefn vload2(size_t, const __local ulong *);
11365float2 __ovld __purefn vload2(size_t, const __local float *);
11366char3 __ovld __purefn vload3(size_t, const __local char *);
11367uchar3 __ovld __purefn vload3(size_t, const __local uchar *);
11368short3 __ovld __purefn vload3(size_t, const __local short *);
11369ushort3 __ovld __purefn vload3(size_t, const __local ushort *);
11370int3 __ovld __purefn vload3(size_t, const __local int *);
11371uint3 __ovld __purefn vload3(size_t, const __local uint *);
11372long3 __ovld __purefn vload3(size_t, const __local long *);
11373ulong3 __ovld __purefn vload3(size_t, const __local ulong *);
11374float3 __ovld __purefn vload3(size_t, const __local float *);
11375char4 __ovld __purefn vload4(size_t, const __local char *);
11376uchar4 __ovld __purefn vload4(size_t, const __local uchar *);
11377short4 __ovld __purefn vload4(size_t, const __local short *);
11378ushort4 __ovld __purefn vload4(size_t, const __local ushort *);
11379int4 __ovld __purefn vload4(size_t, const __local int *);
11380uint4 __ovld __purefn vload4(size_t, const __local uint *);
11381long4 __ovld __purefn vload4(size_t, const __local long *);
11382ulong4 __ovld __purefn vload4(size_t, const __local ulong *);
11383float4 __ovld __purefn vload4(size_t, const __local float *);
11384char8 __ovld __purefn vload8(size_t, const __local char *);
11385uchar8 __ovld __purefn vload8(size_t, const __local uchar *);
11386short8 __ovld __purefn vload8(size_t, const __local short *);
11387ushort8 __ovld __purefn vload8(size_t, const __local ushort *);
11388int8 __ovld __purefn vload8(size_t, const __local int *);
11389uint8 __ovld __purefn vload8(size_t, const __local uint *);
11390long8 __ovld __purefn vload8(size_t, const __local long *);
11391ulong8 __ovld __purefn vload8(size_t, const __local ulong *);
11392float8 __ovld __purefn vload8(size_t, const __local float *);
11393char16 __ovld __purefn vload16(size_t, const __local char *);
11394uchar16 __ovld __purefn vload16(size_t, const __local uchar *);
11395short16 __ovld __purefn vload16(size_t, const __local short *);
11396ushort16 __ovld __purefn vload16(size_t, const __local ushort *);
11397int16 __ovld __purefn vload16(size_t, const __local int *);
11398uint16 __ovld __purefn vload16(size_t, const __local uint *);
11399long16 __ovld __purefn vload16(size_t, const __local long *);
11400ulong16 __ovld __purefn vload16(size_t, const __local ulong *);
11401float16 __ovld __purefn vload16(size_t, const __local float *);
11402char2 __ovld __purefn vload2(size_t, const __private char *);
11403uchar2 __ovld __purefn vload2(size_t, const __private uchar *);
11404short2 __ovld __purefn vload2(size_t, const __private short *);
11405ushort2 __ovld __purefn vload2(size_t, const __private ushort *);
11406int2 __ovld __purefn vload2(size_t, const __private int *);
11407uint2 __ovld __purefn vload2(size_t, const __private uint *);
11408long2 __ovld __purefn vload2(size_t, const __private long *);
11409ulong2 __ovld __purefn vload2(size_t, const __private ulong *);
11410float2 __ovld __purefn vload2(size_t, const __private float *);
11411char3 __ovld __purefn vload3(size_t, const __private char *);
11412uchar3 __ovld __purefn vload3(size_t, const __private uchar *);
11413short3 __ovld __purefn vload3(size_t, const __private short *);
11414ushort3 __ovld __purefn vload3(size_t, const __private ushort *);
11415int3 __ovld __purefn vload3(size_t, const __private int *);
11416uint3 __ovld __purefn vload3(size_t, const __private uint *);
11417long3 __ovld __purefn vload3(size_t, const __private long *);
11418ulong3 __ovld __purefn vload3(size_t, const __private ulong *);
11419float3 __ovld __purefn vload3(size_t, const __private float *);
11420char4 __ovld __purefn vload4(size_t, const __private char *);
11421uchar4 __ovld __purefn vload4(size_t, const __private uchar *);
11422short4 __ovld __purefn vload4(size_t, const __private short *);
11423ushort4 __ovld __purefn vload4(size_t, const __private ushort *);
11424int4 __ovld __purefn vload4(size_t, const __private int *);
11425uint4 __ovld __purefn vload4(size_t, const __private uint *);
11426long4 __ovld __purefn vload4(size_t, const __private long *);
11427ulong4 __ovld __purefn vload4(size_t, const __private ulong *);
11428float4 __ovld __purefn vload4(size_t, const __private float *);
11429char8 __ovld __purefn vload8(size_t, const __private char *);
11430uchar8 __ovld __purefn vload8(size_t, const __private uchar *);
11431short8 __ovld __purefn vload8(size_t, const __private short *);
11432ushort8 __ovld __purefn vload8(size_t, const __private ushort *);
11433int8 __ovld __purefn vload8(size_t, const __private int *);
11434uint8 __ovld __purefn vload8(size_t, const __private uint *);
11435long8 __ovld __purefn vload8(size_t, const __private long *);
11436ulong8 __ovld __purefn vload8(size_t, const __private ulong *);
11437float8 __ovld __purefn vload8(size_t, const __private float *);
11438char16 __ovld __purefn vload16(size_t, const __private char *);
11439uchar16 __ovld __purefn vload16(size_t, const __private uchar *);
11440short16 __ovld __purefn vload16(size_t, const __private short *);
11441ushort16 __ovld __purefn vload16(size_t, const __private ushort *);
11442int16 __ovld __purefn vload16(size_t, const __private int *);
11443uint16 __ovld __purefn vload16(size_t, const __private uint *);
11444long16 __ovld __purefn vload16(size_t, const __private long *);
11445ulong16 __ovld __purefn vload16(size_t, const __private ulong *);
11446float16 __ovld __purefn vload16(size_t, const __private float *);
11447
11448#ifdef cl_khr_fp64
11449double2 __ovld __purefn vload2(size_t, const __global double *);
11450double3 __ovld __purefn vload3(size_t, const __global double *);
11451double4 __ovld __purefn vload4(size_t, const __global double *);
11452double8 __ovld __purefn vload8(size_t, const __global double *);
11453double16 __ovld __purefn vload16(size_t, const __global double *);
11454double2 __ovld __purefn vload2(size_t, const __local double *);
11455double3 __ovld __purefn vload3(size_t, const __local double *);
11456double4 __ovld __purefn vload4(size_t, const __local double *);
11457double8 __ovld __purefn vload8(size_t, const __local double *);
11458double16 __ovld __purefn vload16(size_t, const __local double *);
11459double2 __ovld __purefn vload2(size_t, const __private double *);
11460double3 __ovld __purefn vload3(size_t, const __private double *);
11461double4 __ovld __purefn vload4(size_t, const __private double *);
11462double8 __ovld __purefn vload8(size_t, const __private double *);
11463double16 __ovld __purefn vload16(size_t, const __private double *);
11464#endif //cl_khr_fp64
11465
11466#ifdef cl_khr_fp16
11467half2 __ovld __purefn vload2(size_t, const __global half *);
11468half3 __ovld __purefn vload3(size_t, const __global half *);
11469half4 __ovld __purefn vload4(size_t, const __global half *);
11470half8 __ovld __purefn vload8(size_t, const __global half *);
11471half16 __ovld __purefn vload16(size_t, const __global half *);
11472half2 __ovld __purefn vload2(size_t, const __local half *);
11473half3 __ovld __purefn vload3(size_t, const __local half *);
11474half4 __ovld __purefn vload4(size_t, const __local half *);
11475half8 __ovld __purefn vload8(size_t, const __local half *);
11476half16 __ovld __purefn vload16(size_t, const __local half *);
11477half2 __ovld __purefn vload2(size_t, const __private half *);
11478half3 __ovld __purefn vload3(size_t, const __private half *);
11479half4 __ovld __purefn vload4(size_t, const __private half *);
11480half8 __ovld __purefn vload8(size_t, const __private half *);
11481half16 __ovld __purefn vload16(size_t, const __private half *);
11482#endif //cl_khr_fp16
11483#endif //defined(__opencl_c_named_address_space_builtins)
11484
11485#if defined(__opencl_c_generic_address_space)
11486void __ovld vstore2(char2, size_t, char *);
11487void __ovld vstore2(uchar2, size_t, uchar *);
11488void __ovld vstore2(short2, size_t, short *);
11489void __ovld vstore2(ushort2, size_t, ushort *);
11490void __ovld vstore2(int2, size_t, int *);
11491void __ovld vstore2(uint2, size_t, uint *);
11492void __ovld vstore2(long2, size_t, long *);
11493void __ovld vstore2(ulong2, size_t, ulong *);
11494void __ovld vstore2(float2, size_t, float *);
11495void __ovld vstore3(char3, size_t, char *);
11496void __ovld vstore3(uchar3, size_t, uchar *);
11497void __ovld vstore3(short3, size_t, short *);
11498void __ovld vstore3(ushort3, size_t, ushort *);
11499void __ovld vstore3(int3, size_t, int *);
11500void __ovld vstore3(uint3, size_t, uint *);
11501void __ovld vstore3(long3, size_t, long *);
11502void __ovld vstore3(ulong3, size_t, ulong *);
11503void __ovld vstore3(float3, size_t, float *);
11504void __ovld vstore4(char4, size_t, char *);
11505void __ovld vstore4(uchar4, size_t, uchar *);
11506void __ovld vstore4(short4, size_t, short *);
11507void __ovld vstore4(ushort4, size_t, ushort *);
11508void __ovld vstore4(int4, size_t, int *);
11509void __ovld vstore4(uint4, size_t, uint *);
11510void __ovld vstore4(long4, size_t, long *);
11511void __ovld vstore4(ulong4, size_t, ulong *);
11512void __ovld vstore4(float4, size_t, float *);
11513void __ovld vstore8(char8, size_t, char *);
11514void __ovld vstore8(uchar8, size_t, uchar *);
11515void __ovld vstore8(short8, size_t, short *);
11516void __ovld vstore8(ushort8, size_t, ushort *);
11517void __ovld vstore8(int8, size_t, int *);
11518void __ovld vstore8(uint8, size_t, uint *);
11519void __ovld vstore8(long8, size_t, long *);
11520void __ovld vstore8(ulong8, size_t, ulong *);
11521void __ovld vstore8(float8, size_t, float *);
11522void __ovld vstore16(char16, size_t, char *);
11523void __ovld vstore16(uchar16, size_t, uchar *);
11524void __ovld vstore16(short16, size_t, short *);
11525void __ovld vstore16(ushort16, size_t, ushort *);
11526void __ovld vstore16(int16, size_t, int *);
11527void __ovld vstore16(uint16, size_t, uint *);
11528void __ovld vstore16(long16, size_t, long *);
11529void __ovld vstore16(ulong16, size_t, ulong *);
11530void __ovld vstore16(float16, size_t, float *);
11531#ifdef cl_khr_fp64
11532void __ovld vstore2(double2, size_t, double *);
11533void __ovld vstore3(double3, size_t, double *);
11534void __ovld vstore4(double4, size_t, double *);
11535void __ovld vstore8(double8, size_t, double *);
11536void __ovld vstore16(double16, size_t, double *);
11537#endif //cl_khr_fp64
11538#ifdef cl_khr_fp16
11539void __ovld vstore2(half2, size_t, half *);
11540void __ovld vstore3(half3, size_t, half *);
11541void __ovld vstore4(half4, size_t, half *);
11542void __ovld vstore8(half8, size_t, half *);
11543void __ovld vstore16(half16, size_t, half *);
11544#endif //cl_khr_fp16
11545#endif //defined(__opencl_c_generic_address_space)
11546
11547#if defined(__opencl_c_named_address_space_builtins)
11548void __ovld vstore2(char2, size_t, __global char *);
11549void __ovld vstore2(uchar2, size_t, __global uchar *);
11550void __ovld vstore2(short2, size_t, __global short *);
11551void __ovld vstore2(ushort2, size_t, __global ushort *);
11552void __ovld vstore2(int2, size_t, __global int *);
11553void __ovld vstore2(uint2, size_t, __global uint *);
11554void __ovld vstore2(long2, size_t, __global long *);
11555void __ovld vstore2(ulong2, size_t, __global ulong *);
11556void __ovld vstore2(float2, size_t, __global float *);
11557void __ovld vstore3(char3, size_t, __global char *);
11558void __ovld vstore3(uchar3, size_t, __global uchar *);
11559void __ovld vstore3(short3, size_t, __global short *);
11560void __ovld vstore3(ushort3, size_t, __global ushort *);
11561void __ovld vstore3(int3, size_t, __global int *);
11562void __ovld vstore3(uint3, size_t, __global uint *);
11563void __ovld vstore3(long3, size_t, __global long *);
11564void __ovld vstore3(ulong3, size_t, __global ulong *);
11565void __ovld vstore3(float3, size_t, __global float *);
11566void __ovld vstore4(char4, size_t, __global char *);
11567void __ovld vstore4(uchar4, size_t, __global uchar *);
11568void __ovld vstore4(short4, size_t, __global short *);
11569void __ovld vstore4(ushort4, size_t, __global ushort *);
11570void __ovld vstore4(int4, size_t, __global int *);
11571void __ovld vstore4(uint4, size_t, __global uint *);
11572void __ovld vstore4(long4, size_t, __global long *);
11573void __ovld vstore4(ulong4, size_t, __global ulong *);
11574void __ovld vstore4(float4, size_t, __global float *);
11575void __ovld vstore8(char8, size_t, __global char *);
11576void __ovld vstore8(uchar8, size_t, __global uchar *);
11577void __ovld vstore8(short8, size_t, __global short *);
11578void __ovld vstore8(ushort8, size_t, __global ushort *);
11579void __ovld vstore8(int8, size_t, __global int *);
11580void __ovld vstore8(uint8, size_t, __global uint *);
11581void __ovld vstore8(long8, size_t, __global long *);
11582void __ovld vstore8(ulong8, size_t, __global ulong *);
11583void __ovld vstore8(float8, size_t, __global float *);
11584void __ovld vstore16(char16, size_t, __global char *);
11585void __ovld vstore16(uchar16, size_t, __global uchar *);
11586void __ovld vstore16(short16, size_t, __global short *);
11587void __ovld vstore16(ushort16, size_t, __global ushort *);
11588void __ovld vstore16(int16, size_t, __global int *);
11589void __ovld vstore16(uint16, size_t, __global uint *);
11590void __ovld vstore16(long16, size_t, __global long *);
11591void __ovld vstore16(ulong16, size_t, __global ulong *);
11592void __ovld vstore16(float16, size_t, __global float *);
11593void __ovld vstore2(char2, size_t, __local char *);
11594void __ovld vstore2(uchar2, size_t, __local uchar *);
11595void __ovld vstore2(short2, size_t, __local short *);
11596void __ovld vstore2(ushort2, size_t, __local ushort *);
11597void __ovld vstore2(int2, size_t, __local int *);
11598void __ovld vstore2(uint2, size_t, __local uint *);
11599void __ovld vstore2(long2, size_t, __local long *);
11600void __ovld vstore2(ulong2, size_t, __local ulong *);
11601void __ovld vstore2(float2, size_t, __local float *);
11602void __ovld vstore3(char3, size_t, __local char *);
11603void __ovld vstore3(uchar3, size_t, __local uchar *);
11604void __ovld vstore3(short3, size_t, __local short *);
11605void __ovld vstore3(ushort3, size_t, __local ushort *);
11606void __ovld vstore3(int3, size_t, __local int *);
11607void __ovld vstore3(uint3, size_t, __local uint *);
11608void __ovld vstore3(long3, size_t, __local long *);
11609void __ovld vstore3(ulong3, size_t, __local ulong *);
11610void __ovld vstore3(float3, size_t, __local float *);
11611void __ovld vstore4(char4, size_t, __local char *);
11612void __ovld vstore4(uchar4, size_t, __local uchar *);
11613void __ovld vstore4(short4, size_t, __local short *);
11614void __ovld vstore4(ushort4, size_t, __local ushort *);
11615void __ovld vstore4(int4, size_t, __local int *);
11616void __ovld vstore4(uint4, size_t, __local uint *);
11617void __ovld vstore4(long4, size_t, __local long *);
11618void __ovld vstore4(ulong4, size_t, __local ulong *);
11619void __ovld vstore4(float4, size_t, __local float *);
11620void __ovld vstore8(char8, size_t, __local char *);
11621void __ovld vstore8(uchar8, size_t, __local uchar *);
11622void __ovld vstore8(short8, size_t, __local short *);
11623void __ovld vstore8(ushort8, size_t, __local ushort *);
11624void __ovld vstore8(int8, size_t, __local int *);
11625void __ovld vstore8(uint8, size_t, __local uint *);
11626void __ovld vstore8(long8, size_t, __local long *);
11627void __ovld vstore8(ulong8, size_t, __local ulong *);
11628void __ovld vstore8(float8, size_t, __local float *);
11629void __ovld vstore16(char16, size_t, __local char *);
11630void __ovld vstore16(uchar16, size_t, __local uchar *);
11631void __ovld vstore16(short16, size_t, __local short *);
11632void __ovld vstore16(ushort16, size_t, __local ushort *);
11633void __ovld vstore16(int16, size_t, __local int *);
11634void __ovld vstore16(uint16, size_t, __local uint *);
11635void __ovld vstore16(long16, size_t, __local long *);
11636void __ovld vstore16(ulong16, size_t, __local ulong *);
11637void __ovld vstore16(float16, size_t, __local float *);
11638void __ovld vstore2(char2, size_t, __private char *);
11639void __ovld vstore2(uchar2, size_t, __private uchar *);
11640void __ovld vstore2(short2, size_t, __private short *);
11641void __ovld vstore2(ushort2, size_t, __private ushort *);
11642void __ovld vstore2(int2, size_t, __private int *);
11643void __ovld vstore2(uint2, size_t, __private uint *);
11644void __ovld vstore2(long2, size_t, __private long *);
11645void __ovld vstore2(ulong2, size_t, __private ulong *);
11646void __ovld vstore2(float2, size_t, __private float *);
11647void __ovld vstore3(char3, size_t, __private char *);
11648void __ovld vstore3(uchar3, size_t, __private uchar *);
11649void __ovld vstore3(short3, size_t, __private short *);
11650void __ovld vstore3(ushort3, size_t, __private ushort *);
11651void __ovld vstore3(int3, size_t, __private int *);
11652void __ovld vstore3(uint3, size_t, __private uint *);
11653void __ovld vstore3(long3, size_t, __private long *);
11654void __ovld vstore3(ulong3, size_t, __private ulong *);
11655void __ovld vstore3(float3, size_t, __private float *);
11656void __ovld vstore4(char4, size_t, __private char *);
11657void __ovld vstore4(uchar4, size_t, __private uchar *);
11658void __ovld vstore4(short4, size_t, __private short *);
11659void __ovld vstore4(ushort4, size_t, __private ushort *);
11660void __ovld vstore4(int4, size_t, __private int *);
11661void __ovld vstore4(uint4, size_t, __private uint *);
11662void __ovld vstore4(long4, size_t, __private long *);
11663void __ovld vstore4(ulong4, size_t, __private ulong *);
11664void __ovld vstore4(float4, size_t, __private float *);
11665void __ovld vstore8(char8, size_t, __private char *);
11666void __ovld vstore8(uchar8, size_t, __private uchar *);
11667void __ovld vstore8(short8, size_t, __private short *);
11668void __ovld vstore8(ushort8, size_t, __private ushort *);
11669void __ovld vstore8(int8, size_t, __private int *);
11670void __ovld vstore8(uint8, size_t, __private uint *);
11671void __ovld vstore8(long8, size_t, __private long *);
11672void __ovld vstore8(ulong8, size_t, __private ulong *);
11673void __ovld vstore8(float8, size_t, __private float *);
11674void __ovld vstore16(char16, size_t, __private char *);
11675void __ovld vstore16(uchar16, size_t, __private uchar *);
11676void __ovld vstore16(short16, size_t, __private short *);
11677void __ovld vstore16(ushort16, size_t, __private ushort *);
11678void __ovld vstore16(int16, size_t, __private int *);
11679void __ovld vstore16(uint16, size_t, __private uint *);
11680void __ovld vstore16(long16, size_t, __private long *);
11681void __ovld vstore16(ulong16, size_t, __private ulong *);
11682void __ovld vstore16(float16, size_t, __private float *);
11683#ifdef cl_khr_fp64
11684void __ovld vstore2(double2, size_t, __global double *);
11685void __ovld vstore3(double3, size_t, __global double *);
11686void __ovld vstore4(double4, size_t, __global double *);
11687void __ovld vstore8(double8, size_t, __global double *);
11688void __ovld vstore16(double16, size_t, __global double *);
11689void __ovld vstore2(double2, size_t, __local double *);
11690void __ovld vstore3(double3, size_t, __local double *);
11691void __ovld vstore4(double4, size_t, __local double *);
11692void __ovld vstore8(double8, size_t, __local double *);
11693void __ovld vstore16(double16, size_t, __local double *);
11694void __ovld vstore2(double2, size_t, __private double *);
11695void __ovld vstore3(double3, size_t, __private double *);
11696void __ovld vstore4(double4, size_t, __private double *);
11697void __ovld vstore8(double8, size_t, __private double *);
11698void __ovld vstore16(double16, size_t, __private double *);
11699#endif //cl_khr_fp64
11700#ifdef cl_khr_fp16
11701void __ovld vstore2(half2, size_t, __global half *);
11702void __ovld vstore3(half3, size_t, __global half *);
11703void __ovld vstore4(half4, size_t, __global half *);
11704void __ovld vstore8(half8, size_t, __global half *);
11705void __ovld vstore16(half16, size_t, __global half *);
11706void __ovld vstore2(half2, size_t, __local half *);
11707void __ovld vstore3(half3, size_t, __local half *);
11708void __ovld vstore4(half4, size_t, __local half *);
11709void __ovld vstore8(half8, size_t, __local half *);
11710void __ovld vstore16(half16, size_t, __local half *);
11711void __ovld vstore2(half2, size_t, __private half *);
11712void __ovld vstore3(half3, size_t, __private half *);
11713void __ovld vstore4(half4, size_t, __private half *);
11714void __ovld vstore8(half8, size_t, __private half *);
11715void __ovld vstore16(half16, size_t, __private half *);
11716#endif //cl_khr_fp16
11717#endif //defined(__opencl_c_named_address_space_builtins)
11718
11719/**
11720 * Read sizeof (half) bytes of data from address
11721 * (p + offset). The data read is interpreted as a
11722 * half value. The half value is converted to a
11723 * float value and the float value is returned.
11724 * The read address computed as (p + offset)
11725 * must be 16-bit aligned.
11726 */
11727float __ovld __purefn vload_half(size_t, const __constant half *);
11728#if defined(__opencl_c_generic_address_space)
11729float __ovld __purefn vload_half(size_t, const half *);
11730#endif //defined(__opencl_c_generic_address_space)
11731
11732#if defined(__opencl_c_named_address_space_builtins)
11733float __ovld __purefn vload_half(size_t, const __global half *);
11734float __ovld __purefn vload_half(size_t, const __local half *);
11735float __ovld __purefn vload_half(size_t, const __private half *);
11736#endif //defined(__opencl_c_named_address_space_builtins)
11737
11738/**
11739 * Read sizeof (halfn) bytes of data from address
11740 * (p + (offset * n)). The data read is interpreted
11741 * as a halfn value. The halfn value read is
11742 * converted to a floatn value and the floatn
11743 * value is returned. The read address computed
11744 * as (p + (offset * n)) must be 16-bit aligned.
11745 */
11746float2 __ovld __purefn vload_half2(size_t, const __constant half *);
11747float3 __ovld __purefn vload_half3(size_t, const __constant half *);
11748float4 __ovld __purefn vload_half4(size_t, const __constant half *);
11749float8 __ovld __purefn vload_half8(size_t, const __constant half *);
11750float16 __ovld __purefn vload_half16(size_t, const __constant half *);
11751#if defined(__opencl_c_generic_address_space)
11752float2 __ovld __purefn vload_half2(size_t, const half *);
11753float3 __ovld __purefn vload_half3(size_t, const half *);
11754float4 __ovld __purefn vload_half4(size_t, const half *);
11755float8 __ovld __purefn vload_half8(size_t, const half *);
11756float16 __ovld __purefn vload_half16(size_t, const half *);
11757#endif //defined(__opencl_c_generic_address_space)
11758
11759#if defined(__opencl_c_named_address_space_builtins)
11760float2 __ovld __purefn vload_half2(size_t, const __global half *);
11761float3 __ovld __purefn vload_half3(size_t, const __global half *);
11762float4 __ovld __purefn vload_half4(size_t, const __global half *);
11763float8 __ovld __purefn vload_half8(size_t, const __global half *);
11764float16 __ovld __purefn vload_half16(size_t, const __global half *);
11765float2 __ovld __purefn vload_half2(size_t, const __local half *);
11766float3 __ovld __purefn vload_half3(size_t, const __local half *);
11767float4 __ovld __purefn vload_half4(size_t, const __local half *);
11768float8 __ovld __purefn vload_half8(size_t, const __local half *);
11769float16 __ovld __purefn vload_half16(size_t, const __local half *);
11770float2 __ovld __purefn vload_half2(size_t, const __private half *);
11771float3 __ovld __purefn vload_half3(size_t, const __private half *);
11772float4 __ovld __purefn vload_half4(size_t, const __private half *);
11773float8 __ovld __purefn vload_half8(size_t, const __private half *);
11774float16 __ovld __purefn vload_half16(size_t, const __private half *);
11775#endif //defined(__opencl_c_named_address_space_builtins)
11776
11777/**
11778 * The float value given by data is first
11779 * converted to a half value using the appropriate
11780 * rounding mode. The half value is then written
11781 * to address computed as (p + offset). The
11782 * address computed as (p + offset) must be 16-
11783 * bit aligned.
11784 * vstore_half use the current rounding mode.
11785 * The default current rounding mode is round to
11786 * nearest even.
11787 */
11788#if defined(__opencl_c_generic_address_space)
11789void __ovld vstore_half(float, size_t, half *);
11790void __ovld vstore_half_rte(float, size_t, half *);
11791void __ovld vstore_half_rtz(float, size_t, half *);
11792void __ovld vstore_half_rtp(float, size_t, half *);
11793void __ovld vstore_half_rtn(float, size_t, half *);
11794#ifdef cl_khr_fp64
11795void __ovld vstore_half(double, size_t, half *);
11796void __ovld vstore_half_rte(double, size_t, half *);
11797void __ovld vstore_half_rtz(double, size_t, half *);
11798void __ovld vstore_half_rtp(double, size_t, half *);
11799void __ovld vstore_half_rtn(double, size_t, half *);
11800#endif //cl_khr_fp64
11801#endif //defined(__opencl_c_generic_address_space)
11802
11803#if defined(__opencl_c_named_address_space_builtins)
11804void __ovld vstore_half(float, size_t, __global half *);
11805void __ovld vstore_half_rte(float, size_t, __global half *);
11806void __ovld vstore_half_rtz(float, size_t, __global half *);
11807void __ovld vstore_half_rtp(float, size_t, __global half *);
11808void __ovld vstore_half_rtn(float, size_t, __global half *);
11809void __ovld vstore_half(float, size_t, __local half *);
11810void __ovld vstore_half_rte(float, size_t, __local half *);
11811void __ovld vstore_half_rtz(float, size_t, __local half *);
11812void __ovld vstore_half_rtp(float, size_t, __local half *);
11813void __ovld vstore_half_rtn(float, size_t, __local half *);
11814void __ovld vstore_half(float, size_t, __private half *);
11815void __ovld vstore_half_rte(float, size_t, __private half *);
11816void __ovld vstore_half_rtz(float, size_t, __private half *);
11817void __ovld vstore_half_rtp(float, size_t, __private half *);
11818void __ovld vstore_half_rtn(float, size_t, __private half *);
11819#ifdef cl_khr_fp64
11820void __ovld vstore_half(double, size_t, __global half *);
11821void __ovld vstore_half_rte(double, size_t, __global half *);
11822void __ovld vstore_half_rtz(double, size_t, __global half *);
11823void __ovld vstore_half_rtp(double, size_t, __global half *);
11824void __ovld vstore_half_rtn(double, size_t, __global half *);
11825void __ovld vstore_half(double, size_t, __local half *);
11826void __ovld vstore_half_rte(double, size_t, __local half *);
11827void __ovld vstore_half_rtz(double, size_t, __local half *);
11828void __ovld vstore_half_rtp(double, size_t, __local half *);
11829void __ovld vstore_half_rtn(double, size_t, __local half *);
11830void __ovld vstore_half(double, size_t, __private half *);
11831void __ovld vstore_half_rte(double, size_t, __private half *);
11832void __ovld vstore_half_rtz(double, size_t, __private half *);
11833void __ovld vstore_half_rtp(double, size_t, __private half *);
11834void __ovld vstore_half_rtn(double, size_t, __private half *);
11835#endif //cl_khr_fp64
11836#endif //defined(__opencl_c_named_address_space_builtins)
11837
11838/**
11839 * The floatn value given by data is converted to
11840 * a halfn value using the appropriate rounding
11841 * mode. The halfn value is then written to
11842 * address computed as (p + (offset * n)). The
11843 * address computed as (p + (offset * n)) must be
11844 * 16-bit aligned.
11845 * vstore_halfn uses the current rounding mode.
11846 * The default current rounding mode is round to
11847 * nearest even.
11848 */
11849#if defined(__opencl_c_generic_address_space)
11850void __ovld vstore_half2(float2, size_t, half *);
11851void __ovld vstore_half3(float3, size_t, half *);
11852void __ovld vstore_half4(float4, size_t, half *);
11853void __ovld vstore_half8(float8, size_t, half *);
11854void __ovld vstore_half16(float16, size_t, half *);
11855void __ovld vstore_half2_rte(float2, size_t, half *);
11856void __ovld vstore_half3_rte(float3, size_t, half *);
11857void __ovld vstore_half4_rte(float4, size_t, half *);
11858void __ovld vstore_half8_rte(float8, size_t, half *);
11859void __ovld vstore_half16_rte(float16, size_t, half *);
11860void __ovld vstore_half2_rtz(float2, size_t, half *);
11861void __ovld vstore_half3_rtz(float3, size_t, half *);
11862void __ovld vstore_half4_rtz(float4, size_t, half *);
11863void __ovld vstore_half8_rtz(float8, size_t, half *);
11864void __ovld vstore_half16_rtz(float16, size_t, half *);
11865void __ovld vstore_half2_rtp(float2, size_t, half *);
11866void __ovld vstore_half3_rtp(float3, size_t, half *);
11867void __ovld vstore_half4_rtp(float4, size_t, half *);
11868void __ovld vstore_half8_rtp(float8, size_t, half *);
11869void __ovld vstore_half16_rtp(float16, size_t, half *);
11870void __ovld vstore_half2_rtn(float2, size_t, half *);
11871void __ovld vstore_half3_rtn(float3, size_t, half *);
11872void __ovld vstore_half4_rtn(float4, size_t, half *);
11873void __ovld vstore_half8_rtn(float8, size_t, half *);
11874void __ovld vstore_half16_rtn(float16, size_t, half *);
11875#ifdef cl_khr_fp64
11876void __ovld vstore_half2(double2, size_t, half *);
11877void __ovld vstore_half3(double3, size_t, half *);
11878void __ovld vstore_half4(double4, size_t, half *);
11879void __ovld vstore_half8(double8, size_t, half *);
11880void __ovld vstore_half16(double16, size_t, half *);
11881void __ovld vstore_half2_rte(double2, size_t, half *);
11882void __ovld vstore_half3_rte(double3, size_t, half *);
11883void __ovld vstore_half4_rte(double4, size_t, half *);
11884void __ovld vstore_half8_rte(double8, size_t, half *);
11885void __ovld vstore_half16_rte(double16, size_t, half *);
11886void __ovld vstore_half2_rtz(double2, size_t, half *);
11887void __ovld vstore_half3_rtz(double3, size_t, half *);
11888void __ovld vstore_half4_rtz(double4, size_t, half *);
11889void __ovld vstore_half8_rtz(double8, size_t, half *);
11890void __ovld vstore_half16_rtz(double16, size_t, half *);
11891void __ovld vstore_half2_rtp(double2, size_t, half *);
11892void __ovld vstore_half3_rtp(double3, size_t, half *);
11893void __ovld vstore_half4_rtp(double4, size_t, half *);
11894void __ovld vstore_half8_rtp(double8, size_t, half *);
11895void __ovld vstore_half16_rtp(double16, size_t, half *);
11896void __ovld vstore_half2_rtn(double2, size_t, half *);
11897void __ovld vstore_half3_rtn(double3, size_t, half *);
11898void __ovld vstore_half4_rtn(double4, size_t, half *);
11899void __ovld vstore_half8_rtn(double8, size_t, half *);
11900void __ovld vstore_half16_rtn(double16, size_t, half *);
11901#endif //cl_khr_fp64
11902#endif //defined(__opencl_c_generic_address_space)
11903
11904#if defined(__opencl_c_named_address_space_builtins)
11905void __ovld vstore_half2(float2, size_t, __global half *);
11906void __ovld vstore_half3(float3, size_t, __global half *);
11907void __ovld vstore_half4(float4, size_t, __global half *);
11908void __ovld vstore_half8(float8, size_t, __global half *);
11909void __ovld vstore_half16(float16, size_t, __global half *);
11910void __ovld vstore_half2_rte(float2, size_t, __global half *);
11911void __ovld vstore_half3_rte(float3, size_t, __global half *);
11912void __ovld vstore_half4_rte(float4, size_t, __global half *);
11913void __ovld vstore_half8_rte(float8, size_t, __global half *);
11914void __ovld vstore_half16_rte(float16, size_t, __global half *);
11915void __ovld vstore_half2_rtz(float2, size_t, __global half *);
11916void __ovld vstore_half3_rtz(float3, size_t, __global half *);
11917void __ovld vstore_half4_rtz(float4, size_t, __global half *);
11918void __ovld vstore_half8_rtz(float8, size_t, __global half *);
11919void __ovld vstore_half16_rtz(float16, size_t, __global half *);
11920void __ovld vstore_half2_rtp(float2, size_t, __global half *);
11921void __ovld vstore_half3_rtp(float3, size_t, __global half *);
11922void __ovld vstore_half4_rtp(float4, size_t, __global half *);
11923void __ovld vstore_half8_rtp(float8, size_t, __global half *);
11924void __ovld vstore_half16_rtp(float16, size_t, __global half *);
11925void __ovld vstore_half2_rtn(float2, size_t, __global half *);
11926void __ovld vstore_half3_rtn(float3, size_t, __global half *);
11927void __ovld vstore_half4_rtn(float4, size_t, __global half *);
11928void __ovld vstore_half8_rtn(float8, size_t, __global half *);
11929void __ovld vstore_half16_rtn(float16, size_t, __global half *);
11930void __ovld vstore_half2(float2, size_t, __local half *);
11931void __ovld vstore_half3(float3, size_t, __local half *);
11932void __ovld vstore_half4(float4, size_t, __local half *);
11933void __ovld vstore_half8(float8, size_t, __local half *);
11934void __ovld vstore_half16(float16, size_t, __local half *);
11935void __ovld vstore_half2_rte(float2, size_t, __local half *);
11936void __ovld vstore_half3_rte(float3, size_t, __local half *);
11937void __ovld vstore_half4_rte(float4, size_t, __local half *);
11938void __ovld vstore_half8_rte(float8, size_t, __local half *);
11939void __ovld vstore_half16_rte(float16, size_t, __local half *);
11940void __ovld vstore_half2_rtz(float2, size_t, __local half *);
11941void __ovld vstore_half3_rtz(float3, size_t, __local half *);
11942void __ovld vstore_half4_rtz(float4, size_t, __local half *);
11943void __ovld vstore_half8_rtz(float8, size_t, __local half *);
11944void __ovld vstore_half16_rtz(float16, size_t, __local half *);
11945void __ovld vstore_half2_rtp(float2, size_t, __local half *);
11946void __ovld vstore_half3_rtp(float3, size_t, __local half *);
11947void __ovld vstore_half4_rtp(float4, size_t, __local half *);
11948void __ovld vstore_half8_rtp(float8, size_t, __local half *);
11949void __ovld vstore_half16_rtp(float16, size_t, __local half *);
11950void __ovld vstore_half2_rtn(float2, size_t, __local half *);
11951void __ovld vstore_half3_rtn(float3, size_t, __local half *);
11952void __ovld vstore_half4_rtn(float4, size_t, __local half *);
11953void __ovld vstore_half8_rtn(float8, size_t, __local half *);
11954void __ovld vstore_half16_rtn(float16, size_t, __local half *);
11955void __ovld vstore_half2(float2, size_t, __private half *);
11956void __ovld vstore_half3(float3, size_t, __private half *);
11957void __ovld vstore_half4(float4, size_t, __private half *);
11958void __ovld vstore_half8(float8, size_t, __private half *);
11959void __ovld vstore_half16(float16, size_t, __private half *);
11960void __ovld vstore_half2_rte(float2, size_t, __private half *);
11961void __ovld vstore_half3_rte(float3, size_t, __private half *);
11962void __ovld vstore_half4_rte(float4, size_t, __private half *);
11963void __ovld vstore_half8_rte(float8, size_t, __private half *);
11964void __ovld vstore_half16_rte(float16, size_t, __private half *);
11965void __ovld vstore_half2_rtz(float2, size_t, __private half *);
11966void __ovld vstore_half3_rtz(float3, size_t, __private half *);
11967void __ovld vstore_half4_rtz(float4, size_t, __private half *);
11968void __ovld vstore_half8_rtz(float8, size_t, __private half *);
11969void __ovld vstore_half16_rtz(float16, size_t, __private half *);
11970void __ovld vstore_half2_rtp(float2, size_t, __private half *);
11971void __ovld vstore_half3_rtp(float3, size_t, __private half *);
11972void __ovld vstore_half4_rtp(float4, size_t, __private half *);
11973void __ovld vstore_half8_rtp(float8, size_t, __private half *);
11974void __ovld vstore_half16_rtp(float16, size_t, __private half *);
11975void __ovld vstore_half2_rtn(float2, size_t, __private half *);
11976void __ovld vstore_half3_rtn(float3, size_t, __private half *);
11977void __ovld vstore_half4_rtn(float4, size_t, __private half *);
11978void __ovld vstore_half8_rtn(float8, size_t, __private half *);
11979void __ovld vstore_half16_rtn(float16, size_t, __private half *);
11980#ifdef cl_khr_fp64
11981void __ovld vstore_half2(double2, size_t, __global half *);
11982void __ovld vstore_half3(double3, size_t, __global half *);
11983void __ovld vstore_half4(double4, size_t, __global half *);
11984void __ovld vstore_half8(double8, size_t, __global half *);
11985void __ovld vstore_half16(double16, size_t, __global half *);
11986void __ovld vstore_half2_rte(double2, size_t, __global half *);
11987void __ovld vstore_half3_rte(double3, size_t, __global half *);
11988void __ovld vstore_half4_rte(double4, size_t, __global half *);
11989void __ovld vstore_half8_rte(double8, size_t, __global half *);
11990void __ovld vstore_half16_rte(double16, size_t, __global half *);
11991void __ovld vstore_half2_rtz(double2, size_t, __global half *);
11992void __ovld vstore_half3_rtz(double3, size_t, __global half *);
11993void __ovld vstore_half4_rtz(double4, size_t, __global half *);
11994void __ovld vstore_half8_rtz(double8, size_t, __global half *);
11995void __ovld vstore_half16_rtz(double16, size_t, __global half *);
11996void __ovld vstore_half2_rtp(double2, size_t, __global half *);
11997void __ovld vstore_half3_rtp(double3, size_t, __global half *);
11998void __ovld vstore_half4_rtp(double4, size_t, __global half *);
11999void __ovld vstore_half8_rtp(double8, size_t, __global half *);
12000void __ovld vstore_half16_rtp(double16, size_t, __global half *);
12001void __ovld vstore_half2_rtn(double2, size_t, __global half *);
12002void __ovld vstore_half3_rtn(double3, size_t, __global half *);
12003void __ovld vstore_half4_rtn(double4, size_t, __global half *);
12004void __ovld vstore_half8_rtn(double8, size_t, __global half *);
12005void __ovld vstore_half16_rtn(double16, size_t, __global half *);
12006void __ovld vstore_half2(double2, size_t, __local half *);
12007void __ovld vstore_half3(double3, size_t, __local half *);
12008void __ovld vstore_half4(double4, size_t, __local half *);
12009void __ovld vstore_half8(double8, size_t, __local half *);
12010void __ovld vstore_half16(double16, size_t, __local half *);
12011void __ovld vstore_half2_rte(double2, size_t, __local half *);
12012void __ovld vstore_half3_rte(double3, size_t, __local half *);
12013void __ovld vstore_half4_rte(double4, size_t, __local half *);
12014void __ovld vstore_half8_rte(double8, size_t, __local half *);
12015void __ovld vstore_half16_rte(double16, size_t, __local half *);
12016void __ovld vstore_half2_rtz(double2, size_t, __local half *);
12017void __ovld vstore_half3_rtz(double3, size_t, __local half *);
12018void __ovld vstore_half4_rtz(double4, size_t, __local half *);
12019void __ovld vstore_half8_rtz(double8, size_t, __local half *);
12020void __ovld vstore_half16_rtz(double16, size_t, __local half *);
12021void __ovld vstore_half2_rtp(double2, size_t, __local half *);
12022void __ovld vstore_half3_rtp(double3, size_t, __local half *);
12023void __ovld vstore_half4_rtp(double4, size_t, __local half *);
12024void __ovld vstore_half8_rtp(double8, size_t, __local half *);
12025void __ovld vstore_half16_rtp(double16, size_t, __local half *);
12026void __ovld vstore_half2_rtn(double2, size_t, __local half *);
12027void __ovld vstore_half3_rtn(double3, size_t, __local half *);
12028void __ovld vstore_half4_rtn(double4, size_t, __local half *);
12029void __ovld vstore_half8_rtn(double8, size_t, __local half *);
12030void __ovld vstore_half16_rtn(double16, size_t, __local half *);
12031void __ovld vstore_half2(double2, size_t, __private half *);
12032void __ovld vstore_half3(double3, size_t, __private half *);
12033void __ovld vstore_half4(double4, size_t, __private half *);
12034void __ovld vstore_half8(double8, size_t, __private half *);
12035void __ovld vstore_half16(double16, size_t, __private half *);
12036void __ovld vstore_half2_rte(double2, size_t, __private half *);
12037void __ovld vstore_half3_rte(double3, size_t, __private half *);
12038void __ovld vstore_half4_rte(double4, size_t, __private half *);
12039void __ovld vstore_half8_rte(double8, size_t, __private half *);
12040void __ovld vstore_half16_rte(double16, size_t, __private half *);
12041void __ovld vstore_half2_rtz(double2, size_t, __private half *);
12042void __ovld vstore_half3_rtz(double3, size_t, __private half *);
12043void __ovld vstore_half4_rtz(double4, size_t, __private half *);
12044void __ovld vstore_half8_rtz(double8, size_t, __private half *);
12045void __ovld vstore_half16_rtz(double16, size_t, __private half *);
12046void __ovld vstore_half2_rtp(double2, size_t, __private half *);
12047void __ovld vstore_half3_rtp(double3, size_t, __private half *);
12048void __ovld vstore_half4_rtp(double4, size_t, __private half *);
12049void __ovld vstore_half8_rtp(double8, size_t, __private half *);
12050void __ovld vstore_half16_rtp(double16, size_t, __private half *);
12051void __ovld vstore_half2_rtn(double2, size_t, __private half *);
12052void __ovld vstore_half3_rtn(double3, size_t, __private half *);
12053void __ovld vstore_half4_rtn(double4, size_t, __private half *);
12054void __ovld vstore_half8_rtn(double8, size_t, __private half *);
12055void __ovld vstore_half16_rtn(double16, size_t, __private half *);
12056#endif //cl_khr_fp64
12057#endif //defined(__opencl_c_named_address_space_builtins)
12058
12059/**
12060 * For n = 1, 2, 4, 8 and 16 read sizeof (halfn)
12061 * bytes of data from address (p + (offset * n)).
12062 * The data read is interpreted as a halfn value.
12063 * The halfn value read is converted to a floatn
12064 * value and the floatn value is returned.
12065 * The address computed as (p + (offset * n))
12066 * must be aligned to sizeof (halfn) bytes.
12067 * For n = 3, vloada_half3 reads a half3 from
12068 * address (p + (offset * 4)) and returns a float3.
12069 * The address computed as (p + (offset * 4))
12070 * must be aligned to sizeof (half) * 4 bytes.
12071 */
12072float2 __ovld __purefn vloada_half2(size_t, const __constant half *);
12073float3 __ovld __purefn vloada_half3(size_t, const __constant half *);
12074float4 __ovld __purefn vloada_half4(size_t, const __constant half *);
12075float8 __ovld __purefn vloada_half8(size_t, const __constant half *);
12076float16 __ovld __purefn vloada_half16(size_t, const __constant half *);
12077#if defined(__opencl_c_generic_address_space)
12078float2 __ovld __purefn vloada_half2(size_t, const half *);
12079float3 __ovld __purefn vloada_half3(size_t, const half *);
12080float4 __ovld __purefn vloada_half4(size_t, const half *);
12081float8 __ovld __purefn vloada_half8(size_t, const half *);
12082float16 __ovld __purefn vloada_half16(size_t, const half *);
12083#endif //defined(__opencl_c_generic_address_space)
12084
12085#if defined(__opencl_c_named_address_space_builtins)
12086float2 __ovld __purefn vloada_half2(size_t, const __global half *);
12087float3 __ovld __purefn vloada_half3(size_t, const __global half *);
12088float4 __ovld __purefn vloada_half4(size_t, const __global half *);
12089float8 __ovld __purefn vloada_half8(size_t, const __global half *);
12090float16 __ovld __purefn vloada_half16(size_t, const __global half *);
12091float2 __ovld __purefn vloada_half2(size_t, const __local half *);
12092float3 __ovld __purefn vloada_half3(size_t, const __local half *);
12093float4 __ovld __purefn vloada_half4(size_t, const __local half *);
12094float8 __ovld __purefn vloada_half8(size_t, const __local half *);
12095float16 __ovld __purefn vloada_half16(size_t, const __local half *);
12096float2 __ovld __purefn vloada_half2(size_t, const __private half *);
12097float3 __ovld __purefn vloada_half3(size_t, const __private half *);
12098float4 __ovld __purefn vloada_half4(size_t, const __private half *);
12099float8 __ovld __purefn vloada_half8(size_t, const __private half *);
12100float16 __ovld __purefn vloada_half16(size_t, const __private half *);
12101#endif //defined(__opencl_c_named_address_space_builtins)
12102
12103/**
12104 * The floatn value given by data is converted to
12105 * a halfn value using the appropriate rounding
12106 * mode.
12107 * For n = 1, 2, 4, 8 and 16, the halfn value is
12108 * written to the address computed as (p + (offset
12109 * * n)). The address computed as (p + (offset *
12110 * n)) must be aligned to sizeof (halfn) bytes.
12111 * For n = 3, the half3 value is written to the
12112 * address computed as (p + (offset * 4)). The
12113 * address computed as (p + (offset * 4)) must be
12114 * aligned to sizeof (half) * 4 bytes.
12115 * vstorea_halfn uses the current rounding
12116 * mode. The default current rounding mode is
12117 * round to nearest even.
12118 */
12119#if defined(__opencl_c_generic_address_space)
12120void __ovld vstorea_half2(float2, size_t, half *);
12121void __ovld vstorea_half3(float3, size_t, half *);
12122void __ovld vstorea_half4(float4, size_t, half *);
12123void __ovld vstorea_half8(float8, size_t, half *);
12124void __ovld vstorea_half16(float16, size_t, half *);
12125
12126void __ovld vstorea_half2_rte(float2, size_t, half *);
12127void __ovld vstorea_half3_rte(float3, size_t, half *);
12128void __ovld vstorea_half4_rte(float4, size_t, half *);
12129void __ovld vstorea_half8_rte(float8, size_t, half *);
12130void __ovld vstorea_half16_rte(float16, size_t, half *);
12131
12132void __ovld vstorea_half2_rtz(float2, size_t, half *);
12133void __ovld vstorea_half3_rtz(float3, size_t, half *);
12134void __ovld vstorea_half4_rtz(float4, size_t, half *);
12135void __ovld vstorea_half8_rtz(float8, size_t, half *);
12136void __ovld vstorea_half16_rtz(float16, size_t, half *);
12137
12138void __ovld vstorea_half2_rtp(float2, size_t, half *);
12139void __ovld vstorea_half3_rtp(float3, size_t, half *);
12140void __ovld vstorea_half4_rtp(float4, size_t, half *);
12141void __ovld vstorea_half8_rtp(float8, size_t, half *);
12142void __ovld vstorea_half16_rtp(float16, size_t, half *);
12143
12144void __ovld vstorea_half2_rtn(float2, size_t, half *);
12145void __ovld vstorea_half3_rtn(float3, size_t, half *);
12146void __ovld vstorea_half4_rtn(float4, size_t, half *);
12147void __ovld vstorea_half8_rtn(float8, size_t, half *);
12148void __ovld vstorea_half16_rtn(float16, size_t, half *);
12149
12150#ifdef cl_khr_fp64
12151void __ovld vstorea_half2(double2, size_t, half *);
12152void __ovld vstorea_half3(double3, size_t, half *);
12153void __ovld vstorea_half4(double4, size_t, half *);
12154void __ovld vstorea_half8(double8, size_t, half *);
12155void __ovld vstorea_half16(double16, size_t, half *);
12156
12157void __ovld vstorea_half2_rte(double2, size_t, half *);
12158void __ovld vstorea_half3_rte(double3, size_t, half *);
12159void __ovld vstorea_half4_rte(double4, size_t, half *);
12160void __ovld vstorea_half8_rte(double8, size_t, half *);
12161void __ovld vstorea_half16_rte(double16, size_t, half *);
12162
12163void __ovld vstorea_half2_rtz(double2, size_t, half *);
12164void __ovld vstorea_half3_rtz(double3, size_t, half *);
12165void __ovld vstorea_half4_rtz(double4, size_t, half *);
12166void __ovld vstorea_half8_rtz(double8, size_t, half *);
12167void __ovld vstorea_half16_rtz(double16, size_t, half *);
12168
12169void __ovld vstorea_half2_rtp(double2, size_t, half *);
12170void __ovld vstorea_half3_rtp(double3, size_t, half *);
12171void __ovld vstorea_half4_rtp(double4, size_t, half *);
12172void __ovld vstorea_half8_rtp(double8, size_t, half *);
12173void __ovld vstorea_half16_rtp(double16, size_t, half *);
12174
12175void __ovld vstorea_half2_rtn(double2, size_t, half *);
12176void __ovld vstorea_half3_rtn(double3, size_t, half *);
12177void __ovld vstorea_half4_rtn(double4, size_t, half *);
12178void __ovld vstorea_half8_rtn(double8, size_t, half *);
12179void __ovld vstorea_half16_rtn(double16, size_t, half *);
12180#endif //cl_khr_fp64
12181#endif //defined(__opencl_c_generic_address_space)
12182
12183#if defined(__opencl_c_named_address_space_builtins)
12184void __ovld vstorea_half2(float2, size_t, __global half *);
12185void __ovld vstorea_half3(float3, size_t, __global half *);
12186void __ovld vstorea_half4(float4, size_t, __global half *);
12187void __ovld vstorea_half8(float8, size_t, __global half *);
12188void __ovld vstorea_half16(float16, size_t, __global half *);
12189
12190void __ovld vstorea_half2_rte(float2, size_t, __global half *);
12191void __ovld vstorea_half3_rte(float3, size_t, __global half *);
12192void __ovld vstorea_half4_rte(float4, size_t, __global half *);
12193void __ovld vstorea_half8_rte(float8, size_t, __global half *);
12194void __ovld vstorea_half16_rte(float16, size_t, __global half *);
12195
12196void __ovld vstorea_half2_rtz(float2, size_t, __global half *);
12197void __ovld vstorea_half3_rtz(float3, size_t, __global half *);
12198void __ovld vstorea_half4_rtz(float4, size_t, __global half *);
12199void __ovld vstorea_half8_rtz(float8, size_t, __global half *);
12200void __ovld vstorea_half16_rtz(float16, size_t, __global half *);
12201
12202void __ovld vstorea_half2_rtp(float2, size_t, __global half *);
12203void __ovld vstorea_half3_rtp(float3, size_t, __global half *);
12204void __ovld vstorea_half4_rtp(float4, size_t, __global half *);
12205void __ovld vstorea_half8_rtp(float8, size_t, __global half *);
12206void __ovld vstorea_half16_rtp(float16, size_t, __global half *);
12207
12208void __ovld vstorea_half2_rtn(float2, size_t, __global half *);
12209void __ovld vstorea_half3_rtn(float3, size_t, __global half *);
12210void __ovld vstorea_half4_rtn(float4, size_t, __global half *);
12211void __ovld vstorea_half8_rtn(float8, size_t, __global half *);
12212void __ovld vstorea_half16_rtn(float16, size_t, __global half *);
12213
12214void __ovld vstorea_half2(float2, size_t, __local half *);
12215void __ovld vstorea_half3(float3, size_t, __local half *);
12216void __ovld vstorea_half4(float4, size_t, __local half *);
12217void __ovld vstorea_half8(float8, size_t, __local half *);
12218void __ovld vstorea_half16(float16, size_t, __local half *);
12219
12220void __ovld vstorea_half2_rte(float2, size_t, __local half *);
12221void __ovld vstorea_half3_rte(float3, size_t, __local half *);
12222void __ovld vstorea_half4_rte(float4, size_t, __local half *);
12223void __ovld vstorea_half8_rte(float8, size_t, __local half *);
12224void __ovld vstorea_half16_rte(float16, size_t, __local half *);
12225
12226void __ovld vstorea_half2_rtz(float2, size_t, __local half *);
12227void __ovld vstorea_half3_rtz(float3, size_t, __local half *);
12228void __ovld vstorea_half4_rtz(float4, size_t, __local half *);
12229void __ovld vstorea_half8_rtz(float8, size_t, __local half *);
12230void __ovld vstorea_half16_rtz(float16, size_t, __local half *);
12231
12232void __ovld vstorea_half2_rtp(float2, size_t, __local half *);
12233void __ovld vstorea_half3_rtp(float3, size_t, __local half *);
12234void __ovld vstorea_half4_rtp(float4, size_t, __local half *);
12235void __ovld vstorea_half8_rtp(float8, size_t, __local half *);
12236void __ovld vstorea_half16_rtp(float16, size_t, __local half *);
12237
12238void __ovld vstorea_half2_rtn(float2, size_t, __local half *);
12239void __ovld vstorea_half3_rtn(float3, size_t, __local half *);
12240void __ovld vstorea_half4_rtn(float4, size_t, __local half *);
12241void __ovld vstorea_half8_rtn(float8, size_t, __local half *);
12242void __ovld vstorea_half16_rtn(float16, size_t, __local half *);
12243
12244void __ovld vstorea_half2(float2, size_t, __private half *);
12245void __ovld vstorea_half3(float3, size_t, __private half *);
12246void __ovld vstorea_half4(float4, size_t, __private half *);
12247void __ovld vstorea_half8(float8, size_t, __private half *);
12248void __ovld vstorea_half16(float16, size_t, __private half *);
12249
12250void __ovld vstorea_half2_rte(float2, size_t, __private half *);
12251void __ovld vstorea_half3_rte(float3, size_t, __private half *);
12252void __ovld vstorea_half4_rte(float4, size_t, __private half *);
12253void __ovld vstorea_half8_rte(float8, size_t, __private half *);
12254void __ovld vstorea_half16_rte(float16, size_t, __private half *);
12255
12256void __ovld vstorea_half2_rtz(float2, size_t, __private half *);
12257void __ovld vstorea_half3_rtz(float3, size_t, __private half *);
12258void __ovld vstorea_half4_rtz(float4, size_t, __private half *);
12259void __ovld vstorea_half8_rtz(float8, size_t, __private half *);
12260void __ovld vstorea_half16_rtz(float16, size_t, __private half *);
12261
12262void __ovld vstorea_half2_rtp(float2, size_t, __private half *);
12263void __ovld vstorea_half3_rtp(float3, size_t, __private half *);
12264void __ovld vstorea_half4_rtp(float4, size_t, __private half *);
12265void __ovld vstorea_half8_rtp(float8, size_t, __private half *);
12266void __ovld vstorea_half16_rtp(float16, size_t, __private half *);
12267
12268void __ovld vstorea_half2_rtn(float2, size_t, __private half *);
12269void __ovld vstorea_half3_rtn(float3, size_t, __private half *);
12270void __ovld vstorea_half4_rtn(float4, size_t, __private half *);
12271void __ovld vstorea_half8_rtn(float8, size_t, __private half *);
12272void __ovld vstorea_half16_rtn(float16, size_t, __private half *);
12273
12274#ifdef cl_khr_fp64
12275void __ovld vstorea_half2(double2, size_t, __global half *);
12276void __ovld vstorea_half3(double3, size_t, __global half *);
12277void __ovld vstorea_half4(double4, size_t, __global half *);
12278void __ovld vstorea_half8(double8, size_t, __global half *);
12279void __ovld vstorea_half16(double16, size_t, __global half *);
12280
12281void __ovld vstorea_half2_rte(double2, size_t, __global half *);
12282void __ovld vstorea_half3_rte(double3, size_t, __global half *);
12283void __ovld vstorea_half4_rte(double4, size_t, __global half *);
12284void __ovld vstorea_half8_rte(double8, size_t, __global half *);
12285void __ovld vstorea_half16_rte(double16, size_t, __global half *);
12286
12287void __ovld vstorea_half2_rtz(double2, size_t, __global half *);
12288void __ovld vstorea_half3_rtz(double3, size_t, __global half *);
12289void __ovld vstorea_half4_rtz(double4, size_t, __global half *);
12290void __ovld vstorea_half8_rtz(double8, size_t, __global half *);
12291void __ovld vstorea_half16_rtz(double16, size_t, __global half *);
12292
12293void __ovld vstorea_half2_rtp(double2, size_t, __global half *);
12294void __ovld vstorea_half3_rtp(double3, size_t, __global half *);
12295void __ovld vstorea_half4_rtp(double4, size_t, __global half *);
12296void __ovld vstorea_half8_rtp(double8, size_t, __global half *);
12297void __ovld vstorea_half16_rtp(double16, size_t, __global half *);
12298
12299void __ovld vstorea_half2_rtn(double2, size_t, __global half *);
12300void __ovld vstorea_half3_rtn(double3, size_t, __global half *);
12301void __ovld vstorea_half4_rtn(double4, size_t, __global half *);
12302void __ovld vstorea_half8_rtn(double8, size_t, __global half *);
12303void __ovld vstorea_half16_rtn(double16, size_t, __global half *);
12304
12305void __ovld vstorea_half2(double2, size_t, __local half *);
12306void __ovld vstorea_half3(double3, size_t, __local half *);
12307void __ovld vstorea_half4(double4, size_t, __local half *);
12308void __ovld vstorea_half8(double8, size_t, __local half *);
12309void __ovld vstorea_half16(double16, size_t, __local half *);
12310
12311void __ovld vstorea_half2_rte(double2, size_t, __local half *);
12312void __ovld vstorea_half3_rte(double3, size_t, __local half *);
12313void __ovld vstorea_half4_rte(double4, size_t, __local half *);
12314void __ovld vstorea_half8_rte(double8, size_t, __local half *);
12315void __ovld vstorea_half16_rte(double16, size_t, __local half *);
12316
12317void __ovld vstorea_half2_rtz(double2, size_t, __local half *);
12318void __ovld vstorea_half3_rtz(double3, size_t, __local half *);
12319void __ovld vstorea_half4_rtz(double4, size_t, __local half *);
12320void __ovld vstorea_half8_rtz(double8, size_t, __local half *);
12321void __ovld vstorea_half16_rtz(double16, size_t, __local half *);
12322
12323void __ovld vstorea_half2_rtp(double2, size_t, __local half *);
12324void __ovld vstorea_half3_rtp(double3, size_t, __local half *);
12325void __ovld vstorea_half4_rtp(double4, size_t, __local half *);
12326void __ovld vstorea_half8_rtp(double8, size_t, __local half *);
12327void __ovld vstorea_half16_rtp(double16, size_t, __local half *);
12328
12329void __ovld vstorea_half2_rtn(double2, size_t, __local half *);
12330void __ovld vstorea_half3_rtn(double3, size_t, __local half *);
12331void __ovld vstorea_half4_rtn(double4, size_t, __local half *);
12332void __ovld vstorea_half8_rtn(double8, size_t, __local half *);
12333void __ovld vstorea_half16_rtn(double16, size_t, __local half *);
12334
12335void __ovld vstorea_half2(double2, size_t, __private half *);
12336void __ovld vstorea_half3(double3, size_t, __private half *);
12337void __ovld vstorea_half4(double4, size_t, __private half *);
12338void __ovld vstorea_half8(double8, size_t, __private half *);
12339void __ovld vstorea_half16(double16, size_t, __private half *);
12340
12341void __ovld vstorea_half2_rte(double2, size_t, __private half *);
12342void __ovld vstorea_half3_rte(double3, size_t, __private half *);
12343void __ovld vstorea_half4_rte(double4, size_t, __private half *);
12344void __ovld vstorea_half8_rte(double8, size_t, __private half *);
12345void __ovld vstorea_half16_rte(double16, size_t, __private half *);
12346
12347void __ovld vstorea_half2_rtz(double2, size_t, __private half *);
12348void __ovld vstorea_half3_rtz(double3, size_t, __private half *);
12349void __ovld vstorea_half4_rtz(double4, size_t, __private half *);
12350void __ovld vstorea_half8_rtz(double8, size_t, __private half *);
12351void __ovld vstorea_half16_rtz(double16, size_t, __private half *);
12352
12353void __ovld vstorea_half2_rtp(double2, size_t, __private half *);
12354void __ovld vstorea_half3_rtp(double3, size_t, __private half *);
12355void __ovld vstorea_half4_rtp(double4, size_t, __private half *);
12356void __ovld vstorea_half8_rtp(double8, size_t, __private half *);
12357void __ovld vstorea_half16_rtp(double16, size_t, __private half *);
12358
12359void __ovld vstorea_half2_rtn(double2, size_t, __private half *);
12360void __ovld vstorea_half3_rtn(double3, size_t, __private half *);
12361void __ovld vstorea_half4_rtn(double4, size_t, __private half *);
12362void __ovld vstorea_half8_rtn(double8, size_t, __private half *);
12363void __ovld vstorea_half16_rtn(double16, size_t, __private half *);
12364#endif //cl_khr_fp64
12365#endif //defined(__opencl_c_named_address_space_builtins)
12366
12367// OpenCL v1.1 s6.11.8, v1.2 s6.12.8, v2.0 s6.13.8 - Synchronization Functions
12368
12369/**
12370 * All work-items in a work-group executing the kernel
12371 * on a processor must execute this function before any
12372 * are allowed to continue execution beyond the barrier.
12373 * This function must be encountered by all work-items in
12374 * a work-group executing the kernel.
12375 * If barrier is inside a conditional statement, then all
12376 * work-items must enter the conditional if any work-item
12377 * enters the conditional statement and executes the
12378 * barrier.
12379 * If barrer is inside a loop, all work-items must execute
12380 * the barrier for each iteration of the loop before any are
12381 * allowed to continue execution beyond the barrier.
12382 * The barrier function also queues a memory fence
12383 * (reads and writes) to ensure correct ordering of
12384 * memory operations to local or global memory.
12385 * The flags argument specifies the memory address space
12386 * and can be set to a combination of the following literal
12387 * values.
12388 * CLK_LOCAL_MEM_FENCE - The barrier function
12389 * will either flush any variables stored in local memory
12390 * or queue a memory fence to ensure correct ordering of
12391 * memory operations to local memory.
12392 * CLK_GLOBAL_MEM_FENCE - The barrier function
12393 * will queue a memory fence to ensure correct ordering
12394 * of memory operations to global memory. This can be
12395 * useful when work-items, for example, write to buffer or
12396 * image objects and then want to read the updated data.
12397 */
12398
12399void __ovld __conv barrier(cl_mem_fence_flags);
12400
12401#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
12402void __ovld __conv work_group_barrier(cl_mem_fence_flags, memory_scope);
12403void __ovld __conv work_group_barrier(cl_mem_fence_flags);
12404#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
12405
12406// OpenCL v1.1 s6.11.9, v1.2 s6.12.9 - Explicit Memory Fence Functions
12407
12408/**
12409 * Orders loads and stores of a work-item
12410 * executing a kernel. This means that loads
12411 * and stores preceding the mem_fence will
12412 * be committed to memory before any loads
12413 * and stores following the mem_fence.
12414 * The flags argument specifies the memory
12415 * address space and can be set to a
12416 * combination of the following literal
12417 * values:
12418 * CLK_LOCAL_MEM_FENCE
12419 * CLK_GLOBAL_MEM_FENCE.
12420 */
12421void __ovld mem_fence(cl_mem_fence_flags);
12422
12423/**
12424 * Read memory barrier that orders only
12425 * loads.
12426 * The flags argument specifies the memory
12427 * address space and can be set to a
12428 * combination of the following literal
12429 * values:
12430 * CLK_LOCAL_MEM_FENCE
12431 * CLK_GLOBAL_MEM_FENCE.
12432 */
12433void __ovld read_mem_fence(cl_mem_fence_flags);
12434
12435/**
12436 * Write memory barrier that orders only
12437 * stores.
12438 * The flags argument specifies the memory
12439 * address space and can be set to a
12440 * combination of the following literal
12441 * values:
12442 * CLK_LOCAL_MEM_FENCE
12443 * CLK_GLOBAL_MEM_FENCE.
12444 */
12445void __ovld write_mem_fence(cl_mem_fence_flags);
12446
12447// OpenCL v2.0 s6.13.9 - Address Space Qualifier Functions
12448
12449#if defined(__opencl_c_generic_address_space)
12450cl_mem_fence_flags __ovld get_fence(const void *ptr);
12451cl_mem_fence_flags __ovld get_fence(void *ptr);
12452
12453/**
12454 * Builtin functions to_global, to_local, and to_private need to be declared as Clang builtin functions
12455 * and checked in Sema since they should be declared as
12456 * addr gentype* to_addr (gentype*);
12457 * where gentype is builtin type or user defined type.
12458 */
12459
12460#endif //defined(__opencl_c_generic_address_space)
12461
12462// OpenCL v1.1 s6.11.10, v1.2 s6.12.10, v2.0 s6.13.10 - Async Copies from Global to Local Memory, Local to Global Memory, and Prefetch
12463
12464/**
12465 * event_t async_work_group_copy (
12466 * __global gentype *dst,
12467 * const __local gentype *src,
12468 * size_t num_elements,
12469 * event_t event)
12470 * Perform an async copy of num_elements
12471 * gentype elements from src to dst. The async
12472 * copy is performed by all work-items in a workgroup
12473 * and this built-in function must therefore
12474 * be encountered by all work-items in a workgroup
12475 * executing the kernel with the same
12476 * argument values; otherwise the results are
12477 * undefined.
12478 * Returns an event object that can be used by
12479 * wait_group_events to wait for the async copy
12480 * to finish. The event argument can also be used
12481 * to associate the async_work_group_copy with
12482 * a previous async copy allowing an event to be
12483 * shared by multiple async copies; otherwise event
12484 * should be zero.
12485 * If event argument is non-zero, the event object
12486 * supplied in event argument will be returned.
12487 * This function does not perform any implicit
12488 * synchronization of source data such as using a
12489 * barrier before performing the copy.
12490 */
12491event_t __ovld async_work_group_copy(__local char *, const __global char *, size_t, event_t);
12492event_t __ovld async_work_group_copy(__local uchar *, const __global uchar *, size_t, event_t);
12493event_t __ovld async_work_group_copy(__local short *, const __global short *, size_t, event_t);
12494event_t __ovld async_work_group_copy(__local ushort *, const __global ushort *, size_t, event_t);
12495event_t __ovld async_work_group_copy(__local int *, const __global int *, size_t, event_t);
12496event_t __ovld async_work_group_copy(__local uint *, const __global uint *, size_t, event_t);
12497event_t __ovld async_work_group_copy(__local long *, const __global long *, size_t, event_t);
12498event_t __ovld async_work_group_copy(__local ulong *, const __global ulong *, size_t, event_t);
12499event_t __ovld async_work_group_copy(__local float *, const __global float *, size_t, event_t);
12500event_t __ovld async_work_group_copy(__local char2 *, const __global char2 *, size_t, event_t);
12501event_t __ovld async_work_group_copy(__local uchar2 *, const __global uchar2 *, size_t, event_t);
12502event_t __ovld async_work_group_copy(__local short2 *, const __global short2 *, size_t, event_t);
12503event_t __ovld async_work_group_copy(__local ushort2 *, const __global ushort2 *, size_t, event_t);
12504event_t __ovld async_work_group_copy(__local int2 *, const __global int2 *, size_t, event_t);
12505event_t __ovld async_work_group_copy(__local uint2 *, const __global uint2 *, size_t, event_t);
12506event_t __ovld async_work_group_copy(__local long2 *, const __global long2 *, size_t, event_t);
12507event_t __ovld async_work_group_copy(__local ulong2 *, const __global ulong2 *, size_t, event_t);
12508event_t __ovld async_work_group_copy(__local float2 *, const __global float2 *, size_t, event_t);
12509event_t __ovld async_work_group_copy(__local char3 *, const __global char3 *, size_t, event_t);
12510event_t __ovld async_work_group_copy(__local uchar3 *, const __global uchar3 *, size_t, event_t);
12511event_t __ovld async_work_group_copy(__local short3 *, const __global short3 *, size_t, event_t);
12512event_t __ovld async_work_group_copy(__local ushort3 *, const __global ushort3 *, size_t, event_t);
12513event_t __ovld async_work_group_copy(__local int3 *, const __global int3 *, size_t, event_t);
12514event_t __ovld async_work_group_copy(__local uint3 *, const __global uint3 *, size_t, event_t);
12515event_t __ovld async_work_group_copy(__local long3 *, const __global long3 *, size_t, event_t);
12516event_t __ovld async_work_group_copy(__local ulong3 *, const __global ulong3 *, size_t, event_t);
12517event_t __ovld async_work_group_copy(__local float3 *, const __global float3 *, size_t, event_t);
12518event_t __ovld async_work_group_copy(__local char4 *, const __global char4 *, size_t, event_t);
12519event_t __ovld async_work_group_copy(__local uchar4 *, const __global uchar4 *, size_t, event_t);
12520event_t __ovld async_work_group_copy(__local short4 *, const __global short4 *, size_t, event_t);
12521event_t __ovld async_work_group_copy(__local ushort4 *, const __global ushort4 *, size_t, event_t);
12522event_t __ovld async_work_group_copy(__local int4 *, const __global int4 *, size_t, event_t);
12523event_t __ovld async_work_group_copy(__local uint4 *, const __global uint4 *, size_t, event_t);
12524event_t __ovld async_work_group_copy(__local long4 *, const __global long4 *, size_t, event_t);
12525event_t __ovld async_work_group_copy(__local ulong4 *, const __global ulong4 *, size_t, event_t);
12526event_t __ovld async_work_group_copy(__local float4 *, const __global float4 *, size_t, event_t);
12527event_t __ovld async_work_group_copy(__local char8 *, const __global char8 *, size_t, event_t);
12528event_t __ovld async_work_group_copy(__local uchar8 *, const __global uchar8 *, size_t, event_t);
12529event_t __ovld async_work_group_copy(__local short8 *, const __global short8 *, size_t, event_t);
12530event_t __ovld async_work_group_copy(__local ushort8 *, const __global ushort8 *, size_t, event_t);
12531event_t __ovld async_work_group_copy(__local int8 *, const __global int8 *, size_t, event_t);
12532event_t __ovld async_work_group_copy(__local uint8 *, const __global uint8 *, size_t, event_t);
12533event_t __ovld async_work_group_copy(__local long8 *, const __global long8 *, size_t, event_t);
12534event_t __ovld async_work_group_copy(__local ulong8 *, const __global ulong8 *, size_t, event_t);
12535event_t __ovld async_work_group_copy(__local float8 *, const __global float8 *, size_t, event_t);
12536event_t __ovld async_work_group_copy(__local char16 *, const __global char16 *, size_t, event_t);
12537event_t __ovld async_work_group_copy(__local uchar16 *, const __global uchar16 *, size_t, event_t);
12538event_t __ovld async_work_group_copy(__local short16 *, const __global short16 *, size_t, event_t);
12539event_t __ovld async_work_group_copy(__local ushort16 *, const __global ushort16 *, size_t, event_t);
12540event_t __ovld async_work_group_copy(__local int16 *, const __global int16 *, size_t, event_t);
12541event_t __ovld async_work_group_copy(__local uint16 *, const __global uint16 *, size_t, event_t);
12542event_t __ovld async_work_group_copy(__local long16 *, const __global long16 *, size_t, event_t);
12543event_t __ovld async_work_group_copy(__local ulong16 *, const __global ulong16 *, size_t, event_t);
12544event_t __ovld async_work_group_copy(__local float16 *, const __global float16 *, size_t, event_t);
12545event_t __ovld async_work_group_copy(__global char *, const __local char *, size_t, event_t);
12546event_t __ovld async_work_group_copy(__global uchar *, const __local uchar *, size_t, event_t);
12547event_t __ovld async_work_group_copy(__global short *, const __local short *, size_t, event_t);
12548event_t __ovld async_work_group_copy(__global ushort *, const __local ushort *, size_t, event_t);
12549event_t __ovld async_work_group_copy(__global int *, const __local int *, size_t, event_t);
12550event_t __ovld async_work_group_copy(__global uint *, const __local uint *, size_t, event_t);
12551event_t __ovld async_work_group_copy(__global long *, const __local long *, size_t, event_t);
12552event_t __ovld async_work_group_copy(__global ulong *, const __local ulong *, size_t, event_t);
12553event_t __ovld async_work_group_copy(__global float *, const __local float *, size_t, event_t);
12554event_t __ovld async_work_group_copy(__global char2 *, const __local char2 *, size_t, event_t);
12555event_t __ovld async_work_group_copy(__global uchar2 *, const __local uchar2 *, size_t, event_t);
12556event_t __ovld async_work_group_copy(__global short2 *, const __local short2 *, size_t, event_t);
12557event_t __ovld async_work_group_copy(__global ushort2 *, const __local ushort2 *, size_t, event_t);
12558event_t __ovld async_work_group_copy(__global int2 *, const __local int2 *, size_t, event_t);
12559event_t __ovld async_work_group_copy(__global uint2 *, const __local uint2 *, size_t, event_t);
12560event_t __ovld async_work_group_copy(__global long2 *, const __local long2 *, size_t, event_t);
12561event_t __ovld async_work_group_copy(__global ulong2 *, const __local ulong2 *, size_t, event_t);
12562event_t __ovld async_work_group_copy(__global float2 *, const __local float2 *, size_t, event_t);
12563event_t __ovld async_work_group_copy(__global char3 *, const __local char3 *, size_t, event_t);
12564event_t __ovld async_work_group_copy(__global uchar3 *, const __local uchar3 *, size_t, event_t);
12565event_t __ovld async_work_group_copy(__global short3 *, const __local short3 *, size_t, event_t);
12566event_t __ovld async_work_group_copy(__global ushort3 *, const __local ushort3 *, size_t, event_t);
12567event_t __ovld async_work_group_copy(__global int3 *, const __local int3 *, size_t, event_t);
12568event_t __ovld async_work_group_copy(__global uint3 *, const __local uint3 *, size_t, event_t);
12569event_t __ovld async_work_group_copy(__global long3 *, const __local long3 *, size_t, event_t);
12570event_t __ovld async_work_group_copy(__global ulong3 *, const __local ulong3 *, size_t, event_t);
12571event_t __ovld async_work_group_copy(__global float3 *, const __local float3 *, size_t, event_t);
12572event_t __ovld async_work_group_copy(__global char4 *, const __local char4 *, size_t, event_t);
12573event_t __ovld async_work_group_copy(__global uchar4 *, const __local uchar4 *, size_t, event_t);
12574event_t __ovld async_work_group_copy(__global short4 *, const __local short4 *, size_t, event_t);
12575event_t __ovld async_work_group_copy(__global ushort4 *, const __local ushort4 *, size_t, event_t);
12576event_t __ovld async_work_group_copy(__global int4 *, const __local int4 *, size_t, event_t);
12577event_t __ovld async_work_group_copy(__global uint4 *, const __local uint4 *, size_t, event_t);
12578event_t __ovld async_work_group_copy(__global long4 *, const __local long4 *, size_t, event_t);
12579event_t __ovld async_work_group_copy(__global ulong4 *, const __local ulong4 *, size_t, event_t);
12580event_t __ovld async_work_group_copy(__global float4 *, const __local float4 *, size_t, event_t);
12581event_t __ovld async_work_group_copy(__global char8 *, const __local char8 *, size_t, event_t);
12582event_t __ovld async_work_group_copy(__global uchar8 *, const __local uchar8 *, size_t, event_t);
12583event_t __ovld async_work_group_copy(__global short8 *, const __local short8 *, size_t, event_t);
12584event_t __ovld async_work_group_copy(__global ushort8 *, const __local ushort8 *, size_t, event_t);
12585event_t __ovld async_work_group_copy(__global int8 *, const __local int8 *, size_t, event_t);
12586event_t __ovld async_work_group_copy(__global uint8 *, const __local uint8 *, size_t, event_t);
12587event_t __ovld async_work_group_copy(__global long8 *, const __local long8 *, size_t, event_t);
12588event_t __ovld async_work_group_copy(__global ulong8 *, const __local ulong8 *, size_t, event_t);
12589event_t __ovld async_work_group_copy(__global float8 *, const __local float8 *, size_t, event_t);
12590event_t __ovld async_work_group_copy(__global char16 *, const __local char16 *, size_t, event_t);
12591event_t __ovld async_work_group_copy(__global uchar16 *, const __local uchar16 *, size_t, event_t);
12592event_t __ovld async_work_group_copy(__global short16 *, const __local short16 *, size_t, event_t);
12593event_t __ovld async_work_group_copy(__global ushort16 *, const __local ushort16 *, size_t, event_t);
12594event_t __ovld async_work_group_copy(__global int16 *, const __local int16 *, size_t, event_t);
12595event_t __ovld async_work_group_copy(__global uint16 *, const __local uint16 *, size_t, event_t);
12596event_t __ovld async_work_group_copy(__global long16 *, const __local long16 *, size_t, event_t);
12597event_t __ovld async_work_group_copy(__global ulong16 *, const __local ulong16 *, size_t, event_t);
12598event_t __ovld async_work_group_copy(__global float16 *, const __local float16 *, size_t, event_t);
12599#ifdef cl_khr_fp64
12600event_t __ovld async_work_group_copy(__local double *, const __global double *, size_t, event_t);
12601event_t __ovld async_work_group_copy(__local double2 *, const __global double2 *, size_t, event_t);
12602event_t __ovld async_work_group_copy(__local double3 *, const __global double3 *, size_t, event_t);
12603event_t __ovld async_work_group_copy(__local double4 *, const __global double4 *, size_t, event_t);
12604event_t __ovld async_work_group_copy(__local double8 *, const __global double8 *, size_t, event_t);
12605event_t __ovld async_work_group_copy(__local double16 *, const __global double16 *, size_t, event_t);
12606event_t __ovld async_work_group_copy(__global double *, const __local double *, size_t, event_t);
12607event_t __ovld async_work_group_copy(__global double2 *, const __local double2 *, size_t, event_t);
12608event_t __ovld async_work_group_copy(__global double3 *, const __local double3 *, size_t, event_t);
12609event_t __ovld async_work_group_copy(__global double4 *, const __local double4 *, size_t, event_t);
12610event_t __ovld async_work_group_copy(__global double8 *, const __local double8 *, size_t, event_t);
12611event_t __ovld async_work_group_copy(__global double16 *, const __local double16 *, size_t, event_t);
12612#endif //cl_khr_fp64
12613#ifdef cl_khr_fp16
12614event_t __ovld async_work_group_copy(__local half *, const __global half *, size_t, event_t);
12615event_t __ovld async_work_group_copy(__local half2 *, const __global half2 *, size_t, event_t);
12616event_t __ovld async_work_group_copy(__local half3 *, const __global half3 *, size_t, event_t);
12617event_t __ovld async_work_group_copy(__local half4 *, const __global half4 *, size_t, event_t);
12618event_t __ovld async_work_group_copy(__local half8 *, const __global half8 *, size_t, event_t);
12619event_t __ovld async_work_group_copy(__local half16 *, const __global half16 *, size_t, event_t);
12620event_t __ovld async_work_group_copy(__global half *, const __local half *, size_t, event_t);
12621event_t __ovld async_work_group_copy(__global half2 *, const __local half2 *, size_t, event_t);
12622event_t __ovld async_work_group_copy(__global half3 *, const __local half3 *, size_t, event_t);
12623event_t __ovld async_work_group_copy(__global half4 *, const __local half4 *, size_t, event_t);
12624event_t __ovld async_work_group_copy(__global half8 *, const __local half8 *, size_t, event_t);
12625event_t __ovld async_work_group_copy(__global half16 *, const __local half16 *, size_t, event_t);
12626#endif //cl_khr_fp16
12627
12628/**
12629 * Perform an async gather of num_elements
12630 * gentype elements from src to dst. The
12631 * src_stride is the stride in elements for each
12632 * gentype element read from src. The dst_stride
12633 * is the stride in elements for each gentype
12634 * element written to dst. The async gather is
12635 * performed by all work-items in a work-group.
12636 * This built-in function must therefore be
12637 * encountered by all work-items in a work-group
12638 * executing the kernel with the same argument
12639 * values; otherwise the results are undefined.
12640 * Returns an event object that can be used by
12641 * wait_group_events to wait for the async copy
12642 * to finish. The event argument can also be used
12643 * to associate the
12644 * async_work_group_strided_copy with a
12645 * previous async copy allowing an event to be
12646 * shared by multiple async copies; otherwise event
12647 * should be zero.
12648 * If event argument is non-zero, the event object
12649 * supplied in event argument will be returned.
12650 * This function does not perform any implicit
12651 * synchronization of source data such as using a
12652 * barrier before performing the copy.
12653 */
12654event_t __ovld async_work_group_strided_copy(__local char *, const __global char *, size_t, size_t, event_t);
12655event_t __ovld async_work_group_strided_copy(__local uchar *, const __global uchar *, size_t, size_t, event_t);
12656event_t __ovld async_work_group_strided_copy(__local short *, const __global short *, size_t, size_t, event_t);
12657event_t __ovld async_work_group_strided_copy(__local ushort *, const __global ushort *, size_t, size_t, event_t);
12658event_t __ovld async_work_group_strided_copy(__local int *, const __global int *, size_t, size_t, event_t);
12659event_t __ovld async_work_group_strided_copy(__local uint *, const __global uint *, size_t, size_t, event_t);
12660event_t __ovld async_work_group_strided_copy(__local long *, const __global long *, size_t, size_t, event_t);
12661event_t __ovld async_work_group_strided_copy(__local ulong *, const __global ulong *, size_t, size_t, event_t);
12662event_t __ovld async_work_group_strided_copy(__local float *, const __global float *, size_t, size_t, event_t);
12663event_t __ovld async_work_group_strided_copy(__local char2 *, const __global char2 *, size_t, size_t, event_t);
12664event_t __ovld async_work_group_strided_copy(__local uchar2 *, const __global uchar2 *, size_t, size_t, event_t);
12665event_t __ovld async_work_group_strided_copy(__local short2 *, const __global short2 *, size_t, size_t, event_t);
12666event_t __ovld async_work_group_strided_copy(__local ushort2 *, const __global ushort2 *, size_t, size_t, event_t);
12667event_t __ovld async_work_group_strided_copy(__local int2 *, const __global int2 *, size_t, size_t, event_t);
12668event_t __ovld async_work_group_strided_copy(__local uint2 *, const __global uint2 *, size_t, size_t, event_t);
12669event_t __ovld async_work_group_strided_copy(__local long2 *, const __global long2 *, size_t, size_t, event_t);
12670event_t __ovld async_work_group_strided_copy(__local ulong2 *, const __global ulong2 *, size_t, size_t, event_t);
12671event_t __ovld async_work_group_strided_copy(__local float2 *, const __global float2 *, size_t, size_t, event_t);
12672event_t __ovld async_work_group_strided_copy(__local char3 *, const __global char3 *, size_t, size_t, event_t);
12673event_t __ovld async_work_group_strided_copy(__local uchar3 *, const __global uchar3 *, size_t, size_t, event_t);
12674event_t __ovld async_work_group_strided_copy(__local short3 *, const __global short3 *, size_t, size_t, event_t);
12675event_t __ovld async_work_group_strided_copy(__local ushort3 *, const __global ushort3 *, size_t, size_t, event_t);
12676event_t __ovld async_work_group_strided_copy(__local int3 *, const __global int3 *, size_t, size_t, event_t);
12677event_t __ovld async_work_group_strided_copy(__local uint3 *, const __global uint3 *, size_t, size_t, event_t);
12678event_t __ovld async_work_group_strided_copy(__local long3 *, const __global long3 *, size_t, size_t, event_t);
12679event_t __ovld async_work_group_strided_copy(__local ulong3 *, const __global ulong3 *, size_t, size_t, event_t);
12680event_t __ovld async_work_group_strided_copy(__local float3 *, const __global float3 *, size_t, size_t, event_t);
12681event_t __ovld async_work_group_strided_copy(__local char4 *, const __global char4 *, size_t, size_t, event_t);
12682event_t __ovld async_work_group_strided_copy(__local uchar4 *, const __global uchar4 *, size_t, size_t, event_t);
12683event_t __ovld async_work_group_strided_copy(__local short4 *, const __global short4 *, size_t, size_t, event_t);
12684event_t __ovld async_work_group_strided_copy(__local ushort4 *, const __global ushort4 *, size_t, size_t, event_t);
12685event_t __ovld async_work_group_strided_copy(__local int4 *, const __global int4 *, size_t, size_t, event_t);
12686event_t __ovld async_work_group_strided_copy(__local uint4 *, const __global uint4 *, size_t, size_t, event_t);
12687event_t __ovld async_work_group_strided_copy(__local long4 *, const __global long4 *, size_t, size_t, event_t);
12688event_t __ovld async_work_group_strided_copy(__local ulong4 *, const __global ulong4 *, size_t, size_t, event_t);
12689event_t __ovld async_work_group_strided_copy(__local float4 *, const __global float4 *, size_t, size_t, event_t);
12690event_t __ovld async_work_group_strided_copy(__local char8 *, const __global char8 *, size_t, size_t, event_t);
12691event_t __ovld async_work_group_strided_copy(__local uchar8 *, const __global uchar8 *, size_t, size_t, event_t);
12692event_t __ovld async_work_group_strided_copy(__local short8 *, const __global short8 *, size_t, size_t, event_t);
12693event_t __ovld async_work_group_strided_copy(__local ushort8 *, const __global ushort8 *, size_t, size_t, event_t);
12694event_t __ovld async_work_group_strided_copy(__local int8 *, const __global int8 *, size_t, size_t, event_t);
12695event_t __ovld async_work_group_strided_copy(__local uint8 *, const __global uint8 *, size_t, size_t, event_t);
12696event_t __ovld async_work_group_strided_copy(__local long8 *, const __global long8 *, size_t, size_t, event_t);
12697event_t __ovld async_work_group_strided_copy(__local ulong8 *, const __global ulong8 *, size_t, size_t, event_t);
12698event_t __ovld async_work_group_strided_copy(__local float8 *, const __global float8 *, size_t, size_t, event_t);
12699event_t __ovld async_work_group_strided_copy(__local char16 *, const __global char16 *, size_t, size_t, event_t);
12700event_t __ovld async_work_group_strided_copy(__local uchar16 *, const __global uchar16 *, size_t, size_t, event_t);
12701event_t __ovld async_work_group_strided_copy(__local short16 *, const __global short16 *, size_t, size_t, event_t);
12702event_t __ovld async_work_group_strided_copy(__local ushort16 *, const __global ushort16 *, size_t, size_t, event_t);
12703event_t __ovld async_work_group_strided_copy(__local int16 *, const __global int16 *, size_t, size_t, event_t);
12704event_t __ovld async_work_group_strided_copy(__local uint16 *, const __global uint16 *, size_t, size_t, event_t);
12705event_t __ovld async_work_group_strided_copy(__local long16 *, const __global long16 *, size_t, size_t, event_t);
12706event_t __ovld async_work_group_strided_copy(__local ulong16 *, const __global ulong16 *, size_t, size_t, event_t);
12707event_t __ovld async_work_group_strided_copy(__local float16 *, const __global float16 *, size_t, size_t, event_t);
12708event_t __ovld async_work_group_strided_copy(__global char *, const __local char *, size_t, size_t, event_t);
12709event_t __ovld async_work_group_strided_copy(__global uchar *, const __local uchar *, size_t, size_t, event_t);
12710event_t __ovld async_work_group_strided_copy(__global short *, const __local short *, size_t, size_t, event_t);
12711event_t __ovld async_work_group_strided_copy(__global ushort *, const __local ushort *, size_t, size_t, event_t);
12712event_t __ovld async_work_group_strided_copy(__global int *, const __local int *, size_t, size_t, event_t);
12713event_t __ovld async_work_group_strided_copy(__global uint *, const __local uint *, size_t, size_t, event_t);
12714event_t __ovld async_work_group_strided_copy(__global long *, const __local long *, size_t, size_t, event_t);
12715event_t __ovld async_work_group_strided_copy(__global ulong *, const __local ulong *, size_t, size_t, event_t);
12716event_t __ovld async_work_group_strided_copy(__global float *, const __local float *, size_t, size_t, event_t);
12717event_t __ovld async_work_group_strided_copy(__global char2 *, const __local char2 *, size_t, size_t, event_t);
12718event_t __ovld async_work_group_strided_copy(__global uchar2 *, const __local uchar2 *, size_t, size_t, event_t);
12719event_t __ovld async_work_group_strided_copy(__global short2 *, const __local short2 *, size_t, size_t, event_t);
12720event_t __ovld async_work_group_strided_copy(__global ushort2 *, const __local ushort2 *, size_t, size_t, event_t);
12721event_t __ovld async_work_group_strided_copy(__global int2 *, const __local int2 *, size_t, size_t, event_t);
12722event_t __ovld async_work_group_strided_copy(__global uint2 *, const __local uint2 *, size_t, size_t, event_t);
12723event_t __ovld async_work_group_strided_copy(__global long2 *, const __local long2 *, size_t, size_t, event_t);
12724event_t __ovld async_work_group_strided_copy(__global ulong2 *, const __local ulong2 *, size_t, size_t, event_t);
12725event_t __ovld async_work_group_strided_copy(__global float2 *, const __local float2 *, size_t, size_t, event_t);
12726event_t __ovld async_work_group_strided_copy(__global char3 *, const __local char3 *, size_t, size_t, event_t);
12727event_t __ovld async_work_group_strided_copy(__global uchar3 *, const __local uchar3 *, size_t, size_t, event_t);
12728event_t __ovld async_work_group_strided_copy(__global short3 *, const __local short3 *, size_t, size_t, event_t);
12729event_t __ovld async_work_group_strided_copy(__global ushort3 *, const __local ushort3 *, size_t, size_t, event_t);
12730event_t __ovld async_work_group_strided_copy(__global int3 *, const __local int3 *, size_t, size_t, event_t);
12731event_t __ovld async_work_group_strided_copy(__global uint3 *, const __local uint3 *, size_t, size_t, event_t);
12732event_t __ovld async_work_group_strided_copy(__global long3 *, const __local long3 *, size_t, size_t, event_t);
12733event_t __ovld async_work_group_strided_copy(__global ulong3 *, const __local ulong3 *, size_t, size_t, event_t);
12734event_t __ovld async_work_group_strided_copy(__global float3 *, const __local float3 *, size_t, size_t, event_t);
12735event_t __ovld async_work_group_strided_copy(__global char4 *, const __local char4 *, size_t, size_t, event_t);
12736event_t __ovld async_work_group_strided_copy(__global uchar4 *, const __local uchar4 *, size_t, size_t, event_t);
12737event_t __ovld async_work_group_strided_copy(__global short4 *, const __local short4 *, size_t, size_t, event_t);
12738event_t __ovld async_work_group_strided_copy(__global ushort4 *, const __local ushort4 *, size_t, size_t, event_t);
12739event_t __ovld async_work_group_strided_copy(__global int4 *, const __local int4 *, size_t, size_t, event_t);
12740event_t __ovld async_work_group_strided_copy(__global uint4 *, const __local uint4 *, size_t, size_t, event_t);
12741event_t __ovld async_work_group_strided_copy(__global long4 *, const __local long4 *, size_t, size_t, event_t);
12742event_t __ovld async_work_group_strided_copy(__global ulong4 *, const __local ulong4 *, size_t, size_t, event_t);
12743event_t __ovld async_work_group_strided_copy(__global float4 *, const __local float4 *, size_t, size_t, event_t);
12744event_t __ovld async_work_group_strided_copy(__global char8 *, const __local char8 *, size_t, size_t, event_t);
12745event_t __ovld async_work_group_strided_copy(__global uchar8 *, const __local uchar8 *, size_t, size_t, event_t);
12746event_t __ovld async_work_group_strided_copy(__global short8 *, const __local short8 *, size_t, size_t, event_t);
12747event_t __ovld async_work_group_strided_copy(__global ushort8 *, const __local ushort8 *, size_t, size_t, event_t);
12748event_t __ovld async_work_group_strided_copy(__global int8 *, const __local int8 *, size_t, size_t, event_t);
12749event_t __ovld async_work_group_strided_copy(__global uint8 *, const __local uint8 *, size_t, size_t, event_t);
12750event_t __ovld async_work_group_strided_copy(__global long8 *, const __local long8 *, size_t, size_t, event_t);
12751event_t __ovld async_work_group_strided_copy(__global ulong8 *, const __local ulong8 *, size_t, size_t, event_t);
12752event_t __ovld async_work_group_strided_copy(__global float8 *, const __local float8 *, size_t, size_t, event_t);
12753event_t __ovld async_work_group_strided_copy(__global char16 *, const __local char16 *, size_t, size_t, event_t);
12754event_t __ovld async_work_group_strided_copy(__global uchar16 *, const __local uchar16 *, size_t, size_t, event_t);
12755event_t __ovld async_work_group_strided_copy(__global short16 *, const __local short16 *, size_t, size_t, event_t);
12756event_t __ovld async_work_group_strided_copy(__global ushort16 *, const __local ushort16 *, size_t, size_t, event_t);
12757event_t __ovld async_work_group_strided_copy(__global int16 *, const __local int16 *, size_t, size_t, event_t);
12758event_t __ovld async_work_group_strided_copy(__global uint16 *, const __local uint16 *, size_t, size_t, event_t);
12759event_t __ovld async_work_group_strided_copy(__global long16 *, const __local long16 *, size_t, size_t, event_t);
12760event_t __ovld async_work_group_strided_copy(__global ulong16 *, const __local ulong16 *, size_t, size_t, event_t);
12761event_t __ovld async_work_group_strided_copy(__global float16 *, const __local float16 *, size_t, size_t, event_t);
12762#ifdef cl_khr_fp64
12763event_t __ovld async_work_group_strided_copy(__local double *, const __global double *, size_t, size_t, event_t);
12764event_t __ovld async_work_group_strided_copy(__local double2 *, const __global double2 *, size_t, size_t, event_t);
12765event_t __ovld async_work_group_strided_copy(__local double3 *, const __global double3 *, size_t, size_t, event_t);
12766event_t __ovld async_work_group_strided_copy(__local double4 *, const __global double4 *, size_t, size_t, event_t);
12767event_t __ovld async_work_group_strided_copy(__local double8 *, const __global double8 *, size_t, size_t, event_t);
12768event_t __ovld async_work_group_strided_copy(__local double16 *, const __global double16 *, size_t, size_t, event_t);
12769event_t __ovld async_work_group_strided_copy(__global double *, const __local double *, size_t, size_t, event_t);
12770event_t __ovld async_work_group_strided_copy(__global double2 *, const __local double2 *, size_t, size_t, event_t);
12771event_t __ovld async_work_group_strided_copy(__global double3 *, const __local double3 *, size_t, size_t, event_t);
12772event_t __ovld async_work_group_strided_copy(__global double4 *, const __local double4 *, size_t, size_t, event_t);
12773event_t __ovld async_work_group_strided_copy(__global double8 *, const __local double8 *, size_t, size_t, event_t);
12774event_t __ovld async_work_group_strided_copy(__global double16 *, const __local double16 *, size_t, size_t, event_t);
12775#endif //cl_khr_fp64
12776#ifdef cl_khr_fp16
12777event_t __ovld async_work_group_strided_copy(__local half *, const __global half *, size_t, size_t, event_t);
12778event_t __ovld async_work_group_strided_copy(__local half2 *, const __global half2 *, size_t, size_t, event_t);
12779event_t __ovld async_work_group_strided_copy(__local half3 *, const __global half3 *, size_t, size_t, event_t);
12780event_t __ovld async_work_group_strided_copy(__local half4 *, const __global half4 *, size_t, size_t, event_t);
12781event_t __ovld async_work_group_strided_copy(__local half8 *, const __global half8 *, size_t, size_t, event_t);
12782event_t __ovld async_work_group_strided_copy(__local half16 *, const __global half16 *, size_t, size_t, event_t);
12783event_t __ovld async_work_group_strided_copy(__global half *, const __local half *, size_t, size_t, event_t);
12784event_t __ovld async_work_group_strided_copy(__global half2 *, const __local half2 *, size_t, size_t, event_t);
12785event_t __ovld async_work_group_strided_copy(__global half3 *, const __local half3 *, size_t, size_t, event_t);
12786event_t __ovld async_work_group_strided_copy(__global half4 *, const __local half4 *, size_t, size_t, event_t);
12787event_t __ovld async_work_group_strided_copy(__global half8 *, const __local half8 *, size_t, size_t, event_t);
12788event_t __ovld async_work_group_strided_copy(__global half16 *, const __local half16 *, size_t, size_t, event_t);
12789#endif //cl_khr_fp16
12790
12791/**
12792 * Wait for events that identify the
12793 * async_work_group_copy operations to
12794 * complete. The event objects specified in
12795 * event_list will be released after the wait is
12796 * performed.
12797 * This function must be encountered by all workitems
12798 * in a work-group executing the kernel with
12799 * the same num_events and event objects specified
12800 * in event_list; otherwise the results are undefined.
12801 */
12802void __ovld wait_group_events(int, event_t *);
12803
12804/**
12805 * Prefetch num_elements * sizeof(gentype)
12806 * bytes into the global cache. The prefetch
12807 * instruction is applied to a work-item in a workgroup
12808 * and does not affect the functional
12809 * behavior of the kernel.
12810 */
12811void __ovld prefetch(const __global char *, size_t);
12812void __ovld prefetch(const __global uchar *, size_t);
12813void __ovld prefetch(const __global short *, size_t);
12814void __ovld prefetch(const __global ushort *, size_t);
12815void __ovld prefetch(const __global int *, size_t);
12816void __ovld prefetch(const __global uint *, size_t);
12817void __ovld prefetch(const __global long *, size_t);
12818void __ovld prefetch(const __global ulong *, size_t);
12819void __ovld prefetch(const __global float *, size_t);
12820void __ovld prefetch(const __global char2 *, size_t);
12821void __ovld prefetch(const __global uchar2 *, size_t);
12822void __ovld prefetch(const __global short2 *, size_t);
12823void __ovld prefetch(const __global ushort2 *, size_t);
12824void __ovld prefetch(const __global int2 *, size_t);
12825void __ovld prefetch(const __global uint2 *, size_t);
12826void __ovld prefetch(const __global long2 *, size_t);
12827void __ovld prefetch(const __global ulong2 *, size_t);
12828void __ovld prefetch(const __global float2 *, size_t);
12829void __ovld prefetch(const __global char3 *, size_t);
12830void __ovld prefetch(const __global uchar3 *, size_t);
12831void __ovld prefetch(const __global short3 *, size_t);
12832void __ovld prefetch(const __global ushort3 *, size_t);
12833void __ovld prefetch(const __global int3 *, size_t);
12834void __ovld prefetch(const __global uint3 *, size_t);
12835void __ovld prefetch(const __global long3 *, size_t);
12836void __ovld prefetch(const __global ulong3 *, size_t);
12837void __ovld prefetch(const __global float3 *, size_t);
12838void __ovld prefetch(const __global char4 *, size_t);
12839void __ovld prefetch(const __global uchar4 *, size_t);
12840void __ovld prefetch(const __global short4 *, size_t);
12841void __ovld prefetch(const __global ushort4 *, size_t);
12842void __ovld prefetch(const __global int4 *, size_t);
12843void __ovld prefetch(const __global uint4 *, size_t);
12844void __ovld prefetch(const __global long4 *, size_t);
12845void __ovld prefetch(const __global ulong4 *, size_t);
12846void __ovld prefetch(const __global float4 *, size_t);
12847void __ovld prefetch(const __global char8 *, size_t);
12848void __ovld prefetch(const __global uchar8 *, size_t);
12849void __ovld prefetch(const __global short8 *, size_t);
12850void __ovld prefetch(const __global ushort8 *, size_t);
12851void __ovld prefetch(const __global int8 *, size_t);
12852void __ovld prefetch(const __global uint8 *, size_t);
12853void __ovld prefetch(const __global long8 *, size_t);
12854void __ovld prefetch(const __global ulong8 *, size_t);
12855void __ovld prefetch(const __global float8 *, size_t);
12856void __ovld prefetch(const __global char16 *, size_t);
12857void __ovld prefetch(const __global uchar16 *, size_t);
12858void __ovld prefetch(const __global short16 *, size_t);
12859void __ovld prefetch(const __global ushort16 *, size_t);
12860void __ovld prefetch(const __global int16 *, size_t);
12861void __ovld prefetch(const __global uint16 *, size_t);
12862void __ovld prefetch(const __global long16 *, size_t);
12863void __ovld prefetch(const __global ulong16 *, size_t);
12864void __ovld prefetch(const __global float16 *, size_t);
12865#ifdef cl_khr_fp64
12866void __ovld prefetch(const __global double *, size_t);
12867void __ovld prefetch(const __global double2 *, size_t);
12868void __ovld prefetch(const __global double3 *, size_t);
12869void __ovld prefetch(const __global double4 *, size_t);
12870void __ovld prefetch(const __global double8 *, size_t);
12871void __ovld prefetch(const __global double16 *, size_t);
12872#endif //cl_khr_fp64
12873#ifdef cl_khr_fp16
12874void __ovld prefetch(const __global half *, size_t);
12875void __ovld prefetch(const __global half2 *, size_t);
12876void __ovld prefetch(const __global half3 *, size_t);
12877void __ovld prefetch(const __global half4 *, size_t);
12878void __ovld prefetch(const __global half8 *, size_t);
12879void __ovld prefetch(const __global half16 *, size_t);
12880#endif // cl_khr_fp16
12881
12882// OpenCL v1.1 s6.11.1, v1.2 s6.12.11 - Atomic Functions
12883
12884#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
12885#pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable
12886#pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : enable
12887#endif
12888/**
12889 * Read the 32-bit value (referred to as old)
12890 * stored at location pointed by p. Compute
12891 * (old + val) and store result at location
12892 * pointed by p. The function returns old.
12893 */
12894int __ovld atomic_add(volatile __global int *, int);
12895uint __ovld atomic_add(volatile __global uint *, uint);
12896int __ovld atomic_add(volatile __local int *, int);
12897uint __ovld atomic_add(volatile __local uint *, uint);
12898#ifdef __OPENCL_CPP_VERSION__
12899int __ovld atomic_add(volatile int *, int);
12900uint __ovld atomic_add(volatile uint *, uint);
12901#endif
12902
12903#if defined(cl_khr_global_int32_base_atomics)
12904int __ovld atom_add(volatile __global int *, int);
12905uint __ovld atom_add(volatile __global uint *, uint);
12906#endif
12907#if defined(cl_khr_local_int32_base_atomics)
12908int __ovld atom_add(volatile __local int *, int);
12909uint __ovld atom_add(volatile __local uint *, uint);
12910#endif
12911
12912#if defined(cl_khr_int64_base_atomics)
12913long __ovld atom_add(volatile __global long *, long);
12914ulong __ovld atom_add(volatile __global ulong *, ulong);
12915long __ovld atom_add(volatile __local long *, long);
12916ulong __ovld atom_add(volatile __local ulong *, ulong);
12917#endif
12918
12919/**
12920 * Read the 32-bit value (referred to as old) stored at location pointed by p.
12921 * Compute (old - val) and store result at location pointed by p. The function
12922 * returns old.
12923 */
12924int __ovld atomic_sub(volatile __global int *, int);
12925uint __ovld atomic_sub(volatile __global uint *, uint);
12926int __ovld atomic_sub(volatile __local int *, int);
12927uint __ovld atomic_sub(volatile __local uint *, uint);
12928#ifdef __OPENCL_CPP_VERSION__
12929int __ovld atomic_sub(volatile int *, int);
12930uint __ovld atomic_sub(volatile uint *, uint);
12931#endif
12932
12933#if defined(cl_khr_global_int32_base_atomics)
12934int __ovld atom_sub(volatile __global int *, int);
12935uint __ovld atom_sub(volatile __global uint *, uint);
12936#endif
12937#if defined(cl_khr_local_int32_base_atomics)
12938int __ovld atom_sub(volatile __local int *, int);
12939uint __ovld atom_sub(volatile __local uint *, uint);
12940#endif
12941
12942#if defined(cl_khr_int64_base_atomics)
12943long __ovld atom_sub(volatile __global long *, long);
12944ulong __ovld atom_sub(volatile __global ulong *, ulong);
12945long __ovld atom_sub(volatile __local long *, long);
12946ulong __ovld atom_sub(volatile __local ulong *, ulong);
12947#endif
12948
12949/**
12950 * Swaps the old value stored at location p
12951 * with new value given by val. Returns old
12952 * value.
12953 */
12954int __ovld atomic_xchg(volatile __global int *, int);
12955uint __ovld atomic_xchg(volatile __global uint *, uint);
12956int __ovld atomic_xchg(volatile __local int *, int);
12957uint __ovld atomic_xchg(volatile __local uint *, uint);
12958float __ovld atomic_xchg(volatile __global float *, float);
12959float __ovld atomic_xchg(volatile __local float *, float);
12960#ifdef __OPENCL_CPP_VERSION__
12961int __ovld atomic_xchg(volatile int *, int);
12962uint __ovld atomic_xchg(volatile uint *, uint);
12963float __ovld atomic_xchg(volatile float *, float);
12964#endif
12965
12966#if defined(cl_khr_global_int32_base_atomics)
12967int __ovld atom_xchg(volatile __global int *, int);
12968uint __ovld atom_xchg(volatile __global uint *, uint);
12969#endif
12970#if defined(cl_khr_local_int32_base_atomics)
12971int __ovld atom_xchg(volatile __local int *, int);
12972uint __ovld atom_xchg(volatile __local uint *, uint);
12973#endif
12974
12975#if defined(cl_khr_int64_base_atomics)
12976long __ovld atom_xchg(volatile __global long *, long);
12977long __ovld atom_xchg(volatile __local long *, long);
12978ulong __ovld atom_xchg(volatile __global ulong *, ulong);
12979ulong __ovld atom_xchg(volatile __local ulong *, ulong);
12980#endif
12981
12982/**
12983 * Read the 32-bit value (referred to as old)
12984 * stored at location pointed by p. Compute
12985 * (old + 1) and store result at location
12986 * pointed by p. The function returns old.
12987 */
12988int __ovld atomic_inc(volatile __global int *);
12989uint __ovld atomic_inc(volatile __global uint *);
12990int __ovld atomic_inc(volatile __local int *);
12991uint __ovld atomic_inc(volatile __local uint *);
12992#ifdef __OPENCL_CPP_VERSION__
12993int __ovld atomic_inc(volatile int *);
12994uint __ovld atomic_inc(volatile uint *);
12995#endif
12996
12997#if defined(cl_khr_global_int32_base_atomics)
12998int __ovld atom_inc(volatile __global int *);
12999uint __ovld atom_inc(volatile __global uint *);
13000#endif
13001#if defined(cl_khr_local_int32_base_atomics)
13002int __ovld atom_inc(volatile __local int *);
13003uint __ovld atom_inc(volatile __local uint *);
13004#endif
13005
13006#if defined(cl_khr_int64_base_atomics)
13007long __ovld atom_inc(volatile __global long *);
13008ulong __ovld atom_inc(volatile __global ulong *);
13009long __ovld atom_inc(volatile __local long *);
13010ulong __ovld atom_inc(volatile __local ulong *);
13011#endif
13012
13013/**
13014 * Read the 32-bit value (referred to as old)
13015 * stored at location pointed by p. Compute
13016 * (old - 1) and store result at location
13017 * pointed by p. The function returns old.
13018 */
13019int __ovld atomic_dec(volatile __global int *);
13020uint __ovld atomic_dec(volatile __global uint *);
13021int __ovld atomic_dec(volatile __local int *);
13022uint __ovld atomic_dec(volatile __local uint *);
13023#ifdef __OPENCL_CPP_VERSION__
13024int __ovld atomic_dec(volatile int *);
13025uint __ovld atomic_dec(volatile uint *);
13026#endif
13027
13028#if defined(cl_khr_global_int32_base_atomics)
13029int __ovld atom_dec(volatile __global int *);
13030uint __ovld atom_dec(volatile __global uint *);
13031#endif
13032#if defined(cl_khr_local_int32_base_atomics)
13033int __ovld atom_dec(volatile __local int *);
13034uint __ovld atom_dec(volatile __local uint *);
13035#endif
13036
13037#if defined(cl_khr_int64_base_atomics)
13038long __ovld atom_dec(volatile __global long *);
13039ulong __ovld atom_dec(volatile __global ulong *);
13040long __ovld atom_dec(volatile __local long *);
13041ulong __ovld atom_dec(volatile __local ulong *);
13042#endif
13043
13044/**
13045 * Read the 32-bit value (referred to as old)
13046 * stored at location pointed by p. Compute
13047 * (old == cmp) ? val : old and store result at
13048 * location pointed by p. The function
13049 * returns old.
13050 */
13051int __ovld atomic_cmpxchg(volatile __global int *, int, int);
13052uint __ovld atomic_cmpxchg(volatile __global uint *, uint, uint);
13053int __ovld atomic_cmpxchg(volatile __local int *, int, int);
13054uint __ovld atomic_cmpxchg(volatile __local uint *, uint, uint);
13055#ifdef __OPENCL_CPP_VERSION__
13056int __ovld atomic_cmpxchg(volatile int *, int, int);
13057uint __ovld atomic_cmpxchg(volatile uint *, uint, uint);
13058#endif
13059
13060#if defined(cl_khr_global_int32_base_atomics)
13061int __ovld atom_cmpxchg(volatile __global int *, int, int);
13062uint __ovld atom_cmpxchg(volatile __global uint *, uint, uint);
13063#endif
13064#if defined(cl_khr_local_int32_base_atomics)
13065int __ovld atom_cmpxchg(volatile __local int *, int, int);
13066uint __ovld atom_cmpxchg(volatile __local uint *, uint, uint);
13067#endif
13068
13069#if defined(cl_khr_int64_base_atomics)
13070long __ovld atom_cmpxchg(volatile __global long *, long, long);
13071ulong __ovld atom_cmpxchg(volatile __global ulong *, ulong, ulong);
13072long __ovld atom_cmpxchg(volatile __local long *, long, long);
13073ulong __ovld atom_cmpxchg(volatile __local ulong *, ulong, ulong);
13074#endif
13075
13076/**
13077 * Read the 32-bit value (referred to as old)
13078 * stored at location pointed by p. Compute
13079 * min(old, val) and store minimum value at
13080 * location pointed by p. The function
13081 * returns old.
13082 */
13083int __ovld atomic_min(volatile __global int *, int);
13084uint __ovld atomic_min(volatile __global uint *, uint);
13085int __ovld atomic_min(volatile __local int *, int);
13086uint __ovld atomic_min(volatile __local uint *, uint);
13087#ifdef __OPENCL_CPP_VERSION__
13088int __ovld atomic_min(volatile int *, int);
13089uint __ovld atomic_min(volatile uint *, uint);
13090#endif
13091
13092#if defined(cl_khr_global_int32_extended_atomics)
13093int __ovld atom_min(volatile __global int *, int);
13094uint __ovld atom_min(volatile __global uint *, uint);
13095#endif
13096#if defined(cl_khr_local_int32_extended_atomics)
13097int __ovld atom_min(volatile __local int *, int);
13098uint __ovld atom_min(volatile __local uint *, uint);
13099#endif
13100
13101#if defined(cl_khr_int64_extended_atomics)
13102long __ovld atom_min(volatile __global long *, long);
13103ulong __ovld atom_min(volatile __global ulong *, ulong);
13104long __ovld atom_min(volatile __local long *, long);
13105ulong __ovld atom_min(volatile __local ulong *, ulong);
13106#endif
13107
13108/**
13109 * Read the 32-bit value (referred to as old)
13110 * stored at location pointed by p. Compute
13111 * max(old, val) and store maximum value at
13112 * location pointed by p. The function
13113 * returns old.
13114 */
13115int __ovld atomic_max(volatile __global int *, int);
13116uint __ovld atomic_max(volatile __global uint *, uint);
13117int __ovld atomic_max(volatile __local int *, int);
13118uint __ovld atomic_max(volatile __local uint *, uint);
13119#ifdef __OPENCL_CPP_VERSION__
13120int __ovld atomic_max(volatile int *, int);
13121uint __ovld atomic_max(volatile uint *, uint);
13122#endif
13123
13124#if defined(cl_khr_global_int32_extended_atomics)
13125int __ovld atom_max(volatile __global int *, int);
13126uint __ovld atom_max(volatile __global uint *, uint);
13127#endif
13128#if defined(cl_khr_local_int32_extended_atomics)
13129int __ovld atom_max(volatile __local int *, int);
13130uint __ovld atom_max(volatile __local uint *, uint);
13131#endif
13132
13133#if defined(cl_khr_int64_extended_atomics)
13134long __ovld atom_max(volatile __global long *, long);
13135ulong __ovld atom_max(volatile __global ulong *, ulong);
13136long __ovld atom_max(volatile __local long *, long);
13137ulong __ovld atom_max(volatile __local ulong *, ulong);
13138#endif
13139
13140/**
13141 * Read the 32-bit value (referred to as old)
13142 * stored at location pointed by p. Compute
13143 * (old & val) and store result at location
13144 * pointed by p. The function returns old.
13145 */
13146int __ovld atomic_and(volatile __global int *, int);
13147uint __ovld atomic_and(volatile __global uint *, uint);
13148int __ovld atomic_and(volatile __local int *, int);
13149uint __ovld atomic_and(volatile __local uint *, uint);
13150#ifdef __OPENCL_CPP_VERSION__
13151int __ovld atomic_and(volatile int *, int);
13152uint __ovld atomic_and(volatile uint *, uint);
13153#endif
13154
13155#if defined(cl_khr_global_int32_extended_atomics)
13156int __ovld atom_and(volatile __global int *, int);
13157uint __ovld atom_and(volatile __global uint *, uint);
13158#endif
13159#if defined(cl_khr_local_int32_extended_atomics)
13160int __ovld atom_and(volatile __local int *, int);
13161uint __ovld atom_and(volatile __local uint *, uint);
13162#endif
13163
13164#if defined(cl_khr_int64_extended_atomics)
13165long __ovld atom_and(volatile __global long *, long);
13166ulong __ovld atom_and(volatile __global ulong *, ulong);
13167long __ovld atom_and(volatile __local long *, long);
13168ulong __ovld atom_and(volatile __local ulong *, ulong);
13169#endif
13170
13171/**
13172 * Read the 32-bit value (referred to as old)
13173 * stored at location pointed by p. Compute
13174 * (old | val) and store result at location
13175 * pointed by p. The function returns old.
13176 */
13177int __ovld atomic_or(volatile __global int *, int);
13178uint __ovld atomic_or(volatile __global uint *, uint);
13179int __ovld atomic_or(volatile __local int *, int);
13180uint __ovld atomic_or(volatile __local uint *, uint);
13181#ifdef __OPENCL_CPP_VERSION__
13182int __ovld atomic_or(volatile int *, int);
13183uint __ovld atomic_or(volatile uint *, uint);
13184#endif
13185
13186#if defined(cl_khr_global_int32_extended_atomics)
13187int __ovld atom_or(volatile __global int *, int);
13188uint __ovld atom_or(volatile __global uint *, uint);
13189#endif
13190#if defined(cl_khr_local_int32_extended_atomics)
13191int __ovld atom_or(volatile __local int *, int);
13192uint __ovld atom_or(volatile __local uint *, uint);
13193#endif
13194
13195#if defined(cl_khr_int64_extended_atomics)
13196long __ovld atom_or(volatile __global long *, long);
13197ulong __ovld atom_or(volatile __global ulong *, ulong);
13198long __ovld atom_or(volatile __local long *, long);
13199ulong __ovld atom_or(volatile __local ulong *, ulong);
13200#endif
13201
13202/**
13203 * Read the 32-bit value (referred to as old)
13204 * stored at location pointed by p. Compute
13205 * (old ^ val) and store result at location
13206 * pointed by p. The function returns old.
13207 */
13208int __ovld atomic_xor(volatile __global int *, int);
13209uint __ovld atomic_xor(volatile __global uint *, uint);
13210int __ovld atomic_xor(volatile __local int *, int);
13211uint __ovld atomic_xor(volatile __local uint *, uint);
13212#ifdef __OPENCL_CPP_VERSION__
13213int __ovld atomic_xor(volatile int *, int);
13214uint __ovld atomic_xor(volatile uint *, uint);
13215#endif
13216
13217#if defined(cl_khr_global_int32_extended_atomics)
13218int __ovld atom_xor(volatile __global int *, int);
13219uint __ovld atom_xor(volatile __global uint *, uint);
13220#endif
13221#if defined(cl_khr_local_int32_extended_atomics)
13222int __ovld atom_xor(volatile __local int *, int);
13223uint __ovld atom_xor(volatile __local uint *, uint);
13224#endif
13225
13226#if defined(cl_khr_int64_extended_atomics)
13227long __ovld atom_xor(volatile __global long *, long);
13228ulong __ovld atom_xor(volatile __global ulong *, ulong);
13229long __ovld atom_xor(volatile __local long *, long);
13230ulong __ovld atom_xor(volatile __local ulong *, ulong);
13231#endif
13232
13233#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13234#pragma OPENCL EXTENSION cl_khr_int64_base_atomics : disable
13235#pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : disable
13236#endif
13237
13238// OpenCL v2.0 s6.13.11 - Atomics Functions
13239
13240#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
13241
13242// double atomics support requires extensions cl_khr_int64_base_atomics and cl_khr_int64_extended_atomics
13243#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13244#pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable
13245#pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : enable
13246#endif
13247
13248// atomic_init()
13249#if defined(__opencl_c_generic_address_space)
13250void __ovld atomic_init(volatile atomic_int *, int);
13251void __ovld atomic_init(volatile atomic_uint *, uint);
13252void __ovld atomic_init(volatile atomic_float *, float);
13253#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13254void __ovld atomic_init(volatile atomic_long *, long);
13255void __ovld atomic_init(volatile atomic_ulong *, ulong);
13256#ifdef cl_khr_fp64
13257void __ovld atomic_init(volatile atomic_double *, double);
13258#endif //cl_khr_fp64
13259#endif
13260#endif //defined(__opencl_c_generic_address_space)
13261#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
13262void __ovld atomic_init(volatile __global atomic_int *, int);
13263void __ovld atomic_init(volatile __local atomic_int *, int);
13264void __ovld atomic_init(volatile __global atomic_uint *, uint);
13265void __ovld atomic_init(volatile __local atomic_uint *, uint);
13266void __ovld atomic_init(volatile __global atomic_float *, float);
13267void __ovld atomic_init(volatile __local atomic_float *, float);
13268#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13269void __ovld atomic_init(volatile __global atomic_long *, long);
13270void __ovld atomic_init(volatile __local atomic_long *, long);
13271void __ovld atomic_init(volatile __global atomic_ulong *, ulong);
13272void __ovld atomic_init(volatile __local atomic_ulong *, ulong);
13273#ifdef cl_khr_fp64
13274void __ovld atomic_init(volatile __global atomic_double *, double);
13275void __ovld atomic_init(volatile __local atomic_double *, double);
13276#endif //cl_khr_fp64
13277#endif
13278#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
13279
13280// atomic_work_item_fence()
13281void __ovld atomic_work_item_fence(cl_mem_fence_flags, memory_order, memory_scope);
13282
13283// atomic_fetch()
13284// OpenCL v2.0 s6.13.11.7.5:
13285// add/sub: atomic type argument can be uintptr_t/intptr_t, value type argument can be ptrdiff_t.
13286
13287#if defined(__opencl_c_atomic_order_seq_cst) && defined(__opencl_c_atomic_scope_device)
13288#if defined(__opencl_c_generic_address_space)
13289int __ovld atomic_fetch_add(volatile atomic_int *, int);
13290uint __ovld atomic_fetch_add(volatile atomic_uint *, uint);
13291int __ovld atomic_fetch_sub(volatile atomic_int *, int);
13292uint __ovld atomic_fetch_sub(volatile atomic_uint *, uint);
13293int __ovld atomic_fetch_or(volatile atomic_int *, int);
13294uint __ovld atomic_fetch_or(volatile atomic_uint *, uint);
13295int __ovld atomic_fetch_xor(volatile atomic_int *, int);
13296uint __ovld atomic_fetch_xor(volatile atomic_uint *, uint);
13297int __ovld atomic_fetch_and(volatile atomic_int *, int);
13298uint __ovld atomic_fetch_and(volatile atomic_uint *, uint);
13299int __ovld atomic_fetch_min(volatile atomic_int *, int);
13300uint __ovld atomic_fetch_min(volatile atomic_uint *, uint);
13301int __ovld atomic_fetch_max(volatile atomic_int *, int);
13302uint __ovld atomic_fetch_max(volatile atomic_uint *, uint);
13303#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13304long __ovld atomic_fetch_add(volatile atomic_long *, long);
13305ulong __ovld atomic_fetch_add(volatile atomic_ulong *, ulong);
13306long __ovld atomic_fetch_sub(volatile atomic_long *, long);
13307ulong __ovld atomic_fetch_sub(volatile atomic_ulong *, ulong);
13308long __ovld atomic_fetch_or(volatile atomic_long *, long);
13309ulong __ovld atomic_fetch_or(volatile atomic_ulong *, ulong);
13310long __ovld atomic_fetch_xor(volatile atomic_long *, long);
13311ulong __ovld atomic_fetch_xor(volatile atomic_ulong *, ulong);
13312long __ovld atomic_fetch_and(volatile atomic_long *, long);
13313ulong __ovld atomic_fetch_and(volatile atomic_ulong *, ulong);
13314long __ovld atomic_fetch_min(volatile atomic_long *, long);
13315ulong __ovld atomic_fetch_min(volatile atomic_ulong *, ulong);
13316long __ovld atomic_fetch_max(volatile atomic_long *, long);
13317ulong __ovld atomic_fetch_max(volatile atomic_ulong *, ulong);
13318uintptr_t __ovld atomic_fetch_add(volatile atomic_uintptr_t *, ptrdiff_t);
13319uintptr_t __ovld atomic_fetch_sub(volatile atomic_uintptr_t *, ptrdiff_t);
13320#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13321#endif //defined(__opencl_c_generic_address_space)
13322#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
13323int __ovld atomic_fetch_add(volatile __global atomic_int *, int);
13324int __ovld atomic_fetch_add(volatile __local atomic_int *, int);
13325uint __ovld atomic_fetch_add(volatile __global atomic_uint *, uint);
13326uint __ovld atomic_fetch_add(volatile __local atomic_uint *, uint);
13327int __ovld atomic_fetch_sub(volatile __global atomic_int *, int);
13328int __ovld atomic_fetch_sub(volatile __local atomic_int *, int);
13329uint __ovld atomic_fetch_sub(volatile __global atomic_uint *, uint);
13330uint __ovld atomic_fetch_sub(volatile __local atomic_uint *, uint);
13331int __ovld atomic_fetch_or(volatile __global atomic_int *, int);
13332int __ovld atomic_fetch_or(volatile __local atomic_int *, int);
13333uint __ovld atomic_fetch_or(volatile __global atomic_uint *, uint);
13334uint __ovld atomic_fetch_or(volatile __local atomic_uint *, uint);
13335int __ovld atomic_fetch_xor(volatile __global atomic_int *, int);
13336int __ovld atomic_fetch_xor(volatile __local atomic_int *, int);
13337uint __ovld atomic_fetch_xor(volatile __global atomic_uint *, uint);
13338uint __ovld atomic_fetch_xor(volatile __local atomic_uint *, uint);
13339int __ovld atomic_fetch_and(volatile __global atomic_int *, int);
13340int __ovld atomic_fetch_and(volatile __local atomic_int *, int);
13341uint __ovld atomic_fetch_and(volatile __global atomic_uint *, uint);
13342uint __ovld atomic_fetch_and(volatile __local atomic_uint *, uint);
13343int __ovld atomic_fetch_min(volatile __global atomic_int *, int);
13344int __ovld atomic_fetch_min(volatile __local atomic_int *, int);
13345uint __ovld atomic_fetch_min(volatile __global atomic_uint *, uint);
13346uint __ovld atomic_fetch_min(volatile __local atomic_uint *, uint);
13347int __ovld atomic_fetch_max(volatile __global atomic_int *, int);
13348int __ovld atomic_fetch_max(volatile __local atomic_int *, int);
13349uint __ovld atomic_fetch_max(volatile __global atomic_uint *, uint);
13350uint __ovld atomic_fetch_max(volatile __local atomic_uint *, uint);
13351#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13352long __ovld atomic_fetch_add(volatile __global atomic_long *, long);
13353long __ovld atomic_fetch_add(volatile __local atomic_long *, long);
13354ulong __ovld atomic_fetch_add(volatile __global atomic_ulong *, ulong);
13355ulong __ovld atomic_fetch_add(volatile __local atomic_ulong *, ulong);
13356uintptr_t __ovld atomic_fetch_add(volatile __global atomic_uintptr_t *, ptrdiff_t);
13357uintptr_t __ovld atomic_fetch_add(volatile __local atomic_uintptr_t *, ptrdiff_t);
13358long __ovld atomic_fetch_sub(volatile __global atomic_long *, long);
13359long __ovld atomic_fetch_sub(volatile __local atomic_long *, long);
13360ulong __ovld atomic_fetch_sub(volatile __global atomic_ulong *, ulong);
13361ulong __ovld atomic_fetch_sub(volatile __local atomic_ulong *, ulong);
13362uintptr_t __ovld atomic_fetch_sub(volatile __global atomic_uintptr_t *, ptrdiff_t);
13363uintptr_t __ovld atomic_fetch_sub(volatile __local atomic_uintptr_t *, ptrdiff_t);
13364long __ovld atomic_fetch_or(volatile __global atomic_long *, long);
13365long __ovld atomic_fetch_or(volatile __local atomic_long *, long);
13366ulong __ovld atomic_fetch_or(volatile __global atomic_ulong *, ulong);
13367ulong __ovld atomic_fetch_or(volatile __local atomic_ulong *, ulong);
13368uintptr_t __ovld atomic_fetch_or(volatile __global atomic_uintptr_t *, intptr_t);
13369uintptr_t __ovld atomic_fetch_or(volatile __local atomic_uintptr_t *, intptr_t);
13370intptr_t __ovld atomic_fetch_or(volatile __global atomic_intptr_t *, uintptr_t);
13371intptr_t __ovld atomic_fetch_or(volatile __local atomic_intptr_t *, uintptr_t);
13372long __ovld atomic_fetch_xor(volatile __global atomic_long *, long);
13373long __ovld atomic_fetch_xor(volatile __local atomic_long *, long);
13374ulong __ovld atomic_fetch_xor(volatile __global atomic_ulong *, ulong);
13375ulong __ovld atomic_fetch_xor(volatile __local atomic_ulong *, ulong);
13376uintptr_t __ovld atomic_fetch_xor(volatile __global atomic_uintptr_t *, intptr_t);
13377uintptr_t __ovld atomic_fetch_xor(volatile __local atomic_uintptr_t *, intptr_t);
13378intptr_t __ovld atomic_fetch_xor(volatile __global atomic_intptr_t *, uintptr_t);
13379intptr_t __ovld atomic_fetch_xor(volatile __local atomic_intptr_t *, uintptr_t);
13380long __ovld atomic_fetch_and(volatile __global atomic_long *, long);
13381long __ovld atomic_fetch_and(volatile __local atomic_long *, long);
13382ulong __ovld atomic_fetch_and(volatile __global atomic_ulong *, ulong);
13383ulong __ovld atomic_fetch_and(volatile __local atomic_ulong *, ulong);
13384uintptr_t __ovld atomic_fetch_and(volatile __global atomic_uintptr_t *, intptr_t);
13385uintptr_t __ovld atomic_fetch_and(volatile __local atomic_uintptr_t *, intptr_t);
13386intptr_t __ovld atomic_fetch_and(volatile __global atomic_intptr_t *, uintptr_t);
13387intptr_t __ovld atomic_fetch_and(volatile __local atomic_intptr_t *, uintptr_t);
13388long __ovld atomic_fetch_min(volatile __global atomic_long *, long);
13389long __ovld atomic_fetch_min(volatile __local atomic_long *, long);
13390ulong __ovld atomic_fetch_min(volatile __global atomic_ulong *, ulong);
13391ulong __ovld atomic_fetch_min(volatile __local atomic_ulong *, ulong);
13392uintptr_t __ovld atomic_fetch_min(volatile __global atomic_uintptr_t *, intptr_t);
13393uintptr_t __ovld atomic_fetch_min(volatile __local atomic_uintptr_t *, intptr_t);
13394intptr_t __ovld atomic_fetch_min(volatile __global atomic_intptr_t *, uintptr_t);
13395intptr_t __ovld atomic_fetch_min(volatile __local atomic_intptr_t *, uintptr_t);
13396long __ovld atomic_fetch_max(volatile __global atomic_long *, long);
13397long __ovld atomic_fetch_max(volatile __local atomic_long *, long);
13398ulong __ovld atomic_fetch_max(volatile __global atomic_ulong *, ulong);
13399ulong __ovld atomic_fetch_max(volatile __local atomic_ulong *, ulong);
13400uintptr_t __ovld atomic_fetch_max(volatile __global atomic_uintptr_t *, uintptr_t);
13401uintptr_t __ovld atomic_fetch_max(volatile __local atomic_uintptr_t *, uintptr_t);
13402#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13403#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
13404#endif
13405
13406#if defined(__opencl_c_atomic_scope_device)
13407#if defined(__opencl_c_generic_address_space)
13408int __ovld atomic_fetch_add_explicit(volatile atomic_int *, int, memory_order);
13409uint __ovld atomic_fetch_add_explicit(volatile atomic_uint *, uint, memory_order);
13410int __ovld atomic_fetch_sub_explicit(volatile atomic_int *, int, memory_order);
13411uint __ovld atomic_fetch_sub_explicit(volatile atomic_uint *, uint, memory_order);
13412int __ovld atomic_fetch_or_explicit(volatile atomic_int *, int, memory_order);
13413uint __ovld atomic_fetch_or_explicit(volatile atomic_uint *, uint, memory_order);
13414int __ovld atomic_fetch_xor_explicit(volatile atomic_int *, int, memory_order);
13415uint __ovld atomic_fetch_xor_explicit(volatile atomic_uint *, uint, memory_order);
13416int __ovld atomic_fetch_and_explicit(volatile atomic_int *, int, memory_order);
13417uint __ovld atomic_fetch_and_explicit(volatile atomic_uint *, uint, memory_order);
13418int __ovld atomic_fetch_min_explicit(volatile atomic_int *, int, memory_order);
13419uint __ovld atomic_fetch_min_explicit(volatile atomic_uint *, uint, memory_order);
13420int __ovld atomic_fetch_max_explicit(volatile atomic_int *, int, memory_order);
13421uint __ovld atomic_fetch_max_explicit(volatile atomic_uint *, uint, memory_order);
13422#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13423long __ovld atomic_fetch_add_explicit(volatile atomic_long *, long, memory_order);
13424ulong __ovld atomic_fetch_add_explicit(volatile atomic_ulong *, ulong, memory_order);
13425long __ovld atomic_fetch_sub_explicit(volatile atomic_long *, long, memory_order);
13426ulong __ovld atomic_fetch_sub_explicit(volatile atomic_ulong *, ulong, memory_order);
13427long __ovld atomic_fetch_or_explicit(volatile atomic_long *, long, memory_order);
13428ulong __ovld atomic_fetch_or_explicit(volatile atomic_ulong *, ulong, memory_order);
13429long __ovld atomic_fetch_xor_explicit(volatile atomic_long *, long, memory_order);
13430ulong __ovld atomic_fetch_xor_explicit(volatile atomic_ulong *, ulong, memory_order);
13431long __ovld atomic_fetch_and_explicit(volatile atomic_long *, long, memory_order);
13432ulong __ovld atomic_fetch_and_explicit(volatile atomic_ulong *, ulong, memory_order);
13433long __ovld atomic_fetch_min_explicit(volatile atomic_long *, long, memory_order);
13434ulong __ovld atomic_fetch_min_explicit(volatile atomic_ulong *, ulong, memory_order);
13435long __ovld atomic_fetch_max_explicit(volatile atomic_long *, long, memory_order);
13436ulong __ovld atomic_fetch_max_explicit(volatile atomic_ulong *, ulong, memory_order);
13437uintptr_t __ovld atomic_fetch_add_explicit(volatile atomic_uintptr_t *, ptrdiff_t, memory_order);
13438uintptr_t __ovld atomic_fetch_sub_explicit(volatile atomic_uintptr_t *, ptrdiff_t, memory_order);
13439#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13440#endif //defined(__opencl_c_generic_address_space)
13441#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
13442int __ovld atomic_fetch_add_explicit(volatile __global atomic_int *, int, memory_order);
13443int __ovld atomic_fetch_add_explicit(volatile __local atomic_int *, int, memory_order);
13444uint __ovld atomic_fetch_add_explicit(volatile __global atomic_uint *, uint, memory_order);
13445uint __ovld atomic_fetch_add_explicit(volatile __local atomic_uint *, uint, memory_order);
13446int __ovld atomic_fetch_sub_explicit(volatile __global atomic_int *, int, memory_order);
13447int __ovld atomic_fetch_sub_explicit(volatile __local atomic_int *, int, memory_order);
13448uint __ovld atomic_fetch_sub_explicit(volatile __global atomic_uint *, uint, memory_order);
13449uint __ovld atomic_fetch_sub_explicit(volatile __local atomic_uint *, uint, memory_order);
13450int __ovld atomic_fetch_or_explicit(volatile __global atomic_int *, int, memory_order);
13451int __ovld atomic_fetch_or_explicit(volatile __local atomic_int *, int, memory_order);
13452uint __ovld atomic_fetch_or_explicit(volatile __global atomic_uint *, uint, memory_order);
13453uint __ovld atomic_fetch_or_explicit(volatile __local atomic_uint *, uint, memory_order);
13454int __ovld atomic_fetch_xor_explicit(volatile __global atomic_int *, int, memory_order);
13455int __ovld atomic_fetch_xor_explicit(volatile __local atomic_int *, int, memory_order);
13456uint __ovld atomic_fetch_xor_explicit(volatile __global atomic_uint *, uint, memory_order);
13457uint __ovld atomic_fetch_xor_explicit(volatile __local atomic_uint *, uint, memory_order);
13458int __ovld atomic_fetch_and_explicit(volatile __global atomic_int *, int, memory_order);
13459int __ovld atomic_fetch_and_explicit(volatile __local atomic_int *, int, memory_order);
13460uint __ovld atomic_fetch_and_explicit(volatile __global atomic_uint *, uint, memory_order);
13461uint __ovld atomic_fetch_and_explicit(volatile __local atomic_uint *, uint, memory_order);
13462int __ovld atomic_fetch_min_explicit(volatile __global atomic_int *, int, memory_order);
13463int __ovld atomic_fetch_min_explicit(volatile __local atomic_int *, int, memory_order);
13464uint __ovld atomic_fetch_min_explicit(volatile __global atomic_uint *, uint, memory_order);
13465uint __ovld atomic_fetch_min_explicit(volatile __local atomic_uint *, uint, memory_order);
13466int __ovld atomic_fetch_max_explicit(volatile __global atomic_int *, int, memory_order);
13467int __ovld atomic_fetch_max_explicit(volatile __local atomic_int *, int, memory_order);
13468uint __ovld atomic_fetch_max_explicit(volatile __global atomic_uint *, uint, memory_order);
13469uint __ovld atomic_fetch_max_explicit(volatile __local atomic_uint *, uint, memory_order);
13470#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13471long __ovld atomic_fetch_add_explicit(volatile __global atomic_long *, long, memory_order);
13472long __ovld atomic_fetch_add_explicit(volatile __local atomic_long *, long, memory_order);
13473ulong __ovld atomic_fetch_add_explicit(volatile __global atomic_ulong *, ulong, memory_order);
13474ulong __ovld atomic_fetch_add_explicit(volatile __local atomic_ulong *, ulong, memory_order);
13475uintptr_t __ovld atomic_fetch_add_explicit(volatile __global atomic_uintptr_t *, ptrdiff_t, memory_order);
13476uintptr_t __ovld atomic_fetch_add_explicit(volatile __local atomic_uintptr_t *, ptrdiff_t, memory_order);
13477long __ovld atomic_fetch_sub_explicit(volatile __global atomic_long *, long, memory_order);
13478long __ovld atomic_fetch_sub_explicit(volatile __local atomic_long *, long, memory_order);
13479ulong __ovld atomic_fetch_sub_explicit(volatile __global atomic_ulong *, ulong, memory_order);
13480ulong __ovld atomic_fetch_sub_explicit(volatile __local atomic_ulong *, ulong, memory_order);
13481uintptr_t __ovld atomic_fetch_sub_explicit(volatile __global atomic_uintptr_t *, ptrdiff_t, memory_order);
13482uintptr_t __ovld atomic_fetch_sub_explicit(volatile __local atomic_uintptr_t *, ptrdiff_t, memory_order);
13483long __ovld atomic_fetch_or_explicit(volatile __global atomic_long *, long, memory_order);
13484long __ovld atomic_fetch_or_explicit(volatile __local atomic_long *, long, memory_order);
13485ulong __ovld atomic_fetch_or_explicit(volatile __global atomic_ulong *, ulong, memory_order);
13486ulong __ovld atomic_fetch_or_explicit(volatile __local atomic_ulong *, ulong, memory_order);
13487uintptr_t __ovld atomic_fetch_or_explicit(volatile __global atomic_uintptr_t *, intptr_t, memory_order);
13488uintptr_t __ovld atomic_fetch_or_explicit(volatile __local atomic_uintptr_t *, intptr_t, memory_order);
13489intptr_t __ovld atomic_fetch_or_explicit(volatile __global atomic_intptr_t *, uintptr_t, memory_order);
13490intptr_t __ovld atomic_fetch_or_explicit(volatile __local atomic_intptr_t *, uintptr_t, memory_order);
13491long __ovld atomic_fetch_xor_explicit(volatile __global atomic_long *, long, memory_order);
13492long __ovld atomic_fetch_xor_explicit(volatile __local atomic_long *, long, memory_order);
13493ulong __ovld atomic_fetch_xor_explicit(volatile __global atomic_ulong *, ulong, memory_order);
13494ulong __ovld atomic_fetch_xor_explicit(volatile __local atomic_ulong *, ulong, memory_order);
13495uintptr_t __ovld atomic_fetch_xor_explicit(volatile __global atomic_uintptr_t *, intptr_t, memory_order);
13496uintptr_t __ovld atomic_fetch_xor_explicit(volatile __local atomic_uintptr_t *, intptr_t, memory_order);
13497intptr_t __ovld atomic_fetch_xor_explicit(volatile __global atomic_intptr_t *, uintptr_t, memory_order);
13498intptr_t __ovld atomic_fetch_xor_explicit(volatile __local atomic_intptr_t *, uintptr_t, memory_order);
13499long __ovld atomic_fetch_and_explicit(volatile __global atomic_long *, long, memory_order);
13500long __ovld atomic_fetch_and_explicit(volatile __local atomic_long *, long, memory_order);
13501ulong __ovld atomic_fetch_and_explicit(volatile __global atomic_ulong *, ulong, memory_order);
13502ulong __ovld atomic_fetch_and_explicit(volatile __local atomic_ulong *, ulong, memory_order);
13503uintptr_t __ovld atomic_fetch_and_explicit(volatile __global atomic_uintptr_t *, intptr_t, memory_order);
13504uintptr_t __ovld atomic_fetch_and_explicit(volatile __local atomic_uintptr_t *, intptr_t, memory_order);
13505intptr_t __ovld atomic_fetch_and_explicit(volatile __global atomic_intptr_t *, uintptr_t, memory_order);
13506intptr_t __ovld atomic_fetch_and_explicit(volatile __local atomic_intptr_t *, uintptr_t, memory_order);
13507long __ovld atomic_fetch_min_explicit(volatile __global atomic_long *, long, memory_order);
13508long __ovld atomic_fetch_min_explicit(volatile __local atomic_long *, long, memory_order);
13509ulong __ovld atomic_fetch_min_explicit(volatile __global atomic_ulong *, ulong, memory_order);
13510ulong __ovld atomic_fetch_min_explicit(volatile __local atomic_ulong *, ulong, memory_order);
13511uintptr_t __ovld atomic_fetch_min_explicit(volatile __global atomic_uintptr_t *, intptr_t, memory_order);
13512uintptr_t __ovld atomic_fetch_min_explicit(volatile __local atomic_uintptr_t *, intptr_t, memory_order);
13513intptr_t __ovld atomic_fetch_min_explicit(volatile __global atomic_intptr_t *, uintptr_t, memory_order);
13514intptr_t __ovld atomic_fetch_min_explicit(volatile __local atomic_intptr_t *, uintptr_t, memory_order);
13515long __ovld atomic_fetch_max_explicit(volatile __global atomic_long *, long, memory_order);
13516long __ovld atomic_fetch_max_explicit(volatile __local atomic_long *, long, memory_order);
13517ulong __ovld atomic_fetch_max_explicit(volatile __global atomic_ulong *, ulong, memory_order);
13518ulong __ovld atomic_fetch_max_explicit(volatile __local atomic_ulong *, ulong, memory_order);
13519uintptr_t __ovld atomic_fetch_max_explicit(volatile __global atomic_uintptr_t *, uintptr_t, memory_order);
13520uintptr_t __ovld atomic_fetch_max_explicit(volatile __local atomic_uintptr_t *, uintptr_t, memory_order);
13521#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13522#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
13523#endif
13524
13525#if defined(__opencl_c_generic_address_space)
13526int __ovld atomic_fetch_add_explicit(volatile atomic_int *, int, memory_order, memory_scope);
13527uint __ovld atomic_fetch_add_explicit(volatile atomic_uint *, uint, memory_order, memory_scope);
13528int __ovld atomic_fetch_sub_explicit(volatile atomic_int *, int, memory_order, memory_scope);
13529uint __ovld atomic_fetch_sub_explicit(volatile atomic_uint *, uint, memory_order, memory_scope);
13530int __ovld atomic_fetch_or_explicit(volatile atomic_int *, int, memory_order, memory_scope);
13531uint __ovld atomic_fetch_or_explicit(volatile atomic_uint *, uint, memory_order, memory_scope);
13532int __ovld atomic_fetch_xor_explicit(volatile atomic_int *, int, memory_order, memory_scope);
13533uint __ovld atomic_fetch_xor_explicit(volatile atomic_uint *, uint, memory_order, memory_scope);
13534int __ovld atomic_fetch_and_explicit(volatile atomic_int *, int, memory_order, memory_scope);
13535uint __ovld atomic_fetch_and_explicit(volatile atomic_uint *, uint, memory_order, memory_scope);
13536int __ovld atomic_fetch_min_explicit(volatile atomic_int *, int, memory_order, memory_scope);
13537uint __ovld atomic_fetch_min_explicit(volatile atomic_uint *, uint, memory_order, memory_scope);
13538int __ovld atomic_fetch_max_explicit(volatile atomic_int *, int, memory_order, memory_scope);
13539uint __ovld atomic_fetch_max_explicit(volatile atomic_uint *, uint, memory_order, memory_scope);
13540#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13541long __ovld atomic_fetch_add_explicit(volatile atomic_long *, long, memory_order, memory_scope);
13542ulong __ovld atomic_fetch_add_explicit(volatile atomic_ulong *, ulong, memory_order, memory_scope);
13543long __ovld atomic_fetch_sub_explicit(volatile atomic_long *, long, memory_order, memory_scope);
13544ulong __ovld atomic_fetch_sub_explicit(volatile atomic_ulong *, ulong, memory_order, memory_scope);
13545long __ovld atomic_fetch_or_explicit(volatile atomic_long *, long, memory_order, memory_scope);
13546ulong __ovld atomic_fetch_or_explicit(volatile atomic_ulong *, ulong, memory_order, memory_scope);
13547long __ovld atomic_fetch_xor_explicit(volatile atomic_long *, long, memory_order, memory_scope);
13548ulong __ovld atomic_fetch_xor_explicit(volatile atomic_ulong *, ulong, memory_order, memory_scope);
13549long __ovld atomic_fetch_and_explicit(volatile atomic_long *, long, memory_order, memory_scope);
13550ulong __ovld atomic_fetch_and_explicit(volatile atomic_ulong *, ulong, memory_order, memory_scope);
13551long __ovld atomic_fetch_min_explicit(volatile atomic_long *, long, memory_order, memory_scope);
13552ulong __ovld atomic_fetch_min_explicit(volatile atomic_ulong *, ulong, memory_order, memory_scope);
13553long __ovld atomic_fetch_max_explicit(volatile atomic_long *, long, memory_order, memory_scope);
13554ulong __ovld atomic_fetch_max_explicit(volatile atomic_ulong *, ulong, memory_order, memory_scope);
13555uintptr_t __ovld atomic_fetch_add_explicit(volatile atomic_uintptr_t *, ptrdiff_t, memory_order, memory_scope);
13556uintptr_t __ovld atomic_fetch_sub_explicit(volatile atomic_uintptr_t *, ptrdiff_t, memory_order, memory_scope);
13557#endif
13558#endif //defined(__opencl_c_generic_address_space)
13559#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
13560int __ovld atomic_fetch_add_explicit(volatile __global atomic_int *, int, memory_order, memory_scope);
13561int __ovld atomic_fetch_add_explicit(volatile __local atomic_int *, int, memory_order, memory_scope);
13562uint __ovld atomic_fetch_add_explicit(volatile __global atomic_uint *, uint, memory_order, memory_scope);
13563uint __ovld atomic_fetch_add_explicit(volatile __local atomic_uint *, uint, memory_order, memory_scope);
13564int __ovld atomic_fetch_sub_explicit(volatile __global atomic_int *, int, memory_order, memory_scope);
13565int __ovld atomic_fetch_sub_explicit(volatile __local atomic_int *, int, memory_order, memory_scope);
13566uint __ovld atomic_fetch_sub_explicit(volatile __global atomic_uint *, uint, memory_order, memory_scope);
13567uint __ovld atomic_fetch_sub_explicit(volatile __local atomic_uint *, uint, memory_order, memory_scope);
13568int __ovld atomic_fetch_or_explicit(volatile __global atomic_int *, int, memory_order, memory_scope);
13569int __ovld atomic_fetch_or_explicit(volatile __local atomic_int *, int, memory_order, memory_scope);
13570uint __ovld atomic_fetch_or_explicit(volatile __global atomic_uint *, uint, memory_order, memory_scope);
13571uint __ovld atomic_fetch_or_explicit(volatile __local atomic_uint *, uint, memory_order, memory_scope);
13572int __ovld atomic_fetch_xor_explicit(volatile __global atomic_int *, int, memory_order, memory_scope);
13573int __ovld atomic_fetch_xor_explicit(volatile __local atomic_int *, int, memory_order, memory_scope);
13574uint __ovld atomic_fetch_xor_explicit(volatile __global atomic_uint *, uint, memory_order, memory_scope);
13575uint __ovld atomic_fetch_xor_explicit(volatile __local atomic_uint *, uint, memory_order, memory_scope);
13576int __ovld atomic_fetch_and_explicit(volatile __global atomic_int *, int, memory_order, memory_scope);
13577int __ovld atomic_fetch_and_explicit(volatile __local atomic_int *, int, memory_order, memory_scope);
13578uint __ovld atomic_fetch_and_explicit(volatile __global atomic_uint *, uint, memory_order, memory_scope);
13579uint __ovld atomic_fetch_and_explicit(volatile __local atomic_uint *, uint, memory_order, memory_scope);
13580int __ovld atomic_fetch_min_explicit(volatile __global atomic_int *, int, memory_order, memory_scope);
13581int __ovld atomic_fetch_min_explicit(volatile __local atomic_int *, int, memory_order, memory_scope);
13582uint __ovld atomic_fetch_min_explicit(volatile __global atomic_uint *, uint, memory_order, memory_scope);
13583uint __ovld atomic_fetch_min_explicit(volatile __local atomic_uint *, uint, memory_order, memory_scope);
13584int __ovld atomic_fetch_max_explicit(volatile __global atomic_int *, int, memory_order, memory_scope);
13585int __ovld atomic_fetch_max_explicit(volatile __local atomic_int *, int, memory_order, memory_scope);
13586uint __ovld atomic_fetch_max_explicit(volatile __global atomic_uint *, uint, memory_order, memory_scope);
13587uint __ovld atomic_fetch_max_explicit(volatile __local atomic_uint *, uint, memory_order, memory_scope);
13588#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13589long __ovld atomic_fetch_add_explicit(volatile __global atomic_long *, long, memory_order, memory_scope);
13590long __ovld atomic_fetch_add_explicit(volatile __local atomic_long *, long, memory_order, memory_scope);
13591uintptr_t __ovld atomic_fetch_add_explicit(volatile __global atomic_uintptr_t *, ptrdiff_t, memory_order, memory_scope);
13592uintptr_t __ovld atomic_fetch_add_explicit(volatile __local atomic_uintptr_t *, ptrdiff_t, memory_order, memory_scope);
13593ulong __ovld atomic_fetch_add_explicit(volatile __global atomic_ulong *, ulong, memory_order, memory_scope);
13594ulong __ovld atomic_fetch_add_explicit(volatile __local atomic_ulong *, ulong, memory_order, memory_scope);
13595long __ovld atomic_fetch_sub_explicit(volatile __global atomic_long *, long, memory_order, memory_scope);
13596long __ovld atomic_fetch_sub_explicit(volatile __local atomic_long *, long, memory_order, memory_scope);
13597ulong __ovld atomic_fetch_sub_explicit(volatile __global atomic_ulong *, ulong, memory_order, memory_scope);
13598ulong __ovld atomic_fetch_sub_explicit(volatile __local atomic_ulong *, ulong, memory_order, memory_scope);
13599uintptr_t __ovld atomic_fetch_sub_explicit(volatile __global atomic_uintptr_t *, ptrdiff_t, memory_order, memory_scope);
13600uintptr_t __ovld atomic_fetch_sub_explicit(volatile __local atomic_uintptr_t *, ptrdiff_t, memory_order, memory_scope);
13601long __ovld atomic_fetch_or_explicit(volatile __global atomic_long *, long, memory_order, memory_scope);
13602long __ovld atomic_fetch_or_explicit(volatile __local atomic_long *, long, memory_order, memory_scope);
13603ulong __ovld atomic_fetch_or_explicit(volatile __global atomic_ulong *, ulong, memory_order, memory_scope);
13604ulong __ovld atomic_fetch_or_explicit(volatile __local atomic_ulong *, ulong, memory_order, memory_scope);
13605uintptr_t __ovld atomic_fetch_or_explicit(volatile __global atomic_uintptr_t *, intptr_t, memory_order, memory_scope);
13606uintptr_t __ovld atomic_fetch_or_explicit(volatile __local atomic_uintptr_t *, intptr_t, memory_order, memory_scope);
13607intptr_t __ovld atomic_fetch_or_explicit(volatile __global atomic_intptr_t *, uintptr_t, memory_order, memory_scope);
13608intptr_t __ovld atomic_fetch_or_explicit(volatile __local atomic_intptr_t *, uintptr_t, memory_order, memory_scope);
13609long __ovld atomic_fetch_xor_explicit(volatile __global atomic_long *, long, memory_order, memory_scope);
13610long __ovld atomic_fetch_xor_explicit(volatile __local atomic_long *, long, memory_order, memory_scope);
13611ulong __ovld atomic_fetch_xor_explicit(volatile __global atomic_ulong *, ulong, memory_order, memory_scope);
13612ulong __ovld atomic_fetch_xor_explicit(volatile __local atomic_ulong *, ulong, memory_order, memory_scope);
13613uintptr_t __ovld atomic_fetch_xor_explicit(volatile __global atomic_uintptr_t *, intptr_t, memory_order, memory_scope);
13614uintptr_t __ovld atomic_fetch_xor_explicit(volatile __local atomic_uintptr_t *, intptr_t, memory_order, memory_scope);
13615intptr_t __ovld atomic_fetch_xor_explicit(volatile __global atomic_intptr_t *, uintptr_t, memory_order, memory_scope);
13616intptr_t __ovld atomic_fetch_xor_explicit(volatile __local atomic_intptr_t *, uintptr_t, memory_order, memory_scope);
13617long __ovld atomic_fetch_and_explicit(volatile __global atomic_long *, long, memory_order, memory_scope);
13618long __ovld atomic_fetch_and_explicit(volatile __local atomic_long *, long, memory_order, memory_scope);
13619ulong __ovld atomic_fetch_and_explicit(volatile __global atomic_ulong *, ulong, memory_order, memory_scope);
13620ulong __ovld atomic_fetch_and_explicit(volatile __local atomic_ulong *, ulong, memory_order, memory_scope);
13621uintptr_t __ovld atomic_fetch_and_explicit(volatile __global atomic_uintptr_t *, intptr_t, memory_order, memory_scope);
13622uintptr_t __ovld atomic_fetch_and_explicit(volatile __local atomic_uintptr_t *, intptr_t, memory_order, memory_scope);
13623intptr_t __ovld atomic_fetch_and_explicit(volatile __global atomic_intptr_t *, uintptr_t, memory_order, memory_scope);
13624intptr_t __ovld atomic_fetch_and_explicit(volatile __local atomic_intptr_t *, uintptr_t, memory_order, memory_scope);
13625long __ovld atomic_fetch_min_explicit(volatile __global atomic_long *, long, memory_order, memory_scope);
13626long __ovld atomic_fetch_min_explicit(volatile __local atomic_long *, long, memory_order, memory_scope);
13627ulong __ovld atomic_fetch_min_explicit(volatile __global atomic_ulong *, ulong, memory_order, memory_scope);
13628ulong __ovld atomic_fetch_min_explicit(volatile __local atomic_ulong *, ulong, memory_order, memory_scope);
13629uintptr_t __ovld atomic_fetch_min_explicit(volatile __global atomic_uintptr_t *, intptr_t, memory_order, memory_scope);
13630uintptr_t __ovld atomic_fetch_min_explicit(volatile __local atomic_uintptr_t *, intptr_t, memory_order, memory_scope);
13631intptr_t __ovld atomic_fetch_min_explicit(volatile __global atomic_intptr_t *, uintptr_t, memory_order, memory_scope);
13632intptr_t __ovld atomic_fetch_min_explicit(volatile __local atomic_intptr_t *, uintptr_t, memory_order, memory_scope);
13633long __ovld atomic_fetch_max_explicit(volatile __global atomic_long *, long, memory_order, memory_scope);
13634long __ovld atomic_fetch_max_explicit(volatile __local atomic_long *, long, memory_order, memory_scope);
13635ulong __ovld atomic_fetch_max_explicit(volatile __global atomic_ulong *, ulong, memory_order, memory_scope);
13636ulong __ovld atomic_fetch_max_explicit(volatile __local atomic_ulong *, ulong, memory_order, memory_scope);
13637uintptr_t __ovld atomic_fetch_max_explicit(volatile __global atomic_uintptr_t *, uintptr_t, memory_order, memory_scope);
13638uintptr_t __ovld atomic_fetch_max_explicit(volatile __local atomic_uintptr_t *, uintptr_t, memory_order, memory_scope);
13639#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13640#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
13641
13642// The functionality added by cl_ext_float_atomics extension
13643#if defined(cl_ext_float_atomics)
13644
13645#if defined(__opencl_c_ext_fp16_global_atomic_load_store)
13646void __ovld atomic_store(volatile __global atomic_half *, half);
13647void __ovld atomic_store_explicit(volatile __global atomic_half *,
13648 half, memory_order);
13649void __ovld atomic_store_explicit(volatile __global atomic_half *,
13650 half, memory_order, memory_scope);
13651half __ovld atomic_load(volatile __global atomic_half *);
13652half __ovld atomic_load_explicit(volatile __global atomic_half *,
13653 memory_order);
13654half __ovld atomic_load_explicit(volatile __global atomic_half *,
13655 memory_order, memory_scope);
13656half __ovld atomic_exchange(volatile __global atomic_half *, half);
13657half __ovld atomic_exchange_explicit(volatile __global atomic_half *,
13658 half, memory_order);
13659half __ovld atomic_exchange_explicit(volatile __global atomic_half *,
13660 half, memory_order, memory_scope);
13661#endif // defined(__opencl_c_ext_fp16_global_atomic_load_store)
13662
13663#if defined(__opencl_c_ext_fp16_local_atomic_load_store)
13664void __ovld atomic_store(volatile __local atomic_half *, half);
13665void __ovld atomic_store_explicit(volatile __local atomic_half *,
13666 half, memory_order);
13667void __ovld atomic_store_explicit(volatile __local atomic_half *,
13668 half, memory_order, memory_scope);
13669half __ovld atomic_load(volatile __local atomic_half *);
13670half __ovld atomic_load_explicit(volatile __local atomic_half *,
13671 memory_order);
13672half __ovld atomic_load_explicit(volatile __local atomic_half *,
13673 memory_order, memory_scope);
13674half __ovld atomic_exchange(volatile __local atomic_half *, half);
13675half __ovld atomic_exchange_explicit(volatile __local atomic_half *,
13676 half, memory_order);
13677half __ovld atomic_exchange_explicit(volatile __local atomic_half *,
13678 half, memory_order, memory_scope);
13679#endif // defined(__opencl_c_ext_fp16_local_atomic_load_store)
13680
13681#if defined(__opencl_c_ext_fp16_global_atomic_load_store) && \
13682 defined(__opencl_c_ext_fp16_local_atomic_load_store)
13683void __ovld atomic_store(volatile atomic_half *, half);
13684void __ovld atomic_store_explicit(volatile atomic_half *, half,
13685 memory_order);
13686void __ovld atomic_store_explicit(volatile atomic_half *, half,
13687 memory_order, memory_scope);
13688half __ovld atomic_load(volatile atomic_half *);
13689half __ovld atomic_load_explicit(volatile atomic_half *,
13690 memory_order);
13691half __ovld atomic_load_explicit(volatile atomic_half *,
13692 memory_order, memory_scope);
13693half __ovld atomic_exchange(volatile atomic_half *, half);
13694half __ovld atomic_exchange_explicit(volatile atomic_half *, half,
13695 memory_order);
13696half __ovld atomic_exchange_explicit(volatile atomic_half *, half,
13697 memory_order, memory_scope);
13698#endif // defined(__opencl_c_ext_fp16_global_atomic_load_store) &&
13699 // defined(__opencl_c_ext_fp16_local_atomic_load_store)
13700
13701#if defined(__opencl_c_ext_fp16_global_atomic_min_max)
13702half __ovld atomic_fetch_min(volatile __global atomic_half *, half);
13703half __ovld atomic_fetch_max(volatile __global atomic_half *, half);
13704half __ovld atomic_fetch_min_explicit(volatile __global atomic_half *,
13705 half, memory_order);
13706half __ovld atomic_fetch_max_explicit(volatile __global atomic_half *,
13707 half, memory_order);
13708half __ovld atomic_fetch_min_explicit(volatile __global atomic_half *,
13709 half, memory_order, memory_scope);
13710half __ovld atomic_fetch_max_explicit(volatile __global atomic_half *,
13711 half, memory_order, memory_scope);
13712#endif // defined(__opencl_c_ext_fp16_global_atomic_min_max)
13713
13714#if defined(__opencl_c_ext_fp16_local_atomic_min_max)
13715half __ovld atomic_fetch_min(volatile __local atomic_half *, half);
13716half __ovld atomic_fetch_max(volatile __local atomic_half *, half);
13717half __ovld atomic_fetch_min_explicit(volatile __local atomic_half *,
13718 half, memory_order);
13719half __ovld atomic_fetch_max_explicit(volatile __local atomic_half *,
13720 half, memory_order);
13721half __ovld atomic_fetch_min_explicit(volatile __local atomic_half *,
13722 half, memory_order, memory_scope);
13723half __ovld atomic_fetch_max_explicit(volatile __local atomic_half *,
13724 half, memory_order, memory_scope);
13725#endif // defined(__opencl_c_ext_fp16_local_atomic_min_max)
13726
13727#if defined(__opencl_c_ext_fp16_global_atomic_min_max) && \
13728 defined(__opencl_c_ext_fp16_local_atomic_min_max)
13729half __ovld atomic_fetch_min(volatile atomic_half *, half);
13730half __ovld atomic_fetch_max(volatile atomic_half *, half);
13731half __ovld atomic_fetch_min_explicit(volatile atomic_half *,
13732 half, memory_order);
13733half __ovld atomic_fetch_max_explicit(volatile atomic_half *,
13734 half, memory_order);
13735half __ovld atomic_fetch_min_explicit(volatile atomic_half *,
13736 half, memory_order, memory_scope);
13737half __ovld atomic_fetch_max_explicit(volatile atomic_half *,
13738 half, memory_order, memory_scope);
13739#endif // defined(__opencl_c_ext_fp16_global_atomic_min_max) && \
13740 defined(__opencl_c_ext_fp16_local_atomic_min_max)
13741
13742#if defined(__opencl_c_ext_fp32_global_atomic_min_max)
13743float __ovld atomic_fetch_min(volatile __global atomic_float *, float);
13744float __ovld atomic_fetch_max(volatile __global atomic_float *, float);
13745float __ovld atomic_fetch_min_explicit(volatile __global atomic_float *,
13746 float, memory_order);
13747float __ovld atomic_fetch_max_explicit(volatile __global atomic_float *,
13748 float, memory_order);
13749float __ovld atomic_fetch_min_explicit(volatile __global atomic_float *,
13750 float, memory_order, memory_scope);
13751float __ovld atomic_fetch_max_explicit(volatile __global atomic_float *,
13752 float, memory_order, memory_scope);
13753#endif // defined(__opencl_c_ext_fp32_global_atomic_min_max)
13754
13755#if defined(__opencl_c_ext_fp32_local_atomic_min_max)
13756float __ovld atomic_fetch_min(volatile __local atomic_float *, float);
13757float __ovld atomic_fetch_max(volatile __local atomic_float *, float);
13758float __ovld atomic_fetch_min_explicit(volatile __local atomic_float *,
13759 float, memory_order);
13760float __ovld atomic_fetch_max_explicit(volatile __local atomic_float *,
13761 float, memory_order);
13762float __ovld atomic_fetch_min_explicit(volatile __local atomic_float *,
13763 float, memory_order, memory_scope);
13764float __ovld atomic_fetch_max_explicit(volatile __local atomic_float *,
13765 float, memory_order, memory_scope);
13766#endif // defined(__opencl_c_ext_fp32_local_atomic_min_max)
13767
13768#if defined(__opencl_c_ext_fp32_global_atomic_min_max) && \
13769 defined(__opencl_c_ext_fp32_local_atomic_min_max)
13770float __ovld atomic_fetch_min(volatile atomic_float *, float);
13771float __ovld atomic_fetch_max(volatile atomic_float *, float);
13772float __ovld atomic_fetch_min_explicit(volatile atomic_float *,
13773 float, memory_order);
13774float __ovld atomic_fetch_max_explicit(volatile atomic_float *,
13775 float, memory_order);
13776float __ovld atomic_fetch_min_explicit(volatile atomic_float *,
13777 float, memory_order, memory_scope);
13778float __ovld atomic_fetch_max_explicit(volatile atomic_float *,
13779 float, memory_order, memory_scope);
13780#endif // defined(__opencl_c_ext_fp32_global_atomic_min_max) && \
13781 defined(__opencl_c_ext_fp32_local_atomic_min_max)
13782
13783#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13784#if defined(__opencl_c_ext_fp64_global_atomic_min_max)
13785double __ovld atomic_fetch_min(volatile __global atomic_double *, double);
13786double __ovld atomic_fetch_max(volatile __global atomic_double *, double);
13787double __ovld atomic_fetch_min_explicit(volatile __global atomic_double *,
13788 double, memory_order);
13789double __ovld atomic_fetch_max_explicit(volatile __global atomic_double *,
13790 double, memory_order);
13791double __ovld atomic_fetch_min_explicit(volatile __global atomic_double *,
13792 double, memory_order, memory_scope);
13793double __ovld atomic_fetch_max_explicit(volatile __global atomic_double *,
13794 double, memory_order, memory_scope);
13795#endif // defined(__opencl_c_ext_fp64_global_atomic_min_max)
13796
13797#if defined(__opencl_c_ext_fp64_local_atomic_min_max)
13798double __ovld atomic_fetch_min(volatile __local atomic_double *, double);
13799double __ovld atomic_fetch_max(volatile __local atomic_double *, double);
13800double __ovld atomic_fetch_min_explicit(volatile __local atomic_double *,
13801 double, memory_order);
13802double __ovld atomic_fetch_max_explicit(volatile __local atomic_double *,
13803 double, memory_order);
13804double __ovld atomic_fetch_min_explicit(volatile __local atomic_double *,
13805 double, memory_order, memory_scope);
13806double __ovld atomic_fetch_max_explicit(volatile __local atomic_double *,
13807 double, memory_order, memory_scope);
13808#endif // defined(__opencl_c_ext_fp64_local_atomic_min_max)
13809
13810#if defined(__opencl_c_ext_fp64_global_atomic_min_max) && \
13811 defined(__opencl_c_ext_fp64_local_atomic_min_max)
13812double __ovld atomic_fetch_min(volatile atomic_double *, double);
13813double __ovld atomic_fetch_max(volatile atomic_double *, double);
13814double __ovld atomic_fetch_min_explicit(volatile atomic_double *,
13815 double, memory_order);
13816double __ovld atomic_fetch_max_explicit(volatile atomic_double *,
13817 double, memory_order);
13818double __ovld atomic_fetch_min_explicit(volatile atomic_double *,
13819 double, memory_order, memory_scope);
13820double __ovld atomic_fetch_max_explicit(volatile atomic_double *,
13821 double, memory_order, memory_scope);
13822#endif // defined(__opencl_c_ext_fp64_global_atomic_min_max) && \
13823 defined(__opencl_c_ext_fp64_local_atomic_min_max)
13824#endif // defined(cl_khr_int64_base_atomics) && \
13825 defined(cl_khr_int64_extended_atomics)
13826
13827#if defined(__opencl_c_ext_fp16_global_atomic_add)
13828half __ovld atomic_fetch_add(volatile __global atomic_half *, half);
13829half __ovld atomic_fetch_sub(volatile __global atomic_half *, half);
13830half __ovld atomic_fetch_add_explicit(volatile __global atomic_half *,
13831 half, memory_order);
13832half __ovld atomic_fetch_sub_explicit(volatile __global atomic_half *,
13833 half, memory_order);
13834half __ovld atomic_fetch_add_explicit(volatile __global atomic_half *,
13835 half, memory_order, memory_scope);
13836half __ovld atomic_fetch_sub_explicit(volatile __global atomic_half *,
13837 half, memory_order, memory_scope);
13838#endif // defined(__opencl_c_ext_fp16_global_atomic_add)
13839
13840#if defined(__opencl_c_ext_fp16_local_atomic_add)
13841half __ovld atomic_fetch_add(volatile __local atomic_half *, half);
13842half __ovld atomic_fetch_sub(volatile __local atomic_half *, half);
13843half __ovld atomic_fetch_add_explicit(volatile __local atomic_half *,
13844 half, memory_order);
13845half __ovld atomic_fetch_sub_explicit(volatile __local atomic_half *,
13846 half, memory_order);
13847half __ovld atomic_fetch_add_explicit(volatile __local atomic_half *,
13848 half, memory_order, memory_scope);
13849half __ovld atomic_fetch_sub_explicit(volatile __local atomic_half *,
13850 half, memory_order, memory_scope);
13851#endif // defined(__opencl_c_ext_fp16_local_atomic_add)
13852
13853#if defined(__opencl_c_ext_fp16_global_atomic_add) && \
13854 defined(__opencl_c_ext_fp16_local_atomic_add)
13855half __ovld atomic_fetch_add(volatile atomic_half *, half);
13856half __ovld atomic_fetch_sub(volatile atomic_half *, half);
13857half __ovld atomic_fetch_add_explicit(volatile atomic_half *,
13858 half, memory_order);
13859half __ovld atomic_fetch_sub_explicit(volatile atomic_half *,
13860 half, memory_order);
13861half __ovld atomic_fetch_add_explicit(volatile atomic_half *,
13862 half, memory_order, memory_scope);
13863half __ovld atomic_fetch_sub_explicit(volatile atomic_half *,
13864 half, memory_order, memory_scope);
13865#endif // defined(__opencl_c_ext_fp16_global_atomic_add) && \
13866 defined(__opencl_c_ext_fp16_local_atomic_add)
13867
13868#if defined(__opencl_c_ext_fp32_global_atomic_add)
13869float __ovld atomic_fetch_add(volatile __global atomic_float *, float);
13870float __ovld atomic_fetch_sub(volatile __global atomic_float *, float);
13871float __ovld atomic_fetch_add_explicit(volatile __global atomic_float *,
13872 float, memory_order);
13873float __ovld atomic_fetch_sub_explicit(volatile __global atomic_float *,
13874 float, memory_order);
13875float __ovld atomic_fetch_add_explicit(volatile __global atomic_float *,
13876 float, memory_order, memory_scope);
13877float __ovld atomic_fetch_sub_explicit(volatile __global atomic_float *,
13878 float, memory_order, memory_scope);
13879#endif // defined(__opencl_c_ext_fp32_global_atomic_add)
13880
13881#if defined(__opencl_c_ext_fp32_local_atomic_add)
13882float __ovld atomic_fetch_add(volatile __local atomic_float *, float);
13883float __ovld atomic_fetch_sub(volatile __local atomic_float *, float);
13884float __ovld atomic_fetch_add_explicit(volatile __local atomic_float *,
13885 float, memory_order);
13886float __ovld atomic_fetch_sub_explicit(volatile __local atomic_float *,
13887 float, memory_order);
13888float __ovld atomic_fetch_add_explicit(volatile __local atomic_float *,
13889 float, memory_order, memory_scope);
13890float __ovld atomic_fetch_sub_explicit(volatile __local atomic_float *,
13891 float, memory_order, memory_scope);
13892#endif // defined(__opencl_c_ext_fp32_local_atomic_add)
13893
13894#if defined(__opencl_c_ext_fp32_global_atomic_add) && \
13895 defined(__opencl_c_ext_fp32_local_atomic_add)
13896float __ovld atomic_fetch_add(volatile atomic_float *, float);
13897float __ovld atomic_fetch_sub(volatile atomic_float *, float);
13898float __ovld atomic_fetch_add_explicit(volatile atomic_float *,
13899 float, memory_order);
13900float __ovld atomic_fetch_sub_explicit(volatile atomic_float *,
13901 float, memory_order);
13902float __ovld atomic_fetch_add_explicit(volatile atomic_float *,
13903 float, memory_order, memory_scope);
13904float __ovld atomic_fetch_sub_explicit(volatile atomic_float *,
13905 float, memory_order, memory_scope);
13906#endif // defined(__opencl_c_ext_fp32_global_atomic_add) && \
13907 defined(__opencl_c_ext_fp32_local_atomic_add)
13908
13909#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13910#if defined(__opencl_c_ext_fp64_global_atomic_add)
13911double __ovld atomic_fetch_add(volatile __global atomic_double *, double);
13912double __ovld atomic_fetch_sub(volatile __global atomic_double *, double);
13913double __ovld atomic_fetch_add_explicit(volatile __global atomic_double *,
13914 double, memory_order);
13915double __ovld atomic_fetch_sub_explicit(volatile __global atomic_double *,
13916 double, memory_order);
13917double __ovld atomic_fetch_add_explicit(volatile __global atomic_double *,
13918 double, memory_order, memory_scope);
13919double __ovld atomic_fetch_sub_explicit(volatile __global atomic_double *,
13920 double, memory_order, memory_scope);
13921#endif // defined(__opencl_c_ext_fp64_global_atomic_add)
13922
13923#if defined(__opencl_c_ext_fp64_local_atomic_add)
13924double __ovld atomic_fetch_add(volatile __local atomic_double *, double);
13925double __ovld atomic_fetch_sub(volatile __local atomic_double *, double);
13926double __ovld atomic_fetch_add_explicit(volatile __local atomic_double *,
13927 double, memory_order);
13928double __ovld atomic_fetch_sub_explicit(volatile __local atomic_double *,
13929 double, memory_order);
13930double __ovld atomic_fetch_add_explicit(volatile __local atomic_double *,
13931 double, memory_order, memory_scope);
13932double __ovld atomic_fetch_sub_explicit(volatile __local atomic_double *,
13933 double, memory_order, memory_scope);
13934#endif // defined(__opencl_c_ext_fp64_local_atomic_add)
13935
13936#if defined(__opencl_c_ext_fp64_global_atomic_add) && \
13937 defined(__opencl_c_ext_fp64_local_atomic_add)
13938double __ovld atomic_fetch_add(volatile atomic_double *, double);
13939double __ovld atomic_fetch_sub(volatile atomic_double *, double);
13940double __ovld atomic_fetch_add_explicit(volatile atomic_double *,
13941 double, memory_order);
13942double __ovld atomic_fetch_sub_explicit(volatile atomic_double *,
13943 double, memory_order);
13944double __ovld atomic_fetch_add_explicit(volatile atomic_double *,
13945 double, memory_order, memory_scope);
13946double __ovld atomic_fetch_sub_explicit(volatile atomic_double *,
13947 double, memory_order, memory_scope);
13948#endif // defined(__opencl_c_ext_fp64_global_atomic_add) && \
13949 defined(__opencl_c_ext_fp64_local_atomic_add)
13950#endif // defined(cl_khr_int64_base_atomics) && \
13951 defined(cl_khr_int64_extended_atomics)
13952
13953#endif // cl_ext_float_atomics
13954
13955// atomic_store()
13956
13957#if defined(__opencl_c_atomic_order_seq_cst) && defined(__opencl_c_atomic_scope_device)
13958#if defined(__opencl_c_generic_address_space)
13959void __ovld atomic_store(volatile atomic_int *, int);
13960void __ovld atomic_store(volatile atomic_uint *, uint);
13961void __ovld atomic_store(volatile atomic_float *, float);
13962
13963#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13964#ifdef cl_khr_fp64
13965void __ovld atomic_store(volatile atomic_double *, double);
13966#endif //cl_khr_fp64
13967void __ovld atomic_store(volatile atomic_long *, long);
13968void __ovld atomic_store(volatile atomic_ulong *, ulong);
13969#endif
13970#endif //defined(__opencl_c_generic_address_space)
13971#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
13972void __ovld atomic_store(volatile __global atomic_int *, int);
13973void __ovld atomic_store(volatile __local atomic_int *, int);
13974void __ovld atomic_store(volatile __global atomic_uint *, uint);
13975void __ovld atomic_store(volatile __local atomic_uint *, uint);
13976void __ovld atomic_store(volatile __global atomic_float *, float);
13977void __ovld atomic_store(volatile __local atomic_float *, float);
13978#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13979#ifdef cl_khr_fp64
13980void __ovld atomic_store(volatile __global atomic_double *, double);
13981void __ovld atomic_store(volatile __local atomic_double *, double);
13982#endif //cl_khr_fp64
13983void __ovld atomic_store(volatile __global atomic_long *, long);
13984void __ovld atomic_store(volatile __local atomic_long *, long);
13985void __ovld atomic_store(volatile __global atomic_ulong *, ulong);
13986void __ovld atomic_store(volatile __local atomic_ulong *, ulong);
13987#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13988#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
13989#endif
13990
13991#if defined(__opencl_c_atomic_scope_device)
13992#if defined(__opencl_c_generic_address_space)
13993void __ovld atomic_store_explicit(volatile atomic_int *, int, memory_order);
13994void __ovld atomic_store_explicit(volatile atomic_uint *, uint, memory_order);
13995void __ovld atomic_store_explicit(volatile atomic_float *, float, memory_order);
13996#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
13997#ifdef cl_khr_fp64
13998void __ovld atomic_store_explicit(volatile atomic_double *, double, memory_order);
13999#endif //cl_khr_fp64
14000void __ovld atomic_store_explicit(volatile atomic_long *, long, memory_order);
14001void __ovld atomic_store_explicit(volatile atomic_ulong *, ulong, memory_order);
14002#endif
14003#endif //defined(__opencl_c_generic_address_space)
14004#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14005void __ovld atomic_store_explicit(volatile __global atomic_int *, int, memory_order);
14006void __ovld atomic_store_explicit(volatile __local atomic_int *, int, memory_order);
14007void __ovld atomic_store_explicit(volatile __global atomic_uint *, uint, memory_order);
14008void __ovld atomic_store_explicit(volatile __local atomic_uint *, uint, memory_order);
14009void __ovld atomic_store_explicit(volatile __global atomic_float *, float, memory_order);
14010void __ovld atomic_store_explicit(volatile __local atomic_float *, float, memory_order);
14011#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14012#ifdef cl_khr_fp64
14013void __ovld atomic_store_explicit(volatile __global atomic_double *, double, memory_order);
14014void __ovld atomic_store_explicit(volatile __local atomic_double *, double, memory_order);
14015#endif
14016void __ovld atomic_store_explicit(volatile __global atomic_long *, long, memory_order);
14017void __ovld atomic_store_explicit(volatile __local atomic_long *, long, memory_order);
14018void __ovld atomic_store_explicit(volatile __global atomic_ulong *, ulong, memory_order);
14019void __ovld atomic_store_explicit(volatile __local atomic_ulong *, ulong, memory_order);
14020#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14021#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14022#endif
14023
14024#if defined(__opencl_c_generic_address_space)
14025void __ovld atomic_store_explicit(volatile atomic_int *, int, memory_order, memory_scope);
14026void __ovld atomic_store_explicit(volatile atomic_uint *, uint, memory_order, memory_scope);
14027void __ovld atomic_store_explicit(volatile atomic_float *, float, memory_order, memory_scope);
14028#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14029#ifdef cl_khr_fp64
14030void __ovld atomic_store_explicit(volatile atomic_double *, double, memory_order, memory_scope);
14031#endif //cl_khr_fp64
14032void __ovld atomic_store_explicit(volatile atomic_long *, long, memory_order, memory_scope);
14033void __ovld atomic_store_explicit(volatile atomic_ulong *, ulong, memory_order, memory_scope);
14034#endif
14035#endif //defined(__opencl_c_generic_address_space)
14036#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14037void __ovld atomic_store_explicit(volatile __global atomic_int *, int, memory_order, memory_scope);
14038void __ovld atomic_store_explicit(volatile __local atomic_int *, int, memory_order, memory_scope);
14039void __ovld atomic_store_explicit(volatile __global atomic_uint *, uint, memory_order, memory_scope);
14040void __ovld atomic_store_explicit(volatile __local atomic_uint *, uint, memory_order, memory_scope);
14041void __ovld atomic_store_explicit(volatile __global atomic_float *, float, memory_order, memory_scope);
14042void __ovld atomic_store_explicit(volatile __local atomic_float *, float, memory_order, memory_scope);
14043#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14044#ifdef cl_khr_fp64
14045void __ovld atomic_store_explicit(volatile __global atomic_double *, double, memory_order, memory_scope);
14046void __ovld atomic_store_explicit(volatile __local atomic_double *, double, memory_order, memory_scope);
14047#endif //cl_khr_fp64
14048void __ovld atomic_store_explicit(volatile __global atomic_long *, long, memory_order, memory_scope);
14049void __ovld atomic_store_explicit(volatile __local atomic_long *, long, memory_order, memory_scope);
14050void __ovld atomic_store_explicit(volatile __global atomic_ulong *, ulong, memory_order, memory_scope);
14051void __ovld atomic_store_explicit(volatile __local atomic_ulong *, ulong, memory_order, memory_scope);
14052#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14053#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14054
14055// atomic_load()
14056#if defined(__opencl_c_atomic_order_seq_cst) && defined(__opencl_c_atomic_scope_device)
14057#if defined(__opencl_c_generic_address_space)
14058int __ovld atomic_load(volatile atomic_int *);
14059uint __ovld atomic_load(volatile atomic_uint *);
14060float __ovld atomic_load(volatile atomic_float *);
14061#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14062#ifdef cl_khr_fp64
14063double __ovld atomic_load(volatile atomic_double *);
14064#endif //cl_khr_fp64
14065long __ovld atomic_load(volatile atomic_long *);
14066ulong __ovld atomic_load(volatile atomic_ulong *);
14067#endif
14068#endif //defined(__opencl_c_generic_address_space)
14069#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14070int __ovld atomic_load(volatile __global atomic_int *);
14071int __ovld atomic_load(volatile __local atomic_int *);
14072uint __ovld atomic_load(volatile __global atomic_uint *);
14073uint __ovld atomic_load(volatile __local atomic_uint *);
14074float __ovld atomic_load(volatile __global atomic_float *);
14075float __ovld atomic_load(volatile __local atomic_float *);
14076#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14077#ifdef cl_khr_fp64
14078double __ovld atomic_load(volatile __global atomic_double *);
14079double __ovld atomic_load(volatile __local atomic_double *);
14080#endif //cl_khr_fp64
14081long __ovld atomic_load(volatile __global atomic_long *);
14082long __ovld atomic_load(volatile __local atomic_long *);
14083ulong __ovld atomic_load(volatile __global atomic_ulong *);
14084ulong __ovld atomic_load(volatile __local atomic_ulong *);
14085#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14086#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14087#endif
14088
14089#if defined(__opencl_c_atomic_scope_device)
14090#if defined(__opencl_c_generic_address_space)
14091int __ovld atomic_load_explicit(volatile atomic_int *, memory_order);
14092uint __ovld atomic_load_explicit(volatile atomic_uint *, memory_order);
14093float __ovld atomic_load_explicit(volatile atomic_float *, memory_order);
14094#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14095#ifdef cl_khr_fp64
14096double __ovld atomic_load_explicit(volatile atomic_double *, memory_order);
14097#endif //cl_khr_fp64
14098long __ovld atomic_load_explicit(volatile atomic_long *, memory_order);
14099ulong __ovld atomic_load_explicit(volatile atomic_ulong *, memory_order);
14100#endif
14101#endif //defined(__opencl_c_generic_address_space)
14102#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14103int __ovld atomic_load_explicit(volatile __global atomic_int *, memory_order);
14104int __ovld atomic_load_explicit(volatile __local atomic_int *, memory_order);
14105uint __ovld atomic_load_explicit(volatile __global atomic_uint *, memory_order);
14106uint __ovld atomic_load_explicit(volatile __local atomic_uint *, memory_order);
14107float __ovld atomic_load_explicit(volatile __global atomic_float *, memory_order);
14108float __ovld atomic_load_explicit(volatile __local atomic_float *, memory_order);
14109#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14110#ifdef cl_khr_fp64
14111double __ovld atomic_load_explicit(volatile __global atomic_double *, memory_order);
14112double __ovld atomic_load_explicit(volatile __local atomic_double *, memory_order);
14113#endif //cl_khr_fp64
14114long __ovld atomic_load_explicit(volatile __global atomic_long *, memory_order);
14115long __ovld atomic_load_explicit(volatile __local atomic_long *, memory_order);
14116ulong __ovld atomic_load_explicit(volatile __global atomic_ulong *, memory_order);
14117ulong __ovld atomic_load_explicit(volatile __local atomic_ulong *, memory_order);
14118#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14119#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14120#endif
14121
14122#if defined(__opencl_c_generic_address_space)
14123int __ovld atomic_load_explicit(volatile atomic_int *, memory_order, memory_scope);
14124uint __ovld atomic_load_explicit(volatile atomic_uint *, memory_order, memory_scope);
14125float __ovld atomic_load_explicit(volatile atomic_float *, memory_order, memory_scope);
14126#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14127#ifdef cl_khr_fp64
14128double __ovld atomic_load_explicit(volatile atomic_double *, memory_order, memory_scope);
14129#endif //cl_khr_fp64
14130long __ovld atomic_load_explicit(volatile atomic_long *, memory_order, memory_scope);
14131ulong __ovld atomic_load_explicit(volatile atomic_ulong *, memory_order, memory_scope);
14132#endif
14133#endif //defined(__opencl_c_generic_address_space)
14134#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14135int __ovld atomic_load_explicit(volatile __global atomic_int *, memory_order, memory_scope);
14136int __ovld atomic_load_explicit(volatile __local atomic_int *, memory_order, memory_scope);
14137uint __ovld atomic_load_explicit(volatile __global atomic_uint *, memory_order, memory_scope);
14138uint __ovld atomic_load_explicit(volatile __local atomic_uint *, memory_order, memory_scope);
14139float __ovld atomic_load_explicit(volatile __global atomic_float *, memory_order, memory_scope);
14140float __ovld atomic_load_explicit(volatile __local atomic_float *, memory_order, memory_scope);
14141#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14142#ifdef cl_khr_fp64
14143double __ovld atomic_load_explicit(volatile __global atomic_double *, memory_order, memory_scope);
14144double __ovld atomic_load_explicit(volatile __local atomic_double *, memory_order, memory_scope);
14145#endif
14146long __ovld atomic_load_explicit(volatile __global atomic_long *, memory_order, memory_scope);
14147long __ovld atomic_load_explicit(volatile __local atomic_long *, memory_order, memory_scope);
14148ulong __ovld atomic_load_explicit(volatile __global atomic_ulong *, memory_order, memory_scope);
14149ulong __ovld atomic_load_explicit(volatile __local atomic_ulong *, memory_order, memory_scope);
14150#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14151#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14152
14153// atomic_exchange()
14154
14155#if defined(__opencl_c_atomic_order_seq_cst) && defined(__opencl_c_atomic_scope_device)
14156#if defined(__opencl_c_generic_address_space)
14157int __ovld atomic_exchange(volatile atomic_int *, int);
14158uint __ovld atomic_exchange(volatile atomic_uint *, uint);
14159float __ovld atomic_exchange(volatile atomic_float *, float);
14160#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14161#ifdef cl_khr_fp64
14162double __ovld atomic_exchange(volatile atomic_double *, double);
14163#endif //cl_khr_fp64
14164long __ovld atomic_exchange(volatile atomic_long *, long);
14165ulong __ovld atomic_exchange(volatile atomic_ulong *, ulong);
14166#endif
14167#endif //defined(__opencl_c_generic_address_space)
14168#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14169int __ovld atomic_exchange(volatile __global atomic_int *, int);
14170int __ovld atomic_exchange(volatile __local atomic_int *, int);
14171uint __ovld atomic_exchange(volatile __global atomic_uint *, uint);
14172uint __ovld atomic_exchange(volatile __local atomic_uint *, uint);
14173float __ovld atomic_exchange(volatile __global atomic_float *, float);
14174float __ovld atomic_exchange(volatile __local atomic_float *, float);
14175#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14176#ifdef cl_khr_fp64
14177double __ovld atomic_exchange(volatile __global atomic_double *, double);
14178double __ovld atomic_exchange(volatile __local atomic_double *, double);
14179#endif //cl_khr_fp64
14180long __ovld atomic_exchange(volatile __global atomic_long *, long);
14181long __ovld atomic_exchange(volatile __local atomic_long *, long);
14182ulong __ovld atomic_exchange(volatile __global atomic_ulong *, ulong);
14183ulong __ovld atomic_exchange(volatile __local atomic_ulong *, ulong);
14184#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14185#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14186#endif
14187
14188#if defined(__opencl_c_atomic_scope_device)
14189#if defined(__opencl_c_generic_address_space)
14190int __ovld atomic_exchange_explicit(volatile atomic_int *, int, memory_order);
14191uint __ovld atomic_exchange_explicit(volatile atomic_uint *, uint, memory_order);
14192float __ovld atomic_exchange_explicit(volatile atomic_float *, float, memory_order);
14193#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14194#ifdef cl_khr_fp64
14195double __ovld atomic_exchange_explicit(volatile atomic_double *, double, memory_order);
14196#endif //cl_khr_fp64
14197long __ovld atomic_exchange_explicit(volatile atomic_long *, long, memory_order);
14198ulong __ovld atomic_exchange_explicit(volatile atomic_ulong *, ulong, memory_order);
14199#endif
14200#endif //defined(__opencl_c_generic_address_space)
14201#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14202int __ovld atomic_exchange_explicit(volatile __global atomic_int *, int, memory_order);
14203int __ovld atomic_exchange_explicit(volatile __local atomic_int *, int, memory_order);
14204uint __ovld atomic_exchange_explicit(volatile __global atomic_uint *, uint, memory_order);
14205uint __ovld atomic_exchange_explicit(volatile __local atomic_uint *, uint, memory_order);
14206float __ovld atomic_exchange_explicit(volatile __global atomic_float *, float, memory_order);
14207float __ovld atomic_exchange_explicit(volatile __local atomic_float *, float, memory_order);
14208#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14209#ifdef cl_khr_fp64
14210double __ovld atomic_exchange_explicit(volatile __global atomic_double *, double, memory_order);
14211double __ovld atomic_exchange_explicit(volatile __local atomic_double *, double, memory_order);
14212#endif //cl_khr_fp64
14213long __ovld atomic_exchange_explicit(volatile __global atomic_long *, long, memory_order);
14214long __ovld atomic_exchange_explicit(volatile __local atomic_long *, long, memory_order);
14215ulong __ovld atomic_exchange_explicit(volatile __global atomic_ulong *, ulong, memory_order);
14216ulong __ovld atomic_exchange_explicit(volatile __local atomic_ulong *, ulong, memory_order);
14217#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)wi
14218#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14219#endif
14220
14221#if defined(__opencl_c_generic_address_space)
14222int __ovld atomic_exchange_explicit(volatile atomic_int *, int, memory_order, memory_scope);
14223uint __ovld atomic_exchange_explicit(volatile atomic_uint *, uint, memory_order, memory_scope);
14224float __ovld atomic_exchange_explicit(volatile atomic_float *, float, memory_order, memory_scope);
14225#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14226#ifdef cl_khr_fp64
14227double __ovld atomic_exchange_explicit(volatile atomic_double *, double, memory_order, memory_scope);
14228#endif //cl_khr_fp64
14229long __ovld atomic_exchange_explicit(volatile atomic_long *, long, memory_order, memory_scope);
14230ulong __ovld atomic_exchange_explicit(volatile atomic_ulong *, ulong, memory_order, memory_scope);
14231#endif
14232#endif //defined(__opencl_c_generic_address_space)
14233#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14234int __ovld atomic_exchange_explicit(volatile __global atomic_int *, int, memory_order, memory_scope);
14235int __ovld atomic_exchange_explicit(volatile __local atomic_int *, int, memory_order, memory_scope);
14236uint __ovld atomic_exchange_explicit(volatile __global atomic_uint *, uint, memory_order, memory_scope);
14237uint __ovld atomic_exchange_explicit(volatile __local atomic_uint *, uint, memory_order, memory_scope);
14238float __ovld atomic_exchange_explicit(volatile __global atomic_float *, float, memory_order, memory_scope);
14239float __ovld atomic_exchange_explicit(volatile __local atomic_float *, float, memory_order, memory_scope);
14240#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14241#ifdef cl_khr_fp64
14242double __ovld atomic_exchange_explicit(volatile __global atomic_double *, double, memory_order, memory_scope);
14243double __ovld atomic_exchange_explicit(volatile __local atomic_double *, double, memory_order, memory_scope);
14244#endif //cl_khr_fp64
14245long __ovld atomic_exchange_explicit(volatile __global atomic_long *, long, memory_order, memory_scope);
14246long __ovld atomic_exchange_explicit(volatile __local atomic_long *, long, memory_order, memory_scope);
14247ulong __ovld atomic_exchange_explicit(volatile __global atomic_ulong *, ulong, memory_order, memory_scope);
14248ulong __ovld atomic_exchange_explicit(volatile __local atomic_ulong *, ulong, memory_order, memory_scope);
14249#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14250#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14251
14252// atomic_compare_exchange_strong() and atomic_compare_exchange_weak()
14253#if defined(__opencl_c_atomic_order_seq_cst) && defined(__opencl_c_atomic_scope_device)
14254#if defined(__opencl_c_generic_address_space)
14255bool __ovld atomic_compare_exchange_strong(volatile atomic_int *, int *, int);
14256bool __ovld atomic_compare_exchange_strong(volatile atomic_uint *, uint *, uint);
14257bool __ovld atomic_compare_exchange_weak(volatile atomic_int *, int *, int);
14258bool __ovld atomic_compare_exchange_weak(volatile atomic_uint *, uint *, uint);
14259bool __ovld atomic_compare_exchange_strong(volatile atomic_float *, float *, float);
14260bool __ovld atomic_compare_exchange_weak(volatile atomic_float *, float *, float);
14261#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14262#ifdef cl_khr_fp64
14263bool __ovld atomic_compare_exchange_strong(volatile atomic_double *, double *, double);
14264bool __ovld atomic_compare_exchange_weak(volatile atomic_double *, double *, double);
14265#endif //cl_khr_fp64
14266bool __ovld atomic_compare_exchange_strong(volatile atomic_long *, long *, long);
14267bool __ovld atomic_compare_exchange_weak(volatile atomic_long *, long *, long);
14268bool __ovld atomic_compare_exchange_strong(volatile atomic_ulong *, ulong *, ulong);
14269bool __ovld atomic_compare_exchange_weak(volatile atomic_ulong *, ulong *, ulong);
14270#endif
14271#endif //defined(__opencl_c_generic_address_space)
14272#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14273bool __ovld atomic_compare_exchange_strong(volatile __global atomic_int *, __global int *, int);
14274bool __ovld atomic_compare_exchange_strong(volatile __global atomic_int *, __local int *, int);
14275bool __ovld atomic_compare_exchange_strong(volatile __global atomic_int *, __private int *, int);
14276bool __ovld atomic_compare_exchange_strong(volatile __local atomic_int *, __global int *, int);
14277bool __ovld atomic_compare_exchange_strong(volatile __local atomic_int *, __local int *, int);
14278bool __ovld atomic_compare_exchange_strong(volatile __local atomic_int *, __private int *, int);
14279bool __ovld atomic_compare_exchange_strong(volatile __global atomic_uint *, __global uint *, uint);
14280bool __ovld atomic_compare_exchange_strong(volatile __global atomic_uint *, __local uint *, uint);
14281bool __ovld atomic_compare_exchange_strong(volatile __global atomic_uint *, __private uint *, uint);
14282bool __ovld atomic_compare_exchange_strong(volatile __local atomic_uint *, __global uint *, uint);
14283bool __ovld atomic_compare_exchange_strong(volatile __local atomic_uint *, __local uint *, uint);
14284bool __ovld atomic_compare_exchange_strong(volatile __local atomic_uint *, __private uint *, uint);
14285bool __ovld atomic_compare_exchange_strong(volatile __global atomic_float *, __global float *, float);
14286bool __ovld atomic_compare_exchange_strong(volatile __global atomic_float *, __local float *, float);
14287bool __ovld atomic_compare_exchange_strong(volatile __global atomic_float *, __private float *, float);
14288bool __ovld atomic_compare_exchange_strong(volatile __local atomic_float *, __global float *, float);
14289bool __ovld atomic_compare_exchange_strong(volatile __local atomic_float *, __local float *, float);
14290bool __ovld atomic_compare_exchange_strong(volatile __local atomic_float *, __private float *, float);
14291bool __ovld atomic_compare_exchange_weak(volatile __global atomic_int *, __global int *, int);
14292bool __ovld atomic_compare_exchange_weak(volatile __global atomic_int *, __local int *, int);
14293bool __ovld atomic_compare_exchange_weak(volatile __global atomic_int *, __private int *, int);
14294bool __ovld atomic_compare_exchange_weak(volatile __local atomic_int *, __global int *, int);
14295bool __ovld atomic_compare_exchange_weak(volatile __local atomic_int *, __local int *, int);
14296bool __ovld atomic_compare_exchange_weak(volatile __local atomic_int *, __private int *, int);
14297bool __ovld atomic_compare_exchange_weak(volatile __global atomic_uint *, __global uint *, uint);
14298bool __ovld atomic_compare_exchange_weak(volatile __global atomic_uint *, __local uint *, uint);
14299bool __ovld atomic_compare_exchange_weak(volatile __global atomic_uint *, __private uint *, uint);
14300bool __ovld atomic_compare_exchange_weak(volatile __local atomic_uint *, __global uint *, uint);
14301bool __ovld atomic_compare_exchange_weak(volatile __local atomic_uint *, __local uint *, uint);
14302bool __ovld atomic_compare_exchange_weak(volatile __local atomic_uint *, __private uint *, uint);
14303bool __ovld atomic_compare_exchange_weak(volatile __global atomic_float *, __global float *, float);
14304bool __ovld atomic_compare_exchange_weak(volatile __global atomic_float *, __local float *, float);
14305bool __ovld atomic_compare_exchange_weak(volatile __global atomic_float *, __private float *, float);
14306bool __ovld atomic_compare_exchange_weak(volatile __local atomic_float *, __global float *, float);
14307bool __ovld atomic_compare_exchange_weak(volatile __local atomic_float *, __local float *, float);
14308bool __ovld atomic_compare_exchange_weak(volatile __local atomic_float *, __private float *, float);
14309#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14310#ifdef cl_khr_fp64
14311bool __ovld atomic_compare_exchange_strong(volatile __global atomic_double *, __global double *, double);
14312bool __ovld atomic_compare_exchange_strong(volatile __global atomic_double *, __local double *, double);
14313bool __ovld atomic_compare_exchange_strong(volatile __global atomic_double *, __private double *, double);
14314bool __ovld atomic_compare_exchange_strong(volatile __local atomic_double *, __global double *, double);
14315bool __ovld atomic_compare_exchange_strong(volatile __local atomic_double *, __local double *, double);
14316bool __ovld atomic_compare_exchange_strong(volatile __local atomic_double *, __private double *, double);
14317bool __ovld atomic_compare_exchange_weak(volatile __global atomic_double *, __global double *, double);
14318bool __ovld atomic_compare_exchange_weak(volatile __global atomic_double *, __local double *, double);
14319bool __ovld atomic_compare_exchange_weak(volatile __global atomic_double *, __private double *, double);
14320bool __ovld atomic_compare_exchange_weak(volatile __local atomic_double *, __global double *, double);
14321bool __ovld atomic_compare_exchange_weak(volatile __local atomic_double *, __local double *, double);
14322bool __ovld atomic_compare_exchange_weak(volatile __local atomic_double *, __private double *, double);
14323#endif //cl_khr_fp64
14324bool __ovld atomic_compare_exchange_strong(volatile __global atomic_long *, __global long *, long);
14325bool __ovld atomic_compare_exchange_strong(volatile __global atomic_long *, __local long *, long);
14326bool __ovld atomic_compare_exchange_strong(volatile __global atomic_long *, __private long *, long);
14327bool __ovld atomic_compare_exchange_strong(volatile __local atomic_long *, __global long *, long);
14328bool __ovld atomic_compare_exchange_strong(volatile __local atomic_long *, __local long *, long);
14329bool __ovld atomic_compare_exchange_strong(volatile __local atomic_long *, __private long *, long);
14330bool __ovld atomic_compare_exchange_strong(volatile __global atomic_ulong *, __global ulong *, ulong);
14331bool __ovld atomic_compare_exchange_strong(volatile __global atomic_ulong *, __local ulong *, ulong);
14332bool __ovld atomic_compare_exchange_strong(volatile __global atomic_ulong *, __private ulong *, ulong);
14333bool __ovld atomic_compare_exchange_strong(volatile __local atomic_ulong *, __global ulong *, ulong);
14334bool __ovld atomic_compare_exchange_strong(volatile __local atomic_ulong *, __local ulong *, ulong);
14335bool __ovld atomic_compare_exchange_strong(volatile __local atomic_ulong *, __private ulong *, ulong);
14336bool __ovld atomic_compare_exchange_weak(volatile __global atomic_long *, __global long *, long);
14337bool __ovld atomic_compare_exchange_weak(volatile __global atomic_long *, __local long *, long);
14338bool __ovld atomic_compare_exchange_weak(volatile __global atomic_long *, __private long *, long);
14339bool __ovld atomic_compare_exchange_weak(volatile __local atomic_long *, __global long *, long);
14340bool __ovld atomic_compare_exchange_weak(volatile __local atomic_long *, __local long *, long);
14341bool __ovld atomic_compare_exchange_weak(volatile __local atomic_long *, __private long *, long);
14342bool __ovld atomic_compare_exchange_weak(volatile __global atomic_ulong *, __global ulong *, ulong);
14343bool __ovld atomic_compare_exchange_weak(volatile __global atomic_ulong *, __local ulong *, ulong);
14344bool __ovld atomic_compare_exchange_weak(volatile __global atomic_ulong *, __private ulong *, ulong);
14345bool __ovld atomic_compare_exchange_weak(volatile __local atomic_ulong *, __global ulong *, ulong);
14346bool __ovld atomic_compare_exchange_weak(volatile __local atomic_ulong *, __local ulong *, ulong);
14347bool __ovld atomic_compare_exchange_weak(volatile __local atomic_ulong *, __private ulong *, ulong);
14348#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14349#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14350#endif
14351
14352#if defined(__opencl_c_atomic_scope_device)
14353#if defined(__opencl_c_generic_address_space)
14354bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_int *, int *, int, memory_order, memory_order);
14355bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_uint *, uint *, uint, memory_order, memory_order);
14356bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_int *, int *, int, memory_order, memory_order);
14357bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_uint *, uint *, uint, memory_order, memory_order);
14358bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_float *, float *, float, memory_order, memory_order);
14359bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_float *, float *, float, memory_order, memory_order);
14360#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14361#ifdef cl_khr_fp64
14362bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_double *, double *, double, memory_order, memory_order);
14363bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_double *, double *, double, memory_order, memory_order);
14364#endif //cl_khr_fp64
14365bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_long *, long *, long, memory_order, memory_order);
14366bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_long *, long *, long, memory_order, memory_order);
14367bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_ulong *, ulong *, ulong, memory_order, memory_order);
14368bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_ulong *, ulong *, ulong, memory_order, memory_order);
14369#endif
14370#endif //defined(__opencl_c_generic_address_space)
14371#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14372bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_int *, __global int *, int, memory_order, memory_order);
14373bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_int *, __local int *, int, memory_order, memory_order);
14374bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_int *, __private int *, int, memory_order, memory_order);
14375bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_int *, __global int *, int, memory_order, memory_order);
14376bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_int *, __local int *, int, memory_order, memory_order);
14377bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_int *, __private int *, int, memory_order, memory_order);
14378bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_uint *, __global uint *, uint, memory_order, memory_order);
14379bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_uint *, __local uint *, uint, memory_order, memory_order);
14380bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_uint *, __private uint *, uint, memory_order, memory_order);
14381bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_uint *, __global uint *, uint, memory_order, memory_order);
14382bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_uint *, __local uint *, uint, memory_order, memory_order);
14383bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_uint *, __private uint *, uint, memory_order, memory_order);
14384bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_float *, __global float *, float, memory_order, memory_order);
14385bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_float *, __local float *, float, memory_order, memory_order);
14386bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_float *, __private float *, float, memory_order, memory_order);
14387bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_float *, __global float *, float, memory_order, memory_order);
14388bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_float *, __local float *, float, memory_order, memory_order);
14389bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_float *, __private float *, float, memory_order, memory_order);
14390bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_int *, __global int *, int, memory_order, memory_order);
14391bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_int *, __local int *, int, memory_order, memory_order);
14392bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_int *, __private int *, int, memory_order, memory_order);
14393bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_int *, __global int *, int, memory_order, memory_order);
14394bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_int *, __local int *, int, memory_order, memory_order);
14395bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_int *, __private int *, int, memory_order, memory_order);
14396bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_uint *, __global uint *, uint, memory_order, memory_order);
14397bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_uint *, __local uint *, uint, memory_order, memory_order);
14398bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_uint *, __private uint *, uint, memory_order, memory_order);
14399bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_uint *, __global uint *, uint, memory_order, memory_order);
14400bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_uint *, __local uint *, uint, memory_order, memory_order);
14401bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_uint *, __private uint *, uint, memory_order, memory_order);
14402bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_float *, __global float *, float, memory_order, memory_order);
14403bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_float *, __local float *, float, memory_order, memory_order);
14404bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_float *, __private float *, float, memory_order, memory_order);
14405bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_float *, __global float *, float, memory_order, memory_order);
14406bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_float *, __local float *, float, memory_order, memory_order);
14407bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_float *, __private float *, float, memory_order, memory_order);
14408#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14409#ifdef cl_khr_fp64
14410bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_double *, __global double *, double, memory_order, memory_order);
14411bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_double *, __local double *, double, memory_order, memory_order);
14412bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_double *, __private double *, double, memory_order, memory_order);
14413bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_double *, __global double *, double, memory_order, memory_order);
14414bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_double *, __local double *, double, memory_order, memory_order);
14415bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_double *, __private double *, double, memory_order, memory_order);
14416bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_double *, __global double *, double, memory_order, memory_order);
14417bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_double *, __local double *, double, memory_order, memory_order);
14418bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_double *, __private double *, double, memory_order, memory_order);
14419bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_double *, __global double *, double, memory_order, memory_order);
14420bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_double *, __local double *, double, memory_order, memory_order);
14421bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_double *, __private double *, double, memory_order, memory_order);
14422#endif //cl_khr_fp64
14423bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_long *, __global long *, long, memory_order, memory_order);
14424bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_long *, __local long *, long, memory_order, memory_order);
14425bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_long *, __private long *, long, memory_order, memory_order);
14426bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_long *, __global long *, long, memory_order, memory_order);
14427bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_long *, __local long *, long, memory_order, memory_order);
14428bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_long *, __private long *, long, memory_order, memory_order);
14429bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_ulong *, __global ulong *, ulong, memory_order, memory_order);
14430bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_ulong *, __local ulong *, ulong, memory_order, memory_order);
14431bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_ulong *, __private ulong *, ulong, memory_order, memory_order);
14432bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_ulong *, __global ulong *, ulong, memory_order, memory_order);
14433bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_ulong *, __local ulong *, ulong, memory_order, memory_order);
14434bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_ulong *, __private ulong *, ulong, memory_order, memory_order);
14435bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_long *, __global long *, long, memory_order, memory_order);
14436bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_long *, __local long *, long, memory_order, memory_order);
14437bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_long *, __private long *, long, memory_order, memory_order);
14438bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_long *, __global long *, long, memory_order, memory_order);
14439bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_long *, __local long *, long, memory_order, memory_order);
14440bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_long *, __private long *, long, memory_order, memory_order);
14441bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_ulong *, __global ulong *, ulong, memory_order, memory_order);
14442bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_ulong *, __local ulong *, ulong, memory_order, memory_order);
14443bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_ulong *, __private ulong *, ulong, memory_order, memory_order);
14444bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_ulong *, __global ulong *, ulong, memory_order, memory_order);
14445bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_ulong *, __local ulong *, ulong, memory_order, memory_order);
14446bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_ulong *, __private ulong *, ulong, memory_order, memory_order);
14447#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14448#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14449#endif //defined(__opencl_c_atomic_scope_device)
14450
14451#if defined(__opencl_c_generic_address_space)
14452bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_int *, int *, int, memory_order, memory_order, memory_scope);
14453bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_uint *, uint *, uint, memory_order, memory_order, memory_scope);
14454bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_int *, int *, int, memory_order, memory_order, memory_scope);
14455bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_uint *, uint *, uint, memory_order, memory_order, memory_scope);
14456bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_float *, float *, float, memory_order, memory_order, memory_scope);
14457bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_float *, float *, float, memory_order, memory_order, memory_scope);
14458#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14459#ifdef cl_khr_fp64
14460bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_double *, double *, double, memory_order, memory_order, memory_scope);
14461bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_double *, double *, double, memory_order, memory_order, memory_scope);
14462#endif //cl_khr_fp64
14463bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_long *, long *, long, memory_order, memory_order, memory_scope);
14464bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_long *, long *, long, memory_order, memory_order, memory_scope);
14465bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_ulong *, ulong *, ulong, memory_order, memory_order, memory_scope);
14466bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_ulong *, ulong *, ulong, memory_order, memory_order, memory_scope);
14467#endif
14468#endif //defined(__opencl_c_generic_address_space)
14469#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14470bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_int *, __global int *, int, memory_order, memory_order, memory_scope);
14471bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_int *, __local int *, int, memory_order, memory_order, memory_scope);
14472bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_int *, __private int *, int, memory_order, memory_order, memory_scope);
14473bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_int *, __global int *, int, memory_order, memory_order, memory_scope);
14474bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_int *, __local int *, int, memory_order, memory_order, memory_scope);
14475bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_int *, __private int *, int, memory_order, memory_order, memory_scope);
14476bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_uint *, __global uint *, uint, memory_order, memory_order, memory_scope);
14477bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_uint *, __local uint *, uint, memory_order, memory_order, memory_scope);
14478bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_uint *, __private uint *, uint, memory_order, memory_order, memory_scope);
14479bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_uint *, __global uint *, uint, memory_order, memory_order, memory_scope);
14480bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_uint *, __local uint *, uint, memory_order, memory_order, memory_scope);
14481bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_uint *, __private uint *, uint, memory_order, memory_order, memory_scope);
14482bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_float *, __global float *, float, memory_order, memory_order, memory_scope);
14483bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_float *, __local float *, float, memory_order, memory_order, memory_scope);
14484bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_float *, __private float *, float, memory_order, memory_order, memory_scope);
14485bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_float *, __global float *, float, memory_order, memory_order, memory_scope);
14486bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_float *, __local float *, float, memory_order, memory_order, memory_scope);
14487bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_float *, __private float *, float, memory_order, memory_order, memory_scope);
14488bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_int *, __global int *, int, memory_order, memory_order, memory_scope);
14489bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_int *, __local int *, int, memory_order, memory_order, memory_scope);
14490bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_int *, __private int *, int, memory_order, memory_order, memory_scope);
14491bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_int *, __global int *, int, memory_order, memory_order, memory_scope);
14492bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_int *, __local int *, int, memory_order, memory_order, memory_scope);
14493bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_int *, __private int *, int, memory_order, memory_order, memory_scope);
14494bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_uint *, __global uint *, uint, memory_order, memory_order, memory_scope);
14495bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_uint *, __local uint *, uint, memory_order, memory_order, memory_scope);
14496bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_uint *, __private uint *, uint, memory_order, memory_order, memory_scope);
14497bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_uint *, __global uint *, uint, memory_order, memory_order, memory_scope);
14498bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_uint *, __local uint *, uint, memory_order, memory_order, memory_scope);
14499bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_uint *, __private uint *, uint, memory_order, memory_order, memory_scope);
14500bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_float *, __global float *, float, memory_order, memory_order, memory_scope);
14501bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_float *, __local float *, float, memory_order, memory_order, memory_scope);
14502bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_float *, __private float *, float, memory_order, memory_order, memory_scope);
14503bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_float *, __global float *, float, memory_order, memory_order, memory_scope);
14504bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_float *, __local float *, float, memory_order, memory_order, memory_scope);
14505bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_float *, __private float *, float, memory_order, memory_order, memory_scope);
14506#if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14507#ifdef cl_khr_fp64
14508bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_double *, __global double *, double, memory_order, memory_order, memory_scope);
14509bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_double *, __local double *, double, memory_order, memory_order, memory_scope);
14510bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_double *, __private double *, double, memory_order, memory_order, memory_scope);
14511bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_double *, __global double *, double, memory_order, memory_order, memory_scope);
14512bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_double *, __local double *, double, memory_order, memory_order, memory_scope);
14513bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_double *, __private double *, double, memory_order, memory_order, memory_scope);
14514bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_double *, __global double *, double, memory_order, memory_order, memory_scope);
14515bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_double *, __local double *, double, memory_order, memory_order, memory_scope);
14516bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_double *, __private double *, double, memory_order, memory_order, memory_scope);
14517bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_double *, __global double *, double, memory_order, memory_order, memory_scope);
14518bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_double *, __local double *, double, memory_order, memory_order, memory_scope);
14519bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_double *, __private double *, double, memory_order, memory_order, memory_scope);
14520#endif //cl_khr_fp64
14521bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_long *, __global long *, long, memory_order, memory_order, memory_scope);
14522bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_long *, __local long *, long, memory_order, memory_order, memory_scope);
14523bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_long *, __private long *, long, memory_order, memory_order, memory_scope);
14524bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_long *, __global long *, long, memory_order, memory_order, memory_scope);
14525bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_long *, __local long *, long, memory_order, memory_order, memory_scope);
14526bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_long *, __private long *, long, memory_order, memory_order, memory_scope);
14527bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_ulong *, __global ulong *, ulong, memory_order, memory_order, memory_scope);
14528bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_ulong *, __local ulong *, ulong, memory_order, memory_order, memory_scope);
14529bool __ovld atomic_compare_exchange_strong_explicit(volatile __global atomic_ulong *, __private ulong *, ulong, memory_order, memory_order, memory_scope);
14530bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_ulong *, __global ulong *, ulong, memory_order, memory_order, memory_scope);
14531bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_ulong *, __local ulong *, ulong, memory_order, memory_order, memory_scope);
14532bool __ovld atomic_compare_exchange_strong_explicit(volatile __local atomic_ulong *, __private ulong *, ulong, memory_order, memory_order, memory_scope);
14533bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_long *, __global long *, long, memory_order, memory_order, memory_scope);
14534bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_long *, __local long *, long, memory_order, memory_order, memory_scope);
14535bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_long *, __private long *, long, memory_order, memory_order, memory_scope);
14536bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_long *, __global long *, long, memory_order, memory_order, memory_scope);
14537bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_long *, __local long *, long, memory_order, memory_order, memory_scope);
14538bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_long *, __private long *, long, memory_order, memory_order, memory_scope);
14539bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_ulong *, __global ulong *, ulong, memory_order, memory_order, memory_scope);
14540bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_ulong *, __local ulong *, ulong, memory_order, memory_order, memory_scope);
14541bool __ovld atomic_compare_exchange_weak_explicit(volatile __global atomic_ulong *, __private ulong *, ulong, memory_order, memory_order, memory_scope);
14542bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_ulong *, __global ulong *, ulong, memory_order, memory_order, memory_scope);
14543bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_ulong *, __local ulong *, ulong, memory_order, memory_order, memory_scope);
14544bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_ulong *, __private ulong *, ulong, memory_order, memory_order, memory_scope);
14545#endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
14546#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14547
14548// atomic_flag_test_and_set() and atomic_flag_clear()
14549#if defined(__opencl_c_atomic_order_seq_cst) && defined(__opencl_c_atomic_scope_device)
14550#if defined(__opencl_c_generic_address_space)
14551bool __ovld atomic_flag_test_and_set(volatile atomic_flag *);
14552void __ovld atomic_flag_clear(volatile atomic_flag *);
14553#endif //defined(__opencl_c_generic_address_space)
14554#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14555bool __ovld atomic_flag_test_and_set(volatile __global atomic_flag *);
14556bool __ovld atomic_flag_test_and_set(volatile __local atomic_flag *);
14557void __ovld atomic_flag_clear(volatile __global atomic_flag *);
14558void __ovld atomic_flag_clear(volatile __local atomic_flag *);
14559#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14560#endif
14561
14562#if defined(__opencl_c_atomic_scope_device)
14563#if defined(__opencl_c_generic_address_space)
14564bool __ovld atomic_flag_test_and_set_explicit(volatile atomic_flag *, memory_order);
14565void __ovld atomic_flag_clear_explicit(volatile atomic_flag *, memory_order);
14566#endif //defined(__opencl_c_generic_address_space)
14567#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14568bool __ovld atomic_flag_test_and_set_explicit(volatile __global atomic_flag *, memory_order);
14569bool __ovld atomic_flag_test_and_set_explicit(volatile __local atomic_flag *, memory_order);
14570void __ovld atomic_flag_clear_explicit(volatile __global atomic_flag *, memory_order);
14571void __ovld atomic_flag_clear_explicit(volatile __local atomic_flag *, memory_order);
14572#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14573#endif
14574
14575#if defined(__opencl_c_generic_address_space)
14576bool __ovld atomic_flag_test_and_set_explicit(volatile atomic_flag *, memory_order, memory_scope);
14577void __ovld atomic_flag_clear_explicit(volatile atomic_flag *, memory_order, memory_scope);
14578#endif //defined(__opencl_c_generic_address_space)
14579#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14580bool __ovld atomic_flag_test_and_set_explicit(volatile __global atomic_flag *, memory_order, memory_scope);
14581bool __ovld atomic_flag_test_and_set_explicit(volatile __local atomic_flag *, memory_order, memory_scope);
14582void __ovld atomic_flag_clear_explicit(volatile __global atomic_flag *, memory_order, memory_scope);
14583void __ovld atomic_flag_clear_explicit(volatile __local atomic_flag *, memory_order, memory_scope);
14584#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
14585#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
14586
14587// OpenCL v1.1 s6.11.12, v1.2 s6.12.12, v2.0 s6.13.12 - Miscellaneous Vector Functions
14588
14589/**
14590 * The shuffle and shuffle2 built-in functions construct
14591 * a permutation of elements from one or two input
14592 * vectors respectively that are of the same type,
14593 * returning a vector with the same element type as the
14594 * input and length that is the same as the shuffle mask.
14595 * The size of each element in the mask must match the
14596 * size of each element in the result. For shuffle, only
14597 * the ilogb(2m-1) least significant bits of each mask
14598 * element are considered. For shuffle2, only the
14599 * ilogb(2m-1)+1 least significant bits of each mask
14600 * element are considered. Other bits in the mask shall
14601 * be ignored.
14602 * The elements of the input vectors are numbered from
14603 * left to right across one or both of the vectors. For this
14604 * purpose, the number of elements in a vector is given
14605 * by vec_step(gentypem). The shuffle mask operand
14606 * specifies, for each element of the result vector, which
14607 * element of the one or two input vectors the result
14608 * element gets.
14609 * Examples:
14610 * uint4 mask = (uint4)(3, 2,
14611 * 1, 0);
14612 * float4 a;
14613 * float4 r = shuffle(a, mask);
14614 * // r.s0123 = a.wzyx
14615 * uint8 mask = (uint8)(0, 1, 2, 3,
14616 * 4, 5, 6, 7);
14617 * float4 a, b;
14618 * float8 r = shuffle2(a, b, mask);
14619 * // r.s0123 = a.xyzw
14620 * // r.s4567 = b.xyzw
14621 * uint4 mask;
14622 * float8 a;
14623 * float4 b;
14624 * b = shuffle(a, mask);
14625 * Examples that are not valid are:
14626 * uint8 mask;
14627 * short16 a;
14628 * short8 b;
14629 * b = shuffle(a, mask); <- not valid
14630 */
14631char2 __ovld __cnfn shuffle(char2, uchar2);
14632char2 __ovld __cnfn shuffle(char4, uchar2);
14633char2 __ovld __cnfn shuffle(char8, uchar2);
14634char2 __ovld __cnfn shuffle(char16, uchar2);
14635
14636uchar2 __ovld __cnfn shuffle(uchar2, uchar2);
14637uchar2 __ovld __cnfn shuffle(uchar4, uchar2);
14638uchar2 __ovld __cnfn shuffle(uchar8, uchar2);
14639uchar2 __ovld __cnfn shuffle(uchar16, uchar2);
14640
14641short2 __ovld __cnfn shuffle(short2, ushort2);
14642short2 __ovld __cnfn shuffle(short4, ushort2);
14643short2 __ovld __cnfn shuffle(short8, ushort2);
14644short2 __ovld __cnfn shuffle(short16, ushort2);
14645
14646ushort2 __ovld __cnfn shuffle(ushort2, ushort2);
14647ushort2 __ovld __cnfn shuffle(ushort4, ushort2);
14648ushort2 __ovld __cnfn shuffle(ushort8, ushort2);
14649ushort2 __ovld __cnfn shuffle(ushort16, ushort2);
14650
14651int2 __ovld __cnfn shuffle(int2, uint2);
14652int2 __ovld __cnfn shuffle(int4, uint2);
14653int2 __ovld __cnfn shuffle(int8, uint2);
14654int2 __ovld __cnfn shuffle(int16, uint2);
14655
14656uint2 __ovld __cnfn shuffle(uint2, uint2);
14657uint2 __ovld __cnfn shuffle(uint4, uint2);
14658uint2 __ovld __cnfn shuffle(uint8, uint2);
14659uint2 __ovld __cnfn shuffle(uint16, uint2);
14660
14661long2 __ovld __cnfn shuffle(long2, ulong2);
14662long2 __ovld __cnfn shuffle(long4, ulong2);
14663long2 __ovld __cnfn shuffle(long8, ulong2);
14664long2 __ovld __cnfn shuffle(long16, ulong2);
14665
14666ulong2 __ovld __cnfn shuffle(ulong2, ulong2);
14667ulong2 __ovld __cnfn shuffle(ulong4, ulong2);
14668ulong2 __ovld __cnfn shuffle(ulong8, ulong2);
14669ulong2 __ovld __cnfn shuffle(ulong16, ulong2);
14670
14671float2 __ovld __cnfn shuffle(float2, uint2);
14672float2 __ovld __cnfn shuffle(float4, uint2);
14673float2 __ovld __cnfn shuffle(float8, uint2);
14674float2 __ovld __cnfn shuffle(float16, uint2);
14675
14676char4 __ovld __cnfn shuffle(char2, uchar4);
14677char4 __ovld __cnfn shuffle(char4, uchar4);
14678char4 __ovld __cnfn shuffle(char8, uchar4);
14679char4 __ovld __cnfn shuffle(char16, uchar4);
14680
14681uchar4 __ovld __cnfn shuffle(uchar2, uchar4);
14682uchar4 __ovld __cnfn shuffle(uchar4, uchar4);
14683uchar4 __ovld __cnfn shuffle(uchar8, uchar4);
14684uchar4 __ovld __cnfn shuffle(uchar16, uchar4);
14685
14686short4 __ovld __cnfn shuffle(short2, ushort4);
14687short4 __ovld __cnfn shuffle(short4, ushort4);
14688short4 __ovld __cnfn shuffle(short8, ushort4);
14689short4 __ovld __cnfn shuffle(short16, ushort4);
14690
14691ushort4 __ovld __cnfn shuffle(ushort2, ushort4);
14692ushort4 __ovld __cnfn shuffle(ushort4, ushort4);
14693ushort4 __ovld __cnfn shuffle(ushort8, ushort4);
14694ushort4 __ovld __cnfn shuffle(ushort16, ushort4);
14695
14696int4 __ovld __cnfn shuffle(int2, uint4);
14697int4 __ovld __cnfn shuffle(int4, uint4);
14698int4 __ovld __cnfn shuffle(int8, uint4);
14699int4 __ovld __cnfn shuffle(int16, uint4);
14700
14701uint4 __ovld __cnfn shuffle(uint2, uint4);
14702uint4 __ovld __cnfn shuffle(uint4, uint4);
14703uint4 __ovld __cnfn shuffle(uint8, uint4);
14704uint4 __ovld __cnfn shuffle(uint16, uint4);
14705
14706long4 __ovld __cnfn shuffle(long2, ulong4);
14707long4 __ovld __cnfn shuffle(long4, ulong4);
14708long4 __ovld __cnfn shuffle(long8, ulong4);
14709long4 __ovld __cnfn shuffle(long16, ulong4);
14710
14711ulong4 __ovld __cnfn shuffle(ulong2, ulong4);
14712ulong4 __ovld __cnfn shuffle(ulong4, ulong4);
14713ulong4 __ovld __cnfn shuffle(ulong8, ulong4);
14714ulong4 __ovld __cnfn shuffle(ulong16, ulong4);
14715
14716float4 __ovld __cnfn shuffle(float2, uint4);
14717float4 __ovld __cnfn shuffle(float4, uint4);
14718float4 __ovld __cnfn shuffle(float8, uint4);
14719float4 __ovld __cnfn shuffle(float16, uint4);
14720
14721char8 __ovld __cnfn shuffle(char2, uchar8);
14722char8 __ovld __cnfn shuffle(char4, uchar8);
14723char8 __ovld __cnfn shuffle(char8, uchar8);
14724char8 __ovld __cnfn shuffle(char16, uchar8);
14725
14726uchar8 __ovld __cnfn shuffle(uchar2, uchar8);
14727uchar8 __ovld __cnfn shuffle(uchar4, uchar8);
14728uchar8 __ovld __cnfn shuffle(uchar8, uchar8);
14729uchar8 __ovld __cnfn shuffle(uchar16, uchar8);
14730
14731short8 __ovld __cnfn shuffle(short2, ushort8);
14732short8 __ovld __cnfn shuffle(short4, ushort8);
14733short8 __ovld __cnfn shuffle(short8, ushort8);
14734short8 __ovld __cnfn shuffle(short16, ushort8);
14735
14736ushort8 __ovld __cnfn shuffle(ushort2, ushort8);
14737ushort8 __ovld __cnfn shuffle(ushort4, ushort8);
14738ushort8 __ovld __cnfn shuffle(ushort8, ushort8);
14739ushort8 __ovld __cnfn shuffle(ushort16, ushort8);
14740
14741int8 __ovld __cnfn shuffle(int2, uint8);
14742int8 __ovld __cnfn shuffle(int4, uint8);
14743int8 __ovld __cnfn shuffle(int8, uint8);
14744int8 __ovld __cnfn shuffle(int16, uint8);
14745
14746uint8 __ovld __cnfn shuffle(uint2, uint8);
14747uint8 __ovld __cnfn shuffle(uint4, uint8);
14748uint8 __ovld __cnfn shuffle(uint8, uint8);
14749uint8 __ovld __cnfn shuffle(uint16, uint8);
14750
14751long8 __ovld __cnfn shuffle(long2, ulong8);
14752long8 __ovld __cnfn shuffle(long4, ulong8);
14753long8 __ovld __cnfn shuffle(long8, ulong8);
14754long8 __ovld __cnfn shuffle(long16, ulong8);
14755
14756ulong8 __ovld __cnfn shuffle(ulong2, ulong8);
14757ulong8 __ovld __cnfn shuffle(ulong4, ulong8);
14758ulong8 __ovld __cnfn shuffle(ulong8, ulong8);
14759ulong8 __ovld __cnfn shuffle(ulong16, ulong8);
14760
14761float8 __ovld __cnfn shuffle(float2, uint8);
14762float8 __ovld __cnfn shuffle(float4, uint8);
14763float8 __ovld __cnfn shuffle(float8, uint8);
14764float8 __ovld __cnfn shuffle(float16, uint8);
14765
14766char16 __ovld __cnfn shuffle(char2, uchar16);
14767char16 __ovld __cnfn shuffle(char4, uchar16);
14768char16 __ovld __cnfn shuffle(char8, uchar16);
14769char16 __ovld __cnfn shuffle(char16, uchar16);
14770
14771uchar16 __ovld __cnfn shuffle(uchar2, uchar16);
14772uchar16 __ovld __cnfn shuffle(uchar4, uchar16);
14773uchar16 __ovld __cnfn shuffle(uchar8, uchar16);
14774uchar16 __ovld __cnfn shuffle(uchar16, uchar16);
14775
14776short16 __ovld __cnfn shuffle(short2, ushort16);
14777short16 __ovld __cnfn shuffle(short4, ushort16);
14778short16 __ovld __cnfn shuffle(short8, ushort16);
14779short16 __ovld __cnfn shuffle(short16, ushort16);
14780
14781ushort16 __ovld __cnfn shuffle(ushort2, ushort16);
14782ushort16 __ovld __cnfn shuffle(ushort4, ushort16);
14783ushort16 __ovld __cnfn shuffle(ushort8, ushort16);
14784ushort16 __ovld __cnfn shuffle(ushort16, ushort16);
14785
14786int16 __ovld __cnfn shuffle(int2, uint16);
14787int16 __ovld __cnfn shuffle(int4, uint16);
14788int16 __ovld __cnfn shuffle(int8, uint16);
14789int16 __ovld __cnfn shuffle(int16, uint16);
14790
14791uint16 __ovld __cnfn shuffle(uint2, uint16);
14792uint16 __ovld __cnfn shuffle(uint4, uint16);
14793uint16 __ovld __cnfn shuffle(uint8, uint16);
14794uint16 __ovld __cnfn shuffle(uint16, uint16);
14795
14796long16 __ovld __cnfn shuffle(long2, ulong16);
14797long16 __ovld __cnfn shuffle(long4, ulong16);
14798long16 __ovld __cnfn shuffle(long8, ulong16);
14799long16 __ovld __cnfn shuffle(long16, ulong16);
14800
14801ulong16 __ovld __cnfn shuffle(ulong2, ulong16);
14802ulong16 __ovld __cnfn shuffle(ulong4, ulong16);
14803ulong16 __ovld __cnfn shuffle(ulong8, ulong16);
14804ulong16 __ovld __cnfn shuffle(ulong16, ulong16);
14805
14806float16 __ovld __cnfn shuffle(float2, uint16);
14807float16 __ovld __cnfn shuffle(float4, uint16);
14808float16 __ovld __cnfn shuffle(float8, uint16);
14809float16 __ovld __cnfn shuffle(float16, uint16);
14810
14811#ifdef cl_khr_fp64
14812double2 __ovld __cnfn shuffle(double2, ulong2);
14813double2 __ovld __cnfn shuffle(double4, ulong2);
14814double2 __ovld __cnfn shuffle(double8, ulong2);
14815double2 __ovld __cnfn shuffle(double16, ulong2);
14816
14817double4 __ovld __cnfn shuffle(double2, ulong4);
14818double4 __ovld __cnfn shuffle(double4, ulong4);
14819double4 __ovld __cnfn shuffle(double8, ulong4);
14820double4 __ovld __cnfn shuffle(double16, ulong4);
14821
14822double8 __ovld __cnfn shuffle(double2, ulong8);
14823double8 __ovld __cnfn shuffle(double4, ulong8);
14824double8 __ovld __cnfn shuffle(double8, ulong8);
14825double8 __ovld __cnfn shuffle(double16, ulong8);
14826
14827double16 __ovld __cnfn shuffle(double2, ulong16);
14828double16 __ovld __cnfn shuffle(double4, ulong16);
14829double16 __ovld __cnfn shuffle(double8, ulong16);
14830double16 __ovld __cnfn shuffle(double16, ulong16);
14831#endif //cl_khr_fp64
14832
14833#ifdef cl_khr_fp16
14834half2 __ovld __cnfn shuffle(half2, ushort2);
14835half2 __ovld __cnfn shuffle(half4, ushort2);
14836half2 __ovld __cnfn shuffle(half8, ushort2);
14837half2 __ovld __cnfn shuffle(half16, ushort2);
14838
14839half4 __ovld __cnfn shuffle(half2, ushort4);
14840half4 __ovld __cnfn shuffle(half4, ushort4);
14841half4 __ovld __cnfn shuffle(half8, ushort4);
14842half4 __ovld __cnfn shuffle(half16, ushort4);
14843
14844half8 __ovld __cnfn shuffle(half2, ushort8);
14845half8 __ovld __cnfn shuffle(half4, ushort8);
14846half8 __ovld __cnfn shuffle(half8, ushort8);
14847half8 __ovld __cnfn shuffle(half16, ushort8);
14848
14849half16 __ovld __cnfn shuffle(half2, ushort16);
14850half16 __ovld __cnfn shuffle(half4, ushort16);
14851half16 __ovld __cnfn shuffle(half8, ushort16);
14852half16 __ovld __cnfn shuffle(half16, ushort16);
14853#endif //cl_khr_fp16
14854
14855char2 __ovld __cnfn shuffle2(char2, char2, uchar2);
14856char2 __ovld __cnfn shuffle2(char4, char4, uchar2);
14857char2 __ovld __cnfn shuffle2(char8, char8, uchar2);
14858char2 __ovld __cnfn shuffle2(char16, char16, uchar2);
14859
14860uchar2 __ovld __cnfn shuffle2(uchar2, uchar2, uchar2);
14861uchar2 __ovld __cnfn shuffle2(uchar4, uchar4, uchar2);
14862uchar2 __ovld __cnfn shuffle2(uchar8, uchar8, uchar2);
14863uchar2 __ovld __cnfn shuffle2(uchar16, uchar16, uchar2);
14864
14865short2 __ovld __cnfn shuffle2(short2, short2, ushort2);
14866short2 __ovld __cnfn shuffle2(short4, short4, ushort2);
14867short2 __ovld __cnfn shuffle2(short8, short8, ushort2);
14868short2 __ovld __cnfn shuffle2(short16, short16, ushort2);
14869
14870ushort2 __ovld __cnfn shuffle2(ushort2, ushort2, ushort2);
14871ushort2 __ovld __cnfn shuffle2(ushort4, ushort4, ushort2);
14872ushort2 __ovld __cnfn shuffle2(ushort8, ushort8, ushort2);
14873ushort2 __ovld __cnfn shuffle2(ushort16, ushort16, ushort2);
14874
14875int2 __ovld __cnfn shuffle2(int2, int2, uint2);
14876int2 __ovld __cnfn shuffle2(int4, int4, uint2);
14877int2 __ovld __cnfn shuffle2(int8, int8, uint2);
14878int2 __ovld __cnfn shuffle2(int16, int16, uint2);
14879
14880uint2 __ovld __cnfn shuffle2(uint2, uint2, uint2);
14881uint2 __ovld __cnfn shuffle2(uint4, uint4, uint2);
14882uint2 __ovld __cnfn shuffle2(uint8, uint8, uint2);
14883uint2 __ovld __cnfn shuffle2(uint16, uint16, uint2);
14884
14885long2 __ovld __cnfn shuffle2(long2, long2, ulong2);
14886long2 __ovld __cnfn shuffle2(long4, long4, ulong2);
14887long2 __ovld __cnfn shuffle2(long8, long8, ulong2);
14888long2 __ovld __cnfn shuffle2(long16, long16, ulong2);
14889
14890ulong2 __ovld __cnfn shuffle2(ulong2, ulong2, ulong2);
14891ulong2 __ovld __cnfn shuffle2(ulong4, ulong4, ulong2);
14892ulong2 __ovld __cnfn shuffle2(ulong8, ulong8, ulong2);
14893ulong2 __ovld __cnfn shuffle2(ulong16, ulong16, ulong2);
14894
14895float2 __ovld __cnfn shuffle2(float2, float2, uint2);
14896float2 __ovld __cnfn shuffle2(float4, float4, uint2);
14897float2 __ovld __cnfn shuffle2(float8, float8, uint2);
14898float2 __ovld __cnfn shuffle2(float16, float16, uint2);
14899
14900char4 __ovld __cnfn shuffle2(char2, char2, uchar4);
14901char4 __ovld __cnfn shuffle2(char4, char4, uchar4);
14902char4 __ovld __cnfn shuffle2(char8, char8, uchar4);
14903char4 __ovld __cnfn shuffle2(char16, char16, uchar4);
14904
14905uchar4 __ovld __cnfn shuffle2(uchar2, uchar2, uchar4);
14906uchar4 __ovld __cnfn shuffle2(uchar4, uchar4, uchar4);
14907uchar4 __ovld __cnfn shuffle2(uchar8, uchar8, uchar4);
14908uchar4 __ovld __cnfn shuffle2(uchar16, uchar16, uchar4);
14909
14910short4 __ovld __cnfn shuffle2(short2, short2, ushort4);
14911short4 __ovld __cnfn shuffle2(short4, short4, ushort4);
14912short4 __ovld __cnfn shuffle2(short8, short8, ushort4);
14913short4 __ovld __cnfn shuffle2(short16, short16, ushort4);
14914
14915ushort4 __ovld __cnfn shuffle2(ushort2, ushort2, ushort4);
14916ushort4 __ovld __cnfn shuffle2(ushort4, ushort4, ushort4);
14917ushort4 __ovld __cnfn shuffle2(ushort8, ushort8, ushort4);
14918ushort4 __ovld __cnfn shuffle2(ushort16, ushort16, ushort4);
14919
14920int4 __ovld __cnfn shuffle2(int2, int2, uint4);
14921int4 __ovld __cnfn shuffle2(int4, int4, uint4);
14922int4 __ovld __cnfn shuffle2(int8, int8, uint4);
14923int4 __ovld __cnfn shuffle2(int16, int16, uint4);
14924
14925uint4 __ovld __cnfn shuffle2(uint2, uint2, uint4);
14926uint4 __ovld __cnfn shuffle2(uint4, uint4, uint4);
14927uint4 __ovld __cnfn shuffle2(uint8, uint8, uint4);
14928uint4 __ovld __cnfn shuffle2(uint16, uint16, uint4);
14929
14930long4 __ovld __cnfn shuffle2(long2, long2, ulong4);
14931long4 __ovld __cnfn shuffle2(long4, long4, ulong4);
14932long4 __ovld __cnfn shuffle2(long8, long8, ulong4);
14933long4 __ovld __cnfn shuffle2(long16, long16, ulong4);
14934
14935ulong4 __ovld __cnfn shuffle2(ulong2, ulong2, ulong4);
14936ulong4 __ovld __cnfn shuffle2(ulong4, ulong4, ulong4);
14937ulong4 __ovld __cnfn shuffle2(ulong8, ulong8, ulong4);
14938ulong4 __ovld __cnfn shuffle2(ulong16, ulong16, ulong4);
14939
14940float4 __ovld __cnfn shuffle2(float2, float2, uint4);
14941float4 __ovld __cnfn shuffle2(float4, float4, uint4);
14942float4 __ovld __cnfn shuffle2(float8, float8, uint4);
14943float4 __ovld __cnfn shuffle2(float16, float16, uint4);
14944
14945char8 __ovld __cnfn shuffle2(char2, char2, uchar8);
14946char8 __ovld __cnfn shuffle2(char4, char4, uchar8);
14947char8 __ovld __cnfn shuffle2(char8, char8, uchar8);
14948char8 __ovld __cnfn shuffle2(char16, char16, uchar8);
14949
14950uchar8 __ovld __cnfn shuffle2(uchar2, uchar2, uchar8);
14951uchar8 __ovld __cnfn shuffle2(uchar4, uchar4, uchar8);
14952uchar8 __ovld __cnfn shuffle2(uchar8, uchar8, uchar8);
14953uchar8 __ovld __cnfn shuffle2(uchar16, uchar16, uchar8);
14954
14955short8 __ovld __cnfn shuffle2(short2, short2, ushort8);
14956short8 __ovld __cnfn shuffle2(short4, short4, ushort8);
14957short8 __ovld __cnfn shuffle2(short8, short8, ushort8);
14958short8 __ovld __cnfn shuffle2(short16, short16, ushort8);
14959
14960ushort8 __ovld __cnfn shuffle2(ushort2, ushort2, ushort8);
14961ushort8 __ovld __cnfn shuffle2(ushort4, ushort4, ushort8);
14962ushort8 __ovld __cnfn shuffle2(ushort8, ushort8, ushort8);
14963ushort8 __ovld __cnfn shuffle2(ushort16, ushort16, ushort8);
14964
14965int8 __ovld __cnfn shuffle2(int2, int2, uint8);
14966int8 __ovld __cnfn shuffle2(int4, int4, uint8);
14967int8 __ovld __cnfn shuffle2(int8, int8, uint8);
14968int8 __ovld __cnfn shuffle2(int16, int16, uint8);
14969
14970uint8 __ovld __cnfn shuffle2(uint2, uint2, uint8);
14971uint8 __ovld __cnfn shuffle2(uint4, uint4, uint8);
14972uint8 __ovld __cnfn shuffle2(uint8, uint8, uint8);
14973uint8 __ovld __cnfn shuffle2(uint16, uint16, uint8);
14974
14975long8 __ovld __cnfn shuffle2(long2, long2, ulong8);
14976long8 __ovld __cnfn shuffle2(long4, long4, ulong8);
14977long8 __ovld __cnfn shuffle2(long8, long8, ulong8);
14978long8 __ovld __cnfn shuffle2(long16, long16, ulong8);
14979
14980ulong8 __ovld __cnfn shuffle2(ulong2, ulong2, ulong8);
14981ulong8 __ovld __cnfn shuffle2(ulong4, ulong4, ulong8);
14982ulong8 __ovld __cnfn shuffle2(ulong8, ulong8, ulong8);
14983ulong8 __ovld __cnfn shuffle2(ulong16, ulong16, ulong8);
14984
14985float8 __ovld __cnfn shuffle2(float2, float2, uint8);
14986float8 __ovld __cnfn shuffle2(float4, float4, uint8);
14987float8 __ovld __cnfn shuffle2(float8, float8, uint8);
14988float8 __ovld __cnfn shuffle2(float16, float16, uint8);
14989
14990char16 __ovld __cnfn shuffle2(char2, char2, uchar16);
14991char16 __ovld __cnfn shuffle2(char4, char4, uchar16);
14992char16 __ovld __cnfn shuffle2(char8, char8, uchar16);
14993char16 __ovld __cnfn shuffle2(char16, char16, uchar16);
14994
14995uchar16 __ovld __cnfn shuffle2(uchar2, uchar2, uchar16);
14996uchar16 __ovld __cnfn shuffle2(uchar4, uchar4, uchar16);
14997uchar16 __ovld __cnfn shuffle2(uchar8, uchar8, uchar16);
14998uchar16 __ovld __cnfn shuffle2(uchar16, uchar16, uchar16);
14999
15000short16 __ovld __cnfn shuffle2(short2, short2, ushort16);
15001short16 __ovld __cnfn shuffle2(short4, short4, ushort16);
15002short16 __ovld __cnfn shuffle2(short8, short8, ushort16);
15003short16 __ovld __cnfn shuffle2(short16, short16, ushort16);
15004
15005ushort16 __ovld __cnfn shuffle2(ushort2, ushort2, ushort16);
15006ushort16 __ovld __cnfn shuffle2(ushort4, ushort4, ushort16);
15007ushort16 __ovld __cnfn shuffle2(ushort8, ushort8, ushort16);
15008ushort16 __ovld __cnfn shuffle2(ushort16, ushort16, ushort16);
15009
15010int16 __ovld __cnfn shuffle2(int2, int2, uint16);
15011int16 __ovld __cnfn shuffle2(int4, int4, uint16);
15012int16 __ovld __cnfn shuffle2(int8, int8, uint16);
15013int16 __ovld __cnfn shuffle2(int16, int16, uint16);
15014
15015uint16 __ovld __cnfn shuffle2(uint2, uint2, uint16);
15016uint16 __ovld __cnfn shuffle2(uint4, uint4, uint16);
15017uint16 __ovld __cnfn shuffle2(uint8, uint8, uint16);
15018uint16 __ovld __cnfn shuffle2(uint16, uint16, uint16);
15019
15020long16 __ovld __cnfn shuffle2(long2, long2, ulong16);
15021long16 __ovld __cnfn shuffle2(long4, long4, ulong16);
15022long16 __ovld __cnfn shuffle2(long8, long8, ulong16);
15023long16 __ovld __cnfn shuffle2(long16, long16, ulong16);
15024
15025ulong16 __ovld __cnfn shuffle2(ulong2, ulong2, ulong16);
15026ulong16 __ovld __cnfn shuffle2(ulong4, ulong4, ulong16);
15027ulong16 __ovld __cnfn shuffle2(ulong8, ulong8, ulong16);
15028ulong16 __ovld __cnfn shuffle2(ulong16, ulong16, ulong16);
15029
15030float16 __ovld __cnfn shuffle2(float2, float2, uint16);
15031float16 __ovld __cnfn shuffle2(float4, float4, uint16);
15032float16 __ovld __cnfn shuffle2(float8, float8, uint16);
15033float16 __ovld __cnfn shuffle2(float16, float16, uint16);
15034
15035#ifdef cl_khr_fp64
15036double2 __ovld __cnfn shuffle2(double2, double2, ulong2);
15037double2 __ovld __cnfn shuffle2(double4, double4, ulong2);
15038double2 __ovld __cnfn shuffle2(double8, double8, ulong2);
15039double2 __ovld __cnfn shuffle2(double16, double16, ulong2);
15040
15041double4 __ovld __cnfn shuffle2(double2, double2, ulong4);
15042double4 __ovld __cnfn shuffle2(double4, double4, ulong4);
15043double4 __ovld __cnfn shuffle2(double8, double8, ulong4);
15044double4 __ovld __cnfn shuffle2(double16, double16, ulong4);
15045
15046double8 __ovld __cnfn shuffle2(double2, double2, ulong8);
15047double8 __ovld __cnfn shuffle2(double4, double4, ulong8);
15048double8 __ovld __cnfn shuffle2(double8, double8, ulong8);
15049double8 __ovld __cnfn shuffle2(double16, double16, ulong8);
15050
15051double16 __ovld __cnfn shuffle2(double2, double2, ulong16);
15052double16 __ovld __cnfn shuffle2(double4, double4, ulong16);
15053double16 __ovld __cnfn shuffle2(double8, double8, ulong16);
15054double16 __ovld __cnfn shuffle2(double16, double16, ulong16);
15055#endif //cl_khr_fp64
15056
15057#ifdef cl_khr_fp16
15058half2 __ovld __cnfn shuffle2(half2, half2, ushort2);
15059half2 __ovld __cnfn shuffle2(half4, half4, ushort2);
15060half2 __ovld __cnfn shuffle2(half8, half8, ushort2);
15061half2 __ovld __cnfn shuffle2(half16, half16, ushort2);
15062
15063half4 __ovld __cnfn shuffle2(half2, half2, ushort4);
15064half4 __ovld __cnfn shuffle2(half4, half4, ushort4);
15065half4 __ovld __cnfn shuffle2(half8, half8, ushort4);
15066half4 __ovld __cnfn shuffle2(half16, half16, ushort4);
15067
15068half8 __ovld __cnfn shuffle2(half2, half2, ushort8);
15069half8 __ovld __cnfn shuffle2(half4, half4, ushort8);
15070half8 __ovld __cnfn shuffle2(half8, half8, ushort8);
15071half8 __ovld __cnfn shuffle2(half16, half16, ushort8);
15072
15073half16 __ovld __cnfn shuffle2(half2, half2, ushort16);
15074half16 __ovld __cnfn shuffle2(half4, half4, ushort16);
15075half16 __ovld __cnfn shuffle2(half8, half8, ushort16);
15076half16 __ovld __cnfn shuffle2(half16, half16, ushort16);
15077#endif //cl_khr_fp16
15078
15079// OpenCL v1.1 s6.11.3, v1.2 s6.12.14, v2.0 s6.13.14 - Image Read and Write Functions
15080
15081#ifdef cl_khr_gl_msaa_sharing
15082#pragma OPENCL EXTENSION cl_khr_gl_msaa_sharing : enable
15083#endif //cl_khr_gl_msaa_sharing
15084
15085/**
15086 * Use the coordinate (coord.xy) to do an element lookup in
15087 * the 2D image object specified by image.
15088 *
15089 * Use the coordinate (coord.x, coord.y, coord.z) to do
15090 * an element lookup in the 3D image object specified
15091 * by image. coord.w is ignored.
15092 *
15093 * Use the coordinate (coord.z) to index into the
15094 * 2D image array object specified by image_array
15095 * and (coord.x, coord.y) to do an element lookup in
15096 * the 2D image object specified by image.
15097 *
15098 * Use the coordinate (x) to do an element lookup in
15099 * the 1D image object specified by image.
15100 *
15101 * Use the coordinate (coord.y) to index into the
15102 * 1D image array object specified by image_array
15103 * and (coord.x) to do an element lookup in
15104 * the 1D image object specified by image.
15105 *
15106 * Use the coordinate (cood.xy) and sample to do an
15107 * element lookup in the 2D multi-sample image specified
15108 * by image.
15109 *
15110 * Use coord.xy and sample to do an element
15111 * lookup in the 2D multi-sample image layer
15112 * identified by index coord.z in the 2D multi-sample
15113 * image array specified by image.
15114 *
15115 * For mipmap images, use the mip-level specified by
15116 * the Level-of-Detail (lod) or use gradients for LOD
15117 * computation.
15118 *
15119 * read_imagef returns floating-point values in the
15120 * range [0.0 ... 1.0] for image objects created with
15121 * image_channel_data_type set to one of the predefined
15122 * packed formats or CL_UNORM_INT8, or
15123 * CL_UNORM_INT16.
15124 *
15125 * read_imagef returns floating-point values in the
15126 * range [-1.0 ... 1.0] for image objects created with
15127 * image_channel_data_type set to CL_SNORM_INT8,
15128 * or CL_SNORM_INT16.
15129 *
15130 * read_imagef returns floating-point values for image
15131 * objects created with image_channel_data_type set to
15132 * CL_HALF_FLOAT or CL_FLOAT.
15133 *
15134 * read_imagei and read_imageui return
15135 * unnormalized signed integer and unsigned integer
15136 * values respectively. Each channel will be stored in a
15137 * 32-bit integer.
15138 *
15139 * read_imagei can only be used with image objects
15140 * created with image_channel_data_type set to one of
15141 * the following values:
15142 * CL_SIGNED_INT8,
15143 * CL_SIGNED_INT16 and
15144 * CL_SIGNED_INT32.
15145 * If the image_channel_data_type is not one of the
15146 * above values, the values returned by read_imagei
15147 * are undefined.
15148 *
15149 * read_imageui can only be used with image objects
15150 * created with image_channel_data_type set to one of
15151 * the following values:
15152 * CL_UNSIGNED_INT8,
15153 * CL_UNSIGNED_INT16 and
15154 * CL_UNSIGNED_INT32.
15155 * If the image_channel_data_type is not one of the
15156 * above values, the values returned by read_imageui
15157 * are undefined.
15158 *
15159 * The read_image{i|ui} calls support a nearest filter
15160 * only. The filter_mode specified in sampler
15161 * must be set to CLK_FILTER_NEAREST; otherwise
15162 * the values returned are undefined.
15163
15164 * The read_image{f|i|ui} calls that take
15165 * integer coordinates must use a sampler with
15166 * normalized coordinates set to
15167 * CLK_NORMALIZED_COORDS_FALSE and
15168 * addressing mode set to
15169 * CLK_ADDRESS_CLAMP_TO_EDGE,
15170 * CLK_ADDRESS_CLAMP or CLK_ADDRESS_NONE;
15171 * otherwise the values returned are undefined.
15172 *
15173 * Values returned by read_imagef for image objects
15174 * with image_channel_data_type values not specified
15175 * in the description above are undefined.
15176 */
15177
15178float4 __ovld __purefn read_imagef(read_only image2d_t, sampler_t, int2);
15179float4 __ovld __purefn read_imagef(read_only image2d_t, sampler_t, float2);
15180
15181int4 __ovld __purefn read_imagei(read_only image2d_t, sampler_t, int2);
15182int4 __ovld __purefn read_imagei(read_only image2d_t, sampler_t, float2);
15183uint4 __ovld __purefn read_imageui(read_only image2d_t, sampler_t, int2);
15184uint4 __ovld __purefn read_imageui(read_only image2d_t, sampler_t, float2);
15185
15186float4 __ovld __purefn read_imagef(read_only image3d_t, sampler_t, int4);
15187float4 __ovld __purefn read_imagef(read_only image3d_t, sampler_t, float4);
15188
15189int4 __ovld __purefn read_imagei(read_only image3d_t, sampler_t, int4);
15190int4 __ovld __purefn read_imagei(read_only image3d_t, sampler_t, float4);
15191uint4 __ovld __purefn read_imageui(read_only image3d_t, sampler_t, int4);
15192uint4 __ovld __purefn read_imageui(read_only image3d_t, sampler_t, float4);
15193
15194#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_1_2)
15195float4 __ovld __purefn read_imagef(read_only image2d_array_t, sampler_t, int4);
15196float4 __ovld __purefn read_imagef(read_only image2d_array_t, sampler_t, float4);
15197
15198int4 __ovld __purefn read_imagei(read_only image2d_array_t, sampler_t, int4);
15199int4 __ovld __purefn read_imagei(read_only image2d_array_t, sampler_t, float4);
15200uint4 __ovld __purefn read_imageui(read_only image2d_array_t, sampler_t, int4);
15201uint4 __ovld __purefn read_imageui(read_only image2d_array_t, sampler_t, float4);
15202#endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_1_2)
15203
15204float4 __ovld __purefn read_imagef(read_only image1d_t, sampler_t, int);
15205float4 __ovld __purefn read_imagef(read_only image1d_t, sampler_t, float);
15206
15207int4 __ovld __purefn read_imagei(read_only image1d_t, sampler_t, int);
15208int4 __ovld __purefn read_imagei(read_only image1d_t, sampler_t, float);
15209uint4 __ovld __purefn read_imageui(read_only image1d_t, sampler_t, int);
15210uint4 __ovld __purefn read_imageui(read_only image1d_t, sampler_t, float);
15211
15212#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_1_2)
15213float4 __ovld __purefn read_imagef(read_only image1d_array_t, sampler_t, int2);
15214float4 __ovld __purefn read_imagef(read_only image1d_array_t, sampler_t, float2);
15215
15216int4 __ovld __purefn read_imagei(read_only image1d_array_t, sampler_t, int2);
15217int4 __ovld __purefn read_imagei(read_only image1d_array_t, sampler_t, float2);
15218uint4 __ovld __purefn read_imageui(read_only image1d_array_t, sampler_t, int2);
15219uint4 __ovld __purefn read_imageui(read_only image1d_array_t, sampler_t, float2);
15220#endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_1_2)
15221
15222#ifdef cl_khr_depth_images
15223float __ovld __purefn read_imagef(read_only image2d_depth_t, sampler_t, float2);
15224float __ovld __purefn read_imagef(read_only image2d_depth_t, sampler_t, int2);
15225
15226float __ovld __purefn read_imagef(read_only image2d_array_depth_t, sampler_t, float4);
15227float __ovld __purefn read_imagef(read_only image2d_array_depth_t, sampler_t, int4);
15228#endif //cl_khr_depth_images
15229
15230#if defined(cl_khr_gl_msaa_sharing)
15231float4 __ovld __purefn read_imagef(read_only image2d_msaa_t, int2, int);
15232int4 __ovld __purefn read_imagei(read_only image2d_msaa_t, int2, int);
15233uint4 __ovld __purefn read_imageui(read_only image2d_msaa_t, int2, int);
15234
15235float __ovld __purefn read_imagef(read_only image2d_msaa_depth_t, int2, int);
15236
15237float4 __ovld __purefn read_imagef(read_only image2d_array_msaa_t, int4, int);
15238int4 __ovld __purefn read_imagei(read_only image2d_array_msaa_t, int4, int);
15239uint4 __ovld __purefn read_imageui(read_only image2d_array_msaa_t, int4, int);
15240
15241float __ovld __purefn read_imagef(read_only image2d_array_msaa_depth_t, int4, int);
15242#endif //cl_khr_gl_msaa_sharing
15243
15244// OpenCL Extension v2.0 s9.18 - Mipmaps
15245#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
15246#ifdef cl_khr_mipmap_image
15247
15248float4 __ovld __purefn read_imagef(read_only image1d_t, sampler_t, float, float);
15249int4 __ovld __purefn read_imagei(read_only image1d_t, sampler_t, float, float);
15250uint4 __ovld __purefn read_imageui(read_only image1d_t, sampler_t, float, float);
15251
15252float4 __ovld __purefn read_imagef(read_only image1d_array_t, sampler_t, float2, float);
15253int4 __ovld __purefn read_imagei(read_only image1d_array_t, sampler_t, float2, float);
15254uint4 __ovld __purefn read_imageui(read_only image1d_array_t, sampler_t, float2, float);
15255
15256float4 __ovld __purefn read_imagef(read_only image2d_t, sampler_t, float2, float);
15257int4 __ovld __purefn read_imagei(read_only image2d_t, sampler_t, float2, float);
15258uint4 __ovld __purefn read_imageui(read_only image2d_t, sampler_t, float2, float);
15259
15260#ifdef cl_khr_depth_images
15261float __ovld __purefn read_imagef(read_only image2d_depth_t, sampler_t, float2, float);
15262#endif // cl_khr_depth_images
15263
15264float4 __ovld __purefn read_imagef(read_only image2d_array_t, sampler_t, float4, float);
15265int4 __ovld __purefn read_imagei(read_only image2d_array_t, sampler_t, float4, float);
15266uint4 __ovld __purefn read_imageui(read_only image2d_array_t, sampler_t, float4, float);
15267
15268#ifdef cl_khr_depth_images
15269float __ovld __purefn read_imagef(read_only image2d_array_depth_t, sampler_t, float4, float);
15270#endif // cl_khr_depth_images
15271
15272float4 __ovld __purefn read_imagef(read_only image3d_t, sampler_t, float4, float);
15273int4 __ovld __purefn read_imagei(read_only image3d_t, sampler_t, float4, float);
15274uint4 __ovld __purefn read_imageui(read_only image3d_t, sampler_t, float4, float);
15275
15276float4 __ovld __purefn read_imagef(read_only image1d_t, sampler_t, float, float, float);
15277int4 __ovld __purefn read_imagei(read_only image1d_t, sampler_t, float, float, float);
15278uint4 __ovld __purefn read_imageui(read_only image1d_t, sampler_t, float, float, float);
15279
15280float4 __ovld __purefn read_imagef(read_only image1d_array_t, sampler_t, float2, float, float);
15281int4 __ovld __purefn read_imagei(read_only image1d_array_t, sampler_t, float2, float, float);
15282uint4 __ovld __purefn read_imageui(read_only image1d_array_t, sampler_t, float2, float, float);
15283
15284float4 __ovld __purefn read_imagef(read_only image2d_t, sampler_t, float2, float2, float2);
15285int4 __ovld __purefn read_imagei(read_only image2d_t, sampler_t, float2, float2, float2);
15286uint4 __ovld __purefn read_imageui(read_only image2d_t, sampler_t, float2, float2, float2);
15287
15288#ifdef cl_khr_depth_images
15289float __ovld __purefn read_imagef(read_only image2d_depth_t, sampler_t, float2, float2, float2);
15290#endif // cl_khr_depth_images
15291
15292float4 __ovld __purefn read_imagef(read_only image2d_array_t, sampler_t, float4, float2, float2);
15293int4 __ovld __purefn read_imagei(read_only image2d_array_t, sampler_t, float4, float2, float2);
15294uint4 __ovld __purefn read_imageui(read_only image2d_array_t, sampler_t, float4, float2, float2);
15295
15296#ifdef cl_khr_depth_images
15297float __ovld __purefn read_imagef(read_only image2d_array_depth_t, sampler_t, float4, float2, float2);
15298#endif // cl_khr_depth_images
15299
15300float4 __ovld __purefn read_imagef(read_only image3d_t, sampler_t, float4, float4, float4);
15301int4 __ovld __purefn read_imagei(read_only image3d_t, sampler_t, float4, float4, float4);
15302uint4 __ovld __purefn read_imageui(read_only image3d_t, sampler_t, float4, float4, float4);
15303
15304#endif //cl_khr_mipmap_image
15305#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
15306
15307#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_1_2)
15308
15309/**
15310* Sampler-less Image Access
15311*/
15312
15313float4 __ovld __purefn read_imagef(read_only image1d_t, int);
15314int4 __ovld __purefn read_imagei(read_only image1d_t, int);
15315uint4 __ovld __purefn read_imageui(read_only image1d_t, int);
15316
15317float4 __ovld __purefn read_imagef(read_only image1d_buffer_t, int);
15318int4 __ovld __purefn read_imagei(read_only image1d_buffer_t, int);
15319uint4 __ovld __purefn read_imageui(read_only image1d_buffer_t, int);
15320
15321float4 __ovld __purefn read_imagef(read_only image1d_array_t, int2);
15322int4 __ovld __purefn read_imagei(read_only image1d_array_t, int2);
15323uint4 __ovld __purefn read_imageui(read_only image1d_array_t, int2);
15324
15325float4 __ovld __purefn read_imagef(read_only image2d_t, int2);
15326int4 __ovld __purefn read_imagei(read_only image2d_t, int2);
15327uint4 __ovld __purefn read_imageui(read_only image2d_t, int2);
15328
15329float4 __ovld __purefn read_imagef(read_only image2d_array_t, int4);
15330int4 __ovld __purefn read_imagei(read_only image2d_array_t, int4);
15331uint4 __ovld __purefn read_imageui(read_only image2d_array_t, int4);
15332
15333#ifdef cl_khr_depth_images
15334float __ovld __purefn read_imagef(read_only image2d_depth_t, int2);
15335float __ovld __purefn read_imagef(read_only image2d_array_depth_t, int4);
15336#endif //cl_khr_depth_images
15337
15338float4 __ovld __purefn read_imagef(read_only image3d_t, int4);
15339int4 __ovld __purefn read_imagei(read_only image3d_t, int4);
15340uint4 __ovld __purefn read_imageui(read_only image3d_t, int4);
15341
15342#endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_1_2)
15343
15344// Image read functions returning half4 type
15345#ifdef cl_khr_fp16
15346half4 __ovld __purefn read_imageh(read_only image1d_t, sampler_t, int);
15347half4 __ovld __purefn read_imageh(read_only image1d_t, sampler_t, float);
15348half4 __ovld __purefn read_imageh(read_only image2d_t, sampler_t, int2);
15349half4 __ovld __purefn read_imageh(read_only image2d_t, sampler_t, float2);
15350half4 __ovld __purefn read_imageh(read_only image3d_t, sampler_t, int4);
15351half4 __ovld __purefn read_imageh(read_only image3d_t, sampler_t, float4);
15352#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_1_2)
15353half4 __ovld __purefn read_imageh(read_only image1d_array_t, sampler_t, int2);
15354half4 __ovld __purefn read_imageh(read_only image1d_array_t, sampler_t, float2);
15355half4 __ovld __purefn read_imageh(read_only image2d_array_t, sampler_t, int4);
15356half4 __ovld __purefn read_imageh(read_only image2d_array_t, sampler_t, float4);
15357/**
15358 * Sampler-less Image Access
15359 */
15360half4 __ovld __purefn read_imageh(read_only image1d_t, int);
15361half4 __ovld __purefn read_imageh(read_only image2d_t, int2);
15362half4 __ovld __purefn read_imageh(read_only image3d_t, int4);
15363half4 __ovld __purefn read_imageh(read_only image1d_array_t, int2);
15364half4 __ovld __purefn read_imageh(read_only image2d_array_t, int4);
15365half4 __ovld __purefn read_imageh(read_only image1d_buffer_t, int);
15366#endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_1_2)
15367#endif //cl_khr_fp16
15368
15369// Image read functions for read_write images
15370#if defined(__opencl_c_read_write_images)
15371float4 __ovld __purefn read_imagef(read_write image1d_t, int);
15372int4 __ovld __purefn read_imagei(read_write image1d_t, int);
15373uint4 __ovld __purefn read_imageui(read_write image1d_t, int);
15374
15375float4 __ovld __purefn read_imagef(read_write image1d_buffer_t, int);
15376int4 __ovld __purefn read_imagei(read_write image1d_buffer_t, int);
15377uint4 __ovld __purefn read_imageui(read_write image1d_buffer_t, int);
15378
15379float4 __ovld __purefn read_imagef(read_write image1d_array_t, int2);
15380int4 __ovld __purefn read_imagei(read_write image1d_array_t, int2);
15381uint4 __ovld __purefn read_imageui(read_write image1d_array_t, int2);
15382
15383float4 __ovld __purefn read_imagef(read_write image2d_t, int2);
15384int4 __ovld __purefn read_imagei(read_write image2d_t, int2);
15385uint4 __ovld __purefn read_imageui(read_write image2d_t, int2);
15386
15387float4 __ovld __purefn read_imagef(read_write image2d_array_t, int4);
15388int4 __ovld __purefn read_imagei(read_write image2d_array_t, int4);
15389uint4 __ovld __purefn read_imageui(read_write image2d_array_t, int4);
15390
15391#ifdef cl_khr_3d_image_writes
15392float4 __ovld __purefn read_imagef(read_write image3d_t, int4);
15393int4 __ovld __purefn read_imagei(read_write image3d_t, int4);
15394uint4 __ovld __purefn read_imageui(read_write image3d_t, int4);
15395#endif // cl_khr_3d_image_writes
15396
15397#ifdef cl_khr_depth_images
15398float __ovld __purefn read_imagef(read_write image2d_depth_t, int2);
15399float __ovld __purefn read_imagef(read_write image2d_array_depth_t, int4);
15400#endif //cl_khr_depth_images
15401
15402#if cl_khr_gl_msaa_sharing
15403float4 __ovld __purefn read_imagef(read_write image2d_msaa_t, int2, int);
15404int4 __ovld __purefn read_imagei(read_write image2d_msaa_t, int2, int);
15405uint4 __ovld __purefn read_imageui(read_write image2d_msaa_t, int2, int);
15406
15407float4 __ovld __purefn read_imagef(read_write image2d_array_msaa_t, int4, int);
15408int4 __ovld __purefn read_imagei(read_write image2d_array_msaa_t, int4, int);
15409uint4 __ovld __purefn read_imageui(read_write image2d_array_msaa_t, int4, int);
15410
15411float __ovld __purefn read_imagef(read_write image2d_msaa_depth_t, int2, int);
15412float __ovld __purefn read_imagef(read_write image2d_array_msaa_depth_t, int4, int);
15413#endif //cl_khr_gl_msaa_sharing
15414
15415#ifdef cl_khr_mipmap_image
15416float4 __ovld __purefn read_imagef(read_write image1d_t, sampler_t, float, float);
15417int4 __ovld __purefn read_imagei(read_write image1d_t, sampler_t, float, float);
15418uint4 __ovld __purefn read_imageui(read_write image1d_t, sampler_t, float, float);
15419
15420float4 __ovld __purefn read_imagef(read_write image1d_array_t, sampler_t, float2, float);
15421int4 __ovld __purefn read_imagei(read_write image1d_array_t, sampler_t, float2, float);
15422uint4 __ovld __purefn read_imageui(read_write image1d_array_t, sampler_t, float2, float);
15423
15424float4 __ovld __purefn read_imagef(read_write image2d_t, sampler_t, float2, float);
15425int4 __ovld __purefn read_imagei(read_write image2d_t, sampler_t, float2, float);
15426uint4 __ovld __purefn read_imageui(read_write image2d_t, sampler_t, float2, float);
15427
15428float __ovld __purefn read_imagef(read_write image2d_depth_t, sampler_t, float2, float);
15429
15430float4 __ovld __purefn read_imagef(read_write image2d_array_t, sampler_t, float4, float);
15431int4 __ovld __purefn read_imagei(read_write image2d_array_t, sampler_t, float4, float);
15432uint4 __ovld __purefn read_imageui(read_write image2d_array_t, sampler_t, float4, float);
15433
15434float __ovld __purefn read_imagef(read_write image2d_array_depth_t, sampler_t, float4, float);
15435
15436#ifdef cl_khr_3d_image_writes
15437float4 __ovld __purefn read_imagef(read_write image3d_t, sampler_t, float4, float);
15438int4 __ovld __purefn read_imagei(read_write image3d_t, sampler_t, float4, float);
15439uint4 __ovld __purefn read_imageui(read_write image3d_t, sampler_t, float4, float);
15440#endif // cl_khr_3d_image_writes
15441
15442float4 __ovld __purefn read_imagef(read_write image1d_t, sampler_t, float, float, float);
15443int4 __ovld __purefn read_imagei(read_write image1d_t, sampler_t, float, float, float);
15444uint4 __ovld __purefn read_imageui(read_write image1d_t, sampler_t, float, float, float);
15445
15446float4 __ovld __purefn read_imagef(read_write image1d_array_t, sampler_t, float2, float, float);
15447int4 __ovld __purefn read_imagei(read_write image1d_array_t, sampler_t, float2, float, float);
15448uint4 __ovld __purefn read_imageui(read_write image1d_array_t, sampler_t, float2, float, float);
15449
15450float4 __ovld __purefn read_imagef(read_write image2d_t, sampler_t, float2, float2, float2);
15451int4 __ovld __purefn read_imagei(read_write image2d_t, sampler_t, float2, float2, float2);
15452uint4 __ovld __purefn read_imageui(read_write image2d_t, sampler_t, float2, float2, float2);
15453
15454float __ovld __purefn read_imagef(read_write image2d_depth_t, sampler_t, float2, float2, float2);
15455
15456float4 __ovld __purefn read_imagef(read_write image2d_array_t, sampler_t, float4, float2, float2);
15457int4 __ovld __purefn read_imagei(read_write image2d_array_t, sampler_t, float4, float2, float2);
15458uint4 __ovld __purefn read_imageui(read_write image2d_array_t, sampler_t, float4, float2, float2);
15459
15460float __ovld __purefn read_imagef(read_write image2d_array_depth_t, sampler_t, float4, float2, float2);
15461
15462#ifdef cl_khr_3d_image_writes
15463float4 __ovld __purefn read_imagef(read_write image3d_t, sampler_t, float4, float4, float4);
15464int4 __ovld __purefn read_imagei(read_write image3d_t, sampler_t, float4, float4, float4);
15465uint4 __ovld __purefn read_imageui(read_write image3d_t, sampler_t, float4, float4, float4);
15466#endif // cl_khr_3d_image_writes
15467
15468#endif //cl_khr_mipmap_image
15469
15470// Image read functions returning half4 type
15471#ifdef cl_khr_fp16
15472half4 __ovld __purefn read_imageh(read_write image1d_t, int);
15473half4 __ovld __purefn read_imageh(read_write image2d_t, int2);
15474#ifdef cl_khr_3d_image_writes
15475half4 __ovld __purefn read_imageh(read_write image3d_t, int4);
15476#endif // cl_khr_3d_image_writes
15477half4 __ovld __purefn read_imageh(read_write image1d_array_t, int2);
15478half4 __ovld __purefn read_imageh(read_write image2d_array_t, int4);
15479half4 __ovld __purefn read_imageh(read_write image1d_buffer_t, int);
15480#endif //cl_khr_fp16
15481#endif //defined(__opencl_c_read_write_images)
15482
15483/**
15484 * Write color value to location specified by coordinate
15485 * (coord.x, coord.y) in the 2D image object specified by image.
15486 * (coord.x, coord.y) are considered to be unnormalized coordinates
15487 * and must be in the range 0 ... image width - 1, and 0
15488 * ... image height - 1.
15489
15490 * Write color value to location specified by coordinate
15491 * (coord.x, coord.y) in the 2D image object specified by index
15492 * (coord.z) of the 2D image array object image_array.
15493 * (coord.x, coord.y) are considered to be unnormalized
15494 * coordinates and must be in the range 0 ... image width
15495 * - 1.
15496 *
15497 * Write color value to location specified by coordinate
15498 * (coord) in the 1D image (buffer) object specified by image.
15499 * coord is considered to be unnormalized coordinates
15500 * and must be in the range 0 ... image width - 1.
15501 *
15502 * Write color value to location specified by coordinate
15503 * (coord.x) in the 1D image object specified by index
15504 * (coord.y) of the 1D image array object image_array.
15505 * x is considered to be unnormalized coordinates
15506 * and must be in the range 0 ... image width - 1.
15507 *
15508 * Write color value to location specified by coordinate
15509 * (coord.x, coord.y, coord.z) in the 3D image object specified by image.
15510 * coord.x & coord.y are considered to be unnormalized coordinates
15511 * and must be in the range 0 ... image width - 1, and 0
15512 * ... image height - 1.
15513 *
15514 * For mipmap images, use mip-level specified by lod.
15515 *
15516 * Appropriate data format conversion to the specified
15517 * image format is done before writing the color value.
15518 *
15519 * write_imagef can only be used with image objects
15520 * created with image_channel_data_type set to one of
15521 * the pre-defined packed formats or set to
15522 * CL_SNORM_INT8, CL_UNORM_INT8,
15523 * CL_SNORM_INT16, CL_UNORM_INT16,
15524 * CL_HALF_FLOAT or CL_FLOAT. Appropriate data
15525 * format conversion will be done to convert channel
15526 * data from a floating-point value to actual data format
15527 * in which the channels are stored.
15528 *
15529 * write_imagei can only be used with image objects
15530 * created with image_channel_data_type set to one of
15531 * the following values:
15532 * CL_SIGNED_INT8,
15533 * CL_SIGNED_INT16 and
15534 * CL_SIGNED_INT32.
15535 *
15536 * write_imageui can only be used with image objects
15537 * created with image_channel_data_type set to one of
15538 * the following values:
15539 * CL_UNSIGNED_INT8,
15540 * CL_UNSIGNED_INT16 and
15541 * CL_UNSIGNED_INT32.
15542 *
15543 * The behavior of write_imagef, write_imagei and
15544 * write_imageui for image objects created with
15545 * image_channel_data_type values not specified in
15546 * the description above or with (x, y) coordinate
15547 * values that are not in the range (0 ... image width -1,
15548 * 0 ... image height - 1), respectively, is undefined.
15549 */
15550void __ovld write_imagef(write_only image2d_t, int2, float4);
15551void __ovld write_imagei(write_only image2d_t, int2, int4);
15552void __ovld write_imageui(write_only image2d_t, int2, uint4);
15553
15554void __ovld write_imagef(write_only image2d_array_t, int4, float4);
15555void __ovld write_imagei(write_only image2d_array_t, int4, int4);
15556void __ovld write_imageui(write_only image2d_array_t, int4, uint4);
15557
15558void __ovld write_imagef(write_only image1d_t, int, float4);
15559void __ovld write_imagei(write_only image1d_t, int, int4);
15560void __ovld write_imageui(write_only image1d_t, int, uint4);
15561
15562void __ovld write_imagef(write_only image1d_buffer_t, int, float4);
15563void __ovld write_imagei(write_only image1d_buffer_t, int, int4);
15564void __ovld write_imageui(write_only image1d_buffer_t, int, uint4);
15565
15566void __ovld write_imagef(write_only image1d_array_t, int2, float4);
15567void __ovld write_imagei(write_only image1d_array_t, int2, int4);
15568void __ovld write_imageui(write_only image1d_array_t, int2, uint4);
15569
15570#ifdef cl_khr_3d_image_writes
15571void __ovld write_imagef(write_only image3d_t, int4, float4);
15572void __ovld write_imagei(write_only image3d_t, int4, int4);
15573void __ovld write_imageui(write_only image3d_t, int4, uint4);
15574#endif
15575
15576#ifdef cl_khr_depth_images
15577void __ovld write_imagef(write_only image2d_depth_t, int2, float);
15578void __ovld write_imagef(write_only image2d_array_depth_t, int4, float);
15579#endif //cl_khr_depth_images
15580
15581// OpenCL Extension v2.0 s9.18 - Mipmaps
15582#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
15583#if defined(cl_khr_mipmap_image_writes)
15584void __ovld write_imagef(write_only image1d_t, int, int, float4);
15585void __ovld write_imagei(write_only image1d_t, int, int, int4);
15586void __ovld write_imageui(write_only image1d_t, int, int, uint4);
15587
15588void __ovld write_imagef(write_only image1d_array_t, int2, int, float4);
15589void __ovld write_imagei(write_only image1d_array_t, int2, int, int4);
15590void __ovld write_imageui(write_only image1d_array_t, int2, int, uint4);
15591
15592void __ovld write_imagef(write_only image2d_t, int2, int, float4);
15593void __ovld write_imagei(write_only image2d_t, int2, int, int4);
15594void __ovld write_imageui(write_only image2d_t, int2, int, uint4);
15595
15596void __ovld write_imagef(write_only image2d_array_t, int4, int, float4);
15597void __ovld write_imagei(write_only image2d_array_t, int4, int, int4);
15598void __ovld write_imageui(write_only image2d_array_t, int4, int, uint4);
15599
15600void __ovld write_imagef(write_only image2d_depth_t, int2, int, float);
15601void __ovld write_imagef(write_only image2d_array_depth_t, int4, int, float);
15602
15603#ifdef cl_khr_3d_image_writes
15604void __ovld write_imagef(write_only image3d_t, int4, int, float4);
15605void __ovld write_imagei(write_only image3d_t, int4, int, int4);
15606void __ovld write_imageui(write_only image3d_t, int4, int, uint4);
15607#endif //cl_khr_3d_image_writes
15608
15609#endif //defined(cl_khr_mipmap_image_writes)
15610#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
15611
15612// Image write functions for half4 type
15613#ifdef cl_khr_fp16
15614void __ovld write_imageh(write_only image1d_t, int, half4);
15615void __ovld write_imageh(write_only image2d_t, int2, half4);
15616#ifdef cl_khr_3d_image_writes
15617void __ovld write_imageh(write_only image3d_t, int4, half4);
15618#endif
15619void __ovld write_imageh(write_only image1d_array_t, int2, half4);
15620void __ovld write_imageh(write_only image2d_array_t, int4, half4);
15621void __ovld write_imageh(write_only image1d_buffer_t, int, half4);
15622#endif //cl_khr_fp16
15623
15624// Image write functions for read_write images
15625#if defined(__opencl_c_read_write_images)
15626void __ovld write_imagef(read_write image2d_t, int2, float4);
15627void __ovld write_imagei(read_write image2d_t, int2, int4);
15628void __ovld write_imageui(read_write image2d_t, int2, uint4);
15629
15630void __ovld write_imagef(read_write image2d_array_t, int4, float4);
15631void __ovld write_imagei(read_write image2d_array_t, int4, int4);
15632void __ovld write_imageui(read_write image2d_array_t, int4, uint4);
15633
15634void __ovld write_imagef(read_write image1d_t, int, float4);
15635void __ovld write_imagei(read_write image1d_t, int, int4);
15636void __ovld write_imageui(read_write image1d_t, int, uint4);
15637
15638void __ovld write_imagef(read_write image1d_buffer_t, int, float4);
15639void __ovld write_imagei(read_write image1d_buffer_t, int, int4);
15640void __ovld write_imageui(read_write image1d_buffer_t, int, uint4);
15641
15642void __ovld write_imagef(read_write image1d_array_t, int2, float4);
15643void __ovld write_imagei(read_write image1d_array_t, int2, int4);
15644void __ovld write_imageui(read_write image1d_array_t, int2, uint4);
15645
15646#ifdef cl_khr_3d_image_writes
15647void __ovld write_imagef(read_write image3d_t, int4, float4);
15648void __ovld write_imagei(read_write image3d_t, int4, int4);
15649void __ovld write_imageui(read_write image3d_t, int4, uint4);
15650#endif
15651
15652#ifdef cl_khr_depth_images
15653void __ovld write_imagef(read_write image2d_depth_t, int2, float);
15654void __ovld write_imagef(read_write image2d_array_depth_t, int4, float);
15655#endif //cl_khr_depth_images
15656
15657#if defined(cl_khr_mipmap_image_writes)
15658void __ovld write_imagef(read_write image1d_t, int, int, float4);
15659void __ovld write_imagei(read_write image1d_t, int, int, int4);
15660void __ovld write_imageui(read_write image1d_t, int, int, uint4);
15661
15662void __ovld write_imagef(read_write image1d_array_t, int2, int, float4);
15663void __ovld write_imagei(read_write image1d_array_t, int2, int, int4);
15664void __ovld write_imageui(read_write image1d_array_t, int2, int, uint4);
15665
15666void __ovld write_imagef(read_write image2d_t, int2, int, float4);
15667void __ovld write_imagei(read_write image2d_t, int2, int, int4);
15668void __ovld write_imageui(read_write image2d_t, int2, int, uint4);
15669
15670void __ovld write_imagef(read_write image2d_array_t, int4, int, float4);
15671void __ovld write_imagei(read_write image2d_array_t, int4, int, int4);
15672void __ovld write_imageui(read_write image2d_array_t, int4, int, uint4);
15673
15674void __ovld write_imagef(read_write image2d_depth_t, int2, int, float);
15675void __ovld write_imagef(read_write image2d_array_depth_t, int4, int, float);
15676
15677#ifdef cl_khr_3d_image_writes
15678void __ovld write_imagef(read_write image3d_t, int4, int, float4);
15679void __ovld write_imagei(read_write image3d_t, int4, int, int4);
15680void __ovld write_imageui(read_write image3d_t, int4, int, uint4);
15681#endif //cl_khr_3d_image_writes
15682
15683#endif //cl_khr_mipmap_image_writes
15684
15685// Image write functions for half4 type
15686#ifdef cl_khr_fp16
15687void __ovld write_imageh(read_write image1d_t, int, half4);
15688void __ovld write_imageh(read_write image2d_t, int2, half4);
15689#ifdef cl_khr_3d_image_writes
15690void __ovld write_imageh(read_write image3d_t, int4, half4);
15691#endif
15692void __ovld write_imageh(read_write image1d_array_t, int2, half4);
15693void __ovld write_imageh(read_write image2d_array_t, int4, half4);
15694void __ovld write_imageh(read_write image1d_buffer_t, int, half4);
15695#endif //cl_khr_fp16
15696#endif //defined(__opencl_c_read_write_images)
15697
15698// Note: In OpenCL v1.0/1.1/1.2, image argument of image query builtin functions does not have
15699// access qualifier, which by default assume read_only access qualifier. Image query builtin
15700// functions with write_only image argument should also be declared.
15701
15702/**
15703 * Return the image width in pixels.
15704 *
15705 */
15706int __ovld __cnfn get_image_width(read_only image1d_t);
15707int __ovld __cnfn get_image_width(read_only image1d_buffer_t);
15708int __ovld __cnfn get_image_width(read_only image2d_t);
15709int __ovld __cnfn get_image_width(read_only image3d_t);
15710int __ovld __cnfn get_image_width(read_only image1d_array_t);
15711int __ovld __cnfn get_image_width(read_only image2d_array_t);
15712#ifdef cl_khr_depth_images
15713int __ovld __cnfn get_image_width(read_only image2d_depth_t);
15714int __ovld __cnfn get_image_width(read_only image2d_array_depth_t);
15715#endif //cl_khr_depth_images
15716#if defined(cl_khr_gl_msaa_sharing)
15717int __ovld __cnfn get_image_width(read_only image2d_msaa_t);
15718int __ovld __cnfn get_image_width(read_only image2d_msaa_depth_t);
15719int __ovld __cnfn get_image_width(read_only image2d_array_msaa_t);
15720int __ovld __cnfn get_image_width(read_only image2d_array_msaa_depth_t);
15721#endif //cl_khr_gl_msaa_sharing
15722
15723int __ovld __cnfn get_image_width(write_only image1d_t);
15724int __ovld __cnfn get_image_width(write_only image1d_buffer_t);
15725int __ovld __cnfn get_image_width(write_only image2d_t);
15726#ifdef cl_khr_3d_image_writes
15727int __ovld __cnfn get_image_width(write_only image3d_t);
15728#endif
15729int __ovld __cnfn get_image_width(write_only image1d_array_t);
15730int __ovld __cnfn get_image_width(write_only image2d_array_t);
15731#ifdef cl_khr_depth_images
15732int __ovld __cnfn get_image_width(write_only image2d_depth_t);
15733int __ovld __cnfn get_image_width(write_only image2d_array_depth_t);
15734#endif //cl_khr_depth_images
15735#if defined(cl_khr_gl_msaa_sharing)
15736int __ovld __cnfn get_image_width(write_only image2d_msaa_t);
15737int __ovld __cnfn get_image_width(write_only image2d_msaa_depth_t);
15738int __ovld __cnfn get_image_width(write_only image2d_array_msaa_t);
15739int __ovld __cnfn get_image_width(write_only image2d_array_msaa_depth_t);
15740#endif //cl_khr_gl_msaa_sharing
15741
15742#if defined(__opencl_c_read_write_images)
15743int __ovld __cnfn get_image_width(read_write image1d_t);
15744int __ovld __cnfn get_image_width(read_write image1d_buffer_t);
15745int __ovld __cnfn get_image_width(read_write image2d_t);
15746#ifdef cl_khr_3d_image_writes
15747int __ovld __cnfn get_image_width(read_write image3d_t);
15748#endif // cl_khr_3d_image_writes
15749int __ovld __cnfn get_image_width(read_write image1d_array_t);
15750int __ovld __cnfn get_image_width(read_write image2d_array_t);
15751#ifdef cl_khr_depth_images
15752int __ovld __cnfn get_image_width(read_write image2d_depth_t);
15753int __ovld __cnfn get_image_width(read_write image2d_array_depth_t);
15754#endif //cl_khr_depth_images
15755#if defined(cl_khr_gl_msaa_sharing)
15756int __ovld __cnfn get_image_width(read_write image2d_msaa_t);
15757int __ovld __cnfn get_image_width(read_write image2d_msaa_depth_t);
15758int __ovld __cnfn get_image_width(read_write image2d_array_msaa_t);
15759int __ovld __cnfn get_image_width(read_write image2d_array_msaa_depth_t);
15760#endif //cl_khr_gl_msaa_sharing
15761#endif //defined(__opencl_c_read_write_images)
15762
15763/**
15764 * Return the image height in pixels.
15765 */
15766int __ovld __cnfn get_image_height(read_only image2d_t);
15767int __ovld __cnfn get_image_height(read_only image3d_t);
15768int __ovld __cnfn get_image_height(read_only image2d_array_t);
15769#ifdef cl_khr_depth_images
15770int __ovld __cnfn get_image_height(read_only image2d_depth_t);
15771int __ovld __cnfn get_image_height(read_only image2d_array_depth_t);
15772#endif //cl_khr_depth_images
15773#if defined(cl_khr_gl_msaa_sharing)
15774int __ovld __cnfn get_image_height(read_only image2d_msaa_t);
15775int __ovld __cnfn get_image_height(read_only image2d_msaa_depth_t);
15776int __ovld __cnfn get_image_height(read_only image2d_array_msaa_t);
15777int __ovld __cnfn get_image_height(read_only image2d_array_msaa_depth_t);
15778#endif //cl_khr_gl_msaa_sharing
15779
15780int __ovld __cnfn get_image_height(write_only image2d_t);
15781#ifdef cl_khr_3d_image_writes
15782int __ovld __cnfn get_image_height(write_only image3d_t);
15783#endif
15784int __ovld __cnfn get_image_height(write_only image2d_array_t);
15785#ifdef cl_khr_depth_images
15786int __ovld __cnfn get_image_height(write_only image2d_depth_t);
15787int __ovld __cnfn get_image_height(write_only image2d_array_depth_t);
15788#endif //cl_khr_depth_images
15789#if defined(cl_khr_gl_msaa_sharing)
15790int __ovld __cnfn get_image_height(write_only image2d_msaa_t);
15791int __ovld __cnfn get_image_height(write_only image2d_msaa_depth_t);
15792int __ovld __cnfn get_image_height(write_only image2d_array_msaa_t);
15793int __ovld __cnfn get_image_height(write_only image2d_array_msaa_depth_t);
15794#endif //cl_khr_gl_msaa_sharing
15795
15796#if defined(__opencl_c_read_write_images)
15797int __ovld __cnfn get_image_height(read_write image2d_t);
15798#ifdef cl_khr_3d_image_writes
15799int __ovld __cnfn get_image_height(read_write image3d_t);
15800#endif // cl_khr_3d_image_writes
15801int __ovld __cnfn get_image_height(read_write image2d_array_t);
15802#ifdef cl_khr_depth_images
15803int __ovld __cnfn get_image_height(read_write image2d_depth_t);
15804int __ovld __cnfn get_image_height(read_write image2d_array_depth_t);
15805#endif //cl_khr_depth_images
15806#if defined(cl_khr_gl_msaa_sharing)
15807int __ovld __cnfn get_image_height(read_write image2d_msaa_t);
15808int __ovld __cnfn get_image_height(read_write image2d_msaa_depth_t);
15809int __ovld __cnfn get_image_height(read_write image2d_array_msaa_t);
15810int __ovld __cnfn get_image_height(read_write image2d_array_msaa_depth_t);
15811#endif //cl_khr_gl_msaa_sharing
15812#endif //defined(__opencl_c_read_write_images)
15813
15814/**
15815 * Return the image depth in pixels.
15816 */
15817int __ovld __cnfn get_image_depth(read_only image3d_t);
15818
15819#ifdef cl_khr_3d_image_writes
15820int __ovld __cnfn get_image_depth(write_only image3d_t);
15821
15822#if defined(__opencl_c_read_write_images)
15823int __ovld __cnfn get_image_depth(read_write image3d_t);
15824#endif //defined(__opencl_c_read_write_images)
15825#endif // cl_khr_3d_image_writes
15826
15827// OpenCL Extension v2.0 s9.18 - Mipmaps
15828#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
15829#ifdef cl_khr_mipmap_image
15830/**
15831 * Return the image miplevels.
15832 */
15833
15834int __ovld get_image_num_mip_levels(read_only image1d_t);
15835int __ovld get_image_num_mip_levels(read_only image2d_t);
15836int __ovld get_image_num_mip_levels(read_only image3d_t);
15837
15838int __ovld get_image_num_mip_levels(write_only image1d_t);
15839int __ovld get_image_num_mip_levels(write_only image2d_t);
15840#ifdef cl_khr_3d_image_writes
15841int __ovld get_image_num_mip_levels(write_only image3d_t);
15842#endif
15843
15844#if defined(__opencl_c_read_write_images)
15845int __ovld get_image_num_mip_levels(read_write image1d_t);
15846int __ovld get_image_num_mip_levels(read_write image2d_t);
15847#ifdef cl_khr_3d_image_writes
15848int __ovld get_image_num_mip_levels(read_write image3d_t);
15849#endif // cl_khr_3d_image_writes
15850#endif //defined(__opencl_c_read_write_images)
15851
15852int __ovld get_image_num_mip_levels(read_only image1d_array_t);
15853int __ovld get_image_num_mip_levels(read_only image2d_array_t);
15854#ifdef cl_khr_depth_images
15855int __ovld get_image_num_mip_levels(read_only image2d_array_depth_t);
15856int __ovld get_image_num_mip_levels(read_only image2d_depth_t);
15857#endif // cl_khr_depth_images
15858
15859int __ovld get_image_num_mip_levels(write_only image1d_array_t);
15860int __ovld get_image_num_mip_levels(write_only image2d_array_t);
15861#ifdef cl_khr_depth_images
15862int __ovld get_image_num_mip_levels(write_only image2d_array_depth_t);
15863int __ovld get_image_num_mip_levels(write_only image2d_depth_t);
15864#endif // cl_khr_depth_images
15865
15866#if defined(__opencl_c_read_write_images)
15867int __ovld get_image_num_mip_levels(read_write image1d_array_t);
15868int __ovld get_image_num_mip_levels(read_write image2d_array_t);
15869#ifdef cl_khr_depth_images
15870int __ovld get_image_num_mip_levels(read_write image2d_array_depth_t);
15871int __ovld get_image_num_mip_levels(read_write image2d_depth_t);
15872#endif // cl_khr_depth_images
15873#endif //defined(__opencl_c_read_write_images)
15874
15875#endif //cl_khr_mipmap_image
15876#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
15877
15878/**
15879 * Return the channel data type. Valid values are:
15880 * CLK_SNORM_INT8
15881 * CLK_SNORM_INT16
15882 * CLK_UNORM_INT8
15883 * CLK_UNORM_INT16
15884 * CLK_UNORM_SHORT_565
15885 * CLK_UNORM_SHORT_555
15886 * CLK_UNORM_SHORT_101010
15887 * CLK_SIGNED_INT8
15888 * CLK_SIGNED_INT16
15889 * CLK_SIGNED_INT32
15890 * CLK_UNSIGNED_INT8
15891 * CLK_UNSIGNED_INT16
15892 * CLK_UNSIGNED_INT32
15893 * CLK_HALF_FLOAT
15894 * CLK_FLOAT
15895 */
15896
15897int __ovld __cnfn get_image_channel_data_type(read_only image1d_t);
15898int __ovld __cnfn get_image_channel_data_type(read_only image1d_buffer_t);
15899int __ovld __cnfn get_image_channel_data_type(read_only image2d_t);
15900int __ovld __cnfn get_image_channel_data_type(read_only image3d_t);
15901int __ovld __cnfn get_image_channel_data_type(read_only image1d_array_t);
15902int __ovld __cnfn get_image_channel_data_type(read_only image2d_array_t);
15903#ifdef cl_khr_depth_images
15904int __ovld __cnfn get_image_channel_data_type(read_only image2d_depth_t);
15905int __ovld __cnfn get_image_channel_data_type(read_only image2d_array_depth_t);
15906#endif //cl_khr_depth_images
15907#if defined(cl_khr_gl_msaa_sharing)
15908int __ovld __cnfn get_image_channel_data_type(read_only image2d_msaa_t);
15909int __ovld __cnfn get_image_channel_data_type(read_only image2d_msaa_depth_t);
15910int __ovld __cnfn get_image_channel_data_type(read_only image2d_array_msaa_t);
15911int __ovld __cnfn get_image_channel_data_type(read_only image2d_array_msaa_depth_t);
15912#endif //cl_khr_gl_msaa_sharing
15913
15914int __ovld __cnfn get_image_channel_data_type(write_only image1d_t);
15915int __ovld __cnfn get_image_channel_data_type(write_only image1d_buffer_t);
15916int __ovld __cnfn get_image_channel_data_type(write_only image2d_t);
15917#ifdef cl_khr_3d_image_writes
15918int __ovld __cnfn get_image_channel_data_type(write_only image3d_t);
15919#endif
15920int __ovld __cnfn get_image_channel_data_type(write_only image1d_array_t);
15921int __ovld __cnfn get_image_channel_data_type(write_only image2d_array_t);
15922#ifdef cl_khr_depth_images
15923int __ovld __cnfn get_image_channel_data_type(write_only image2d_depth_t);
15924int __ovld __cnfn get_image_channel_data_type(write_only image2d_array_depth_t);
15925#endif //cl_khr_depth_images
15926#if defined(cl_khr_gl_msaa_sharing)
15927int __ovld __cnfn get_image_channel_data_type(write_only image2d_msaa_t);
15928int __ovld __cnfn get_image_channel_data_type(write_only image2d_msaa_depth_t);
15929int __ovld __cnfn get_image_channel_data_type(write_only image2d_array_msaa_t);
15930int __ovld __cnfn get_image_channel_data_type(write_only image2d_array_msaa_depth_t);
15931#endif //cl_khr_gl_msaa_sharing
15932
15933#if defined(__opencl_c_read_write_images)
15934int __ovld __cnfn get_image_channel_data_type(read_write image1d_t);
15935int __ovld __cnfn get_image_channel_data_type(read_write image1d_buffer_t);
15936int __ovld __cnfn get_image_channel_data_type(read_write image2d_t);
15937#ifdef cl_khr_3d_image_writes
15938int __ovld __cnfn get_image_channel_data_type(read_write image3d_t);
15939#endif // cl_khr_3d_image_writes
15940int __ovld __cnfn get_image_channel_data_type(read_write image1d_array_t);
15941int __ovld __cnfn get_image_channel_data_type(read_write image2d_array_t);
15942#ifdef cl_khr_depth_images
15943int __ovld __cnfn get_image_channel_data_type(read_write image2d_depth_t);
15944int __ovld __cnfn get_image_channel_data_type(read_write image2d_array_depth_t);
15945#endif //cl_khr_depth_images
15946#if defined(cl_khr_gl_msaa_sharing)
15947int __ovld __cnfn get_image_channel_data_type(read_write image2d_msaa_t);
15948int __ovld __cnfn get_image_channel_data_type(read_write image2d_msaa_depth_t);
15949int __ovld __cnfn get_image_channel_data_type(read_write image2d_array_msaa_t);
15950int __ovld __cnfn get_image_channel_data_type(read_write image2d_array_msaa_depth_t);
15951#endif //cl_khr_gl_msaa_sharing
15952#endif //defined(__opencl_c_read_write_images)
15953
15954/**
15955 * Return the image channel order. Valid values are:
15956 * CLK_A
15957 * CLK_R
15958 * CLK_Rx
15959 * CLK_RG
15960 * CLK_RGx
15961 * CLK_RA
15962 * CLK_RGB
15963 * CLK_RGBx
15964 * CLK_RGBA
15965 * CLK_ARGB
15966 * CLK_BGRA
15967 * CLK_INTENSITY
15968 * CLK_LUMINANCE
15969 */
15970
15971int __ovld __cnfn get_image_channel_order(read_only image1d_t);
15972int __ovld __cnfn get_image_channel_order(read_only image1d_buffer_t);
15973int __ovld __cnfn get_image_channel_order(read_only image2d_t);
15974int __ovld __cnfn get_image_channel_order(read_only image3d_t);
15975int __ovld __cnfn get_image_channel_order(read_only image1d_array_t);
15976int __ovld __cnfn get_image_channel_order(read_only image2d_array_t);
15977#ifdef cl_khr_depth_images
15978int __ovld __cnfn get_image_channel_order(read_only image2d_depth_t);
15979int __ovld __cnfn get_image_channel_order(read_only image2d_array_depth_t);
15980#endif //cl_khr_depth_images
15981#if defined(cl_khr_gl_msaa_sharing)
15982int __ovld __cnfn get_image_channel_order(read_only image2d_msaa_t);
15983int __ovld __cnfn get_image_channel_order(read_only image2d_msaa_depth_t);
15984int __ovld __cnfn get_image_channel_order(read_only image2d_array_msaa_t);
15985int __ovld __cnfn get_image_channel_order(read_only image2d_array_msaa_depth_t);
15986#endif //cl_khr_gl_msaa_sharing
15987
15988int __ovld __cnfn get_image_channel_order(write_only image1d_t);
15989int __ovld __cnfn get_image_channel_order(write_only image1d_buffer_t);
15990int __ovld __cnfn get_image_channel_order(write_only image2d_t);
15991#ifdef cl_khr_3d_image_writes
15992int __ovld __cnfn get_image_channel_order(write_only image3d_t);
15993#endif
15994int __ovld __cnfn get_image_channel_order(write_only image1d_array_t);
15995int __ovld __cnfn get_image_channel_order(write_only image2d_array_t);
15996#ifdef cl_khr_depth_images
15997int __ovld __cnfn get_image_channel_order(write_only image2d_depth_t);
15998int __ovld __cnfn get_image_channel_order(write_only image2d_array_depth_t);
15999#endif //cl_khr_depth_images
16000#if defined(cl_khr_gl_msaa_sharing)
16001int __ovld __cnfn get_image_channel_order(write_only image2d_msaa_t);
16002int __ovld __cnfn get_image_channel_order(write_only image2d_msaa_depth_t);
16003int __ovld __cnfn get_image_channel_order(write_only image2d_array_msaa_t);
16004int __ovld __cnfn get_image_channel_order(write_only image2d_array_msaa_depth_t);
16005#endif //cl_khr_gl_msaa_sharing
16006
16007#if defined(__opencl_c_read_write_images)
16008int __ovld __cnfn get_image_channel_order(read_write image1d_t);
16009int __ovld __cnfn get_image_channel_order(read_write image1d_buffer_t);
16010int __ovld __cnfn get_image_channel_order(read_write image2d_t);
16011#ifdef cl_khr_3d_image_writes
16012int __ovld __cnfn get_image_channel_order(read_write image3d_t);
16013#endif // cl_khr_3d_image_writes
16014int __ovld __cnfn get_image_channel_order(read_write image1d_array_t);
16015int __ovld __cnfn get_image_channel_order(read_write image2d_array_t);
16016#ifdef cl_khr_depth_images
16017int __ovld __cnfn get_image_channel_order(read_write image2d_depth_t);
16018int __ovld __cnfn get_image_channel_order(read_write image2d_array_depth_t);
16019#endif //cl_khr_depth_images
16020#if defined(cl_khr_gl_msaa_sharing)
16021int __ovld __cnfn get_image_channel_order(read_write image2d_msaa_t);
16022int __ovld __cnfn get_image_channel_order(read_write image2d_msaa_depth_t);
16023int __ovld __cnfn get_image_channel_order(read_write image2d_array_msaa_t);
16024int __ovld __cnfn get_image_channel_order(read_write image2d_array_msaa_depth_t);
16025#endif //cl_khr_gl_msaa_sharing
16026#endif //defined(__opencl_c_read_write_images)
16027
16028/**
16029 * Return the 2D image width and height as an int2
16030 * type. The width is returned in the x component, and
16031 * the height in the y component.
16032 */
16033int2 __ovld __cnfn get_image_dim(read_only image2d_t);
16034int2 __ovld __cnfn get_image_dim(read_only image2d_array_t);
16035#ifdef cl_khr_depth_images
16036int2 __ovld __cnfn get_image_dim(read_only image2d_array_depth_t);
16037int2 __ovld __cnfn get_image_dim(read_only image2d_depth_t);
16038#endif //cl_khr_depth_images
16039#if defined(cl_khr_gl_msaa_sharing)
16040int2 __ovld __cnfn get_image_dim(read_only image2d_msaa_t);
16041int2 __ovld __cnfn get_image_dim(read_only image2d_msaa_depth_t);
16042int2 __ovld __cnfn get_image_dim(read_only image2d_array_msaa_t);
16043int2 __ovld __cnfn get_image_dim(read_only image2d_array_msaa_depth_t);
16044#endif //cl_khr_gl_msaa_sharing
16045
16046int2 __ovld __cnfn get_image_dim(write_only image2d_t);
16047int2 __ovld __cnfn get_image_dim(write_only image2d_array_t);
16048#ifdef cl_khr_depth_images
16049int2 __ovld __cnfn get_image_dim(write_only image2d_array_depth_t);
16050int2 __ovld __cnfn get_image_dim(write_only image2d_depth_t);
16051#endif //cl_khr_depth_images
16052#if defined(cl_khr_gl_msaa_sharing)
16053int2 __ovld __cnfn get_image_dim(write_only image2d_msaa_t);
16054int2 __ovld __cnfn get_image_dim(write_only image2d_msaa_depth_t);
16055int2 __ovld __cnfn get_image_dim(write_only image2d_array_msaa_t);
16056int2 __ovld __cnfn get_image_dim(write_only image2d_array_msaa_depth_t);
16057#endif //cl_khr_gl_msaa_sharing
16058
16059#if defined(__opencl_c_read_write_images)
16060int2 __ovld __cnfn get_image_dim(read_write image2d_t);
16061int2 __ovld __cnfn get_image_dim(read_write image2d_array_t);
16062#ifdef cl_khr_depth_images
16063int2 __ovld __cnfn get_image_dim(read_write image2d_array_depth_t);
16064int2 __ovld __cnfn get_image_dim(read_write image2d_depth_t);
16065#endif //cl_khr_depth_images
16066#if defined(cl_khr_gl_msaa_sharing)
16067int2 __ovld __cnfn get_image_dim(read_write image2d_msaa_t);
16068int2 __ovld __cnfn get_image_dim(read_write image2d_msaa_depth_t);
16069int2 __ovld __cnfn get_image_dim(read_write image2d_array_msaa_t);
16070int2 __ovld __cnfn get_image_dim(read_write image2d_array_msaa_depth_t);
16071#endif //cl_khr_gl_msaa_sharing
16072#endif //defined(__opencl_c_read_write_images)
16073
16074/**
16075 * Return the 3D image width, height, and depth as an
16076 * int4 type. The width is returned in the x
16077 * component, height in the y component, depth in the z
16078 * component and the w component is 0.
16079 */
16080int4 __ovld __cnfn get_image_dim(read_only image3d_t);
16081#ifdef cl_khr_3d_image_writes
16082int4 __ovld __cnfn get_image_dim(write_only image3d_t);
16083#if defined(__opencl_c_read_write_images)
16084int4 __ovld __cnfn get_image_dim(read_write image3d_t);
16085#endif //defined(__opencl_c_read_write_images)
16086#endif // cl_khr_3d_image_writes
16087
16088/**
16089 * Return the image array size.
16090 */
16091
16092size_t __ovld __cnfn get_image_array_size(read_only image1d_array_t);
16093size_t __ovld __cnfn get_image_array_size(read_only image2d_array_t);
16094#ifdef cl_khr_depth_images
16095size_t __ovld __cnfn get_image_array_size(read_only image2d_array_depth_t);
16096#endif //cl_khr_depth_images
16097#if defined(cl_khr_gl_msaa_sharing)
16098size_t __ovld __cnfn get_image_array_size(read_only image2d_array_msaa_t);
16099size_t __ovld __cnfn get_image_array_size(read_only image2d_array_msaa_depth_t);
16100#endif //cl_khr_gl_msaa_sharing
16101
16102size_t __ovld __cnfn get_image_array_size(write_only image1d_array_t);
16103size_t __ovld __cnfn get_image_array_size(write_only image2d_array_t);
16104#ifdef cl_khr_depth_images
16105size_t __ovld __cnfn get_image_array_size(write_only image2d_array_depth_t);
16106#endif //cl_khr_depth_images
16107#if defined(cl_khr_gl_msaa_sharing)
16108size_t __ovld __cnfn get_image_array_size(write_only image2d_array_msaa_t);
16109size_t __ovld __cnfn get_image_array_size(write_only image2d_array_msaa_depth_t);
16110#endif //cl_khr_gl_msaa_sharing
16111
16112#if defined(__opencl_c_read_write_images)
16113size_t __ovld __cnfn get_image_array_size(read_write image1d_array_t);
16114size_t __ovld __cnfn get_image_array_size(read_write image2d_array_t);
16115#ifdef cl_khr_depth_images
16116size_t __ovld __cnfn get_image_array_size(read_write image2d_array_depth_t);
16117#endif //cl_khr_depth_images
16118#if defined(cl_khr_gl_msaa_sharing)
16119size_t __ovld __cnfn get_image_array_size(read_write image2d_array_msaa_t);
16120size_t __ovld __cnfn get_image_array_size(read_write image2d_array_msaa_depth_t);
16121#endif //cl_khr_gl_msaa_sharing
16122#endif //defined(__opencl_c_read_write_images)
16123
16124/**
16125* Return the number of samples associated with image
16126*/
16127#if defined(cl_khr_gl_msaa_sharing)
16128int __ovld __cnfn get_image_num_samples(read_only image2d_msaa_t);
16129int __ovld __cnfn get_image_num_samples(read_only image2d_msaa_depth_t);
16130int __ovld __cnfn get_image_num_samples(read_only image2d_array_msaa_t);
16131int __ovld __cnfn get_image_num_samples(read_only image2d_array_msaa_depth_t);
16132
16133int __ovld __cnfn get_image_num_samples(write_only image2d_msaa_t);
16134int __ovld __cnfn get_image_num_samples(write_only image2d_msaa_depth_t);
16135int __ovld __cnfn get_image_num_samples(write_only image2d_array_msaa_t);
16136int __ovld __cnfn get_image_num_samples(write_only image2d_array_msaa_depth_t);
16137
16138#if defined(__opencl_c_read_write_images)
16139int __ovld __cnfn get_image_num_samples(read_write image2d_msaa_t);
16140int __ovld __cnfn get_image_num_samples(read_write image2d_msaa_depth_t);
16141int __ovld __cnfn get_image_num_samples(read_write image2d_array_msaa_t);
16142int __ovld __cnfn get_image_num_samples(read_write image2d_array_msaa_depth_t);
16143#endif //defined(__opencl_c_read_write_images)
16144#endif
16145
16146// OpenCL v2.0 s6.13.15 - Work-group Functions
16147
16148#if defined(__opencl_c_work_group_collective_functions)
16149int __ovld __conv work_group_all(int predicate);
16150int __ovld __conv work_group_any(int predicate);
16151
16152#ifdef cl_khr_fp16
16153half __ovld __conv work_group_broadcast(half, size_t local_id);
16154half __ovld __conv work_group_broadcast(half, size_t, size_t);
16155half __ovld __conv work_group_broadcast(half, size_t, size_t, size_t);
16156#endif
16157int __ovld __conv work_group_broadcast(int, size_t local_id);
16158int __ovld __conv work_group_broadcast(int, size_t, size_t);
16159int __ovld __conv work_group_broadcast(int, size_t, size_t, size_t);
16160uint __ovld __conv work_group_broadcast(uint, size_t local_id);
16161uint __ovld __conv work_group_broadcast(uint, size_t, size_t);
16162uint __ovld __conv work_group_broadcast(uint, size_t, size_t, size_t);
16163long __ovld __conv work_group_broadcast(long, size_t local_id);
16164long __ovld __conv work_group_broadcast(long, size_t, size_t);
16165long __ovld __conv work_group_broadcast(long, size_t, size_t, size_t);
16166ulong __ovld __conv work_group_broadcast(ulong, size_t local_id);
16167ulong __ovld __conv work_group_broadcast(ulong, size_t, size_t);
16168ulong __ovld __conv work_group_broadcast(ulong, size_t, size_t, size_t);
16169float __ovld __conv work_group_broadcast(float, size_t local_id);
16170float __ovld __conv work_group_broadcast(float, size_t, size_t);
16171float __ovld __conv work_group_broadcast(float, size_t, size_t, size_t);
16172#ifdef cl_khr_fp64
16173double __ovld __conv work_group_broadcast(double, size_t local_id);
16174double __ovld __conv work_group_broadcast(double, size_t, size_t);
16175double __ovld __conv work_group_broadcast(double, size_t, size_t, size_t);
16176#endif //cl_khr_fp64
16177
16178#ifdef cl_khr_fp16
16179half __ovld __conv work_group_reduce_add(half);
16180half __ovld __conv work_group_reduce_min(half);
16181half __ovld __conv work_group_reduce_max(half);
16182half __ovld __conv work_group_scan_exclusive_add(half);
16183half __ovld __conv work_group_scan_exclusive_min(half);
16184half __ovld __conv work_group_scan_exclusive_max(half);
16185half __ovld __conv work_group_scan_inclusive_add(half);
16186half __ovld __conv work_group_scan_inclusive_min(half);
16187half __ovld __conv work_group_scan_inclusive_max(half);
16188#endif
16189int __ovld __conv work_group_reduce_add(int);
16190int __ovld __conv work_group_reduce_min(int);
16191int __ovld __conv work_group_reduce_max(int);
16192int __ovld __conv work_group_scan_exclusive_add(int);
16193int __ovld __conv work_group_scan_exclusive_min(int);
16194int __ovld __conv work_group_scan_exclusive_max(int);
16195int __ovld __conv work_group_scan_inclusive_add(int);
16196int __ovld __conv work_group_scan_inclusive_min(int);
16197int __ovld __conv work_group_scan_inclusive_max(int);
16198uint __ovld __conv work_group_reduce_add(uint);
16199uint __ovld __conv work_group_reduce_min(uint);
16200uint __ovld __conv work_group_reduce_max(uint);
16201uint __ovld __conv work_group_scan_exclusive_add(uint);
16202uint __ovld __conv work_group_scan_exclusive_min(uint);
16203uint __ovld __conv work_group_scan_exclusive_max(uint);
16204uint __ovld __conv work_group_scan_inclusive_add(uint);
16205uint __ovld __conv work_group_scan_inclusive_min(uint);
16206uint __ovld __conv work_group_scan_inclusive_max(uint);
16207long __ovld __conv work_group_reduce_add(long);
16208long __ovld __conv work_group_reduce_min(long);
16209long __ovld __conv work_group_reduce_max(long);
16210long __ovld __conv work_group_scan_exclusive_add(long);
16211long __ovld __conv work_group_scan_exclusive_min(long);
16212long __ovld __conv work_group_scan_exclusive_max(long);
16213long __ovld __conv work_group_scan_inclusive_add(long);
16214long __ovld __conv work_group_scan_inclusive_min(long);
16215long __ovld __conv work_group_scan_inclusive_max(long);
16216ulong __ovld __conv work_group_reduce_add(ulong);
16217ulong __ovld __conv work_group_reduce_min(ulong);
16218ulong __ovld __conv work_group_reduce_max(ulong);
16219ulong __ovld __conv work_group_scan_exclusive_add(ulong);
16220ulong __ovld __conv work_group_scan_exclusive_min(ulong);
16221ulong __ovld __conv work_group_scan_exclusive_max(ulong);
16222ulong __ovld __conv work_group_scan_inclusive_add(ulong);
16223ulong __ovld __conv work_group_scan_inclusive_min(ulong);
16224ulong __ovld __conv work_group_scan_inclusive_max(ulong);
16225float __ovld __conv work_group_reduce_add(float);
16226float __ovld __conv work_group_reduce_min(float);
16227float __ovld __conv work_group_reduce_max(float);
16228float __ovld __conv work_group_scan_exclusive_add(float);
16229float __ovld __conv work_group_scan_exclusive_min(float);
16230float __ovld __conv work_group_scan_exclusive_max(float);
16231float __ovld __conv work_group_scan_inclusive_add(float);
16232float __ovld __conv work_group_scan_inclusive_min(float);
16233float __ovld __conv work_group_scan_inclusive_max(float);
16234#ifdef cl_khr_fp64
16235double __ovld __conv work_group_reduce_add(double);
16236double __ovld __conv work_group_reduce_min(double);
16237double __ovld __conv work_group_reduce_max(double);
16238double __ovld __conv work_group_scan_exclusive_add(double);
16239double __ovld __conv work_group_scan_exclusive_min(double);
16240double __ovld __conv work_group_scan_exclusive_max(double);
16241double __ovld __conv work_group_scan_inclusive_add(double);
16242double __ovld __conv work_group_scan_inclusive_min(double);
16243double __ovld __conv work_group_scan_inclusive_max(double);
16244#endif //cl_khr_fp64
16245
16246#endif //defined(__opencl_c_work_group_collective_functions)
16247
16248// OpenCL v2.0 s6.13.16 - Pipe Functions
16249#if defined(__opencl_c_pipes)
16250bool __ovld is_valid_reserve_id(reserve_id_t reserve_id);
16251#endif //defined(__opencl_c_pipes)
16252
16253
16254// OpenCL v2.0 s6.13.17 - Enqueue Kernels
16255#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
16256
16257#ifdef __opencl_c_device_enqueue
16258ndrange_t __ovld ndrange_1D(size_t);
16259ndrange_t __ovld ndrange_1D(size_t, size_t);
16260ndrange_t __ovld ndrange_1D(size_t, size_t, size_t);
16261
16262ndrange_t __ovld ndrange_2D(const size_t[2]);
16263ndrange_t __ovld ndrange_2D(const size_t[2], const size_t[2]);
16264ndrange_t __ovld ndrange_2D(const size_t[2], const size_t[2], const size_t[2]);
16265
16266ndrange_t __ovld ndrange_3D(const size_t[3]);
16267ndrange_t __ovld ndrange_3D(const size_t[3], const size_t[3]);
16268ndrange_t __ovld ndrange_3D(const size_t[3], const size_t[3], const size_t[3]);
16269
16270int __ovld enqueue_marker(queue_t, uint, const clk_event_t*, clk_event_t*);
16271
16272void __ovld retain_event(clk_event_t);
16273
16274void __ovld release_event(clk_event_t);
16275
16276clk_event_t __ovld create_user_event(void);
16277
16278void __ovld set_user_event_status(clk_event_t e, int state);
16279
16280bool __ovld is_valid_event (clk_event_t event);
16281
16282void __ovld capture_event_profiling_info(clk_event_t, clk_profiling_info, __global void*);
16283
16284queue_t __ovld get_default_queue(void);
16285#endif //__opencl_c_device_enqueue
16286#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
16287
16288// OpenCL Extension v2.0 s9.17 - Sub-groups
16289
16290#if defined(__opencl_subgroup_builtins)
16291// Shared Sub Group Functions
16292uint __ovld get_sub_group_size(void);
16293uint __ovld get_max_sub_group_size(void);
16294uint __ovld get_num_sub_groups(void);
16295#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
16296uint __ovld get_enqueued_num_sub_groups(void);
16297#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
16298uint __ovld get_sub_group_id(void);
16299uint __ovld get_sub_group_local_id(void);
16300
16301void __ovld __conv sub_group_barrier(cl_mem_fence_flags);
16302#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
16303void __ovld __conv sub_group_barrier(cl_mem_fence_flags, memory_scope);
16304#endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
16305
16306int __ovld __conv sub_group_all(int predicate);
16307int __ovld __conv sub_group_any(int predicate);
16308
16309int __ovld __conv sub_group_broadcast(int , uint sub_group_local_id);
16310uint __ovld __conv sub_group_broadcast(uint , uint sub_group_local_id);
16311long __ovld __conv sub_group_broadcast(long , uint sub_group_local_id);
16312ulong __ovld __conv sub_group_broadcast(ulong, uint sub_group_local_id);
16313float __ovld __conv sub_group_broadcast(float, uint sub_group_local_id);
16314
16315int __ovld __conv sub_group_reduce_add(int );
16316uint __ovld __conv sub_group_reduce_add(uint );
16317long __ovld __conv sub_group_reduce_add(long );
16318ulong __ovld __conv sub_group_reduce_add(ulong);
16319float __ovld __conv sub_group_reduce_add(float);
16320int __ovld __conv sub_group_reduce_min(int );
16321uint __ovld __conv sub_group_reduce_min(uint );
16322long __ovld __conv sub_group_reduce_min(long );
16323ulong __ovld __conv sub_group_reduce_min(ulong);
16324float __ovld __conv sub_group_reduce_min(float);
16325int __ovld __conv sub_group_reduce_max(int );
16326uint __ovld __conv sub_group_reduce_max(uint );
16327long __ovld __conv sub_group_reduce_max(long );
16328ulong __ovld __conv sub_group_reduce_max(ulong);
16329float __ovld __conv sub_group_reduce_max(float);
16330
16331int __ovld __conv sub_group_scan_exclusive_add(int );
16332uint __ovld __conv sub_group_scan_exclusive_add(uint );
16333long __ovld __conv sub_group_scan_exclusive_add(long );
16334ulong __ovld __conv sub_group_scan_exclusive_add(ulong);
16335float __ovld __conv sub_group_scan_exclusive_add(float);
16336int __ovld __conv sub_group_scan_exclusive_min(int );
16337uint __ovld __conv sub_group_scan_exclusive_min(uint );
16338long __ovld __conv sub_group_scan_exclusive_min(long );
16339ulong __ovld __conv sub_group_scan_exclusive_min(ulong);
16340float __ovld __conv sub_group_scan_exclusive_min(float);
16341int __ovld __conv sub_group_scan_exclusive_max(int );
16342uint __ovld __conv sub_group_scan_exclusive_max(uint );
16343long __ovld __conv sub_group_scan_exclusive_max(long );
16344ulong __ovld __conv sub_group_scan_exclusive_max(ulong);
16345float __ovld __conv sub_group_scan_exclusive_max(float);
16346
16347int __ovld __conv sub_group_scan_inclusive_add(int );
16348uint __ovld __conv sub_group_scan_inclusive_add(uint );
16349long __ovld __conv sub_group_scan_inclusive_add(long );
16350ulong __ovld __conv sub_group_scan_inclusive_add(ulong);
16351float __ovld __conv sub_group_scan_inclusive_add(float);
16352int __ovld __conv sub_group_scan_inclusive_min(int );
16353uint __ovld __conv sub_group_scan_inclusive_min(uint );
16354long __ovld __conv sub_group_scan_inclusive_min(long );
16355ulong __ovld __conv sub_group_scan_inclusive_min(ulong);
16356float __ovld __conv sub_group_scan_inclusive_min(float);
16357int __ovld __conv sub_group_scan_inclusive_max(int );
16358uint __ovld __conv sub_group_scan_inclusive_max(uint );
16359long __ovld __conv sub_group_scan_inclusive_max(long );
16360ulong __ovld __conv sub_group_scan_inclusive_max(ulong);
16361float __ovld __conv sub_group_scan_inclusive_max(float);
16362
16363#ifdef cl_khr_fp16
16364half __ovld __conv sub_group_broadcast(half, uint sub_group_local_id);
16365half __ovld __conv sub_group_reduce_add(half);
16366half __ovld __conv sub_group_reduce_min(half);
16367half __ovld __conv sub_group_reduce_max(half);
16368half __ovld __conv sub_group_scan_exclusive_add(half);
16369half __ovld __conv sub_group_scan_exclusive_min(half);
16370half __ovld __conv sub_group_scan_exclusive_max(half);
16371half __ovld __conv sub_group_scan_inclusive_add(half);
16372half __ovld __conv sub_group_scan_inclusive_min(half);
16373half __ovld __conv sub_group_scan_inclusive_max(half);
16374#endif //cl_khr_fp16
16375
16376#ifdef cl_khr_fp64
16377double __ovld __conv sub_group_broadcast(double, uint sub_group_local_id);
16378double __ovld __conv sub_group_reduce_add(double);
16379double __ovld __conv sub_group_reduce_min(double);
16380double __ovld __conv sub_group_reduce_max(double);
16381double __ovld __conv sub_group_scan_exclusive_add(double);
16382double __ovld __conv sub_group_scan_exclusive_min(double);
16383double __ovld __conv sub_group_scan_exclusive_max(double);
16384double __ovld __conv sub_group_scan_inclusive_add(double);
16385double __ovld __conv sub_group_scan_inclusive_min(double);
16386double __ovld __conv sub_group_scan_inclusive_max(double);
16387#endif //cl_khr_fp64
16388
16389#endif // __opencl_subgroup_builtins
16390
16391#if defined(cl_khr_subgroup_extended_types)
16392char __ovld __conv sub_group_broadcast( char value, uint index );
16393char2 __ovld __conv sub_group_broadcast( char2 value, uint index );
16394char3 __ovld __conv sub_group_broadcast( char3 value, uint index );
16395char4 __ovld __conv sub_group_broadcast( char4 value, uint index );
16396char8 __ovld __conv sub_group_broadcast( char8 value, uint index );
16397char16 __ovld __conv sub_group_broadcast( char16 value, uint index );
16398
16399uchar __ovld __conv sub_group_broadcast( uchar value, uint index );
16400uchar2 __ovld __conv sub_group_broadcast( uchar2 value, uint index );
16401uchar3 __ovld __conv sub_group_broadcast( uchar3 value, uint index );
16402uchar4 __ovld __conv sub_group_broadcast( uchar4 value, uint index );
16403uchar8 __ovld __conv sub_group_broadcast( uchar8 value, uint index );
16404uchar16 __ovld __conv sub_group_broadcast( uchar16 value, uint index );
16405
16406short __ovld __conv sub_group_broadcast( short value, uint index );
16407short2 __ovld __conv sub_group_broadcast( short2 value, uint index );
16408short3 __ovld __conv sub_group_broadcast( short3 value, uint index );
16409short4 __ovld __conv sub_group_broadcast( short4 value, uint index );
16410short8 __ovld __conv sub_group_broadcast( short8 value, uint index );
16411short16 __ovld __conv sub_group_broadcast( short16 value, uint index );
16412
16413ushort __ovld __conv sub_group_broadcast( ushort value, uint index );
16414ushort2 __ovld __conv sub_group_broadcast( ushort2 value, uint index );
16415ushort3 __ovld __conv sub_group_broadcast( ushort3 value, uint index );
16416ushort4 __ovld __conv sub_group_broadcast( ushort4 value, uint index );
16417ushort8 __ovld __conv sub_group_broadcast( ushort8 value, uint index );
16418ushort16 __ovld __conv sub_group_broadcast( ushort16 value, uint index );
16419
16420// scalar int broadcast is part of cl_khr_subgroups
16421int2 __ovld __conv sub_group_broadcast( int2 value, uint index );
16422int3 __ovld __conv sub_group_broadcast( int3 value, uint index );
16423int4 __ovld __conv sub_group_broadcast( int4 value, uint index );
16424int8 __ovld __conv sub_group_broadcast( int8 value, uint index );
16425int16 __ovld __conv sub_group_broadcast( int16 value, uint index );
16426
16427// scalar uint broadcast is part of cl_khr_subgroups
16428uint2 __ovld __conv sub_group_broadcast( uint2 value, uint index );
16429uint3 __ovld __conv sub_group_broadcast( uint3 value, uint index );
16430uint4 __ovld __conv sub_group_broadcast( uint4 value, uint index );
16431uint8 __ovld __conv sub_group_broadcast( uint8 value, uint index );
16432uint16 __ovld __conv sub_group_broadcast( uint16 value, uint index );
16433
16434// scalar long broadcast is part of cl_khr_subgroups
16435long2 __ovld __conv sub_group_broadcast( long2 value, uint index );
16436long3 __ovld __conv sub_group_broadcast( long3 value, uint index );
16437long4 __ovld __conv sub_group_broadcast( long4 value, uint index );
16438long8 __ovld __conv sub_group_broadcast( long8 value, uint index );
16439long16 __ovld __conv sub_group_broadcast( long16 value, uint index );
16440
16441// scalar ulong broadcast is part of cl_khr_subgroups
16442ulong2 __ovld __conv sub_group_broadcast( ulong2 value, uint index );
16443ulong3 __ovld __conv sub_group_broadcast( ulong3 value, uint index );
16444ulong4 __ovld __conv sub_group_broadcast( ulong4 value, uint index );
16445ulong8 __ovld __conv sub_group_broadcast( ulong8 value, uint index );
16446ulong16 __ovld __conv sub_group_broadcast( ulong16 value, uint index );
16447
16448// scalar float broadcast is part of cl_khr_subgroups
16449float2 __ovld __conv sub_group_broadcast( float2 value, uint index );
16450float3 __ovld __conv sub_group_broadcast( float3 value, uint index );
16451float4 __ovld __conv sub_group_broadcast( float4 value, uint index );
16452float8 __ovld __conv sub_group_broadcast( float8 value, uint index );
16453float16 __ovld __conv sub_group_broadcast( float16 value, uint index );
16454
16455char __ovld __conv sub_group_reduce_add( char value );
16456uchar __ovld __conv sub_group_reduce_add( uchar value );
16457short __ovld __conv sub_group_reduce_add( short value );
16458ushort __ovld __conv sub_group_reduce_add( ushort value );
16459
16460char __ovld __conv sub_group_reduce_min( char value );
16461uchar __ovld __conv sub_group_reduce_min( uchar value );
16462short __ovld __conv sub_group_reduce_min( short value );
16463ushort __ovld __conv sub_group_reduce_min( ushort value );
16464
16465char __ovld __conv sub_group_reduce_max( char value );
16466uchar __ovld __conv sub_group_reduce_max( uchar value );
16467short __ovld __conv sub_group_reduce_max( short value );
16468ushort __ovld __conv sub_group_reduce_max( ushort value );
16469
16470char __ovld __conv sub_group_scan_inclusive_add( char value );
16471uchar __ovld __conv sub_group_scan_inclusive_add( uchar value );
16472short __ovld __conv sub_group_scan_inclusive_add( short value );
16473ushort __ovld __conv sub_group_scan_inclusive_add( ushort value );
16474
16475char __ovld __conv sub_group_scan_inclusive_min( char value );
16476uchar __ovld __conv sub_group_scan_inclusive_min( uchar value );
16477short __ovld __conv sub_group_scan_inclusive_min( short value );
16478ushort __ovld __conv sub_group_scan_inclusive_min( ushort value );
16479
16480char __ovld __conv sub_group_scan_inclusive_max( char value );
16481uchar __ovld __conv sub_group_scan_inclusive_max( uchar value );
16482short __ovld __conv sub_group_scan_inclusive_max( short value );
16483ushort __ovld __conv sub_group_scan_inclusive_max( ushort value );
16484
16485char __ovld __conv sub_group_scan_exclusive_add( char value );
16486uchar __ovld __conv sub_group_scan_exclusive_add( uchar value );
16487short __ovld __conv sub_group_scan_exclusive_add( short value );
16488ushort __ovld __conv sub_group_scan_exclusive_add( ushort value );
16489
16490char __ovld __conv sub_group_scan_exclusive_min( char value );
16491uchar __ovld __conv sub_group_scan_exclusive_min( uchar value );
16492short __ovld __conv sub_group_scan_exclusive_min( short value );
16493ushort __ovld __conv sub_group_scan_exclusive_min( ushort value );
16494
16495char __ovld __conv sub_group_scan_exclusive_max( char value );
16496uchar __ovld __conv sub_group_scan_exclusive_max( uchar value );
16497short __ovld __conv sub_group_scan_exclusive_max( short value );
16498ushort __ovld __conv sub_group_scan_exclusive_max( ushort value );
16499
16500#if defined(cl_khr_fp16)
16501// scalar half broadcast is part of cl_khr_subgroups
16502half2 __ovld __conv sub_group_broadcast( half2 value, uint index );
16503half3 __ovld __conv sub_group_broadcast( half3 value, uint index );
16504half4 __ovld __conv sub_group_broadcast( half4 value, uint index );
16505half8 __ovld __conv sub_group_broadcast( half8 value, uint index );
16506half16 __ovld __conv sub_group_broadcast( half16 value, uint index );
16507#endif // cl_khr_fp16
16508
16509#if defined(cl_khr_fp64)
16510// scalar double broadcast is part of cl_khr_subgroups
16511double2 __ovld __conv sub_group_broadcast( double2 value, uint index );
16512double3 __ovld __conv sub_group_broadcast( double3 value, uint index );
16513double4 __ovld __conv sub_group_broadcast( double4 value, uint index );
16514double8 __ovld __conv sub_group_broadcast( double8 value, uint index );
16515double16 __ovld __conv sub_group_broadcast( double16 value, uint index );
16516#endif // cl_khr_fp64
16517
16518#endif // cl_khr_subgroup_extended_types
16519
16520#if defined(cl_khr_subgroup_non_uniform_vote)
16521int __ovld sub_group_elect(void);
16522int __ovld sub_group_non_uniform_all( int predicate );
16523int __ovld sub_group_non_uniform_any( int predicate );
16524
16525int __ovld sub_group_non_uniform_all_equal( char value );
16526int __ovld sub_group_non_uniform_all_equal( uchar value );
16527int __ovld sub_group_non_uniform_all_equal( short value );
16528int __ovld sub_group_non_uniform_all_equal( ushort value );
16529int __ovld sub_group_non_uniform_all_equal( int value );
16530int __ovld sub_group_non_uniform_all_equal( uint value );
16531int __ovld sub_group_non_uniform_all_equal( long value );
16532int __ovld sub_group_non_uniform_all_equal( ulong value );
16533int __ovld sub_group_non_uniform_all_equal( float value );
16534
16535#if defined(cl_khr_fp16)
16536int __ovld sub_group_non_uniform_all_equal( half value );
16537#endif // cl_khr_fp16
16538
16539#if defined(cl_khr_fp64)
16540int __ovld sub_group_non_uniform_all_equal( double value );
16541#endif // cl_khr_fp64
16542
16543#endif // cl_khr_subgroup_non_uniform_vote
16544
16545#if defined(cl_khr_subgroup_ballot)
16546char __ovld sub_group_non_uniform_broadcast( char value, uint index );
16547char2 __ovld sub_group_non_uniform_broadcast( char2 value, uint index );
16548char3 __ovld sub_group_non_uniform_broadcast( char3 value, uint index );
16549char4 __ovld sub_group_non_uniform_broadcast( char4 value, uint index );
16550char8 __ovld sub_group_non_uniform_broadcast( char8 value, uint index );
16551char16 __ovld sub_group_non_uniform_broadcast( char16 value, uint index );
16552
16553uchar __ovld sub_group_non_uniform_broadcast( uchar value, uint index );
16554uchar2 __ovld sub_group_non_uniform_broadcast( uchar2 value, uint index );
16555uchar3 __ovld sub_group_non_uniform_broadcast( uchar3 value, uint index );
16556uchar4 __ovld sub_group_non_uniform_broadcast( uchar4 value, uint index );
16557uchar8 __ovld sub_group_non_uniform_broadcast( uchar8 value, uint index );
16558uchar16 __ovld sub_group_non_uniform_broadcast( uchar16 value, uint index );
16559
16560short __ovld sub_group_non_uniform_broadcast( short value, uint index );
16561short2 __ovld sub_group_non_uniform_broadcast( short2 value, uint index );
16562short3 __ovld sub_group_non_uniform_broadcast( short3 value, uint index );
16563short4 __ovld sub_group_non_uniform_broadcast( short4 value, uint index );
16564short8 __ovld sub_group_non_uniform_broadcast( short8 value, uint index );
16565short16 __ovld sub_group_non_uniform_broadcast( short16 value, uint index );
16566
16567ushort __ovld sub_group_non_uniform_broadcast( ushort value, uint index );
16568ushort2 __ovld sub_group_non_uniform_broadcast( ushort2 value, uint index );
16569ushort3 __ovld sub_group_non_uniform_broadcast( ushort3 value, uint index );
16570ushort4 __ovld sub_group_non_uniform_broadcast( ushort4 value, uint index );
16571ushort8 __ovld sub_group_non_uniform_broadcast( ushort8 value, uint index );
16572ushort16 __ovld sub_group_non_uniform_broadcast( ushort16 value, uint index );
16573
16574int __ovld sub_group_non_uniform_broadcast( int value, uint index );
16575int2 __ovld sub_group_non_uniform_broadcast( int2 value, uint index );
16576int3 __ovld sub_group_non_uniform_broadcast( int3 value, uint index );
16577int4 __ovld sub_group_non_uniform_broadcast( int4 value, uint index );
16578int8 __ovld sub_group_non_uniform_broadcast( int8 value, uint index );
16579int16 __ovld sub_group_non_uniform_broadcast( int16 value, uint index );
16580
16581uint __ovld sub_group_non_uniform_broadcast( uint value, uint index );
16582uint2 __ovld sub_group_non_uniform_broadcast( uint2 value, uint index );
16583uint3 __ovld sub_group_non_uniform_broadcast( uint3 value, uint index );
16584uint4 __ovld sub_group_non_uniform_broadcast( uint4 value, uint index );
16585uint8 __ovld sub_group_non_uniform_broadcast( uint8 value, uint index );
16586uint16 __ovld sub_group_non_uniform_broadcast( uint16 value, uint index );
16587
16588long __ovld sub_group_non_uniform_broadcast( long value, uint index );
16589long2 __ovld sub_group_non_uniform_broadcast( long2 value, uint index );
16590long3 __ovld sub_group_non_uniform_broadcast( long3 value, uint index );
16591long4 __ovld sub_group_non_uniform_broadcast( long4 value, uint index );
16592long8 __ovld sub_group_non_uniform_broadcast( long8 value, uint index );
16593long16 __ovld sub_group_non_uniform_broadcast( long16 value, uint index );
16594
16595ulong __ovld sub_group_non_uniform_broadcast( ulong value, uint index );
16596ulong2 __ovld sub_group_non_uniform_broadcast( ulong2 value, uint index );
16597ulong3 __ovld sub_group_non_uniform_broadcast( ulong3 value, uint index );
16598ulong4 __ovld sub_group_non_uniform_broadcast( ulong4 value, uint index );
16599ulong8 __ovld sub_group_non_uniform_broadcast( ulong8 value, uint index );
16600ulong16 __ovld sub_group_non_uniform_broadcast( ulong16 value, uint index );
16601
16602float __ovld sub_group_non_uniform_broadcast( float value, uint index );
16603float2 __ovld sub_group_non_uniform_broadcast( float2 value, uint index );
16604float3 __ovld sub_group_non_uniform_broadcast( float3 value, uint index );
16605float4 __ovld sub_group_non_uniform_broadcast( float4 value, uint index );
16606float8 __ovld sub_group_non_uniform_broadcast( float8 value, uint index );
16607float16 __ovld sub_group_non_uniform_broadcast( float16 value, uint index );
16608
16609char __ovld sub_group_broadcast_first( char value );
16610uchar __ovld sub_group_broadcast_first( uchar value );
16611short __ovld sub_group_broadcast_first( short value );
16612ushort __ovld sub_group_broadcast_first( ushort value );
16613int __ovld sub_group_broadcast_first( int value );
16614uint __ovld sub_group_broadcast_first( uint value );
16615long __ovld sub_group_broadcast_first( long value );
16616ulong __ovld sub_group_broadcast_first( ulong value );
16617float __ovld sub_group_broadcast_first( float value );
16618
16619uint4 __ovld sub_group_ballot( int predicate );
16620int __ovld __cnfn sub_group_inverse_ballot( uint4 value );
16621int __ovld __cnfn sub_group_ballot_bit_extract( uint4 value, uint index );
16622uint __ovld __cnfn sub_group_ballot_bit_count( uint4 value );
16623
16624uint __ovld sub_group_ballot_inclusive_scan( uint4 value );
16625uint __ovld sub_group_ballot_exclusive_scan( uint4 value );
16626uint __ovld sub_group_ballot_find_lsb( uint4 value );
16627uint __ovld sub_group_ballot_find_msb( uint4 value );
16628
16629uint4 __ovld __cnfn get_sub_group_eq_mask(void);
16630uint4 __ovld __cnfn get_sub_group_ge_mask(void);
16631uint4 __ovld __cnfn get_sub_group_gt_mask(void);
16632uint4 __ovld __cnfn get_sub_group_le_mask(void);
16633uint4 __ovld __cnfn get_sub_group_lt_mask(void);
16634
16635#if defined(cl_khr_fp16)
16636half __ovld sub_group_non_uniform_broadcast( half value, uint index );
16637half2 __ovld sub_group_non_uniform_broadcast( half2 value, uint index );
16638half3 __ovld sub_group_non_uniform_broadcast( half3 value, uint index );
16639half4 __ovld sub_group_non_uniform_broadcast( half4 value, uint index );
16640half8 __ovld sub_group_non_uniform_broadcast( half8 value, uint index );
16641half16 __ovld sub_group_non_uniform_broadcast( half16 value, uint index );
16642
16643half __ovld sub_group_broadcast_first( half value );
16644#endif // cl_khr_fp16
16645
16646#if defined(cl_khr_fp64)
16647double __ovld sub_group_non_uniform_broadcast( double value, uint index );
16648double2 __ovld sub_group_non_uniform_broadcast( double2 value, uint index );
16649double3 __ovld sub_group_non_uniform_broadcast( double3 value, uint index );
16650double4 __ovld sub_group_non_uniform_broadcast( double4 value, uint index );
16651double8 __ovld sub_group_non_uniform_broadcast( double8 value, uint index );
16652double16 __ovld sub_group_non_uniform_broadcast( double16 value, uint index );
16653
16654double __ovld sub_group_broadcast_first( double value );
16655#endif // cl_khr_fp64
16656
16657#endif // cl_khr_subgroup_ballot
16658
16659#if defined(cl_khr_subgroup_non_uniform_arithmetic)
16660char __ovld sub_group_non_uniform_reduce_add( char value );
16661uchar __ovld sub_group_non_uniform_reduce_add( uchar value );
16662short __ovld sub_group_non_uniform_reduce_add( short value );
16663ushort __ovld sub_group_non_uniform_reduce_add( ushort value );
16664int __ovld sub_group_non_uniform_reduce_add( int value );
16665uint __ovld sub_group_non_uniform_reduce_add( uint value );
16666long __ovld sub_group_non_uniform_reduce_add( long value );
16667ulong __ovld sub_group_non_uniform_reduce_add( ulong value );
16668float __ovld sub_group_non_uniform_reduce_add( float value );
16669
16670char __ovld sub_group_non_uniform_reduce_mul( char value );
16671uchar __ovld sub_group_non_uniform_reduce_mul( uchar value );
16672short __ovld sub_group_non_uniform_reduce_mul( short value );
16673ushort __ovld sub_group_non_uniform_reduce_mul( ushort value );
16674int __ovld sub_group_non_uniform_reduce_mul( int value );
16675uint __ovld sub_group_non_uniform_reduce_mul( uint value );
16676long __ovld sub_group_non_uniform_reduce_mul( long value );
16677ulong __ovld sub_group_non_uniform_reduce_mul( ulong value );
16678float __ovld sub_group_non_uniform_reduce_mul( float value );
16679
16680char __ovld sub_group_non_uniform_reduce_min( char value );
16681uchar __ovld sub_group_non_uniform_reduce_min( uchar value );
16682short __ovld sub_group_non_uniform_reduce_min( short value );
16683ushort __ovld sub_group_non_uniform_reduce_min( ushort value );
16684int __ovld sub_group_non_uniform_reduce_min( int value );
16685uint __ovld sub_group_non_uniform_reduce_min( uint value );
16686long __ovld sub_group_non_uniform_reduce_min( long value );
16687ulong __ovld sub_group_non_uniform_reduce_min( ulong value );
16688float __ovld sub_group_non_uniform_reduce_min( float value );
16689
16690char __ovld sub_group_non_uniform_reduce_max( char value );
16691uchar __ovld sub_group_non_uniform_reduce_max( uchar value );
16692short __ovld sub_group_non_uniform_reduce_max( short value );
16693ushort __ovld sub_group_non_uniform_reduce_max( ushort value );
16694int __ovld sub_group_non_uniform_reduce_max( int value );
16695uint __ovld sub_group_non_uniform_reduce_max( uint value );
16696long __ovld sub_group_non_uniform_reduce_max( long value );
16697ulong __ovld sub_group_non_uniform_reduce_max( ulong value );
16698float __ovld sub_group_non_uniform_reduce_max( float value );
16699
16700char __ovld sub_group_non_uniform_scan_inclusive_add( char value );
16701uchar __ovld sub_group_non_uniform_scan_inclusive_add( uchar value );
16702short __ovld sub_group_non_uniform_scan_inclusive_add( short value );
16703ushort __ovld sub_group_non_uniform_scan_inclusive_add( ushort value );
16704int __ovld sub_group_non_uniform_scan_inclusive_add( int value );
16705uint __ovld sub_group_non_uniform_scan_inclusive_add( uint value );
16706long __ovld sub_group_non_uniform_scan_inclusive_add( long value );
16707ulong __ovld sub_group_non_uniform_scan_inclusive_add( ulong value );
16708float __ovld sub_group_non_uniform_scan_inclusive_add( float value );
16709
16710char __ovld sub_group_non_uniform_scan_inclusive_mul( char value );
16711uchar __ovld sub_group_non_uniform_scan_inclusive_mul( uchar value );
16712short __ovld sub_group_non_uniform_scan_inclusive_mul( short value );
16713ushort __ovld sub_group_non_uniform_scan_inclusive_mul( ushort value );
16714int __ovld sub_group_non_uniform_scan_inclusive_mul( int value );
16715uint __ovld sub_group_non_uniform_scan_inclusive_mul( uint value );
16716long __ovld sub_group_non_uniform_scan_inclusive_mul( long value );
16717ulong __ovld sub_group_non_uniform_scan_inclusive_mul( ulong value );
16718float __ovld sub_group_non_uniform_scan_inclusive_mul( float value );
16719
16720char __ovld sub_group_non_uniform_scan_inclusive_min( char value );
16721uchar __ovld sub_group_non_uniform_scan_inclusive_min( uchar value );
16722short __ovld sub_group_non_uniform_scan_inclusive_min( short value );
16723ushort __ovld sub_group_non_uniform_scan_inclusive_min( ushort value );
16724int __ovld sub_group_non_uniform_scan_inclusive_min( int value );
16725uint __ovld sub_group_non_uniform_scan_inclusive_min( uint value );
16726long __ovld sub_group_non_uniform_scan_inclusive_min( long value );
16727ulong __ovld sub_group_non_uniform_scan_inclusive_min( ulong value );
16728float __ovld sub_group_non_uniform_scan_inclusive_min( float value );
16729
16730char __ovld sub_group_non_uniform_scan_inclusive_max( char value );
16731uchar __ovld sub_group_non_uniform_scan_inclusive_max( uchar value );
16732short __ovld sub_group_non_uniform_scan_inclusive_max( short value );
16733ushort __ovld sub_group_non_uniform_scan_inclusive_max( ushort value );
16734int __ovld sub_group_non_uniform_scan_inclusive_max( int value );
16735uint __ovld sub_group_non_uniform_scan_inclusive_max( uint value );
16736long __ovld sub_group_non_uniform_scan_inclusive_max( long value );
16737ulong __ovld sub_group_non_uniform_scan_inclusive_max( ulong value );
16738float __ovld sub_group_non_uniform_scan_inclusive_max( float value );
16739
16740char __ovld sub_group_non_uniform_scan_exclusive_add( char value );
16741uchar __ovld sub_group_non_uniform_scan_exclusive_add( uchar value );
16742short __ovld sub_group_non_uniform_scan_exclusive_add( short value );
16743ushort __ovld sub_group_non_uniform_scan_exclusive_add( ushort value );
16744int __ovld sub_group_non_uniform_scan_exclusive_add( int value );
16745uint __ovld sub_group_non_uniform_scan_exclusive_add( uint value );
16746long __ovld sub_group_non_uniform_scan_exclusive_add( long value );
16747ulong __ovld sub_group_non_uniform_scan_exclusive_add( ulong value );
16748float __ovld sub_group_non_uniform_scan_exclusive_add( float value );
16749
16750char __ovld sub_group_non_uniform_scan_exclusive_mul( char value );
16751uchar __ovld sub_group_non_uniform_scan_exclusive_mul( uchar value );
16752short __ovld sub_group_non_uniform_scan_exclusive_mul( short value );
16753ushort __ovld sub_group_non_uniform_scan_exclusive_mul( ushort value );
16754int __ovld sub_group_non_uniform_scan_exclusive_mul( int value );
16755uint __ovld sub_group_non_uniform_scan_exclusive_mul( uint value );
16756long __ovld sub_group_non_uniform_scan_exclusive_mul( long value );
16757ulong __ovld sub_group_non_uniform_scan_exclusive_mul( ulong value );
16758float __ovld sub_group_non_uniform_scan_exclusive_mul( float value );
16759
16760char __ovld sub_group_non_uniform_scan_exclusive_min( char value );
16761uchar __ovld sub_group_non_uniform_scan_exclusive_min( uchar value );
16762short __ovld sub_group_non_uniform_scan_exclusive_min( short value );
16763ushort __ovld sub_group_non_uniform_scan_exclusive_min( ushort value );
16764int __ovld sub_group_non_uniform_scan_exclusive_min( int value );
16765uint __ovld sub_group_non_uniform_scan_exclusive_min( uint value );
16766long __ovld sub_group_non_uniform_scan_exclusive_min( long value );
16767ulong __ovld sub_group_non_uniform_scan_exclusive_min( ulong value );
16768float __ovld sub_group_non_uniform_scan_exclusive_min( float value );
16769
16770char __ovld sub_group_non_uniform_scan_exclusive_max( char value );
16771uchar __ovld sub_group_non_uniform_scan_exclusive_max( uchar value );
16772short __ovld sub_group_non_uniform_scan_exclusive_max( short value );
16773ushort __ovld sub_group_non_uniform_scan_exclusive_max( ushort value );
16774int __ovld sub_group_non_uniform_scan_exclusive_max( int value );
16775uint __ovld sub_group_non_uniform_scan_exclusive_max( uint value );
16776long __ovld sub_group_non_uniform_scan_exclusive_max( long value );
16777ulong __ovld sub_group_non_uniform_scan_exclusive_max( ulong value );
16778float __ovld sub_group_non_uniform_scan_exclusive_max( float value );
16779
16780char __ovld sub_group_non_uniform_reduce_and( char value );
16781uchar __ovld sub_group_non_uniform_reduce_and( uchar value );
16782short __ovld sub_group_non_uniform_reduce_and( short value );
16783ushort __ovld sub_group_non_uniform_reduce_and( ushort value );
16784int __ovld sub_group_non_uniform_reduce_and( int value );
16785uint __ovld sub_group_non_uniform_reduce_and( uint value );
16786long __ovld sub_group_non_uniform_reduce_and( long value );
16787ulong __ovld sub_group_non_uniform_reduce_and( ulong value );
16788
16789char __ovld sub_group_non_uniform_reduce_or( char value );
16790uchar __ovld sub_group_non_uniform_reduce_or( uchar value );
16791short __ovld sub_group_non_uniform_reduce_or( short value );
16792ushort __ovld sub_group_non_uniform_reduce_or( ushort value );
16793int __ovld sub_group_non_uniform_reduce_or( int value );
16794uint __ovld sub_group_non_uniform_reduce_or( uint value );
16795long __ovld sub_group_non_uniform_reduce_or( long value );
16796ulong __ovld sub_group_non_uniform_reduce_or( ulong value );
16797
16798char __ovld sub_group_non_uniform_reduce_xor( char value );
16799uchar __ovld sub_group_non_uniform_reduce_xor( uchar value );
16800short __ovld sub_group_non_uniform_reduce_xor( short value );
16801ushort __ovld sub_group_non_uniform_reduce_xor( ushort value );
16802int __ovld sub_group_non_uniform_reduce_xor( int value );
16803uint __ovld sub_group_non_uniform_reduce_xor( uint value );
16804long __ovld sub_group_non_uniform_reduce_xor( long value );
16805ulong __ovld sub_group_non_uniform_reduce_xor( ulong value );
16806
16807char __ovld sub_group_non_uniform_scan_inclusive_and( char value );
16808uchar __ovld sub_group_non_uniform_scan_inclusive_and( uchar value );
16809short __ovld sub_group_non_uniform_scan_inclusive_and( short value );
16810ushort __ovld sub_group_non_uniform_scan_inclusive_and( ushort value );
16811int __ovld sub_group_non_uniform_scan_inclusive_and( int value );
16812uint __ovld sub_group_non_uniform_scan_inclusive_and( uint value );
16813long __ovld sub_group_non_uniform_scan_inclusive_and( long value );
16814ulong __ovld sub_group_non_uniform_scan_inclusive_and( ulong value );
16815
16816char __ovld sub_group_non_uniform_scan_inclusive_or( char value );
16817uchar __ovld sub_group_non_uniform_scan_inclusive_or( uchar value );
16818short __ovld sub_group_non_uniform_scan_inclusive_or( short value );
16819ushort __ovld sub_group_non_uniform_scan_inclusive_or( ushort value );
16820int __ovld sub_group_non_uniform_scan_inclusive_or( int value );
16821uint __ovld sub_group_non_uniform_scan_inclusive_or( uint value );
16822long __ovld sub_group_non_uniform_scan_inclusive_or( long value );
16823ulong __ovld sub_group_non_uniform_scan_inclusive_or( ulong value );
16824
16825char __ovld sub_group_non_uniform_scan_inclusive_xor( char value );
16826uchar __ovld sub_group_non_uniform_scan_inclusive_xor( uchar value );
16827short __ovld sub_group_non_uniform_scan_inclusive_xor( short value );
16828ushort __ovld sub_group_non_uniform_scan_inclusive_xor( ushort value );
16829int __ovld sub_group_non_uniform_scan_inclusive_xor( int value );
16830uint __ovld sub_group_non_uniform_scan_inclusive_xor( uint value );
16831long __ovld sub_group_non_uniform_scan_inclusive_xor( long value );
16832ulong __ovld sub_group_non_uniform_scan_inclusive_xor( ulong value );
16833
16834char __ovld sub_group_non_uniform_scan_exclusive_and( char value );
16835uchar __ovld sub_group_non_uniform_scan_exclusive_and( uchar value );
16836short __ovld sub_group_non_uniform_scan_exclusive_and( short value );
16837ushort __ovld sub_group_non_uniform_scan_exclusive_and( ushort value );
16838int __ovld sub_group_non_uniform_scan_exclusive_and( int value );
16839uint __ovld sub_group_non_uniform_scan_exclusive_and( uint value );
16840long __ovld sub_group_non_uniform_scan_exclusive_and( long value );
16841ulong __ovld sub_group_non_uniform_scan_exclusive_and( ulong value );
16842
16843char __ovld sub_group_non_uniform_scan_exclusive_or( char value );
16844uchar __ovld sub_group_non_uniform_scan_exclusive_or( uchar value );
16845short __ovld sub_group_non_uniform_scan_exclusive_or( short value );
16846ushort __ovld sub_group_non_uniform_scan_exclusive_or( ushort value );
16847int __ovld sub_group_non_uniform_scan_exclusive_or( int value );
16848uint __ovld sub_group_non_uniform_scan_exclusive_or( uint value );
16849long __ovld sub_group_non_uniform_scan_exclusive_or( long value );
16850ulong __ovld sub_group_non_uniform_scan_exclusive_or( ulong value );
16851
16852char __ovld sub_group_non_uniform_scan_exclusive_xor( char value );
16853uchar __ovld sub_group_non_uniform_scan_exclusive_xor( uchar value );
16854short __ovld sub_group_non_uniform_scan_exclusive_xor( short value );
16855ushort __ovld sub_group_non_uniform_scan_exclusive_xor( ushort value );
16856int __ovld sub_group_non_uniform_scan_exclusive_xor( int value );
16857uint __ovld sub_group_non_uniform_scan_exclusive_xor( uint value );
16858long __ovld sub_group_non_uniform_scan_exclusive_xor( long value );
16859ulong __ovld sub_group_non_uniform_scan_exclusive_xor( ulong value );
16860
16861int __ovld sub_group_non_uniform_reduce_logical_and( int predicate );
16862int __ovld sub_group_non_uniform_reduce_logical_or( int predicate );
16863int __ovld sub_group_non_uniform_reduce_logical_xor( int predicate );
16864
16865int __ovld sub_group_non_uniform_scan_inclusive_logical_and( int predicate );
16866int __ovld sub_group_non_uniform_scan_inclusive_logical_or( int predicate );
16867int __ovld sub_group_non_uniform_scan_inclusive_logical_xor( int predicate );
16868
16869int __ovld sub_group_non_uniform_scan_exclusive_logical_and( int predicate );
16870int __ovld sub_group_non_uniform_scan_exclusive_logical_or( int predicate );
16871int __ovld sub_group_non_uniform_scan_exclusive_logical_xor( int predicate );
16872
16873#if defined(cl_khr_fp16)
16874half __ovld sub_group_non_uniform_reduce_add( half value );
16875half __ovld sub_group_non_uniform_reduce_mul( half value );
16876half __ovld sub_group_non_uniform_reduce_min( half value );
16877half __ovld sub_group_non_uniform_reduce_max( half value );
16878half __ovld sub_group_non_uniform_scan_inclusive_add( half value );
16879half __ovld sub_group_non_uniform_scan_inclusive_mul( half value );
16880half __ovld sub_group_non_uniform_scan_inclusive_min( half value );
16881half __ovld sub_group_non_uniform_scan_inclusive_max( half value );
16882half __ovld sub_group_non_uniform_scan_exclusive_add( half value );
16883half __ovld sub_group_non_uniform_scan_exclusive_mul( half value );
16884half __ovld sub_group_non_uniform_scan_exclusive_min( half value );
16885half __ovld sub_group_non_uniform_scan_exclusive_max( half value );
16886#endif // cl_khr_fp16
16887
16888#if defined(cl_khr_fp64)
16889double __ovld sub_group_non_uniform_reduce_add( double value );
16890double __ovld sub_group_non_uniform_reduce_mul( double value );
16891double __ovld sub_group_non_uniform_reduce_min( double value );
16892double __ovld sub_group_non_uniform_reduce_max( double value );
16893double __ovld sub_group_non_uniform_scan_inclusive_add( double value );
16894double __ovld sub_group_non_uniform_scan_inclusive_mul( double value );
16895double __ovld sub_group_non_uniform_scan_inclusive_min( double value );
16896double __ovld sub_group_non_uniform_scan_inclusive_max( double value );
16897double __ovld sub_group_non_uniform_scan_exclusive_add( double value );
16898double __ovld sub_group_non_uniform_scan_exclusive_mul( double value );
16899double __ovld sub_group_non_uniform_scan_exclusive_min( double value );
16900double __ovld sub_group_non_uniform_scan_exclusive_max( double value );
16901#endif // cl_khr_fp64
16902
16903#endif // cl_khr_subgroup_non_uniform_arithmetic
16904
16905#if defined(cl_khr_subgroup_shuffle)
16906char __ovld sub_group_shuffle( char value, uint index );
16907uchar __ovld sub_group_shuffle( uchar value, uint index );
16908short __ovld sub_group_shuffle( short value, uint index );
16909ushort __ovld sub_group_shuffle( ushort value, uint index );
16910int __ovld sub_group_shuffle( int value, uint index );
16911uint __ovld sub_group_shuffle( uint value, uint index );
16912long __ovld sub_group_shuffle( long value, uint index );
16913ulong __ovld sub_group_shuffle( ulong value, uint index );
16914float __ovld sub_group_shuffle( float value, uint index );
16915
16916char __ovld sub_group_shuffle_xor( char value, uint mask );
16917uchar __ovld sub_group_shuffle_xor( uchar value, uint mask );
16918short __ovld sub_group_shuffle_xor( short value, uint mask );
16919ushort __ovld sub_group_shuffle_xor( ushort value, uint mask );
16920int __ovld sub_group_shuffle_xor( int value, uint mask );
16921uint __ovld sub_group_shuffle_xor( uint value, uint mask );
16922long __ovld sub_group_shuffle_xor( long value, uint mask );
16923ulong __ovld sub_group_shuffle_xor( ulong value, uint mask );
16924float __ovld sub_group_shuffle_xor( float value, uint mask );
16925
16926#if defined(cl_khr_fp16)
16927half __ovld sub_group_shuffle( half value, uint index );
16928half __ovld sub_group_shuffle_xor( half value, uint mask );
16929#endif // cl_khr_fp16
16930
16931#if defined(cl_khr_fp64)
16932double __ovld sub_group_shuffle( double value, uint index );
16933double __ovld sub_group_shuffle_xor( double value, uint mask );
16934#endif // cl_khr_fp64
16935
16936#endif // cl_khr_subgroup_shuffle
16937
16938#if defined(cl_khr_subgroup_shuffle_relative)
16939char __ovld sub_group_shuffle_up( char value, uint delta );
16940uchar __ovld sub_group_shuffle_up( uchar value, uint delta );
16941short __ovld sub_group_shuffle_up( short value, uint delta );
16942ushort __ovld sub_group_shuffle_up( ushort value, uint delta );
16943int __ovld sub_group_shuffle_up( int value, uint delta );
16944uint __ovld sub_group_shuffle_up( uint value, uint delta );
16945long __ovld sub_group_shuffle_up( long value, uint delta );
16946ulong __ovld sub_group_shuffle_up( ulong value, uint delta );
16947float __ovld sub_group_shuffle_up( float value, uint delta );
16948
16949char __ovld sub_group_shuffle_down( char value, uint delta );
16950uchar __ovld sub_group_shuffle_down( uchar value, uint delta );
16951short __ovld sub_group_shuffle_down( short value, uint delta );
16952ushort __ovld sub_group_shuffle_down( ushort value, uint delta );
16953int __ovld sub_group_shuffle_down( int value, uint delta );
16954uint __ovld sub_group_shuffle_down( uint value, uint delta );
16955long __ovld sub_group_shuffle_down( long value, uint delta );
16956ulong __ovld sub_group_shuffle_down( ulong value, uint delta );
16957float __ovld sub_group_shuffle_down( float value, uint delta );
16958
16959#if defined(cl_khr_fp16)
16960half __ovld sub_group_shuffle_up( half value, uint delta );
16961half __ovld sub_group_shuffle_down( half value, uint delta );
16962#endif // cl_khr_fp16
16963
16964#if defined(cl_khr_fp64)
16965double __ovld sub_group_shuffle_up( double value, uint delta );
16966double __ovld sub_group_shuffle_down( double value, uint delta );
16967#endif // cl_khr_fp64
16968
16969#endif // cl_khr_subgroup_shuffle_relative
16970
16971#if defined(cl_khr_subgroup_clustered_reduce)
16972char __ovld sub_group_clustered_reduce_add( char value, uint clustersize );
16973uchar __ovld sub_group_clustered_reduce_add( uchar value, uint clustersize );
16974short __ovld sub_group_clustered_reduce_add( short value, uint clustersize );
16975ushort __ovld sub_group_clustered_reduce_add( ushort value, uint clustersize );
16976int __ovld sub_group_clustered_reduce_add( int value, uint clustersize );
16977uint __ovld sub_group_clustered_reduce_add( uint value, uint clustersize );
16978long __ovld sub_group_clustered_reduce_add( long value, uint clustersize );
16979ulong __ovld sub_group_clustered_reduce_add( ulong value, uint clustersize );
16980float __ovld sub_group_clustered_reduce_add( float value, uint clustersize );
16981
16982char __ovld sub_group_clustered_reduce_mul( char value, uint clustersize );
16983uchar __ovld sub_group_clustered_reduce_mul( uchar value, uint clustersize );
16984short __ovld sub_group_clustered_reduce_mul( short value, uint clustersize );
16985ushort __ovld sub_group_clustered_reduce_mul( ushort value, uint clustersize );
16986int __ovld sub_group_clustered_reduce_mul( int value, uint clustersize );
16987uint __ovld sub_group_clustered_reduce_mul( uint value, uint clustersize );
16988long __ovld sub_group_clustered_reduce_mul( long value, uint clustersize );
16989ulong __ovld sub_group_clustered_reduce_mul( ulong value, uint clustersize );
16990float __ovld sub_group_clustered_reduce_mul( float value, uint clustersize );
16991
16992char __ovld sub_group_clustered_reduce_min( char value, uint clustersize );
16993uchar __ovld sub_group_clustered_reduce_min( uchar value, uint clustersize );
16994short __ovld sub_group_clustered_reduce_min( short value, uint clustersize );
16995ushort __ovld sub_group_clustered_reduce_min( ushort value, uint clustersize );
16996int __ovld sub_group_clustered_reduce_min( int value, uint clustersize );
16997uint __ovld sub_group_clustered_reduce_min( uint value, uint clustersize );
16998long __ovld sub_group_clustered_reduce_min( long value, uint clustersize );
16999ulong __ovld sub_group_clustered_reduce_min( ulong value, uint clustersize );
17000float __ovld sub_group_clustered_reduce_min( float value, uint clustersize );
17001
17002char __ovld sub_group_clustered_reduce_max( char value, uint clustersize );
17003uchar __ovld sub_group_clustered_reduce_max( uchar value, uint clustersize );
17004short __ovld sub_group_clustered_reduce_max( short value, uint clustersize );
17005ushort __ovld sub_group_clustered_reduce_max( ushort value, uint clustersize );
17006int __ovld sub_group_clustered_reduce_max( int value, uint clustersize );
17007uint __ovld sub_group_clustered_reduce_max( uint value, uint clustersize );
17008long __ovld sub_group_clustered_reduce_max( long value, uint clustersize );
17009ulong __ovld sub_group_clustered_reduce_max( ulong value, uint clustersize );
17010float __ovld sub_group_clustered_reduce_max( float value, uint clustersize );
17011
17012char __ovld sub_group_clustered_reduce_and( char value, uint clustersize );
17013uchar __ovld sub_group_clustered_reduce_and( uchar value, uint clustersize );
17014short __ovld sub_group_clustered_reduce_and( short value, uint clustersize );
17015ushort __ovld sub_group_clustered_reduce_and( ushort value, uint clustersize );
17016int __ovld sub_group_clustered_reduce_and( int value, uint clustersize );
17017uint __ovld sub_group_clustered_reduce_and( uint value, uint clustersize );
17018long __ovld sub_group_clustered_reduce_and( long value, uint clustersize );
17019ulong __ovld sub_group_clustered_reduce_and( ulong value, uint clustersize );
17020
17021char __ovld sub_group_clustered_reduce_or( char value, uint clustersize );
17022uchar __ovld sub_group_clustered_reduce_or( uchar value, uint clustersize );
17023short __ovld sub_group_clustered_reduce_or( short value, uint clustersize );
17024ushort __ovld sub_group_clustered_reduce_or( ushort value, uint clustersize );
17025int __ovld sub_group_clustered_reduce_or( int value, uint clustersize );
17026uint __ovld sub_group_clustered_reduce_or( uint value, uint clustersize );
17027long __ovld sub_group_clustered_reduce_or( long value, uint clustersize );
17028ulong __ovld sub_group_clustered_reduce_or( ulong value, uint clustersize );
17029
17030char __ovld sub_group_clustered_reduce_xor( char value, uint clustersize );
17031uchar __ovld sub_group_clustered_reduce_xor( uchar value, uint clustersize );
17032short __ovld sub_group_clustered_reduce_xor( short value, uint clustersize );
17033ushort __ovld sub_group_clustered_reduce_xor( ushort value, uint clustersize );
17034int __ovld sub_group_clustered_reduce_xor( int value, uint clustersize );
17035uint __ovld sub_group_clustered_reduce_xor( uint value, uint clustersize );
17036long __ovld sub_group_clustered_reduce_xor( long value, uint clustersize );
17037ulong __ovld sub_group_clustered_reduce_xor( ulong value, uint clustersize );
17038
17039int __ovld sub_group_clustered_reduce_logical_and( int predicate, uint clustersize );
17040int __ovld sub_group_clustered_reduce_logical_or( int predicate, uint clustersize );
17041int __ovld sub_group_clustered_reduce_logical_xor( int predicate, uint clustersize );
17042
17043#if defined(cl_khr_fp16)
17044half __ovld sub_group_clustered_reduce_add( half value, uint clustersize );
17045half __ovld sub_group_clustered_reduce_mul( half value, uint clustersize );
17046half __ovld sub_group_clustered_reduce_min( half value, uint clustersize );
17047half __ovld sub_group_clustered_reduce_max( half value, uint clustersize );
17048#endif // cl_khr_fp16
17049
17050#if defined(cl_khr_fp64)
17051double __ovld sub_group_clustered_reduce_add( double value, uint clustersize );
17052double __ovld sub_group_clustered_reduce_mul( double value, uint clustersize );
17053double __ovld sub_group_clustered_reduce_min( double value, uint clustersize );
17054double __ovld sub_group_clustered_reduce_max( double value, uint clustersize );
17055#endif // cl_khr_fp64
17056
17057#endif // cl_khr_subgroup_clustered_reduce
17058
17059#if defined(cl_khr_extended_bit_ops)
17060char __ovld __cnfn bitfield_insert(char, char, uint, uint);
17061uchar __ovld __cnfn bitfield_insert(uchar, uchar, uint, uint);
17062short __ovld __cnfn bitfield_insert(short, short, uint, uint);
17063ushort __ovld __cnfn bitfield_insert(ushort, ushort, uint, uint);
17064int __ovld __cnfn bitfield_insert(int, int, uint, uint);
17065uint __ovld __cnfn bitfield_insert(uint, uint, uint, uint);
17066long __ovld __cnfn bitfield_insert(long, long, uint, uint);
17067ulong __ovld __cnfn bitfield_insert(ulong, ulong, uint, uint);
17068char2 __ovld __cnfn bitfield_insert(char2, char2, uint, uint);
17069uchar2 __ovld __cnfn bitfield_insert(uchar2, uchar2, uint, uint);
17070short2 __ovld __cnfn bitfield_insert(short2, short2, uint, uint);
17071ushort2 __ovld __cnfn bitfield_insert(ushort2, ushort2, uint, uint);
17072int2 __ovld __cnfn bitfield_insert(int2, int2, uint, uint);
17073uint2 __ovld __cnfn bitfield_insert(uint2, uint2, uint, uint);
17074long2 __ovld __cnfn bitfield_insert(long2, long2, uint, uint);
17075ulong2 __ovld __cnfn bitfield_insert(ulong2, ulong2, uint, uint);
17076char3 __ovld __cnfn bitfield_insert(char3, char3, uint, uint);
17077uchar3 __ovld __cnfn bitfield_insert(uchar3, uchar3, uint, uint);
17078short3 __ovld __cnfn bitfield_insert(short3, short3, uint, uint);
17079ushort3 __ovld __cnfn bitfield_insert(ushort3, ushort3, uint, uint);
17080int3 __ovld __cnfn bitfield_insert(int3, int3, uint, uint);
17081uint3 __ovld __cnfn bitfield_insert(uint3, uint3, uint, uint);
17082long3 __ovld __cnfn bitfield_insert(long3, long3, uint, uint);
17083ulong3 __ovld __cnfn bitfield_insert(ulong3, ulong3, uint, uint);
17084char4 __ovld __cnfn bitfield_insert(char4, char4, uint, uint);
17085uchar4 __ovld __cnfn bitfield_insert(uchar4, uchar4, uint, uint);
17086short4 __ovld __cnfn bitfield_insert(short4, short4, uint, uint);
17087ushort4 __ovld __cnfn bitfield_insert(ushort4, ushort4, uint, uint);
17088int4 __ovld __cnfn bitfield_insert(int4, int4, uint, uint);
17089uint4 __ovld __cnfn bitfield_insert(uint4, uint4, uint, uint);
17090long4 __ovld __cnfn bitfield_insert(long4, long4, uint, uint);
17091ulong4 __ovld __cnfn bitfield_insert(ulong4, ulong4, uint, uint);
17092char8 __ovld __cnfn bitfield_insert(char8, char8, uint, uint);
17093uchar8 __ovld __cnfn bitfield_insert(uchar8, uchar8, uint, uint);
17094short8 __ovld __cnfn bitfield_insert(short8, short8, uint, uint);
17095ushort8 __ovld __cnfn bitfield_insert(ushort8, ushort8, uint, uint);
17096int8 __ovld __cnfn bitfield_insert(int8, int8, uint, uint);
17097uint8 __ovld __cnfn bitfield_insert(uint8, uint8, uint, uint);
17098long8 __ovld __cnfn bitfield_insert(long8, long8, uint, uint);
17099ulong8 __ovld __cnfn bitfield_insert(ulong8, ulong8, uint, uint);
17100char16 __ovld __cnfn bitfield_insert(char16, char16, uint, uint);
17101uchar16 __ovld __cnfn bitfield_insert(uchar16, uchar16, uint, uint);
17102short16 __ovld __cnfn bitfield_insert(short16, short16, uint, uint);
17103ushort16 __ovld __cnfn bitfield_insert(ushort16, ushort16, uint, uint);
17104int16 __ovld __cnfn bitfield_insert(int16, int16, uint, uint);
17105uint16 __ovld __cnfn bitfield_insert(uint16, uint16, uint, uint);
17106long16 __ovld __cnfn bitfield_insert(long16, long16, uint, uint);
17107ulong16 __ovld __cnfn bitfield_insert(ulong16, ulong16, uint, uint);
17108
17109char __ovld __cnfn bitfield_extract_signed(char, uint, uint);
17110short __ovld __cnfn bitfield_extract_signed(short, uint, uint);
17111int __ovld __cnfn bitfield_extract_signed(int, uint, uint);
17112long __ovld __cnfn bitfield_extract_signed(long, uint, uint);
17113char2 __ovld __cnfn bitfield_extract_signed(char2, uint, uint);
17114short2 __ovld __cnfn bitfield_extract_signed(short2, uint, uint);
17115int2 __ovld __cnfn bitfield_extract_signed(int2, uint, uint);
17116long2 __ovld __cnfn bitfield_extract_signed(long2, uint, uint);
17117char3 __ovld __cnfn bitfield_extract_signed(char3, uint, uint);
17118short3 __ovld __cnfn bitfield_extract_signed(short3, uint, uint);
17119int3 __ovld __cnfn bitfield_extract_signed(int3, uint, uint);
17120long3 __ovld __cnfn bitfield_extract_signed(long3, uint, uint);
17121char4 __ovld __cnfn bitfield_extract_signed(char4, uint, uint);
17122short4 __ovld __cnfn bitfield_extract_signed(short4, uint, uint);
17123int4 __ovld __cnfn bitfield_extract_signed(int4, uint, uint);
17124long4 __ovld __cnfn bitfield_extract_signed(long4, uint, uint);
17125char8 __ovld __cnfn bitfield_extract_signed(char8, uint, uint);
17126short8 __ovld __cnfn bitfield_extract_signed(short8, uint, uint);
17127int8 __ovld __cnfn bitfield_extract_signed(int8, uint, uint);
17128long8 __ovld __cnfn bitfield_extract_signed(long8, uint, uint);
17129char16 __ovld __cnfn bitfield_extract_signed(char16, uint, uint);
17130short16 __ovld __cnfn bitfield_extract_signed(short16, uint, uint);
17131int16 __ovld __cnfn bitfield_extract_signed(int16, uint, uint);
17132long16 __ovld __cnfn bitfield_extract_signed(long16, uint, uint);
17133
17134char __ovld __cnfn bitfield_extract_signed(uchar, uint, uint);
17135short __ovld __cnfn bitfield_extract_signed(ushort, uint, uint);
17136int __ovld __cnfn bitfield_extract_signed(uint, uint, uint);
17137long __ovld __cnfn bitfield_extract_signed(ulong, uint, uint);
17138char2 __ovld __cnfn bitfield_extract_signed(uchar2, uint, uint);
17139short2 __ovld __cnfn bitfield_extract_signed(ushort2, uint, uint);
17140int2 __ovld __cnfn bitfield_extract_signed(uint2, uint, uint);
17141long2 __ovld __cnfn bitfield_extract_signed(ulong2, uint, uint);
17142char3 __ovld __cnfn bitfield_extract_signed(uchar3, uint, uint);
17143short3 __ovld __cnfn bitfield_extract_signed(ushort3, uint, uint);
17144int3 __ovld __cnfn bitfield_extract_signed(uint3, uint, uint);
17145long3 __ovld __cnfn bitfield_extract_signed(ulong3, uint, uint);
17146char4 __ovld __cnfn bitfield_extract_signed(uchar4, uint, uint);
17147short4 __ovld __cnfn bitfield_extract_signed(ushort4, uint, uint);
17148int4 __ovld __cnfn bitfield_extract_signed(uint4, uint, uint);
17149long4 __ovld __cnfn bitfield_extract_signed(ulong4, uint, uint);
17150char8 __ovld __cnfn bitfield_extract_signed(uchar8, uint, uint);
17151short8 __ovld __cnfn bitfield_extract_signed(ushort8, uint, uint);
17152int8 __ovld __cnfn bitfield_extract_signed(uint8, uint, uint);
17153long8 __ovld __cnfn bitfield_extract_signed(ulong8, uint, uint);
17154char16 __ovld __cnfn bitfield_extract_signed(uchar16, uint, uint);
17155short16 __ovld __cnfn bitfield_extract_signed(ushort16, uint, uint);
17156int16 __ovld __cnfn bitfield_extract_signed(uint16, uint, uint);
17157long16 __ovld __cnfn bitfield_extract_signed(ulong16, uint, uint);
17158
17159uchar __ovld __cnfn bitfield_extract_unsigned(char, uint, uint);
17160ushort __ovld __cnfn bitfield_extract_unsigned(short, uint, uint);
17161uint __ovld __cnfn bitfield_extract_unsigned(int, uint, uint);
17162ulong __ovld __cnfn bitfield_extract_unsigned(long, uint, uint);
17163uchar2 __ovld __cnfn bitfield_extract_unsigned(char2, uint, uint);
17164ushort2 __ovld __cnfn bitfield_extract_unsigned(short2, uint, uint);
17165uint2 __ovld __cnfn bitfield_extract_unsigned(int2, uint, uint);
17166ulong2 __ovld __cnfn bitfield_extract_unsigned(long2, uint, uint);
17167uchar3 __ovld __cnfn bitfield_extract_unsigned(char3, uint, uint);
17168ushort3 __ovld __cnfn bitfield_extract_unsigned(short3, uint, uint);
17169uint3 __ovld __cnfn bitfield_extract_unsigned(int3, uint, uint);
17170ulong3 __ovld __cnfn bitfield_extract_unsigned(long3, uint, uint);
17171uchar4 __ovld __cnfn bitfield_extract_unsigned(char4, uint, uint);
17172ushort4 __ovld __cnfn bitfield_extract_unsigned(short4, uint, uint);
17173uint4 __ovld __cnfn bitfield_extract_unsigned(int4, uint, uint);
17174ulong4 __ovld __cnfn bitfield_extract_unsigned(long4, uint, uint);
17175uchar8 __ovld __cnfn bitfield_extract_unsigned(char8, uint, uint);
17176ushort8 __ovld __cnfn bitfield_extract_unsigned(short8, uint, uint);
17177uint8 __ovld __cnfn bitfield_extract_unsigned(int8, uint, uint);
17178ulong8 __ovld __cnfn bitfield_extract_unsigned(long8, uint, uint);
17179uchar16 __ovld __cnfn bitfield_extract_unsigned(char16, uint, uint);
17180ushort16 __ovld __cnfn bitfield_extract_unsigned(short16, uint, uint);
17181uint16 __ovld __cnfn bitfield_extract_unsigned(int16, uint, uint);
17182ulong16 __ovld __cnfn bitfield_extract_unsigned(long16, uint, uint);
17183
17184uchar __ovld __cnfn bitfield_extract_unsigned(uchar, uint, uint);
17185ushort __ovld __cnfn bitfield_extract_unsigned(ushort, uint, uint);
17186uint __ovld __cnfn bitfield_extract_unsigned(uint, uint, uint);
17187ulong __ovld __cnfn bitfield_extract_unsigned(ulong, uint, uint);
17188uchar2 __ovld __cnfn bitfield_extract_unsigned(uchar2, uint, uint);
17189ushort2 __ovld __cnfn bitfield_extract_unsigned(ushort2, uint, uint);
17190uint2 __ovld __cnfn bitfield_extract_unsigned(uint2, uint, uint);
17191ulong2 __ovld __cnfn bitfield_extract_unsigned(ulong2, uint, uint);
17192uchar3 __ovld __cnfn bitfield_extract_unsigned(uchar3, uint, uint);
17193ushort3 __ovld __cnfn bitfield_extract_unsigned(ushort3, uint, uint);
17194uint3 __ovld __cnfn bitfield_extract_unsigned(uint3, uint, uint);
17195ulong3 __ovld __cnfn bitfield_extract_unsigned(ulong3, uint, uint);
17196uchar4 __ovld __cnfn bitfield_extract_unsigned(uchar4, uint, uint);
17197ushort4 __ovld __cnfn bitfield_extract_unsigned(ushort4, uint, uint);
17198uint4 __ovld __cnfn bitfield_extract_unsigned(uint4, uint, uint);
17199ulong4 __ovld __cnfn bitfield_extract_unsigned(ulong4, uint, uint);
17200uchar8 __ovld __cnfn bitfield_extract_unsigned(uchar8, uint, uint);
17201ushort8 __ovld __cnfn bitfield_extract_unsigned(ushort8, uint, uint);
17202uint8 __ovld __cnfn bitfield_extract_unsigned(uint8, uint, uint);
17203ulong8 __ovld __cnfn bitfield_extract_unsigned(ulong8, uint, uint);
17204uchar16 __ovld __cnfn bitfield_extract_unsigned(uchar16, uint, uint);
17205ushort16 __ovld __cnfn bitfield_extract_unsigned(ushort16, uint, uint);
17206uint16 __ovld __cnfn bitfield_extract_unsigned(uint16, uint, uint);
17207ulong16 __ovld __cnfn bitfield_extract_unsigned(ulong16, uint, uint);
17208
17209char __ovld __cnfn bit_reverse(char);
17210uchar __ovld __cnfn bit_reverse(uchar);
17211short __ovld __cnfn bit_reverse(short);
17212ushort __ovld __cnfn bit_reverse(ushort);
17213int __ovld __cnfn bit_reverse(int);
17214uint __ovld __cnfn bit_reverse(uint);
17215long __ovld __cnfn bit_reverse(long);
17216ulong __ovld __cnfn bit_reverse(ulong);
17217char2 __ovld __cnfn bit_reverse(char2);
17218uchar2 __ovld __cnfn bit_reverse(uchar2);
17219short2 __ovld __cnfn bit_reverse(short2);
17220ushort2 __ovld __cnfn bit_reverse(ushort2);
17221int2 __ovld __cnfn bit_reverse(int2);
17222uint2 __ovld __cnfn bit_reverse(uint2);
17223long2 __ovld __cnfn bit_reverse(long2);
17224ulong2 __ovld __cnfn bit_reverse(ulong2);
17225char3 __ovld __cnfn bit_reverse(char3);
17226uchar3 __ovld __cnfn bit_reverse(uchar3);
17227short3 __ovld __cnfn bit_reverse(short3);
17228ushort3 __ovld __cnfn bit_reverse(ushort3);
17229int3 __ovld __cnfn bit_reverse(int3);
17230uint3 __ovld __cnfn bit_reverse(uint3);
17231long3 __ovld __cnfn bit_reverse(long3);
17232ulong3 __ovld __cnfn bit_reverse(ulong3);
17233char4 __ovld __cnfn bit_reverse(char4);
17234uchar4 __ovld __cnfn bit_reverse(uchar4);
17235short4 __ovld __cnfn bit_reverse(short4);
17236ushort4 __ovld __cnfn bit_reverse(ushort4);
17237int4 __ovld __cnfn bit_reverse(int4);
17238uint4 __ovld __cnfn bit_reverse(uint4);
17239long4 __ovld __cnfn bit_reverse(long4);
17240ulong4 __ovld __cnfn bit_reverse(ulong4);
17241char8 __ovld __cnfn bit_reverse(char8);
17242uchar8 __ovld __cnfn bit_reverse(uchar8);
17243short8 __ovld __cnfn bit_reverse(short8);
17244ushort8 __ovld __cnfn bit_reverse(ushort8);
17245int8 __ovld __cnfn bit_reverse(int8);
17246uint8 __ovld __cnfn bit_reverse(uint8);
17247long8 __ovld __cnfn bit_reverse(long8);
17248ulong8 __ovld __cnfn bit_reverse(ulong8);
17249char16 __ovld __cnfn bit_reverse(char16);
17250uchar16 __ovld __cnfn bit_reverse(uchar16);
17251short16 __ovld __cnfn bit_reverse(short16);
17252ushort16 __ovld __cnfn bit_reverse(ushort16);
17253int16 __ovld __cnfn bit_reverse(int16);
17254uint16 __ovld __cnfn bit_reverse(uint16);
17255long16 __ovld __cnfn bit_reverse(long16);
17256ulong16 __ovld __cnfn bit_reverse(ulong16);
17257#endif // cl_khr_extended_bit_ops
17258
17259#if defined(__opencl_c_integer_dot_product_input_4x8bit)
17260uint __ovld __cnfn dot(uchar4, uchar4);
17261int __ovld __cnfn dot(char4, char4);
17262int __ovld __cnfn dot(uchar4, char4);
17263int __ovld __cnfn dot(char4, uchar4);
17264
17265uint __ovld __cnfn dot_acc_sat(uchar4, uchar4, uint);
17266int __ovld __cnfn dot_acc_sat(char4, char4, int);
17267int __ovld __cnfn dot_acc_sat(uchar4, char4, int);
17268int __ovld __cnfn dot_acc_sat(char4, uchar4, int);
17269#endif // __opencl_c_integer_dot_product_input_4x8bit
17270
17271#if defined(__opencl_c_integer_dot_product_input_4x8bit_packed)
17272uint __ovld __cnfn dot_4x8packed_uu_uint(uint, uint);
17273int __ovld __cnfn dot_4x8packed_ss_int(uint, uint);
17274int __ovld __cnfn dot_4x8packed_us_int(uint, uint);
17275int __ovld __cnfn dot_4x8packed_su_int(uint, uint);
17276
17277uint __ovld __cnfn dot_acc_sat_4x8packed_uu_uint(uint, uint, uint);
17278int __ovld __cnfn dot_acc_sat_4x8packed_ss_int(uint, uint, int);
17279int __ovld __cnfn dot_acc_sat_4x8packed_us_int(uint, uint, int);
17280int __ovld __cnfn dot_acc_sat_4x8packed_su_int(uint, uint, int);
17281#endif // __opencl_c_integer_dot_product_input_4x8bit_packed
17282
17283#if defined(cl_khr_subgroup_rotate)
17284char __ovld __conv sub_group_rotate(char, int);
17285uchar __ovld __conv sub_group_rotate(uchar, int);
17286short __ovld __conv sub_group_rotate(short, int);
17287ushort __ovld __conv sub_group_rotate(ushort, int);
17288int __ovld __conv sub_group_rotate(int, int);
17289uint __ovld __conv sub_group_rotate(uint, int);
17290long __ovld __conv sub_group_rotate(long, int);
17291ulong __ovld __conv sub_group_rotate(ulong, int);
17292float __ovld __conv sub_group_rotate(float, int);
17293#if defined(cl_khr_fp64)
17294double __ovld __conv sub_group_rotate(double, int);
17295#endif // cl_khr_fp64
17296#if defined(cl_khr_fp16)
17297half __ovld __conv sub_group_rotate(half, int);
17298#endif // cl_khr_fp16
17299
17300char __ovld __conv sub_group_clustered_rotate(char, int, uint);
17301uchar __ovld __conv sub_group_clustered_rotate(uchar, int, uint);
17302short __ovld __conv sub_group_clustered_rotate(short, int, uint);
17303ushort __ovld __conv sub_group_clustered_rotate(ushort, int, uint);
17304int __ovld __conv sub_group_clustered_rotate(int, int, uint);
17305uint __ovld __conv sub_group_clustered_rotate(uint, int, uint);
17306long __ovld __conv sub_group_clustered_rotate(long, int, uint);
17307ulong __ovld __conv sub_group_clustered_rotate(ulong, int, uint);
17308float __ovld __conv sub_group_clustered_rotate(float, int, uint);
17309#if defined(cl_khr_fp64)
17310double __ovld __conv sub_group_clustered_rotate(double, int, uint);
17311#endif // cl_khr_fp64
17312#if defined(cl_khr_fp16)
17313half __ovld __conv sub_group_clustered_rotate(half, int, uint);
17314#endif // cl_khr_fp16
17315#endif // cl_khr_subgroup_rotate
17316
17317#if defined(cl_khr_kernel_clock)
17318#if defined(__opencl_c_kernel_clock_scope_device)
17319ulong __ovld clock_read_device();
17320uint2 __ovld clock_read_hilo_device();
17321#endif // __opencl_c_kernel_clock_scope_device
17322#if defined(__opencl_c_kernel_clock_scope_work_group)
17323ulong __ovld clock_read_work_group();
17324uint2 __ovld clock_read_hilo_work_group();
17325#endif // __opencl_c_kernel_clock_scope_work_group
17326#if defined(__opencl_c_kernel_clock_scope_sub_group)
17327ulong __ovld clock_read_sub_group();
17328uint2 __ovld clock_read_hilo_sub_group();
17329#endif // __opencl_c_kernel_clock_scope_sub_group
17330#endif // cl_khr_kernel_clock
17331
17332#if defined(cl_intel_subgroups)
17333// Intel-Specific Sub Group Functions
17334float __ovld __conv intel_sub_group_shuffle( float , uint );
17335float2 __ovld __conv intel_sub_group_shuffle( float2, uint );
17336float3 __ovld __conv intel_sub_group_shuffle( float3, uint );
17337float4 __ovld __conv intel_sub_group_shuffle( float4, uint );
17338float8 __ovld __conv intel_sub_group_shuffle( float8, uint );
17339float16 __ovld __conv intel_sub_group_shuffle( float16, uint );
17340
17341int __ovld __conv intel_sub_group_shuffle( int , uint );
17342int2 __ovld __conv intel_sub_group_shuffle( int2, uint );
17343int3 __ovld __conv intel_sub_group_shuffle( int3, uint );
17344int4 __ovld __conv intel_sub_group_shuffle( int4, uint );
17345int8 __ovld __conv intel_sub_group_shuffle( int8, uint );
17346int16 __ovld __conv intel_sub_group_shuffle( int16, uint );
17347
17348uint __ovld __conv intel_sub_group_shuffle( uint , uint );
17349uint2 __ovld __conv intel_sub_group_shuffle( uint2, uint );
17350uint3 __ovld __conv intel_sub_group_shuffle( uint3, uint );
17351uint4 __ovld __conv intel_sub_group_shuffle( uint4, uint );
17352uint8 __ovld __conv intel_sub_group_shuffle( uint8, uint );
17353uint16 __ovld __conv intel_sub_group_shuffle( uint16, uint );
17354
17355long __ovld __conv intel_sub_group_shuffle( long, uint );
17356ulong __ovld __conv intel_sub_group_shuffle( ulong, uint );
17357
17358float __ovld __conv intel_sub_group_shuffle_down( float cur, float next, uint );
17359float2 __ovld __conv intel_sub_group_shuffle_down( float2 cur, float2 next, uint );
17360float3 __ovld __conv intel_sub_group_shuffle_down( float3 cur, float3 next, uint );
17361float4 __ovld __conv intel_sub_group_shuffle_down( float4 cur, float4 next, uint );
17362float8 __ovld __conv intel_sub_group_shuffle_down( float8 cur, float8 next, uint );
17363float16 __ovld __conv intel_sub_group_shuffle_down( float16 cur, float16 next, uint );
17364
17365int __ovld __conv intel_sub_group_shuffle_down( int cur, int next, uint );
17366int2 __ovld __conv intel_sub_group_shuffle_down( int2 cur, int2 next, uint );
17367int3 __ovld __conv intel_sub_group_shuffle_down( int3 cur, int3 next, uint );
17368int4 __ovld __conv intel_sub_group_shuffle_down( int4 cur, int4 next, uint );
17369int8 __ovld __conv intel_sub_group_shuffle_down( int8 cur, int8 next, uint );
17370int16 __ovld __conv intel_sub_group_shuffle_down( int16 cur, int16 next, uint );
17371
17372uint __ovld __conv intel_sub_group_shuffle_down( uint cur, uint next, uint );
17373uint2 __ovld __conv intel_sub_group_shuffle_down( uint2 cur, uint2 next, uint );
17374uint3 __ovld __conv intel_sub_group_shuffle_down( uint3 cur, uint3 next, uint );
17375uint4 __ovld __conv intel_sub_group_shuffle_down( uint4 cur, uint4 next, uint );
17376uint8 __ovld __conv intel_sub_group_shuffle_down( uint8 cur, uint8 next, uint );
17377uint16 __ovld __conv intel_sub_group_shuffle_down( uint16 cur, uint16 next, uint );
17378
17379long __ovld __conv intel_sub_group_shuffle_down( long prev, long cur, uint );
17380ulong __ovld __conv intel_sub_group_shuffle_down( ulong prev, ulong cur, uint );
17381
17382float __ovld __conv intel_sub_group_shuffle_up( float prev, float cur, uint );
17383float2 __ovld __conv intel_sub_group_shuffle_up( float2 prev, float2 cur, uint );
17384float3 __ovld __conv intel_sub_group_shuffle_up( float3 prev, float3 cur, uint );
17385float4 __ovld __conv intel_sub_group_shuffle_up( float4 prev, float4 cur, uint );
17386float8 __ovld __conv intel_sub_group_shuffle_up( float8 prev, float8 cur, uint );
17387float16 __ovld __conv intel_sub_group_shuffle_up( float16 prev, float16 cur, uint );
17388
17389int __ovld __conv intel_sub_group_shuffle_up( int prev, int cur, uint );
17390int2 __ovld __conv intel_sub_group_shuffle_up( int2 prev, int2 cur, uint );
17391int3 __ovld __conv intel_sub_group_shuffle_up( int3 prev, int3 cur, uint );
17392int4 __ovld __conv intel_sub_group_shuffle_up( int4 prev, int4 cur, uint );
17393int8 __ovld __conv intel_sub_group_shuffle_up( int8 prev, int8 cur, uint );
17394int16 __ovld __conv intel_sub_group_shuffle_up( int16 prev, int16 cur, uint );
17395
17396uint __ovld __conv intel_sub_group_shuffle_up( uint prev, uint cur, uint );
17397uint2 __ovld __conv intel_sub_group_shuffle_up( uint2 prev, uint2 cur, uint );
17398uint3 __ovld __conv intel_sub_group_shuffle_up( uint3 prev, uint3 cur, uint );
17399uint4 __ovld __conv intel_sub_group_shuffle_up( uint4 prev, uint4 cur, uint );
17400uint8 __ovld __conv intel_sub_group_shuffle_up( uint8 prev, uint8 cur, uint );
17401uint16 __ovld __conv intel_sub_group_shuffle_up( uint16 prev, uint16 cur, uint );
17402
17403long __ovld __conv intel_sub_group_shuffle_up( long prev, long cur, uint );
17404ulong __ovld __conv intel_sub_group_shuffle_up( ulong prev, ulong cur, uint );
17405
17406float __ovld __conv intel_sub_group_shuffle_xor( float , uint );
17407float2 __ovld __conv intel_sub_group_shuffle_xor( float2, uint );
17408float3 __ovld __conv intel_sub_group_shuffle_xor( float3, uint );
17409float4 __ovld __conv intel_sub_group_shuffle_xor( float4, uint );
17410float8 __ovld __conv intel_sub_group_shuffle_xor( float8, uint );
17411float16 __ovld __conv intel_sub_group_shuffle_xor( float16, uint );
17412
17413int __ovld __conv intel_sub_group_shuffle_xor( int , uint );
17414int2 __ovld __conv intel_sub_group_shuffle_xor( int2, uint );
17415int3 __ovld __conv intel_sub_group_shuffle_xor( int3, uint );
17416int4 __ovld __conv intel_sub_group_shuffle_xor( int4, uint );
17417int8 __ovld __conv intel_sub_group_shuffle_xor( int8, uint );
17418int16 __ovld __conv intel_sub_group_shuffle_xor( int16, uint );
17419
17420uint __ovld __conv intel_sub_group_shuffle_xor( uint , uint );
17421uint2 __ovld __conv intel_sub_group_shuffle_xor( uint2, uint );
17422uint3 __ovld __conv intel_sub_group_shuffle_xor( uint3, uint );
17423uint4 __ovld __conv intel_sub_group_shuffle_xor( uint4, uint );
17424uint8 __ovld __conv intel_sub_group_shuffle_xor( uint8, uint );
17425uint16 __ovld __conv intel_sub_group_shuffle_xor( uint16, uint );
17426
17427long __ovld __conv intel_sub_group_shuffle_xor( long, uint );
17428ulong __ovld __conv intel_sub_group_shuffle_xor( ulong, uint );
17429
17430#if defined(__opencl_c_images)
17431uint __ovld __conv intel_sub_group_block_read(read_only image2d_t, int2);
17432uint2 __ovld __conv intel_sub_group_block_read2(read_only image2d_t, int2);
17433uint4 __ovld __conv intel_sub_group_block_read4(read_only image2d_t, int2);
17434uint8 __ovld __conv intel_sub_group_block_read8(read_only image2d_t, int2);
17435#endif
17436
17437#if defined(__opencl_c_read_write_images)
17438uint __ovld __conv intel_sub_group_block_read(read_write image2d_t, int2);
17439uint2 __ovld __conv intel_sub_group_block_read2(read_write image2d_t, int2);
17440uint4 __ovld __conv intel_sub_group_block_read4(read_write image2d_t, int2);
17441uint8 __ovld __conv intel_sub_group_block_read8(read_write image2d_t, int2);
17442#endif // defined(__opencl_c_read_write_images)
17443
17444uint __ovld __conv intel_sub_group_block_read( const __global uint* p );
17445uint2 __ovld __conv intel_sub_group_block_read2( const __global uint* p );
17446uint4 __ovld __conv intel_sub_group_block_read4( const __global uint* p );
17447uint8 __ovld __conv intel_sub_group_block_read8( const __global uint* p );
17448
17449#if defined(__opencl_c_images)
17450void __ovld __conv intel_sub_group_block_write(write_only image2d_t, int2, uint);
17451void __ovld __conv intel_sub_group_block_write2(write_only image2d_t, int2, uint2);
17452void __ovld __conv intel_sub_group_block_write4(write_only image2d_t, int2, uint4);
17453void __ovld __conv intel_sub_group_block_write8(write_only image2d_t, int2, uint8);
17454#endif // defined(__opencl_c_images)
17455
17456#if defined(__opencl_c_read_write_images)
17457void __ovld __conv intel_sub_group_block_write(read_write image2d_t, int2, uint);
17458void __ovld __conv intel_sub_group_block_write2(read_write image2d_t, int2, uint2);
17459void __ovld __conv intel_sub_group_block_write4(read_write image2d_t, int2, uint4);
17460void __ovld __conv intel_sub_group_block_write8(read_write image2d_t, int2, uint8);
17461#endif // defined(__opencl_c_read_write_images)
17462
17463void __ovld __conv intel_sub_group_block_write( __global uint* p, uint data );
17464void __ovld __conv intel_sub_group_block_write2( __global uint* p, uint2 data );
17465void __ovld __conv intel_sub_group_block_write4( __global uint* p, uint4 data );
17466void __ovld __conv intel_sub_group_block_write8( __global uint* p, uint8 data );
17467
17468#ifdef cl_khr_fp16
17469half __ovld __conv intel_sub_group_shuffle( half, uint );
17470half __ovld __conv intel_sub_group_shuffle_down( half prev, half cur, uint );
17471half __ovld __conv intel_sub_group_shuffle_up( half prev, half cur, uint );
17472half __ovld __conv intel_sub_group_shuffle_xor( half, uint );
17473#endif
17474
17475#if defined(cl_khr_fp64)
17476double __ovld __conv intel_sub_group_shuffle( double, uint );
17477double __ovld __conv intel_sub_group_shuffle_down( double prev, double cur, uint );
17478double __ovld __conv intel_sub_group_shuffle_up( double prev, double cur, uint );
17479double __ovld __conv intel_sub_group_shuffle_xor( double, uint );
17480#endif
17481
17482#endif //cl_intel_subgroups
17483
17484#if defined(cl_intel_subgroups_short)
17485short __ovld __conv intel_sub_group_broadcast( short , uint sub_group_local_id );
17486short2 __ovld __conv intel_sub_group_broadcast( short2, uint sub_group_local_id );
17487short3 __ovld __conv intel_sub_group_broadcast( short3, uint sub_group_local_id );
17488short4 __ovld __conv intel_sub_group_broadcast( short4, uint sub_group_local_id );
17489short8 __ovld __conv intel_sub_group_broadcast( short8, uint sub_group_local_id );
17490
17491ushort __ovld __conv intel_sub_group_broadcast( ushort , uint sub_group_local_id );
17492ushort2 __ovld __conv intel_sub_group_broadcast( ushort2, uint sub_group_local_id );
17493ushort3 __ovld __conv intel_sub_group_broadcast( ushort3, uint sub_group_local_id );
17494ushort4 __ovld __conv intel_sub_group_broadcast( ushort4, uint sub_group_local_id );
17495ushort8 __ovld __conv intel_sub_group_broadcast( ushort8, uint sub_group_local_id );
17496
17497short __ovld __conv intel_sub_group_shuffle( short , uint );
17498short2 __ovld __conv intel_sub_group_shuffle( short2 , uint );
17499short3 __ovld __conv intel_sub_group_shuffle( short3 , uint );
17500short4 __ovld __conv intel_sub_group_shuffle( short4 , uint );
17501short8 __ovld __conv intel_sub_group_shuffle( short8 , uint );
17502short16 __ovld __conv intel_sub_group_shuffle( short16, uint);
17503
17504ushort __ovld __conv intel_sub_group_shuffle( ushort , uint );
17505ushort2 __ovld __conv intel_sub_group_shuffle( ushort2 , uint );
17506ushort3 __ovld __conv intel_sub_group_shuffle( ushort3 , uint );
17507ushort4 __ovld __conv intel_sub_group_shuffle( ushort4 , uint );
17508ushort8 __ovld __conv intel_sub_group_shuffle( ushort8 , uint );
17509ushort16 __ovld __conv intel_sub_group_shuffle( ushort16, uint );
17510
17511short __ovld __conv intel_sub_group_shuffle_down( short cur, short next, uint );
17512short2 __ovld __conv intel_sub_group_shuffle_down( short2 cur, short2 next, uint );
17513short3 __ovld __conv intel_sub_group_shuffle_down( short3 cur, short3 next, uint );
17514short4 __ovld __conv intel_sub_group_shuffle_down( short4 cur, short4 next, uint );
17515short8 __ovld __conv intel_sub_group_shuffle_down( short8 cur, short8 next, uint );
17516short16 __ovld __conv intel_sub_group_shuffle_down( short16 cur, short16 next, uint );
17517
17518ushort __ovld __conv intel_sub_group_shuffle_down( ushort cur, ushort next, uint );
17519ushort2 __ovld __conv intel_sub_group_shuffle_down( ushort2 cur, ushort2 next, uint );
17520ushort3 __ovld __conv intel_sub_group_shuffle_down( ushort3 cur, ushort3 next, uint );
17521ushort4 __ovld __conv intel_sub_group_shuffle_down( ushort4 cur, ushort4 next, uint );
17522ushort8 __ovld __conv intel_sub_group_shuffle_down( ushort8 cur, ushort8 next, uint );
17523ushort16 __ovld __conv intel_sub_group_shuffle_down( ushort16 cur, ushort16 next, uint );
17524
17525short __ovld __conv intel_sub_group_shuffle_up( short cur, short next, uint );
17526short2 __ovld __conv intel_sub_group_shuffle_up( short2 cur, short2 next, uint );
17527short3 __ovld __conv intel_sub_group_shuffle_up( short3 cur, short3 next, uint );
17528short4 __ovld __conv intel_sub_group_shuffle_up( short4 cur, short4 next, uint );
17529short8 __ovld __conv intel_sub_group_shuffle_up( short8 cur, short8 next, uint );
17530short16 __ovld __conv intel_sub_group_shuffle_up( short16 cur, short16 next, uint );
17531
17532ushort __ovld __conv intel_sub_group_shuffle_up( ushort cur, ushort next, uint );
17533ushort2 __ovld __conv intel_sub_group_shuffle_up( ushort2 cur, ushort2 next, uint );
17534ushort3 __ovld __conv intel_sub_group_shuffle_up( ushort3 cur, ushort3 next, uint );
17535ushort4 __ovld __conv intel_sub_group_shuffle_up( ushort4 cur, ushort4 next, uint );
17536ushort8 __ovld __conv intel_sub_group_shuffle_up( ushort8 cur, ushort8 next, uint );
17537ushort16 __ovld __conv intel_sub_group_shuffle_up( ushort16 cur, ushort16 next, uint );
17538
17539short __ovld __conv intel_sub_group_shuffle_xor( short , uint );
17540short2 __ovld __conv intel_sub_group_shuffle_xor( short2 , uint );
17541short3 __ovld __conv intel_sub_group_shuffle_xor( short3 , uint );
17542short4 __ovld __conv intel_sub_group_shuffle_xor( short4 , uint );
17543short8 __ovld __conv intel_sub_group_shuffle_xor( short8 , uint );
17544short16 __ovld __conv intel_sub_group_shuffle_xor( short16, uint );
17545
17546ushort __ovld __conv intel_sub_group_shuffle_xor( ushort , uint );
17547ushort2 __ovld __conv intel_sub_group_shuffle_xor( ushort2 , uint );
17548ushort3 __ovld __conv intel_sub_group_shuffle_xor( ushort3 , uint );
17549ushort4 __ovld __conv intel_sub_group_shuffle_xor( ushort4 , uint );
17550ushort8 __ovld __conv intel_sub_group_shuffle_xor( ushort8 , uint );
17551ushort16 __ovld __conv intel_sub_group_shuffle_xor( ushort16, uint );
17552
17553short __ovld __conv intel_sub_group_reduce_add( short x );
17554ushort __ovld __conv intel_sub_group_reduce_add( ushort x );
17555short __ovld __conv intel_sub_group_reduce_min( short x );
17556ushort __ovld __conv intel_sub_group_reduce_min( ushort x );
17557short __ovld __conv intel_sub_group_reduce_max( short x );
17558ushort __ovld __conv intel_sub_group_reduce_max( ushort x );
17559
17560short __ovld __conv intel_sub_group_scan_exclusive_add( short x );
17561ushort __ovld __conv intel_sub_group_scan_exclusive_add( ushort x );
17562short __ovld __conv intel_sub_group_scan_exclusive_min( short x );
17563ushort __ovld __conv intel_sub_group_scan_exclusive_min( ushort x );
17564short __ovld __conv intel_sub_group_scan_exclusive_max( short x );
17565ushort __ovld __conv intel_sub_group_scan_exclusive_max( ushort x );
17566
17567short __ovld __conv intel_sub_group_scan_inclusive_add( short x );
17568ushort __ovld __conv intel_sub_group_scan_inclusive_add( ushort x );
17569short __ovld __conv intel_sub_group_scan_inclusive_min( short x );
17570ushort __ovld __conv intel_sub_group_scan_inclusive_min( ushort x );
17571short __ovld __conv intel_sub_group_scan_inclusive_max( short x );
17572ushort __ovld __conv intel_sub_group_scan_inclusive_max( ushort x );
17573
17574#if defined(__opencl_c_images)
17575uint __ovld __conv intel_sub_group_block_read_ui(read_only image2d_t, int2);
17576uint2 __ovld __conv intel_sub_group_block_read_ui2(read_only image2d_t, int2);
17577uint4 __ovld __conv intel_sub_group_block_read_ui4(read_only image2d_t, int2);
17578uint8 __ovld __conv intel_sub_group_block_read_ui8(read_only image2d_t, int2);
17579#endif // defined(__opencl_c_images)
17580
17581#if defined(__opencl_c_read_write_images)
17582uint __ovld __conv intel_sub_group_block_read_ui(read_write image2d_t, int2);
17583uint2 __ovld __conv intel_sub_group_block_read_ui2(read_write image2d_t, int2);
17584uint4 __ovld __conv intel_sub_group_block_read_ui4(read_write image2d_t, int2);
17585uint8 __ovld __conv intel_sub_group_block_read_ui8(read_write image2d_t, int2);
17586#endif // defined(__opencl_c_read_write_images)
17587
17588uint __ovld __conv intel_sub_group_block_read_ui( const __global uint* p );
17589uint2 __ovld __conv intel_sub_group_block_read_ui2( const __global uint* p );
17590uint4 __ovld __conv intel_sub_group_block_read_ui4( const __global uint* p );
17591uint8 __ovld __conv intel_sub_group_block_read_ui8( const __global uint* p );
17592
17593#if defined(__opencl_c_images)
17594void __ovld __conv intel_sub_group_block_write_ui(read_only image2d_t, int2, uint);
17595void __ovld __conv intel_sub_group_block_write_ui2(read_only image2d_t, int2, uint2);
17596void __ovld __conv intel_sub_group_block_write_ui4(read_only image2d_t, int2, uint4);
17597void __ovld __conv intel_sub_group_block_write_ui8(read_only image2d_t, int2, uint8);
17598#endif //defined(__opencl_c_images)
17599
17600#if defined(__opencl_c_read_write_images)
17601void __ovld __conv intel_sub_group_block_write_ui(read_write image2d_t, int2, uint);
17602void __ovld __conv intel_sub_group_block_write_ui2(read_write image2d_t, int2, uint2);
17603void __ovld __conv intel_sub_group_block_write_ui4(read_write image2d_t, int2, uint4);
17604void __ovld __conv intel_sub_group_block_write_ui8(read_write image2d_t, int2, uint8);
17605#endif // defined(__opencl_c_read_write_images)
17606
17607void __ovld __conv intel_sub_group_block_write_ui( __global uint* p, uint data );
17608void __ovld __conv intel_sub_group_block_write_ui2( __global uint* p, uint2 data );
17609void __ovld __conv intel_sub_group_block_write_ui4( __global uint* p, uint4 data );
17610void __ovld __conv intel_sub_group_block_write_ui8( __global uint* p, uint8 data );
17611
17612#if defined(__opencl_c_images)
17613ushort __ovld __conv intel_sub_group_block_read_us(read_only image2d_t, int2);
17614ushort2 __ovld __conv intel_sub_group_block_read_us2(read_only image2d_t, int2);
17615ushort4 __ovld __conv intel_sub_group_block_read_us4(read_only image2d_t, int2);
17616ushort8 __ovld __conv intel_sub_group_block_read_us8(read_only image2d_t, int2);
17617#endif // defined(__opencl_c_images)
17618
17619#if defined(__opencl_c_read_write_images)
17620ushort __ovld __conv intel_sub_group_block_read_us(read_write image2d_t, int2);
17621ushort2 __ovld __conv intel_sub_group_block_read_us2(read_write image2d_t, int2);
17622ushort4 __ovld __conv intel_sub_group_block_read_us4(read_write image2d_t, int2);
17623ushort8 __ovld __conv intel_sub_group_block_read_us8(read_write image2d_t, int2);
17624#endif // defined(__opencl_c_read_write_images)
17625
17626ushort __ovld __conv intel_sub_group_block_read_us( const __global ushort* p );
17627ushort2 __ovld __conv intel_sub_group_block_read_us2( const __global ushort* p );
17628ushort4 __ovld __conv intel_sub_group_block_read_us4( const __global ushort* p );
17629ushort8 __ovld __conv intel_sub_group_block_read_us8( const __global ushort* p );
17630
17631#if defined(__opencl_c_images)
17632void __ovld __conv intel_sub_group_block_write_us(write_only image2d_t, int2, ushort);
17633void __ovld __conv intel_sub_group_block_write_us2(write_only image2d_t, int2, ushort2);
17634void __ovld __conv intel_sub_group_block_write_us4(write_only image2d_t, int2, ushort4);
17635void __ovld __conv intel_sub_group_block_write_us8(write_only image2d_t, int2, ushort8);
17636#endif // defined(__opencl_c_images)
17637
17638#if defined(__opencl_c_read_write_images)
17639void __ovld __conv intel_sub_group_block_write_us(read_write image2d_t, int2, ushort);
17640void __ovld __conv intel_sub_group_block_write_us2(read_write image2d_t, int2, ushort2);
17641void __ovld __conv intel_sub_group_block_write_us4(read_write image2d_t, int2, ushort4);
17642void __ovld __conv intel_sub_group_block_write_us8(read_write image2d_t, int2, ushort8);
17643#endif // defined(__opencl_c_read_write_images)
17644
17645void __ovld __conv intel_sub_group_block_write_us( __global ushort* p, ushort data );
17646void __ovld __conv intel_sub_group_block_write_us2( __global ushort* p, ushort2 data );
17647void __ovld __conv intel_sub_group_block_write_us4( __global ushort* p, ushort4 data );
17648void __ovld __conv intel_sub_group_block_write_us8( __global ushort* p, ushort8 data );
17649#endif // cl_intel_subgroups_short
17650
17651#ifdef cl_intel_device_side_avc_motion_estimation
17652#pragma OPENCL EXTENSION cl_intel_device_side_avc_motion_estimation : begin
17653
17654// MCE built-in functions
17655uchar __ovld
17656intel_sub_group_avc_mce_get_default_inter_base_multi_reference_penalty(
17657 uchar slice_type, uchar qp);
17658ulong __ovld intel_sub_group_avc_mce_get_default_inter_shape_penalty(
17659 uchar slice_type, uchar qp);
17660uchar __ovld intel_sub_group_avc_mce_get_default_inter_direction_penalty(
17661 uchar slice_type, uchar qp);
17662uint __ovld intel_sub_group_avc_mce_get_default_intra_luma_shape_penalty(
17663 uchar slice_type, uchar qp);
17664uint2 __ovld
17665intel_sub_group_avc_mce_get_default_inter_motion_vector_cost_table(
17666 uchar slice_type, uchar qp);
17667uchar __ovld intel_sub_group_avc_mce_get_default_intra_luma_mode_penalty(
17668 uchar slice_type, uchar qp);
17669
17670uint2 __ovld intel_sub_group_avc_mce_get_default_high_penalty_cost_table();
17671uint2 __ovld intel_sub_group_avc_mce_get_default_medium_penalty_cost_table();
17672uint2 __ovld intel_sub_group_avc_mce_get_default_low_penalty_cost_table();
17673uint __ovld intel_sub_group_avc_mce_get_default_non_dc_luma_intra_penalty();
17674uchar __ovld
17675intel_sub_group_avc_mce_get_default_intra_chroma_mode_base_penalty();
17676
17677intel_sub_group_avc_mce_payload_t __ovld
17678intel_sub_group_avc_mce_set_inter_base_multi_reference_penalty(
17679 uchar reference_base_penalty, intel_sub_group_avc_mce_payload_t payload);
17680intel_sub_group_avc_mce_payload_t __ovld
17681intel_sub_group_avc_mce_set_inter_shape_penalty(
17682 ulong packed_shape_penalty, intel_sub_group_avc_mce_payload_t payload);
17683intel_sub_group_avc_mce_payload_t __ovld
17684intel_sub_group_avc_mce_set_inter_direction_penalty(
17685 uchar direction_cost, intel_sub_group_avc_mce_payload_t payload);
17686intel_sub_group_avc_mce_payload_t __ovld
17687intel_sub_group_avc_mce_set_motion_vector_cost_function(
17688 ulong packed_cost_center_delta, uint2 packed_cost_table,
17689 uchar cost_precision, intel_sub_group_avc_mce_payload_t payload);
17690intel_sub_group_avc_mce_payload_t __ovld
17691intel_sub_group_avc_mce_set_ac_only_haar(
17692 intel_sub_group_avc_mce_payload_t payload);
17693intel_sub_group_avc_mce_payload_t __ovld
17694intel_sub_group_avc_mce_set_source_interlaced_field_polarity(
17695 uchar src_field_polarity, intel_sub_group_avc_mce_payload_t payload);
17696intel_sub_group_avc_mce_payload_t __ovld
17697intel_sub_group_avc_mce_set_single_reference_interlaced_field_polarity(
17698 uchar ref_field_polarity, intel_sub_group_avc_mce_payload_t payload);
17699intel_sub_group_avc_mce_payload_t __ovld
17700intel_sub_group_avc_mce_set_dual_reference_interlaced_field_polarities(
17701 uchar fwd_ref_field_polarity, uchar bwd_ref_field_polarity,
17702 intel_sub_group_avc_mce_payload_t payload);
17703
17704ulong __ovld intel_sub_group_avc_mce_get_motion_vectors(
17705 intel_sub_group_avc_mce_result_t result);
17706ushort __ovld intel_sub_group_avc_mce_get_inter_distortions(
17707 intel_sub_group_avc_mce_result_t result);
17708ushort __ovld intel_sub_group_avc_mce_get_best_inter_distortion(
17709 intel_sub_group_avc_mce_result_t result);
17710uchar __ovld intel_sub_group_avc_mce_get_inter_major_shape(
17711 intel_sub_group_avc_mce_result_t result);
17712uchar __ovld intel_sub_group_avc_mce_get_inter_minor_shapes(
17713 intel_sub_group_avc_mce_result_t result);
17714uchar __ovld intel_sub_group_avc_mce_get_inter_directions(
17715 intel_sub_group_avc_mce_result_t result);
17716uchar __ovld intel_sub_group_avc_mce_get_inter_motion_vector_count(
17717 intel_sub_group_avc_mce_result_t result);
17718uint __ovld intel_sub_group_avc_mce_get_inter_reference_ids(
17719 intel_sub_group_avc_mce_result_t result);
17720uchar __ovld
17721intel_sub_group_avc_mce_get_inter_reference_interlaced_field_polarities(
17722 uint packed_reference_ids, uint packed_reference_parameter_field_polarities,
17723 intel_sub_group_avc_mce_result_t result);
17724
17725// IME built-in functions
17726intel_sub_group_avc_ime_payload_t __ovld
17727intel_sub_group_avc_ime_initialize(
17728 ushort2 src_coord, uchar partition_mask, uchar sad_adjustment);
17729intel_sub_group_avc_ime_payload_t __ovld
17730intel_sub_group_avc_ime_set_single_reference(
17731 short2 ref_offset, uchar search_window_config,
17732 intel_sub_group_avc_ime_payload_t payload);
17733intel_sub_group_avc_ime_payload_t __ovld
17734intel_sub_group_avc_ime_set_dual_reference(
17735 short2 fwd_ref_offset, short2 bwd_ref_offset, uchar search_window_config,
17736 intel_sub_group_avc_ime_payload_t payload);
17737intel_sub_group_avc_ime_payload_t __ovld
17738intel_sub_group_avc_ime_set_max_motion_vector_count(
17739 uchar max_motion_vector_count, intel_sub_group_avc_ime_payload_t payload);
17740intel_sub_group_avc_ime_payload_t __ovld
17741intel_sub_group_avc_ime_set_unidirectional_mix_disable(
17742 intel_sub_group_avc_ime_payload_t payload);
17743intel_sub_group_avc_ime_payload_t __ovld
17744intel_sub_group_avc_ime_set_early_search_termination_threshold(
17745 uchar threshold, intel_sub_group_avc_ime_payload_t payload);
17746intel_sub_group_avc_ime_payload_t __ovld
17747intel_sub_group_avc_ime_set_weighted_sad(
17748 uint packed_sad_weights, intel_sub_group_avc_ime_payload_t payload);
17749
17750__attribute__((deprecated("If you use the latest Intel driver, please use "
17751 "intel_sub_group_avc_ime_ref_window_size instead",
17752 "intel_sub_group_avc_ime_ref_window_size")))
17753ushort2 __ovld
17754intel_sub_group_ime_ref_window_size(uchar search_window_config, char dual_ref);
17755ushort2 __ovld intel_sub_group_avc_ime_ref_window_size(
17756 uchar search_window_config, char dual_ref);
17757short2 __ovld intel_sub_group_avc_ime_adjust_ref_offset(
17758 short2 ref_offset, ushort2 src_coord, ushort2 ref_window_size,
17759 ushort2 image_size);
17760
17761#if defined(__opencl_c_images)
17762intel_sub_group_avc_ime_result_t __ovld
17763intel_sub_group_avc_ime_evaluate_with_single_reference(
17764 read_only image2d_t src_image, read_only image2d_t ref_image,
17765 sampler_t vme_media_sampler, intel_sub_group_avc_ime_payload_t payload);
17766intel_sub_group_avc_ime_result_t __ovld
17767intel_sub_group_avc_ime_evaluate_with_dual_reference(
17768 read_only image2d_t src_image, read_only image2d_t fwd_ref_image,
17769 read_only image2d_t bwd_ref_image, sampler_t vme_media_sampler,
17770 intel_sub_group_avc_ime_payload_t payload);
17771intel_sub_group_avc_ime_result_single_reference_streamout_t __ovld
17772intel_sub_group_avc_ime_evaluate_with_single_reference_streamout(
17773 read_only image2d_t src_image, read_only image2d_t ref_image,
17774 sampler_t vme_media_sampler, intel_sub_group_avc_ime_payload_t payload);
17775intel_sub_group_avc_ime_result_dual_reference_streamout_t __ovld
17776intel_sub_group_avc_ime_evaluate_with_dual_reference_streamout(
17777 read_only image2d_t src_image, read_only image2d_t fwd_ref_image,
17778 read_only image2d_t bwd_ref_image, sampler_t vme_media_sampler,
17779 intel_sub_group_avc_ime_payload_t payload);
17780intel_sub_group_avc_ime_result_t __ovld
17781intel_sub_group_avc_ime_evaluate_with_single_reference_streamin(
17782 read_only image2d_t src_image, read_only image2d_t ref_image,
17783 sampler_t vme_media_sampler, intel_sub_group_avc_ime_payload_t payload,
17784 intel_sub_group_avc_ime_single_reference_streamin_t streamin_components);
17785intel_sub_group_avc_ime_result_t __ovld
17786intel_sub_group_avc_ime_evaluate_with_dual_reference_streamin(
17787 read_only image2d_t src_image, read_only image2d_t fwd_ref_image,
17788 read_only image2d_t bwd_ref_image, sampler_t vme_media_sampler,
17789 intel_sub_group_avc_ime_payload_t payload,
17790 intel_sub_group_avc_ime_dual_reference_streamin_t streamin_components);
17791intel_sub_group_avc_ime_result_single_reference_streamout_t __ovld
17792intel_sub_group_avc_ime_evaluate_with_single_reference_streaminout(
17793 read_only image2d_t src_image, read_only image2d_t ref_image,
17794 sampler_t vme_media_sampler, intel_sub_group_avc_ime_payload_t payload,
17795 intel_sub_group_avc_ime_single_reference_streamin_t streamin_components);
17796intel_sub_group_avc_ime_result_dual_reference_streamout_t __ovld
17797intel_sub_group_avc_ime_evaluate_with_dual_reference_streaminout(
17798 read_only image2d_t src_image, read_only image2d_t fwd_ref_image,
17799 read_only image2d_t bwd_ref_image, sampler_t vme_media_sampler,
17800 intel_sub_group_avc_ime_payload_t payload,
17801 intel_sub_group_avc_ime_dual_reference_streamin_t streamin_components);
17802#endif
17803
17804intel_sub_group_avc_ime_single_reference_streamin_t __ovld
17805intel_sub_group_avc_ime_get_single_reference_streamin(
17806 intel_sub_group_avc_ime_result_single_reference_streamout_t result);
17807intel_sub_group_avc_ime_dual_reference_streamin_t __ovld
17808intel_sub_group_avc_ime_get_dual_reference_streamin(
17809 intel_sub_group_avc_ime_result_dual_reference_streamout_t result);
17810intel_sub_group_avc_ime_result_t __ovld
17811intel_sub_group_avc_ime_strip_single_reference_streamout(
17812 intel_sub_group_avc_ime_result_single_reference_streamout_t result);
17813intel_sub_group_avc_ime_result_t __ovld
17814intel_sub_group_avc_ime_strip_dual_reference_streamout(
17815 intel_sub_group_avc_ime_result_dual_reference_streamout_t result);
17816
17817uint __ovld intel_sub_group_avc_ime_get_streamout_major_shape_motion_vectors(
17818 intel_sub_group_avc_ime_result_single_reference_streamout_t result,
17819 uchar major_shape);
17820ushort __ovld intel_sub_group_avc_ime_get_streamout_major_shape_distortions(
17821 intel_sub_group_avc_ime_result_single_reference_streamout_t result,
17822 uchar major_shape);
17823uchar __ovld intel_sub_group_avc_ime_get_streamout_major_shape_reference_ids(
17824 intel_sub_group_avc_ime_result_single_reference_streamout_t result,
17825 uchar major_shape);
17826uint __ovld intel_sub_group_avc_ime_get_streamout_major_shape_motion_vectors(
17827 intel_sub_group_avc_ime_result_dual_reference_streamout_t result,
17828 uchar major_shape, uchar direction);
17829ushort __ovld intel_sub_group_avc_ime_get_streamout_major_shape_distortions(
17830 intel_sub_group_avc_ime_result_dual_reference_streamout_t result,
17831 uchar major_shape, uchar direction);
17832uchar __ovld intel_sub_group_avc_ime_get_streamout_major_shape_reference_ids(
17833 intel_sub_group_avc_ime_result_dual_reference_streamout_t result,
17834 uchar major_shape, uchar direction);
17835
17836uchar __ovld intel_sub_group_avc_ime_get_border_reached(
17837 uchar image_select, intel_sub_group_avc_ime_result_t result);
17838uchar __ovld intel_sub_group_avc_ime_get_truncated_search_indication(
17839 intel_sub_group_avc_ime_result_t result);
17840uchar __ovld
17841intel_sub_group_avc_ime_get_unidirectional_early_search_termination(
17842 intel_sub_group_avc_ime_result_t result);
17843uint __ovld intel_sub_group_avc_ime_get_weighting_pattern_minimum_motion_vector(
17844 intel_sub_group_avc_ime_result_t result);
17845ushort __ovld intel_sub_group_avc_ime_get_weighting_pattern_minimum_distortion(
17846 intel_sub_group_avc_ime_result_t result);
17847
17848// REF built-in functions
17849intel_sub_group_avc_ref_payload_t __ovld
17850intel_sub_group_avc_fme_initialize(
17851 ushort2 src_coord, ulong motion_vectors, uchar major_shapes,
17852 uchar minor_shapes, uchar directions, uchar pixel_resolution,
17853 uchar sad_adjustment);
17854intel_sub_group_avc_ref_payload_t __ovld
17855intel_sub_group_avc_bme_initialize(
17856 ushort2 src_coord, ulong motion_vectors, uchar major_shapes,
17857 uchar minor_shapes, uchar directions, uchar pixel_resolution,
17858 uchar bidirectional_weight, uchar sad_adjustment);
17859
17860intel_sub_group_avc_ref_payload_t __ovld
17861intel_sub_group_avc_ref_set_bidirectional_mix_disable(
17862 intel_sub_group_avc_ref_payload_t payload);
17863intel_sub_group_avc_ref_payload_t __ovld
17864intel_sub_group_avc_ref_set_bilinear_filter_enable(
17865 intel_sub_group_avc_ref_payload_t payload);
17866
17867#if defined(__opencl_c_images)
17868intel_sub_group_avc_ref_result_t __ovld
17869intel_sub_group_avc_ref_evaluate_with_single_reference(
17870 read_only image2d_t src_image, read_only image2d_t ref_image,
17871 sampler_t vme_media_sampler, intel_sub_group_avc_ref_payload_t payload);
17872intel_sub_group_avc_ref_result_t __ovld
17873intel_sub_group_avc_ref_evaluate_with_dual_reference(
17874 read_only image2d_t src_image, read_only image2d_t fwd_ref_image,
17875 read_only image2d_t bwd_ref_image, sampler_t vme_media_sampler,
17876 intel_sub_group_avc_ref_payload_t payload);
17877intel_sub_group_avc_ref_result_t __ovld
17878intel_sub_group_avc_ref_evaluate_with_multi_reference(
17879 read_only image2d_t src_image, uint packed_reference_ids,
17880 sampler_t vme_media_sampler, intel_sub_group_avc_ref_payload_t payload);
17881intel_sub_group_avc_ref_result_t __ovld
17882intel_sub_group_avc_ref_evaluate_with_multi_reference(
17883 read_only image2d_t src_image, uint packed_reference_ids,
17884 uchar packed_reference_field_polarities, sampler_t vme_media_sampler,
17885 intel_sub_group_avc_ref_payload_t payload);
17886#endif //defined(__opencl_c_images)
17887
17888// SIC built-in functions
17889intel_sub_group_avc_sic_payload_t __ovld
17890intel_sub_group_avc_sic_initialize(
17891 ushort2 src_coord);
17892intel_sub_group_avc_sic_payload_t __ovld
17893intel_sub_group_avc_sic_configure_skc(
17894 uint skip_block_partition_type, uint skip_motion_vector_mask,
17895 ulong motion_vectors, uchar bidirectional_weight, uchar skip_sad_adjustment,
17896 intel_sub_group_avc_sic_payload_t payload);
17897intel_sub_group_avc_sic_payload_t __ovld intel_sub_group_avc_sic_configure_ipe(
17898 uchar luma_intra_partition_mask, uchar intra_neighbour_availability,
17899 uchar left_edge_luma_pixels, uchar upper_left_corner_luma_pixel,
17900 uchar upper_edge_luma_pixels, uchar upper_right_edge_luma_pixels,
17901 uchar intra_sad_adjustment, intel_sub_group_avc_sic_payload_t payload);
17902intel_sub_group_avc_sic_payload_t __ovld intel_sub_group_avc_sic_configure_ipe(
17903 uchar luma_intra_partition_mask, uchar intra_neighbour_availability,
17904 uchar left_edge_luma_pixels, uchar upper_left_corner_luma_pixel,
17905 uchar upper_edge_luma_pixels, uchar upper_right_edge_luma_pixels,
17906 ushort left_edge_chroma_pixels, ushort upper_left_corner_chroma_pixel,
17907 ushort upper_edge_chroma_pixels, uchar intra_sad_adjustment,
17908 intel_sub_group_avc_sic_payload_t payload);
17909uint __ovld
17910intel_sub_group_avc_sic_get_motion_vector_mask(
17911 uint skip_block_partition_type, uchar direction);
17912
17913intel_sub_group_avc_sic_payload_t __ovld
17914intel_sub_group_avc_sic_set_intra_luma_shape_penalty(
17915 uint packed_shape_cost, intel_sub_group_avc_sic_payload_t payload);
17916intel_sub_group_avc_sic_payload_t __ovld
17917intel_sub_group_avc_sic_set_intra_luma_mode_cost_function(
17918 uchar luma_mode_penalty, uint luma_packed_neighbor_modes,
17919 uint luma_packed_non_dc_penalty, intel_sub_group_avc_sic_payload_t payload);
17920intel_sub_group_avc_sic_payload_t __ovld
17921intel_sub_group_avc_sic_set_intra_chroma_mode_cost_function(
17922 uchar chroma_mode_penalty, intel_sub_group_avc_sic_payload_t payload);
17923
17924intel_sub_group_avc_sic_payload_t __ovld
17925intel_sub_group_avc_sic_set_skc_bilinear_filter_enable(
17926 intel_sub_group_avc_sic_payload_t payload);
17927intel_sub_group_avc_sic_payload_t __ovld
17928intel_sub_group_avc_sic_set_skc_forward_transform_enable(
17929 ulong packed_sad_coefficients, intel_sub_group_avc_sic_payload_t payload);
17930intel_sub_group_avc_sic_payload_t __ovld
17931intel_sub_group_avc_sic_set_block_based_raw_skip_sad(
17932 uchar block_based_skip_type,
17933 intel_sub_group_avc_sic_payload_t payload);
17934
17935#if defined(__opencl_c_images)
17936intel_sub_group_avc_sic_result_t __ovld
17937intel_sub_group_avc_sic_evaluate_ipe(
17938 read_only image2d_t src_image, sampler_t vme_media_sampler,
17939 intel_sub_group_avc_sic_payload_t payload);
17940intel_sub_group_avc_sic_result_t __ovld
17941intel_sub_group_avc_sic_evaluate_with_single_reference(
17942 read_only image2d_t src_image, read_only image2d_t ref_image,
17943 sampler_t vme_media_sampler, intel_sub_group_avc_sic_payload_t payload);
17944intel_sub_group_avc_sic_result_t __ovld
17945intel_sub_group_avc_sic_evaluate_with_dual_reference(
17946 read_only image2d_t src_image, read_only image2d_t fwd_ref_image,
17947 read_only image2d_t bwd_ref_image, sampler_t vme_media_sampler,
17948 intel_sub_group_avc_sic_payload_t payload);
17949intel_sub_group_avc_sic_result_t __ovld
17950intel_sub_group_avc_sic_evaluate_with_multi_reference(
17951 read_only image2d_t src_image, uint packed_reference_ids,
17952 sampler_t vme_media_sampler, intel_sub_group_avc_sic_payload_t payload);
17953intel_sub_group_avc_sic_result_t __ovld
17954intel_sub_group_avc_sic_evaluate_with_multi_reference(
17955 read_only image2d_t src_image, uint packed_reference_ids,
17956 uchar packed_reference_field_polarities, sampler_t vme_media_sampler,
17957 intel_sub_group_avc_sic_payload_t payload);
17958#endif //defined(__opencl_c_images)
17959
17960uchar __ovld intel_sub_group_avc_sic_get_ipe_luma_shape(
17961 intel_sub_group_avc_sic_result_t result);
17962ushort __ovld intel_sub_group_avc_sic_get_best_ipe_luma_distortion(
17963 intel_sub_group_avc_sic_result_t result);
17964ushort __ovld intel_sub_group_avc_sic_get_best_ipe_chroma_distortion(
17965 intel_sub_group_avc_sic_result_t result);
17966ulong __ovld intel_sub_group_avc_sic_get_packed_ipe_luma_modes(
17967 intel_sub_group_avc_sic_result_t result);
17968uchar __ovld intel_sub_group_avc_sic_get_ipe_chroma_mode(
17969 intel_sub_group_avc_sic_result_t result);
17970uint __ovld intel_sub_group_avc_sic_get_packed_skc_luma_count_threshold(
17971 intel_sub_group_avc_sic_result_t result);
17972ulong __ovld intel_sub_group_avc_sic_get_packed_skc_luma_sum_threshold(
17973 intel_sub_group_avc_sic_result_t result);
17974ushort __ovld intel_sub_group_avc_sic_get_inter_raw_sads(
17975 intel_sub_group_avc_sic_result_t result);
17976
17977// Wrappers
17978intel_sub_group_avc_ime_payload_t __ovld
17979intel_sub_group_avc_ime_set_inter_base_multi_reference_penalty(
17980 uchar reference_base_penalty, intel_sub_group_avc_ime_payload_t payload);
17981intel_sub_group_avc_ref_payload_t __ovld
17982intel_sub_group_avc_ref_set_inter_base_multi_reference_penalty(
17983 uchar reference_base_penalty, intel_sub_group_avc_ref_payload_t payload);
17984intel_sub_group_avc_sic_payload_t __ovld
17985intel_sub_group_avc_sic_set_inter_base_multi_reference_penalty(
17986 uchar reference_base_penalty, intel_sub_group_avc_sic_payload_t payload);
17987
17988intel_sub_group_avc_ime_payload_t __ovld
17989intel_sub_group_avc_ime_set_inter_shape_penalty(
17990 ulong packed_shape_cost, intel_sub_group_avc_ime_payload_t payload);
17991intel_sub_group_avc_ref_payload_t __ovld
17992intel_sub_group_avc_ref_set_inter_shape_penalty(
17993 ulong packed_shape_cost, intel_sub_group_avc_ref_payload_t payload);
17994intel_sub_group_avc_sic_payload_t __ovld
17995intel_sub_group_avc_sic_set_inter_shape_penalty(
17996 ulong packed_shape_cost, intel_sub_group_avc_sic_payload_t payload);
17997
17998intel_sub_group_avc_ime_payload_t __ovld
17999intel_sub_group_avc_ime_set_inter_direction_penalty(
18000 uchar direction_cost, intel_sub_group_avc_ime_payload_t payload);
18001intel_sub_group_avc_ref_payload_t __ovld
18002intel_sub_group_avc_ref_set_inter_direction_penalty(
18003 uchar direction_cost, intel_sub_group_avc_ref_payload_t payload);
18004intel_sub_group_avc_sic_payload_t __ovld
18005intel_sub_group_avc_sic_set_inter_direction_penalty(
18006 uchar direction_cost, intel_sub_group_avc_sic_payload_t payload);
18007
18008intel_sub_group_avc_ime_payload_t __ovld
18009intel_sub_group_avc_ime_set_motion_vector_cost_function(
18010 ulong packed_cost_center_delta, uint2 packed_cost_table,
18011 uchar cost_precision, intel_sub_group_avc_ime_payload_t payload);
18012intel_sub_group_avc_ref_payload_t __ovld
18013intel_sub_group_avc_ref_set_motion_vector_cost_function(
18014 ulong packed_cost_center_delta, uint2 packed_cost_table,
18015 uchar cost_precision, intel_sub_group_avc_ref_payload_t payload);
18016intel_sub_group_avc_sic_payload_t __ovld
18017intel_sub_group_avc_sic_set_motion_vector_cost_function(
18018 ulong packed_cost_center_delta, uint2 packed_cost_table,
18019 uchar cost_precision, intel_sub_group_avc_sic_payload_t payload);
18020
18021intel_sub_group_avc_ime_payload_t __ovld
18022intel_sub_group_avc_ime_set_source_interlaced_field_polarity(
18023 uchar src_field_polarity, intel_sub_group_avc_ime_payload_t payload);
18024intel_sub_group_avc_ref_payload_t __ovld
18025intel_sub_group_avc_ref_set_source_interlaced_field_polarity(
18026 uchar src_field_polarity, intel_sub_group_avc_ref_payload_t payload);
18027intel_sub_group_avc_sic_payload_t __ovld
18028intel_sub_group_avc_sic_set_source_interlaced_field_polarity(
18029 uchar src_field_polarity, intel_sub_group_avc_sic_payload_t payload);
18030
18031intel_sub_group_avc_ime_payload_t __ovld
18032intel_sub_group_avc_ime_set_single_reference_interlaced_field_polarity(
18033 uchar ref_field_polarity, intel_sub_group_avc_ime_payload_t payload);
18034intel_sub_group_avc_ref_payload_t __ovld
18035intel_sub_group_avc_ref_set_single_reference_interlaced_field_polarity(
18036 uchar ref_field_polarity, intel_sub_group_avc_ref_payload_t payload);
18037intel_sub_group_avc_sic_payload_t __ovld
18038intel_sub_group_avc_sic_set_single_reference_interlaced_field_polarity(
18039 uchar ref_field_polarity, intel_sub_group_avc_sic_payload_t payload);
18040intel_sub_group_avc_ime_payload_t __ovld
18041intel_sub_group_avc_ime_set_dual_reference_interlaced_field_polarities(
18042 uchar fwd_ref_field_polarity, uchar bwd_ref_field_polarity,
18043 intel_sub_group_avc_ime_payload_t payload);
18044intel_sub_group_avc_ref_payload_t __ovld
18045intel_sub_group_avc_ref_set_dual_reference_interlaced_field_polarities(
18046 uchar fwd_ref_field_polarity, uchar bwd_ref_field_polarity,
18047 intel_sub_group_avc_ref_payload_t payload);
18048intel_sub_group_avc_sic_payload_t __ovld
18049intel_sub_group_avc_sic_set_dual_reference_interlaced_field_polarities(
18050 uchar fwd_ref_field_polarity, uchar bwd_ref_field_polarity,
18051 intel_sub_group_avc_sic_payload_t payload);
18052
18053intel_sub_group_avc_ime_payload_t __ovld
18054intel_sub_group_avc_ime_set_ac_only_haar(
18055 intel_sub_group_avc_ime_payload_t payload);
18056intel_sub_group_avc_ref_payload_t __ovld
18057intel_sub_group_avc_ref_set_ac_only_haar(
18058 intel_sub_group_avc_ref_payload_t payload);
18059intel_sub_group_avc_sic_payload_t __ovld
18060intel_sub_group_avc_sic_set_ac_only_haar(
18061 intel_sub_group_avc_sic_payload_t payload);
18062
18063ulong __ovld intel_sub_group_avc_ime_get_motion_vectors(
18064 intel_sub_group_avc_ime_result_t result);
18065ulong __ovld intel_sub_group_avc_ref_get_motion_vectors(
18066 intel_sub_group_avc_ref_result_t result);
18067
18068ushort __ovld intel_sub_group_avc_ime_get_inter_distortions(
18069 intel_sub_group_avc_ime_result_t result);
18070ushort __ovld intel_sub_group_avc_ref_get_inter_distortions(
18071 intel_sub_group_avc_ref_result_t result);
18072ushort __ovld intel_sub_group_avc_sic_get_inter_distortions(
18073 intel_sub_group_avc_sic_result_t result);
18074
18075ushort __ovld intel_sub_group_avc_ime_get_best_inter_distortion(
18076 intel_sub_group_avc_ime_result_t result);
18077ushort __ovld intel_sub_group_avc_ref_get_best_inter_distortion(
18078 intel_sub_group_avc_ref_result_t result);
18079
18080uchar __ovld intel_sub_group_avc_ime_get_inter_major_shape(
18081 intel_sub_group_avc_ime_result_t result);
18082uchar __ovld intel_sub_group_avc_ref_get_inter_major_shape(
18083 intel_sub_group_avc_ref_result_t result);
18084uchar __ovld intel_sub_group_avc_ime_get_inter_minor_shapes(
18085 intel_sub_group_avc_ime_result_t result);
18086uchar __ovld intel_sub_group_avc_ref_get_inter_minor_shapes(
18087 intel_sub_group_avc_ref_result_t result);
18088
18089uchar __ovld intel_sub_group_avc_ime_get_inter_directions(
18090 intel_sub_group_avc_ime_result_t result);
18091uchar __ovld intel_sub_group_avc_ref_get_inter_directions(
18092 intel_sub_group_avc_ref_result_t result);
18093
18094uchar __ovld intel_sub_group_avc_ime_get_inter_motion_vector_count(
18095 intel_sub_group_avc_ime_result_t result);
18096uchar __ovld intel_sub_group_avc_ref_get_inter_motion_vector_count(
18097 intel_sub_group_avc_ref_result_t result);
18098
18099uint __ovld intel_sub_group_avc_ime_get_inter_reference_ids(
18100 intel_sub_group_avc_ime_result_t result);
18101uint __ovld intel_sub_group_avc_ref_get_inter_reference_ids(
18102 intel_sub_group_avc_ref_result_t result);
18103
18104uchar __ovld
18105intel_sub_group_avc_ime_get_inter_reference_interlaced_field_polarities(
18106 uint packed_reference_ids, uint packed_reference_parameter_field_polarities,
18107 intel_sub_group_avc_ime_result_t result);
18108uchar __ovld
18109intel_sub_group_avc_ref_get_inter_reference_interlaced_field_polarities(
18110 uint packed_reference_ids, uint packed_reference_parameter_field_polarities,
18111 intel_sub_group_avc_ref_result_t result);
18112
18113// Type conversion functions
18114intel_sub_group_avc_mce_payload_t __ovld
18115intel_sub_group_avc_ime_convert_to_mce_payload(
18116 intel_sub_group_avc_ime_payload_t payload);
18117intel_sub_group_avc_ime_payload_t __ovld
18118intel_sub_group_avc_mce_convert_to_ime_payload(
18119 intel_sub_group_avc_mce_payload_t payload);
18120intel_sub_group_avc_mce_payload_t __ovld
18121intel_sub_group_avc_ref_convert_to_mce_payload(
18122 intel_sub_group_avc_ref_payload_t payload);
18123intel_sub_group_avc_ref_payload_t __ovld
18124intel_sub_group_avc_mce_convert_to_ref_payload(
18125 intel_sub_group_avc_mce_payload_t payload);
18126intel_sub_group_avc_mce_payload_t __ovld
18127intel_sub_group_avc_sic_convert_to_mce_payload(
18128 intel_sub_group_avc_sic_payload_t payload);
18129intel_sub_group_avc_sic_payload_t __ovld
18130intel_sub_group_avc_mce_convert_to_sic_payload(
18131 intel_sub_group_avc_mce_payload_t payload);
18132
18133intel_sub_group_avc_mce_result_t __ovld
18134intel_sub_group_avc_ime_convert_to_mce_result(
18135 intel_sub_group_avc_ime_result_t result);
18136intel_sub_group_avc_ime_result_t __ovld
18137intel_sub_group_avc_mce_convert_to_ime_result(
18138 intel_sub_group_avc_mce_result_t result);
18139intel_sub_group_avc_mce_result_t __ovld
18140intel_sub_group_avc_ref_convert_to_mce_result(
18141 intel_sub_group_avc_ref_result_t result);
18142intel_sub_group_avc_ref_result_t __ovld
18143intel_sub_group_avc_mce_convert_to_ref_result(
18144 intel_sub_group_avc_mce_result_t result);
18145intel_sub_group_avc_mce_result_t __ovld
18146intel_sub_group_avc_sic_convert_to_mce_result(
18147 intel_sub_group_avc_sic_result_t result);
18148intel_sub_group_avc_sic_result_t __ovld
18149intel_sub_group_avc_mce_convert_to_sic_result(
18150 intel_sub_group_avc_mce_result_t result);
18151#pragma OPENCL EXTENSION cl_intel_device_side_avc_motion_estimation : end
18152#endif // cl_intel_device_side_avc_motion_estimation
18153
18154#ifdef cl_amd_media_ops
18155uint __ovld amd_bitalign(uint, uint, uint);
18156uint2 __ovld amd_bitalign(uint2, uint2, uint2);
18157uint3 __ovld amd_bitalign(uint3, uint3, uint3);
18158uint4 __ovld amd_bitalign(uint4, uint4, uint4);
18159uint8 __ovld amd_bitalign(uint8, uint8, uint8);
18160uint16 __ovld amd_bitalign(uint16, uint16, uint16);
18161
18162uint __ovld amd_bytealign(uint, uint, uint);
18163uint2 __ovld amd_bytealign(uint2, uint2, uint2);
18164uint3 __ovld amd_bytealign(uint3, uint3, uint3);
18165uint4 __ovld amd_bytealign(uint4, uint4, uint4);
18166uint8 __ovld amd_bytealign(uint8, uint8, uint8);
18167uint16 __ovld amd_bytealign(uint16, uint16, uint16);
18168
18169uint __ovld amd_lerp(uint, uint, uint);
18170uint2 __ovld amd_lerp(uint2, uint2, uint2);
18171uint3 __ovld amd_lerp(uint3, uint3, uint3);
18172uint4 __ovld amd_lerp(uint4, uint4, uint4);
18173uint8 __ovld amd_lerp(uint8, uint8, uint8);
18174uint16 __ovld amd_lerp(uint16, uint16, uint16);
18175
18176uint __ovld amd_pack(float4 v);
18177
18178uint __ovld amd_sad4(uint4, uint4, uint);
18179
18180uint __ovld amd_sadhi(uint, uint, uint);
18181uint2 __ovld amd_sadhi(uint2, uint2, uint2);
18182uint3 __ovld amd_sadhi(uint3, uint3, uint3);
18183uint4 __ovld amd_sadhi(uint4, uint4, uint4);
18184uint8 __ovld amd_sadhi(uint8, uint8, uint8);
18185uint16 __ovld amd_sadhi(uint16, uint16, uint16);
18186
18187uint __ovld amd_sad(uint, uint, uint);
18188uint2 __ovld amd_sad(uint2, uint2, uint2);
18189uint3 __ovld amd_sad(uint3, uint3, uint3);
18190uint4 __ovld amd_sad(uint4, uint4, uint4);
18191uint8 __ovld amd_sad(uint8, uint8, uint8);
18192uint16 __ovld amd_sad(uint16, uint16, uint16);
18193
18194float __ovld amd_unpack0(uint);
18195float2 __ovld amd_unpack0(uint2);
18196float3 __ovld amd_unpack0(uint3);
18197float4 __ovld amd_unpack0(uint4);
18198float8 __ovld amd_unpack0(uint8);
18199float16 __ovld amd_unpack0(uint16);
18200
18201float __ovld amd_unpack1(uint);
18202float2 __ovld amd_unpack1(uint2);
18203float3 __ovld amd_unpack1(uint3);
18204float4 __ovld amd_unpack1(uint4);
18205float8 __ovld amd_unpack1(uint8);
18206float16 __ovld amd_unpack1(uint16);
18207
18208float __ovld amd_unpack2(uint);
18209float2 __ovld amd_unpack2(uint2);
18210float3 __ovld amd_unpack2(uint3);
18211float4 __ovld amd_unpack2(uint4);
18212float8 __ovld amd_unpack2(uint8);
18213float16 __ovld amd_unpack2(uint16);
18214
18215float __ovld amd_unpack3(uint);
18216float2 __ovld amd_unpack3(uint2);
18217float3 __ovld amd_unpack3(uint3);
18218float4 __ovld amd_unpack3(uint4);
18219float8 __ovld amd_unpack3(uint8);
18220float16 __ovld amd_unpack3(uint16);
18221#endif // cl_amd_media_ops
18222
18223#ifdef cl_amd_media_ops2
18224int __ovld amd_bfe(int src0, uint src1, uint src2);
18225int2 __ovld amd_bfe(int2 src0, uint2 src1, uint2 src2);
18226int3 __ovld amd_bfe(int3 src0, uint3 src1, uint3 src2);
18227int4 __ovld amd_bfe(int4 src0, uint4 src1, uint4 src2);
18228int8 __ovld amd_bfe(int8 src0, uint8 src1, uint8 src2);
18229int16 __ovld amd_bfe(int16 src0, uint16 src1, uint16 src2);
18230
18231uint __ovld amd_bfe(uint src0, uint src1, uint src2);
18232uint2 __ovld amd_bfe(uint2 src0, uint2 src1, uint2 src2);
18233uint3 __ovld amd_bfe(uint3 src0, uint3 src1, uint3 src2);
18234uint4 __ovld amd_bfe(uint4 src0, uint4 src1, uint4 src2);
18235uint8 __ovld amd_bfe(uint8 src0, uint8 src1, uint8 src2);
18236uint16 __ovld amd_bfe(uint16 src0, uint16 src1, uint16 src2);
18237
18238uint __ovld amd_bfm(uint src0, uint src1);
18239uint2 __ovld amd_bfm(uint2 src0, uint2 src1);
18240uint3 __ovld amd_bfm(uint3 src0, uint3 src1);
18241uint4 __ovld amd_bfm(uint4 src0, uint4 src1);
18242uint8 __ovld amd_bfm(uint8 src0, uint8 src1);
18243uint16 __ovld amd_bfm(uint16 src0, uint16 src1);
18244
18245float __ovld amd_max3(float src0, float src1, float src2);
18246float2 __ovld amd_max3(float2 src0, float2 src1, float2 src2);
18247float3 __ovld amd_max3(float3 src0, float3 src1, float3 src2);
18248float4 __ovld amd_max3(float4 src0, float4 src1, float4 src2);
18249float8 __ovld amd_max3(float8 src0, float8 src1, float8 src2);
18250float16 __ovld amd_max3(float16 src0, float16 src1, float16 src2);
18251
18252int __ovld amd_max3(int src0, int src1, int src2);
18253int2 __ovld amd_max3(int2 src0, int2 src1, int2 src2);
18254int3 __ovld amd_max3(int3 src0, int3 src1, int3 src2);
18255int4 __ovld amd_max3(int4 src0, int4 src1, int4 src2);
18256int8 __ovld amd_max3(int8 src0, int8 src1, int8 src2);
18257int16 __ovld amd_max3(int16 src0, int16 src1, int16 src2);
18258
18259uint __ovld amd_max3(uint src0, uint src1, uint src2);
18260uint2 __ovld amd_max3(uint2 src0, uint2 src1, uint2 src2);
18261uint3 __ovld amd_max3(uint3 src0, uint3 src1, uint3 src2);
18262uint4 __ovld amd_max3(uint4 src0, uint4 src1, uint4 src2);
18263uint8 __ovld amd_max3(uint8 src0, uint8 src1, uint8 src2);
18264uint16 __ovld amd_max3(uint16 src0, uint16 src1, uint16 src2);
18265
18266float __ovld amd_median3(float src0, float src1, float src2);
18267float2 __ovld amd_median3(float2 src0, float2 src1, float2 src2);
18268float3 __ovld amd_median3(float3 src0, float3 src1, float3 src2);
18269float4 __ovld amd_median3(float4 src0, float4 src1, float4 src2);
18270float8 __ovld amd_median3(float8 src0, float8 src1, float8 src2);
18271float16 __ovld amd_median3(float16 src0, float16 src1, float16 src2);
18272
18273int __ovld amd_median3(int src0, int src1, int src2);
18274int2 __ovld amd_median3(int2 src0, int2 src1, int2 src2);
18275int3 __ovld amd_median3(int3 src0, int3 src1, int3 src2);
18276int4 __ovld amd_median3(int4 src0, int4 src1, int4 src2);
18277int8 __ovld amd_median3(int8 src0, int8 src1, int8 src2);
18278int16 __ovld amd_median3(int16 src0, int16 src1, int16 src2);
18279
18280uint __ovld amd_median3(uint src0, uint src1, uint src2);
18281uint2 __ovld amd_median3(uint2 src0, uint2 src1, uint2 src2);
18282uint3 __ovld amd_median3(uint3 src0, uint3 src1, uint3 src2);
18283uint4 __ovld amd_median3(uint4 src0, uint4 src1, uint4 src2);
18284uint8 __ovld amd_median3(uint8 src0, uint8 src1, uint8 src2);
18285uint16 __ovld amd_median3(uint16 src0, uint16 src1, uint16 src2);
18286
18287float __ovld amd_min3(float src0, float src1, float src);
18288float2 __ovld amd_min3(float2 src0, float2 src1, float2 src);
18289float3 __ovld amd_min3(float3 src0, float3 src1, float3 src);
18290float4 __ovld amd_min3(float4 src0, float4 src1, float4 src);
18291float8 __ovld amd_min3(float8 src0, float8 src1, float8 src);
18292float16 __ovld amd_min3(float16 src0, float16 src1, float16 src);
18293
18294int __ovld amd_min3(int src0, int src1, int src2);
18295int2 __ovld amd_min3(int2 src0, int2 src1, int2 src2);
18296int3 __ovld amd_min3(int3 src0, int3 src1, int3 src2);
18297int4 __ovld amd_min3(int4 src0, int4 src1, int4 src2);
18298int8 __ovld amd_min3(int8 src0, int8 src1, int8 src2);
18299int16 __ovld amd_min3(int16 src0, int16 src1, int16 src2);
18300
18301uint __ovld amd_min3(uint src0, uint src1, uint src2);
18302uint2 __ovld amd_min3(uint2 src0, uint2 src1, uint2 src2);
18303uint3 __ovld amd_min3(uint3 src0, uint3 src1, uint3 src2);
18304uint4 __ovld amd_min3(uint4 src0, uint4 src1, uint4 src2);
18305uint8 __ovld amd_min3(uint8 src0, uint8 src1, uint8 src2);
18306uint16 __ovld amd_min3(uint16 src0, uint16 src1, uint16 src2);
18307
18308ulong __ovld amd_mqsad(ulong src0, uint src1, ulong src2);
18309ulong2 __ovld amd_mqsad(ulong2 src0, uint2 src1, ulong2 src2);
18310ulong3 __ovld amd_mqsad(ulong3 src0, uint3 src1, ulong3 src2);
18311ulong4 __ovld amd_mqsad(ulong4 src0, uint4 src1, ulong4 src2);
18312ulong8 __ovld amd_mqsad(ulong8 src0, uint8 src1, ulong8 src2);
18313ulong16 __ovld amd_mqsad(ulong16 src0, uint16 src1, ulong16 src2);
18314
18315ulong __ovld amd_qsad(ulong src0, uint src1, ulong src2);
18316ulong2 __ovld amd_qsad(ulong2 src0, uint2 src1, ulong2 src2);
18317ulong3 __ovld amd_qsad(ulong3 src0, uint3 src1, ulong3 src2);
18318ulong4 __ovld amd_qsad(ulong4 src0, uint4 src1, ulong4 src2);
18319ulong8 __ovld amd_qsad(ulong8 src0, uint8 src1, ulong8 src2);
18320ulong16 __ovld amd_qsad(ulong16 src0, uint16 src1, ulong16 src2);
18321
18322uint __ovld amd_msad(uint src0, uint src1, uint src2);
18323uint2 __ovld amd_msad(uint2 src0, uint2 src1, uint2 src2);
18324uint3 __ovld amd_msad(uint3 src0, uint3 src1, uint3 src2);
18325uint4 __ovld amd_msad(uint4 src0, uint4 src1, uint4 src2);
18326uint8 __ovld amd_msad(uint8 src0, uint8 src1, uint8 src2);
18327uint16 __ovld amd_msad(uint16 src0, uint16 src1, uint16 src2);
18328
18329uint __ovld amd_sadd(uint src0, uint src1, uint src2);
18330uint2 __ovld amd_sadd(uint2 src0, uint2 src1, uint2 src2);
18331uint3 __ovld amd_sadd(uint3 src0, uint3 src1, uint3 src2);
18332uint4 __ovld amd_sadd(uint4 src0, uint4 src1, uint4 src2);
18333uint8 __ovld amd_sadd(uint8 src0, uint8 src1, uint8 src2);
18334uint16 __ovld amd_sadd(uint16 src0, uint16 src1, uint16 src2);
18335
18336uint __ovld amd_sadw(uint src0, uint src1, uint src2);
18337uint2 __ovld amd_sadw(uint2 src0, uint2 src1, uint2 src2);
18338uint3 __ovld amd_sadw(uint3 src0, uint3 src1, uint3 src2);
18339uint4 __ovld amd_sadw(uint4 src0, uint4 src1, uint4 src2);
18340uint8 __ovld amd_sadw(uint8 src0, uint8 src1, uint8 src2);
18341uint16 __ovld amd_sadw(uint16 src0, uint16 src1, uint16 src2);
18342#endif // cl_amd_media_ops2
18343
18344#if defined(cl_arm_integer_dot_product_int8)
18345uint __ovld arm_dot(uchar4, uchar4);
18346int __ovld arm_dot(char4, char4);
18347#endif // defined(cl_arm_integer_dot_product_int8)
18348
18349#if defined(cl_arm_integer_dot_product_accumulate_int8)
18350uint __ovld arm_dot_acc(uchar4, uchar4, uint);
18351int __ovld arm_dot_acc(char4, char4, int);
18352#endif // defined(cl_arm_integer_dot_product_accumulate_int8)
18353
18354#if defined(cl_arm_integer_dot_product_accumulate_int16)
18355uint __ovld arm_dot_acc(ushort2, ushort2, uint);
18356int __ovld arm_dot_acc(short2, short2, int);
18357#endif // defined(cl_arm_integer_dot_product_accumulate_int16)
18358
18359#if defined(cl_arm_integer_dot_product_accumulate_saturate_int8)
18360uint __ovld arm_dot_acc_sat(uchar4, uchar4, uint);
18361int __ovld arm_dot_acc_sat(char4, char4, int);
18362#endif // defined(cl_arm_integer_dot_product_accumulate_saturate_int8)
18363
18364// Disable any extensions we may have enabled previously.
18365#pragma OPENCL EXTENSION all : disable
18366
18367#undef __opencl_c_named_address_space_builtins
18368
18369#undef __cnfn
18370#undef __ovld
18371#endif //_OPENCL_H_
src/Compilation.zig+3-12
...@@ -305,7 +305,6 @@ pub const LangToExt = std.StaticStringMap(FileExt).initComptime(.{...@@ -305,7 +305,6 @@ pub const LangToExt = std.StaticStringMap(FileExt).initComptime(.{
305 .{ "objective-c++-header", .hmm },305 .{ "objective-c++-header", .hmm },
306 .{ "assembler", .assembly },306 .{ "assembler", .assembly },
307 .{ "assembler-with-cpp", .assembly_with_cpp },307 .{ "assembler-with-cpp", .assembly_with_cpp },
308 .{ "cuda", .cu },
309});308});
310309
311/// For passing to a C compiler.310/// For passing to a C compiler.
...@@ -4699,7 +4698,6 @@ fn updateCObject(comp: *Compilation, c_object: *CObject, c_obj_prog_node: std.Pr...@@ -4699,7 +4698,6 @@ fn updateCObject(comp: *Compilation, c_object: *CObject, c_obj_prog_node: std.Pr
4699 .hm => "objective-c-header",4698 .hm => "objective-c-header",
4700 .mm => "objective-c++",4699 .mm => "objective-c++",
4701 .hmm => "objective-c++-header",4700 .hmm => "objective-c++-header",
4702 .cu => "cuda",
4703 else => fatal("language '{s}' is unsupported in this context", .{@tagName(ext)}),4701 else => fatal("language '{s}' is unsupported in this context", .{@tagName(ext)}),
4704 } });4702 } });
4705 }4703 }
...@@ -5583,7 +5581,6 @@ pub fn addCCArgs(...@@ -5583,7 +5581,6 @@ pub fn addCCArgs(
5583 .hm,5581 .hm,
5584 .mm,5582 .mm,
5585 .hmm,5583 .hmm,
5586 .cu,
5587 => {5584 => {
5588 try argv.append("-fno-spell-checking");5585 try argv.append("-fno-spell-checking");
55895586
...@@ -5821,7 +5818,6 @@ fn failWin32ResourceWithOwnedBundle(...@@ -5821,7 +5818,6 @@ fn failWin32ResourceWithOwnedBundle(
5821pub const FileExt = enum {5818pub const FileExt = enum {
5822 c,5819 c,
5823 cpp,5820 cpp,
5824 cu,
5825 h,5821 h,
5826 hpp,5822 hpp,
5827 hm,5823 hm,
...@@ -5852,7 +5848,6 @@ pub const FileExt = enum {...@@ -5852,7 +5848,6 @@ pub const FileExt = enum {
58525848
5853 .c,5849 .c,
5854 .cpp,5850 .cpp,
5855 .cu,
5856 .m,5851 .m,
5857 .mm,5852 .mm,
5858 .ll,5853 .ll,
...@@ -5874,7 +5869,7 @@ pub const FileExt = enum {...@@ -5874,7 +5869,7 @@ pub const FileExt = enum {
58745869
5875 pub fn clangSupportsDiagnostics(ext: FileExt) bool {5870 pub fn clangSupportsDiagnostics(ext: FileExt) bool {
5876 return switch (ext) {5871 return switch (ext) {
5877 .c, .cpp, .h, .hpp, .hm, .hmm, .m, .mm, .cu, .ll, .bc => true,5872 .c, .cpp, .h, .hpp, .hm, .hmm, .m, .mm, .ll, .bc => true,
58785873
5879 .assembly,5874 .assembly,
5880 .assembly_with_cpp,5875 .assembly_with_cpp,
...@@ -5893,7 +5888,7 @@ pub const FileExt = enum {...@@ -5893,7 +5888,7 @@ pub const FileExt = enum {
58935888
5894 pub fn clangSupportsDepFile(ext: FileExt) bool {5889 pub fn clangSupportsDepFile(ext: FileExt) bool {
5895 return switch (ext) {5890 return switch (ext) {
5896 .assembly_with_cpp, .c, .cpp, .h, .hpp, .hm, .hmm, .m, .mm, .cu => true,5891 .assembly_with_cpp, .c, .cpp, .h, .hpp, .hm, .hmm, .m, .mm => true,
58975892
5898 .ll,5893 .ll,
5899 .bc,5894 .bc,
...@@ -5915,7 +5910,6 @@ pub const FileExt = enum {...@@ -5915,7 +5910,6 @@ pub const FileExt = enum {
5915 return switch (ext) {5910 return switch (ext) {
5916 .c => ".c",5911 .c => ".c",
5917 .cpp => ".cpp",5912 .cpp => ".cpp",
5918 .cu => ".cu",
5919 .h => ".h",5913 .h => ".h",
5920 .hpp => ".hpp",5914 .hpp => ".hpp",
5921 .hm => ".hm",5915 .hm => ".hm",
...@@ -5967,8 +5961,7 @@ pub fn hasCppExt(filename: []const u8) bool {...@@ -5967,8 +5961,7 @@ pub fn hasCppExt(filename: []const u8) bool {
5967 mem.endsWith(u8, filename, ".CPP") or5961 mem.endsWith(u8, filename, ".CPP") or
5968 mem.endsWith(u8, filename, ".cpp") or5962 mem.endsWith(u8, filename, ".cpp") or
5969 mem.endsWith(u8, filename, ".cxx") or5963 mem.endsWith(u8, filename, ".cxx") or
5970 mem.endsWith(u8, filename, ".c++") or5964 mem.endsWith(u8, filename, ".c++");
5971 mem.endsWith(u8, filename, ".stub");
5972}5965}
59735966
5974pub fn hasCppHExt(filename: []const u8) bool {5967pub fn hasCppHExt(filename: []const u8) bool {
...@@ -6054,8 +6047,6 @@ pub fn classifyFileExt(filename: []const u8) FileExt {...@@ -6054,8 +6047,6 @@ pub fn classifyFileExt(filename: []const u8) FileExt {
6054 return .static_library;6047 return .static_library;
6055 } else if (hasObjectExt(filename)) {6048 } else if (hasObjectExt(filename)) {
6056 return .object;6049 return .object;
6057 } else if (mem.endsWith(u8, filename, ".cu")) {
6058 return .cu;
6059 } else if (mem.endsWith(u8, filename, ".def")) {6050 } else if (mem.endsWith(u8, filename, ".def")) {
6060 return .def;6051 return .def;
6061 } else if (std.ascii.endsWithIgnoreCase(filename, ".rc")) {6052 } else if (std.ascii.endsWithIgnoreCase(filename, ".rc")) {
src/main.zig+3-4
...@@ -407,11 +407,10 @@ const usage_build_generic =...@@ -407,11 +407,10 @@ const usage_build_generic =
407 \\ .s Target-specific assembly source code407 \\ .s Target-specific assembly source code
408 \\ .S Assembly with C preprocessor (requires LLVM extensions)408 \\ .S Assembly with C preprocessor (requires LLVM extensions)
409 \\ .c C source code (requires LLVM extensions)409 \\ .c C source code (requires LLVM extensions)
410 \\ .cxx .cc .C .cpp .c++ .stub C++ source code (requires LLVM extensions)410 \\ .cxx .cc .C .cpp .c++ C++ source code (requires LLVM extensions)
411 \\ .m Objective-C source code (requires LLVM extensions)411 \\ .m Objective-C source code (requires LLVM extensions)
412 \\ .mm Objective-C++ source code (requires LLVM extensions)412 \\ .mm Objective-C++ source code (requires LLVM extensions)
413 \\ .bc LLVM IR Module (requires LLVM extensions)413 \\ .bc LLVM IR Module (requires LLVM extensions)
414 \\ .cu Cuda source code (requires LLVM extensions)
415 \\414 \\
416 \\General Options:415 \\General Options:
417 \\ -h, --help Print this help and exit416 \\ -h, --help Print this help and exit
...@@ -1771,7 +1770,7 @@ fn buildOutputType(...@@ -1771,7 +1770,7 @@ fn buildOutputType(
1771 fatal("only one manifest file can be specified, found '{s}' after '{s}'", .{ arg, other });1770 fatal("only one manifest file can be specified, found '{s}' after '{s}'", .{ arg, other });
1772 } else manifest_file = arg;1771 } else manifest_file = arg;
1773 },1772 },
1774 .assembly, .assembly_with_cpp, .c, .cpp, .h, .hpp, .hm, .hmm, .ll, .bc, .m, .mm, .cu => {1773 .assembly, .assembly_with_cpp, .c, .cpp, .h, .hpp, .hm, .hmm, .ll, .bc, .m, .mm => {
1775 try create_module.c_source_files.append(arena, .{1774 try create_module.c_source_files.append(arena, .{
1776 // Populated after module creation.1775 // Populated after module creation.
1777 .owner = undefined,1776 .owner = undefined,
...@@ -1868,7 +1867,7 @@ fn buildOutputType(...@@ -1868,7 +1867,7 @@ fn buildOutputType(
1868 try cc_argv.appendSlice(arena, it.other_args);1867 try cc_argv.appendSlice(arena, it.other_args);
1869 },1868 },
1870 .positional => switch (file_ext orelse Compilation.classifyFileExt(mem.sliceTo(it.only_arg, 0))) {1869 .positional => switch (file_ext orelse Compilation.classifyFileExt(mem.sliceTo(it.only_arg, 0))) {
1871 .assembly, .assembly_with_cpp, .c, .cpp, .ll, .bc, .h, .hpp, .hm, .hmm, .m, .mm, .cu => {1870 .assembly, .assembly_with_cpp, .c, .cpp, .ll, .bc, .h, .hpp, .hm, .hmm, .m, .mm => {
1872 try create_module.c_source_files.append(arena, .{1871 try create_module.c_source_files.append(arena, .{
1873 // Populated after module creation.1872 // Populated after module creation.
1874 .owner = undefined,1873 .owner = undefined,