diff options
author | dim <dim@FreeBSD.org> | 2017-09-26 19:56:36 +0000 |
---|---|---|
committer | Luiz Souza <luiz@netgate.com> | 2018-02-21 15:12:19 -0300 |
commit | 1dcd2e8d24b295bc73e513acec2ed1514bb66be4 (patch) | |
tree | 4bd13a34c251e980e1a6b13584ca1f63b0dfe670 /contrib/llvm/tools/clang/lib/Headers/opencl-c.h | |
parent | f45541ca2a56a1ba1202f94c080b04e96c1fa239 (diff) | |
download | FreeBSD-src-1dcd2e8d24b295bc73e513acec2ed1514bb66be4.zip FreeBSD-src-1dcd2e8d24b295bc73e513acec2ed1514bb66be4.tar.gz |
Merge clang, llvm, lld, lldb, compiler-rt and libc++ 5.0.0 release.
MFC r309126 (by emaste):
Correct lld llvm-tblgen dependency file name
MFC r309169:
Get rid of separate Subversion mergeinfo properties for llvm-dwarfdump
and llvm-lto. The mergeinfo confuses Subversion enormously, and these
directories will just use the mergeinfo for llvm itself.
MFC r312765:
Pull in r276136 from upstream llvm trunk (by Wei Mi):
Use ValueOffsetPair to enhance value reuse during SCEV expansion.
In D12090, the ExprValueMap was added to reuse existing value during
SCEV expansion. However, const folding and sext/zext distribution can
make the reuse still difficult.
A simplified case is: suppose we know S1 expands to V1 in
ExprValueMap, and
S1 = S2 + C_a
S3 = S2 + C_b
where C_a and C_b are different SCEVConstants. Then we'd like to
expand S3 as V1 - C_a + C_b instead of expanding S2 literally. It is
helpful when S2 is a complex SCEV expr and S2 has no entry in
ExprValueMap, which is usually caused by the fact that S3 is
generated from S1 after const folding.
In order to do that, we represent ExprValueMap as a mapping from SCEV
to ValueOffsetPair. We will save both S1->{V1, 0} and S2->{V1, C_a}
into the ExprValueMap when we create SCEV for V1. When S3 is
expanded, it will first expand S2 to V1 - C_a because of S2->{V1,
C_a} in the map, then expand S3 to V1 - C_a + C_b.
Differential Revision: https://reviews.llvm.org/D21313
This should fix assertion failures when building OpenCV >= 3.1.
PR: 215649
MFC r312831:
Revert r312765 for now, since it causes assertions when building
lang/spidermonkey24.
Reported by: antoine
PR: 215649
MFC r316511 (by jhb):
Add an implementation of __ffssi2() derived from __ffsdi2().
Newer versions of GCC include an __ffssi2() symbol in libgcc and the
compiler can emit calls to it in generated code. This is true for at
least GCC 6.2 when compiling world for mips and mips64.
Reviewed by: jmallett, dim
Sponsored by: DARPA / AFRL
Differential Revision: https://reviews.freebsd.org/D10086
MFC r318601 (by adrian):
[libcompiler-rt] add bswapdi2/bswapsi2
This is required for mips gcc 6.3 userland to build/run.
Reviewed by: emaste, dim
Approved by: emaste
Differential Revision: https://reviews.freebsd.org/D10838
MFC r318884 (by emaste):
lldb: map TRAP_CAP to a trace trap
In the absense of a more specific handler for TRAP_CAP (generated by
ENOTCAPABLE or ECAPMODE while in capability mode) treat it as a trace
trap.
Example usage (testing the bug in PR219173):
% proccontrol -m trapcap lldb usr.bin/hexdump/obj/hexdump -- -Cv -s 1 /bin/ls
...
(lldb) run
Process 12980 launching
Process 12980 launched: '.../usr.bin/hexdump/obj/hexdump' (x86_64)
Process 12980 stopped
* thread #1, stop reason = trace
frame #0: 0x0000004b80c65f1a libc.so.7`__sys_lseek + 10
...
In the future we should have LLDB control the trapcap procctl itself
(as it does with ASLR), as well as report a specific stop reason.
This change eliminates an assertion failure from LLDB for now.
MFC r319796:
Remove a few unneeded files from libllvm, libclang and liblldb.
MFC r319885 (by emaste):
lld: ELF: Fix ICF crash on absolute symbol relocations.
If two sections contained relocations to absolute symbols with the same
value we would crash when trying to access their sections. Add a check that
both symbols point to sections before accessing their sections, and treat
absolute symbols as equal if their values are equal.
Obtained from: LLD commit r292578
MFC r319918:
Revert r319796 for now, it can cause undefined references when linking
in some circumstances.
Reported by: Shawn Webb <shawn.webb@hardenedbsd.org>
MFC r319957 (by emaste):
lld: Add armelf emulation mode
Obtained from: LLD r305375
MFC r321369:
Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to
5.0.0 (trunk r308421). Upstream has branched for the 5.0.0 release,
which should be in about a month. Please report bugs and regressions,
so we can get them into the release.
Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11
support to build; see UPDATING for more information.
MFC r321420:
Add a few more object files to liblldb, which should solve errors when
linking the lldb executable in some cases. In particular, when the
-ffunction-sections -fdata-sections options are turned off, or
ineffective.
Reported by: Shawn Webb, Mark Millard
MFC r321433:
Cleanup stale Options.inc files from the previous libllvm build for
clang 4.0.0. Otherwise, these can get included before the two newly
generated ones (which are different) for clang 5.0.0.
Reported by: Mark Millard
MFC r321439 (by bdrewery):
Move llvm Options.inc hack from r321433 for NO_CLEAN to lib/clang/libllvm.
The files are only ever generated to .OBJDIR, not to WORLDTMP (as a
sysroot) and are only ever included from a compilation. So using
a beforebuild target here removes the file before the compilation
tries to include it.
MFC r321664:
Pull in r308891 from upstream llvm trunk (by Benjamin Kramer):
[CodeGenPrepare] Cut off FindAllMemoryUses if there are too many uses.
This avoids excessive compile time. The case I'm looking at is
Function.cpp from an old version of LLVM that still had the giant
memcmp string matcher in it. Before r308322 this compiled in about 2
minutes, after it, clang takes infinite* time to compile it. With
this patch we're at 5 min, which is still bad but this is a
pathological case.
The cut off at 20 uses was chosen by looking at other cut-offs in LLVM
for user scanning. It's probably too high, but does the job and is
very unlikely to regress anything.
Fixes PR33900.
* I'm impatient and aborted after 15 minutes, on the bug report it was
killed after 2h.
Pull in r308986 from upstream llvm trunk (by Simon Pilgrim):
[X86][CGP] Reduce memcmp() expansion to 2 load pairs (PR33914)
D35067/rL308322 attempted to support up to 4 load pairs for memcmp
inlining which resulted in regressions for some optimized libc memcmp
implementations (PR33914).
Until we can match these more optimal cases, this patch reduces the
memcmp expansion to a maximum of 2 load pairs (which matches what we
do for -Os).
This patch should be considered for the 5.0.0 release branch as well
Differential Revision: https://reviews.llvm.org/D35830
These fix a hang (or extremely long compile time) when building older
LLVM ports.
Reported by: antoine
PR: 219139
MFC r321719:
Pull in r309503 from upstream clang trunk (by Richard Smith):
PR33902: Invalidate line number cache when adding more text to
existing buffer.
This led to crashes as the line number cache would report a bogus
line number for a line of code, and we'd try to find a nonexistent
column within the line when printing diagnostics.
This fixes an assertion when building the graphics/champlain port.
Reported by: antoine, kwm
PR: 219139
MFC r321723:
Upgrade our copies of clang, llvm, lld and lldb to r309439 from the
upstream release_50 branch. This is just after upstream's 5.0.0-rc1.
MFC r322320:
Upgrade our copies of clang, llvm and libc++ to r310316 from the
upstream release_50 branch.
MFC r322326 (by emaste):
lldb: Make i386-*-freebsd expression work on JIT path
* Enable i386 ABI creation for freebsd
* Added an extra argument in ABISysV_i386::PrepareTrivialCall for mmap
syscall
* Unlike linux, the last argument of mmap is actually 64-bit(off_t).
This requires us to push an additional word for the higher order bits.
* Prior to this change, ktrace dump will show mmap failures due to
invalid argument coming from the 6th mmap argument.
Submitted by: Karnajit Wangkhem
Differential Revision: https://reviews.llvm.org/D34776
MFC r322360 (by emaste):
lldb: Report inferior signals as signals, not exceptions, on FreeBSD
This is the FreeBSD equivalent of LLVM r238549.
This serves 2 purposes:
* LLDB should handle inferior process signals SIGSEGV/SIGILL/SIGBUS/
SIGFPE the way it is suppose to be handled. Prior to this fix these
signals will neither create a coredump, nor exit from the debugger
or work for signal handling scenario.
* eInvalidCrashReason need not report "unknown crash reason" if we have
a valid si_signo
llvm.org/pr23699
Patch by Karnajit Wangkhem
Differential Revision: https://reviews.llvm.org/D35223
Submitted by: Karnajit Wangkhem
Obtained from: LLVM r310591
MFC r322474 (by emaste):
lld: Add `-z muldefs` option.
Obtained from: LLVM r310757
MFC r322740:
Upgrade our copies of clang, llvm, lld and libc++ to r311219 from the
upstream release_50 branch.
MFC r322855:
Upgrade our copies of clang, llvm, lldb and compiler-rt to r311606 from
the upstream release_50 branch.
As of this version, lib/msun's trig test should also work correctly
again (see bug 220989 for more information).
PR: 220989
MFC r323112:
Upgrade our copies of clang, llvm, lldb and compiler-rt to r312293 from
the upstream release_50 branch. This corresponds to 5.0.0 rc4.
As of this version, the cad/stepcode port should now compile in a more
reasonable time on i386 (see bug 221836 for more information).
PR: 221836
MFC r323245:
Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to
5.0.0 release (upstream r312559).
Release notes for llvm, clang and lld will be available here soon:
<http://releases.llvm.org/5.0.0/docs/ReleaseNotes.html>
<http://releases.llvm.org/5.0.0/tools/clang/docs/ReleaseNotes.html>
<http://releases.llvm.org/5.0.0/tools/lld/docs/ReleaseNotes.html>
Relnotes: yes
(cherry picked from commit 12cd91cf4c6b96a24427c0de5374916f2808d263)
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Headers/opencl-c.h')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Headers/opencl-c.h | 898 |
1 files changed, 120 insertions, 778 deletions
diff --git a/contrib/llvm/tools/clang/lib/Headers/opencl-c.h b/contrib/llvm/tools/clang/lib/Headers/opencl-c.h index 0c25d312..58c8daf 100644 --- a/contrib/llvm/tools/clang/lib/Headers/opencl-c.h +++ b/contrib/llvm/tools/clang/lib/Headers/opencl-c.h @@ -16,6 +16,12 @@ #endif //cl_khr_depth_images #endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0 +#if __OPENCL_C_VERSION__ < CL_VERSION_2_0 +#ifdef cl_khr_3d_image_writes +#pragma OPENCL EXTENSION cl_khr_3d_image_writes : enable +#endif //cl_khr_3d_image_writes +#endif //__OPENCL_C_VERSION__ < CL_VERSION_2_0 + #define __ovld __attribute__((overloadable)) #define __conv __attribute__((convergent)) @@ -6578,777 +6584,85 @@ half16 __ovld __cnfn convert_half16_rtz(double16); * OpenCL v1.1/1.2/2.0 s6.2.4.2 - as_type operators * Reinterprets a data type as another data type of the same size */ -char __ovld __cnfn as_char(char); -char __ovld __cnfn as_char(uchar); - -char2 __ovld __cnfn as_char2(char2); -char2 __ovld __cnfn as_char2(uchar2); -char2 __ovld __cnfn as_char2(short); -char2 __ovld __cnfn as_char2(ushort); - -char3 __ovld __cnfn as_char3(char3); -char3 __ovld __cnfn as_char3(char4); -char3 __ovld __cnfn as_char3(uchar3); -char3 __ovld __cnfn as_char3(uchar4); -char3 __ovld __cnfn as_char3(short2); -char3 __ovld __cnfn as_char3(ushort2); -char3 __ovld __cnfn as_char3(int); -char3 __ovld __cnfn as_char3(uint); -char3 __ovld __cnfn as_char3(float); - -char4 __ovld __cnfn as_char4(char3); -char4 __ovld __cnfn as_char4(char4); -char4 __ovld __cnfn as_char4(uchar3); -char4 __ovld __cnfn as_char4(uchar4); -char4 __ovld __cnfn as_char4(short2); -char4 __ovld __cnfn as_char4(ushort2); -char4 __ovld __cnfn as_char4(int); -char4 __ovld __cnfn as_char4(uint); -char4 __ovld __cnfn as_char4(float); - -char8 __ovld __cnfn as_char8(char8); -char8 __ovld __cnfn as_char8(uchar8); -char8 __ovld __cnfn as_char8(short3); -char8 __ovld __cnfn as_char8(short4); -char8 __ovld __cnfn as_char8(ushort3); -char8 __ovld __cnfn as_char8(ushort4); -char8 __ovld __cnfn as_char8(int2); -char8 __ovld __cnfn as_char8(uint2); -char8 __ovld __cnfn as_char8(long); -char8 __ovld __cnfn as_char8(ulong); -char8 __ovld __cnfn as_char8(float2); - -char16 __ovld __cnfn as_char16(char16); -char16 __ovld __cnfn as_char16(uchar16); -char16 __ovld __cnfn as_char16(short8); -char16 __ovld __cnfn as_char16(ushort8); -char16 __ovld __cnfn as_char16(int3); -char16 __ovld __cnfn as_char16(int4); -char16 __ovld __cnfn as_char16(uint3); -char16 __ovld __cnfn as_char16(uint4); -char16 __ovld __cnfn as_char16(long2); -char16 __ovld __cnfn as_char16(ulong2); -char16 __ovld __cnfn as_char16(float3); -char16 __ovld __cnfn as_char16(float4); - -uchar __ovld __cnfn as_uchar(char); -uchar __ovld __cnfn as_uchar(uchar); - -uchar2 __ovld __cnfn as_uchar2(char2); -uchar2 __ovld __cnfn as_uchar2(uchar2); -uchar2 __ovld __cnfn as_uchar2(short); -uchar2 __ovld __cnfn as_uchar2(ushort); - -uchar3 __ovld __cnfn as_uchar3(char3); -uchar3 __ovld __cnfn as_uchar3(char4); -uchar3 __ovld __cnfn as_uchar3(uchar3); -uchar3 __ovld __cnfn as_uchar3(uchar4); -uchar3 __ovld __cnfn as_uchar3(short2); -uchar3 __ovld __cnfn as_uchar3(ushort2); -uchar3 __ovld __cnfn as_uchar3(int); -uchar3 __ovld __cnfn as_uchar3(uint); -uchar3 __ovld __cnfn as_uchar3(float); - -uchar4 __ovld __cnfn as_uchar4(char3); -uchar4 __ovld __cnfn as_uchar4(char4); -uchar4 __ovld __cnfn as_uchar4(uchar3); -uchar4 __ovld __cnfn as_uchar4(uchar4); -uchar4 __ovld __cnfn as_uchar4(short2); -uchar4 __ovld __cnfn as_uchar4(ushort2); -uchar4 __ovld __cnfn as_uchar4(int); -uchar4 __ovld __cnfn as_uchar4(uint); -uchar4 __ovld __cnfn as_uchar4(float); - -uchar8 __ovld __cnfn as_uchar8(char8); -uchar8 __ovld __cnfn as_uchar8(uchar8); -uchar8 __ovld __cnfn as_uchar8(short3); -uchar8 __ovld __cnfn as_uchar8(short4); -uchar8 __ovld __cnfn as_uchar8(ushort3); -uchar8 __ovld __cnfn as_uchar8(ushort4); -uchar8 __ovld __cnfn as_uchar8(int2); -uchar8 __ovld __cnfn as_uchar8(uint2); -uchar8 __ovld __cnfn as_uchar8(long); -uchar8 __ovld __cnfn as_uchar8(ulong); -uchar8 __ovld __cnfn as_uchar8(float2); - -uchar16 __ovld __cnfn as_uchar16(char16); -uchar16 __ovld __cnfn as_uchar16(uchar16); -uchar16 __ovld __cnfn as_uchar16(short8); -uchar16 __ovld __cnfn as_uchar16(ushort8); -uchar16 __ovld __cnfn as_uchar16(int3); -uchar16 __ovld __cnfn as_uchar16(int4); -uchar16 __ovld __cnfn as_uchar16(uint3); -uchar16 __ovld __cnfn as_uchar16(uint4); -uchar16 __ovld __cnfn as_uchar16(long2); -uchar16 __ovld __cnfn as_uchar16(ulong2); -uchar16 __ovld __cnfn as_uchar16(float3); -uchar16 __ovld __cnfn as_uchar16(float4); - -short __ovld __cnfn as_short(char2); -short __ovld __cnfn as_short(uchar2); -short __ovld __cnfn as_short(short); -short __ovld __cnfn as_short(ushort); - -short2 __ovld __cnfn as_short2(char3); -short2 __ovld __cnfn as_short2(char4); -short2 __ovld __cnfn as_short2(uchar3); -short2 __ovld __cnfn as_short2(uchar4); -short2 __ovld __cnfn as_short2(short2); -short2 __ovld __cnfn as_short2(ushort2); -short2 __ovld __cnfn as_short2(int); -short2 __ovld __cnfn as_short2(uint); -short2 __ovld __cnfn as_short2(float); - -short3 __ovld __cnfn as_short3(char8); -short3 __ovld __cnfn as_short3(uchar8); -short3 __ovld __cnfn as_short3(short3); -short3 __ovld __cnfn as_short3(short4); -short3 __ovld __cnfn as_short3(ushort3); -short3 __ovld __cnfn as_short3(ushort4); -short3 __ovld __cnfn as_short3(int2); -short3 __ovld __cnfn as_short3(uint2); -short3 __ovld __cnfn as_short3(long); -short3 __ovld __cnfn as_short3(ulong); -short3 __ovld __cnfn as_short3(float2); - -short4 __ovld __cnfn as_short4(char8); -short4 __ovld __cnfn as_short4(uchar8); -short4 __ovld __cnfn as_short4(short3); -short4 __ovld __cnfn as_short4(short4); -short4 __ovld __cnfn as_short4(ushort3); -short4 __ovld __cnfn as_short4(ushort4); -short4 __ovld __cnfn as_short4(int2); -short4 __ovld __cnfn as_short4(uint2); -short4 __ovld __cnfn as_short4(long); -short4 __ovld __cnfn as_short4(ulong); -short4 __ovld __cnfn as_short4(float2); - -short8 __ovld __cnfn as_short8(char16); -short8 __ovld __cnfn as_short8(uchar16); -short8 __ovld __cnfn as_short8(short8); -short8 __ovld __cnfn as_short8(ushort8); -short8 __ovld __cnfn as_short8(int3); -short8 __ovld __cnfn as_short8(int4); -short8 __ovld __cnfn as_short8(uint3); -short8 __ovld __cnfn as_short8(uint4); -short8 __ovld __cnfn as_short8(long2); -short8 __ovld __cnfn as_short8(ulong2); -short8 __ovld __cnfn as_short8(float3); -short8 __ovld __cnfn as_short8(float4); - -short16 __ovld __cnfn as_short16(short16); -short16 __ovld __cnfn as_short16(ushort16); -short16 __ovld __cnfn as_short16(int8); -short16 __ovld __cnfn as_short16(uint8); -short16 __ovld __cnfn as_short16(long3); -short16 __ovld __cnfn as_short16(long4); -short16 __ovld __cnfn as_short16(ulong3); -short16 __ovld __cnfn as_short16(ulong4); -short16 __ovld __cnfn as_short16(float8); - -ushort __ovld __cnfn as_ushort(char2); -ushort __ovld __cnfn as_ushort(uchar2); -ushort __ovld __cnfn as_ushort(short); -ushort __ovld __cnfn as_ushort(ushort); - -ushort2 __ovld __cnfn as_ushort2(char3); -ushort2 __ovld __cnfn as_ushort2(char4); -ushort2 __ovld __cnfn as_ushort2(uchar3); -ushort2 __ovld __cnfn as_ushort2(uchar4); -ushort2 __ovld __cnfn as_ushort2(short2); -ushort2 __ovld __cnfn as_ushort2(ushort2); -ushort2 __ovld __cnfn as_ushort2(int); -ushort2 __ovld __cnfn as_ushort2(uint); -ushort2 __ovld __cnfn as_ushort2(float); - -ushort3 __ovld __cnfn as_ushort3(char8); -ushort3 __ovld __cnfn as_ushort3(uchar8); -ushort3 __ovld __cnfn as_ushort3(short3); -ushort3 __ovld __cnfn as_ushort3(short4); -ushort3 __ovld __cnfn as_ushort3(ushort3); -ushort3 __ovld __cnfn as_ushort3(ushort4); -ushort3 __ovld __cnfn as_ushort3(int2); -ushort3 __ovld __cnfn as_ushort3(uint2); -ushort3 __ovld __cnfn as_ushort3(long); -ushort3 __ovld __cnfn as_ushort3(ulong); -ushort3 __ovld __cnfn as_ushort3(float2); - -ushort4 __ovld __cnfn as_ushort4(char8); -ushort4 __ovld __cnfn as_ushort4(uchar8); -ushort4 __ovld __cnfn as_ushort4(short3); -ushort4 __ovld __cnfn as_ushort4(short4); -ushort4 __ovld __cnfn as_ushort4(ushort3); -ushort4 __ovld __cnfn as_ushort4(ushort4); -ushort4 __ovld __cnfn as_ushort4(int2); -ushort4 __ovld __cnfn as_ushort4(uint2); -ushort4 __ovld __cnfn as_ushort4(long); -ushort4 __ovld __cnfn as_ushort4(ulong); -ushort4 __ovld __cnfn as_ushort4(float2); - -ushort8 __ovld __cnfn as_ushort8(char16); -ushort8 __ovld __cnfn as_ushort8(uchar16); -ushort8 __ovld __cnfn as_ushort8(short8); -ushort8 __ovld __cnfn as_ushort8(ushort8); -ushort8 __ovld __cnfn as_ushort8(int3); -ushort8 __ovld __cnfn as_ushort8(int4); -ushort8 __ovld __cnfn as_ushort8(uint3); -ushort8 __ovld __cnfn as_ushort8(uint4); -ushort8 __ovld __cnfn as_ushort8(long2); -ushort8 __ovld __cnfn as_ushort8(ulong2); -ushort8 __ovld __cnfn as_ushort8(float3); -ushort8 __ovld __cnfn as_ushort8(float4); - -ushort16 __ovld __cnfn as_ushort16(short16); -ushort16 __ovld __cnfn as_ushort16(ushort16); -ushort16 __ovld __cnfn as_ushort16(int8); -ushort16 __ovld __cnfn as_ushort16(uint8); -ushort16 __ovld __cnfn as_ushort16(long3); -ushort16 __ovld __cnfn as_ushort16(long4); -ushort16 __ovld __cnfn as_ushort16(ulong3); -ushort16 __ovld __cnfn as_ushort16(ulong4); -ushort16 __ovld __cnfn as_ushort16(float8); - -int __ovld __cnfn as_int(char3); -int __ovld __cnfn as_int(char4); -int __ovld __cnfn as_int(uchar3); -int __ovld __cnfn as_int(uchar4); -int __ovld __cnfn as_int(short2); -int __ovld __cnfn as_int(ushort2); -int __ovld __cnfn as_int(int); -int __ovld __cnfn as_int(uint); -int __ovld __cnfn as_int(float); - -int2 __ovld __cnfn as_int2(char8); -int2 __ovld __cnfn as_int2(uchar8); -int2 __ovld __cnfn as_int2(short3); -int2 __ovld __cnfn as_int2(short4); -int2 __ovld __cnfn as_int2(ushort3); -int2 __ovld __cnfn as_int2(ushort4); -int2 __ovld __cnfn as_int2(int2); -int2 __ovld __cnfn as_int2(uint2); -int2 __ovld __cnfn as_int2(long); -int2 __ovld __cnfn as_int2(ulong); -int2 __ovld __cnfn as_int2(float2); - -int3 __ovld __cnfn as_int3(char16); -int3 __ovld __cnfn as_int3(uchar16); -int3 __ovld __cnfn as_int3(short8); -int3 __ovld __cnfn as_int3(ushort8); -int3 __ovld __cnfn as_int3(int3); -int3 __ovld __cnfn as_int3(int4); -int3 __ovld __cnfn as_int3(uint3); -int3 __ovld __cnfn as_int3(uint4); -int3 __ovld __cnfn as_int3(long2); -int3 __ovld __cnfn as_int3(ulong2); -int3 __ovld __cnfn as_int3(float3); -int3 __ovld __cnfn as_int3(float4); - -int4 __ovld __cnfn as_int4(char16); -int4 __ovld __cnfn as_int4(uchar16); -int4 __ovld __cnfn as_int4(short8); -int4 __ovld __cnfn as_int4(ushort8); -int4 __ovld __cnfn as_int4(int3); -int4 __ovld __cnfn as_int4(int4); -int4 __ovld __cnfn as_int4(uint3); -int4 __ovld __cnfn as_int4(uint4); -int4 __ovld __cnfn as_int4(long2); -int4 __ovld __cnfn as_int4(ulong2); -int4 __ovld __cnfn as_int4(float3); -int4 __ovld __cnfn as_int4(float4); - -int8 __ovld __cnfn as_int8(short16); -int8 __ovld __cnfn as_int8(ushort16); -int8 __ovld __cnfn as_int8(int8); -int8 __ovld __cnfn as_int8(uint8); -int8 __ovld __cnfn as_int8(long3); -int8 __ovld __cnfn as_int8(long4); -int8 __ovld __cnfn as_int8(ulong3); -int8 __ovld __cnfn as_int8(ulong4); -int8 __ovld __cnfn as_int8(float8); - -int16 __ovld __cnfn as_int16(int16); -int16 __ovld __cnfn as_int16(uint16); -int16 __ovld __cnfn as_int16(long8); -int16 __ovld __cnfn as_int16(ulong8); -int16 __ovld __cnfn as_int16(float16); - -uint __ovld __cnfn as_uint(char3); -uint __ovld __cnfn as_uint(char4); -uint __ovld __cnfn as_uint(uchar3); -uint __ovld __cnfn as_uint(uchar4); -uint __ovld __cnfn as_uint(short2); -uint __ovld __cnfn as_uint(ushort2); -uint __ovld __cnfn as_uint(int); -uint __ovld __cnfn as_uint(uint); -uint __ovld __cnfn as_uint(float); - -uint2 __ovld __cnfn as_uint2(char8); -uint2 __ovld __cnfn as_uint2(uchar8); -uint2 __ovld __cnfn as_uint2(short3); -uint2 __ovld __cnfn as_uint2(short4); -uint2 __ovld __cnfn as_uint2(ushort3); -uint2 __ovld __cnfn as_uint2(ushort4); -uint2 __ovld __cnfn as_uint2(int2); -uint2 __ovld __cnfn as_uint2(uint2); -uint2 __ovld __cnfn as_uint2(long); -uint2 __ovld __cnfn as_uint2(ulong); -uint2 __ovld __cnfn as_uint2(float2); - -uint3 __ovld __cnfn as_uint3(char16); -uint3 __ovld __cnfn as_uint3(uchar16); -uint3 __ovld __cnfn as_uint3(short8); -uint3 __ovld __cnfn as_uint3(ushort8); -uint3 __ovld __cnfn as_uint3(int3); -uint3 __ovld __cnfn as_uint3(int4); -uint3 __ovld __cnfn as_uint3(uint3); -uint3 __ovld __cnfn as_uint3(uint4); -uint3 __ovld __cnfn as_uint3(long2); -uint3 __ovld __cnfn as_uint3(ulong2); -uint3 __ovld __cnfn as_uint3(float3); -uint3 __ovld __cnfn as_uint3(float4); - -uint4 __ovld __cnfn as_uint4(char16); -uint4 __ovld __cnfn as_uint4(uchar16); -uint4 __ovld __cnfn as_uint4(short8); -uint4 __ovld __cnfn as_uint4(ushort8); -uint4 __ovld __cnfn as_uint4(int3); -uint4 __ovld __cnfn as_uint4(int4); -uint4 __ovld __cnfn as_uint4(uint3); -uint4 __ovld __cnfn as_uint4(uint4); -uint4 __ovld __cnfn as_uint4(long2); -uint4 __ovld __cnfn as_uint4(ulong2); -uint4 __ovld __cnfn as_uint4(float3); -uint4 __ovld __cnfn as_uint4(float4); - -uint8 __ovld __cnfn as_uint8(short16); -uint8 __ovld __cnfn as_uint8(ushort16); -uint8 __ovld __cnfn as_uint8(int8); -uint8 __ovld __cnfn as_uint8(uint8); -uint8 __ovld __cnfn as_uint8(long3); -uint8 __ovld __cnfn as_uint8(long4); -uint8 __ovld __cnfn as_uint8(ulong3); -uint8 __ovld __cnfn as_uint8(ulong4); -uint8 __ovld __cnfn as_uint8(float8); - -uint16 __ovld __cnfn as_uint16(int16); -uint16 __ovld __cnfn as_uint16(uint16); -uint16 __ovld __cnfn as_uint16(long8); -uint16 __ovld __cnfn as_uint16(ulong8); -uint16 __ovld __cnfn as_uint16(float16); - -long __ovld __cnfn as_long(char8); -long __ovld __cnfn as_long(uchar8); -long __ovld __cnfn as_long(short3); -long __ovld __cnfn as_long(short4); -long __ovld __cnfn as_long(ushort3); -long __ovld __cnfn as_long(ushort4); -long __ovld __cnfn as_long(int2); -long __ovld __cnfn as_long(uint2); -long __ovld __cnfn as_long(long); -long __ovld __cnfn as_long(ulong); -long __ovld __cnfn as_long(float2); - -long2 __ovld __cnfn as_long2(char16); -long2 __ovld __cnfn as_long2(uchar16); -long2 __ovld __cnfn as_long2(short8); -long2 __ovld __cnfn as_long2(ushort8); -long2 __ovld __cnfn as_long2(int3); -long2 __ovld __cnfn as_long2(int4); -long2 __ovld __cnfn as_long2(uint3); -long2 __ovld __cnfn as_long2(uint4); -long2 __ovld __cnfn as_long2(long2); -long2 __ovld __cnfn as_long2(ulong2); -long2 __ovld __cnfn as_long2(float3); -long2 __ovld __cnfn as_long2(float4); - -long3 __ovld __cnfn as_long3(short16); -long3 __ovld __cnfn as_long3(ushort16); -long3 __ovld __cnfn as_long3(int8); -long3 __ovld __cnfn as_long3(uint8); -long3 __ovld __cnfn as_long3(long3); -long3 __ovld __cnfn as_long3(long4); -long3 __ovld __cnfn as_long3(ulong3); -long3 __ovld __cnfn as_long3(ulong4); -long3 __ovld __cnfn as_long3(float8); - -long4 __ovld __cnfn as_long4(short16); -long4 __ovld __cnfn as_long4(ushort16); -long4 __ovld __cnfn as_long4(int8); -long4 __ovld __cnfn as_long4(uint8); -long4 __ovld __cnfn as_long4(long3); -long4 __ovld __cnfn as_long4(long4); -long4 __ovld __cnfn as_long4(ulong3); -long4 __ovld __cnfn as_long4(ulong4); -long4 __ovld __cnfn as_long4(float8); - -long8 __ovld __cnfn as_long8(int16); -long8 __ovld __cnfn as_long8(uint16); -long8 __ovld __cnfn as_long8(long8); -long8 __ovld __cnfn as_long8(ulong8); -long8 __ovld __cnfn as_long8(float16); - -long16 __ovld __cnfn as_long16(long16); -long16 __ovld __cnfn as_long16(ulong16); - -ulong __ovld __cnfn as_ulong(char8); -ulong __ovld __cnfn as_ulong(uchar8); -ulong __ovld __cnfn as_ulong(short3); -ulong __ovld __cnfn as_ulong(short4); -ulong __ovld __cnfn as_ulong(ushort3); -ulong __ovld __cnfn as_ulong(ushort4); -ulong __ovld __cnfn as_ulong(int2); -ulong __ovld __cnfn as_ulong(uint2); -ulong __ovld __cnfn as_ulong(long); -ulong __ovld __cnfn as_ulong(ulong); -ulong __ovld __cnfn as_ulong(float2); - -ulong2 __ovld __cnfn as_ulong2(char16); -ulong2 __ovld __cnfn as_ulong2(uchar16); -ulong2 __ovld __cnfn as_ulong2(short8); -ulong2 __ovld __cnfn as_ulong2(ushort8); -ulong2 __ovld __cnfn as_ulong2(int3); -ulong2 __ovld __cnfn as_ulong2(int4); -ulong2 __ovld __cnfn as_ulong2(uint3); -ulong2 __ovld __cnfn as_ulong2(uint4); -ulong2 __ovld __cnfn as_ulong2(long2); -ulong2 __ovld __cnfn as_ulong2(ulong2); -ulong2 __ovld __cnfn as_ulong2(float3); -ulong2 __ovld __cnfn as_ulong2(float4); - -ulong3 __ovld __cnfn as_ulong3(short16); -ulong3 __ovld __cnfn as_ulong3(ushort16); -ulong3 __ovld __cnfn as_ulong3(int8); -ulong3 __ovld __cnfn as_ulong3(uint8); -ulong3 __ovld __cnfn as_ulong3(long3); -ulong3 __ovld __cnfn as_ulong3(long4); -ulong3 __ovld __cnfn as_ulong3(ulong3); -ulong3 __ovld __cnfn as_ulong3(ulong4); -ulong3 __ovld __cnfn as_ulong3(float8); - -ulong4 __ovld __cnfn as_ulong4(short16); -ulong4 __ovld __cnfn as_ulong4(ushort16); -ulong4 __ovld __cnfn as_ulong4(int8); -ulong4 __ovld __cnfn as_ulong4(uint8); -ulong4 __ovld __cnfn as_ulong4(long3); -ulong4 __ovld __cnfn as_ulong4(long4); -ulong4 __ovld __cnfn as_ulong4(ulong3); -ulong4 __ovld __cnfn as_ulong4(ulong4); -ulong4 __ovld __cnfn as_ulong4(float8); - -ulong8 __ovld __cnfn as_ulong8(int16); -ulong8 __ovld __cnfn as_ulong8(uint16); -ulong8 __ovld __cnfn as_ulong8(long8); -ulong8 __ovld __cnfn as_ulong8(ulong8); -ulong8 __ovld __cnfn as_ulong8(float16); - -ulong16 __ovld __cnfn as_ulong16(long16); -ulong16 __ovld __cnfn as_ulong16(ulong16); - -float __ovld __cnfn as_float(char3); -float __ovld __cnfn as_float(char4); -float __ovld __cnfn as_float(uchar3); -float __ovld __cnfn as_float(uchar4); -float __ovld __cnfn as_float(short2); -float __ovld __cnfn as_float(ushort2); -float __ovld __cnfn as_float(int); -float __ovld __cnfn as_float(uint); -float __ovld __cnfn as_float(float); - -float2 __ovld __cnfn as_float2(char8); -float2 __ovld __cnfn as_float2(uchar8); -float2 __ovld __cnfn as_float2(short3); -float2 __ovld __cnfn as_float2(short4); -float2 __ovld __cnfn as_float2(ushort3); -float2 __ovld __cnfn as_float2(ushort4); -float2 __ovld __cnfn as_float2(int2); -float2 __ovld __cnfn as_float2(uint2); -float2 __ovld __cnfn as_float2(long); -float2 __ovld __cnfn as_float2(ulong); -float2 __ovld __cnfn as_float2(float2); - -float3 __ovld __cnfn as_float3(char16); -float3 __ovld __cnfn as_float3(uchar16); -float3 __ovld __cnfn as_float3(short8); -float3 __ovld __cnfn as_float3(ushort8); -float3 __ovld __cnfn as_float3(int3); -float3 __ovld __cnfn as_float3(int4); -float3 __ovld __cnfn as_float3(uint3); -float3 __ovld __cnfn as_float3(uint4); -float3 __ovld __cnfn as_float3(long2); -float3 __ovld __cnfn as_float3(ulong2); -float3 __ovld __cnfn as_float3(float3); -float3 __ovld __cnfn as_float3(float4); - -float4 __ovld __cnfn as_float4(char16); -float4 __ovld __cnfn as_float4(uchar16); -float4 __ovld __cnfn as_float4(short8); -float4 __ovld __cnfn as_float4(ushort8); -float4 __ovld __cnfn as_float4(int3); -float4 __ovld __cnfn as_float4(int4); -float4 __ovld __cnfn as_float4(uint3); -float4 __ovld __cnfn as_float4(uint4); -float4 __ovld __cnfn as_float4(long2); -float4 __ovld __cnfn as_float4(ulong2); -float4 __ovld __cnfn as_float4(float3); -float4 __ovld __cnfn as_float4(float4); - -float8 __ovld __cnfn as_float8(short16); -float8 __ovld __cnfn as_float8(ushort16); -float8 __ovld __cnfn as_float8(int8); -float8 __ovld __cnfn as_float8(uint8); -float8 __ovld __cnfn as_float8(long3); -float8 __ovld __cnfn as_float8(long4); -float8 __ovld __cnfn as_float8(ulong3); -float8 __ovld __cnfn as_float8(ulong4); -float8 __ovld __cnfn as_float8(float8); - -float16 __ovld __cnfn as_float16(int16); -float16 __ovld __cnfn as_float16(uint16); -float16 __ovld __cnfn as_float16(long8); -float16 __ovld __cnfn as_float16(ulong8); -float16 __ovld __cnfn as_float16(float16); +#define as_char(x) __builtin_astype((x), char) +#define as_char2(x) __builtin_astype((x), char2) +#define as_char3(x) __builtin_astype((x), char3) +#define as_char4(x) __builtin_astype((x), char4) +#define as_char8(x) __builtin_astype((x), char8) +#define as_char16(x) __builtin_astype((x), char16) + +#define as_uchar(x) __builtin_astype((x), uchar) +#define as_uchar2(x) __builtin_astype((x), uchar2) +#define as_uchar3(x) __builtin_astype((x), uchar3) +#define as_uchar4(x) __builtin_astype((x), uchar4) +#define as_uchar8(x) __builtin_astype((x), uchar8) +#define as_uchar16(x) __builtin_astype((x), uchar16) + +#define as_short(x) __builtin_astype((x), short) +#define as_short2(x) __builtin_astype((x), short2) +#define as_short3(x) __builtin_astype((x), short3) +#define as_short4(x) __builtin_astype((x), short4) +#define as_short8(x) __builtin_astype((x), short8) +#define as_short16(x) __builtin_astype((x), short16) + +#define as_ushort(x) __builtin_astype((x), ushort) +#define as_ushort2(x) __builtin_astype((x), ushort2) +#define as_ushort3(x) __builtin_astype((x), ushort3) +#define as_ushort4(x) __builtin_astype((x), ushort4) +#define as_ushort8(x) __builtin_astype((x), ushort8) +#define as_ushort16(x) __builtin_astype((x), ushort16) + +#define as_int(x) __builtin_astype((x), int) +#define as_int2(x) __builtin_astype((x), int2) +#define as_int3(x) __builtin_astype((x), int3) +#define as_int4(x) __builtin_astype((x), int4) +#define as_int8(x) __builtin_astype((x), int8) +#define as_int16(x) __builtin_astype((x), int16) + +#define as_uint(x) __builtin_astype((x), uint) +#define as_uint2(x) __builtin_astype((x), uint2) +#define as_uint3(x) __builtin_astype((x), uint3) +#define as_uint4(x) __builtin_astype((x), uint4) +#define as_uint8(x) __builtin_astype((x), uint8) +#define as_uint16(x) __builtin_astype((x), uint16) + +#define as_long(x) __builtin_astype((x), long) +#define as_long2(x) __builtin_astype((x), long2) +#define as_long3(x) __builtin_astype((x), long3) +#define as_long4(x) __builtin_astype((x), long4) +#define as_long8(x) __builtin_astype((x), long8) +#define as_long16(x) __builtin_astype((x), long16) + +#define as_ulong(x) __builtin_astype((x), ulong) +#define as_ulong2(x) __builtin_astype((x), ulong2) +#define as_ulong3(x) __builtin_astype((x), ulong3) +#define as_ulong4(x) __builtin_astype((x), ulong4) +#define as_ulong8(x) __builtin_astype((x), ulong8) +#define as_ulong16(x) __builtin_astype((x), ulong16) + +#define as_float(x) __builtin_astype((x), float) +#define as_float2(x) __builtin_astype((x), float2) +#define as_float3(x) __builtin_astype((x), float3) +#define as_float4(x) __builtin_astype((x), float4) +#define as_float8(x) __builtin_astype((x), float8) +#define as_float16(x) __builtin_astype((x), float16) #ifdef cl_khr_fp64 -char8 __ovld __cnfn as_char8(double); -char16 __ovld __cnfn as_char16(double2); -uchar8 __ovld __cnfn as_uchar8(double); -uchar16 __ovld __cnfn as_uchar16(double2); -short3 __ovld __cnfn as_short3(double); -short4 __ovld __cnfn as_short4(double); -short8 __ovld __cnfn as_short8(double2); -short16 __ovld __cnfn as_short16(double3); -short16 __ovld __cnfn as_short16(double4); -ushort3 __ovld __cnfn as_ushort3(double); -ushort4 __ovld __cnfn as_ushort4(double); -ushort8 __ovld __cnfn as_ushort8(double2); -ushort16 __ovld __cnfn as_ushort16(double3); -ushort16 __ovld __cnfn as_ushort16(double4); -int2 __ovld __cnfn as_int2(double); -int3 __ovld __cnfn as_int3(double2); -int4 __ovld __cnfn as_int4(double2); -int8 __ovld __cnfn as_int8(double3); -int8 __ovld __cnfn as_int8(double4); -int16 __ovld __cnfn as_int16(double8); -uint2 __ovld __cnfn as_uint2(double); -uint3 __ovld __cnfn as_uint3(double2); -uint4 __ovld __cnfn as_uint4(double2); -uint8 __ovld __cnfn as_uint8(double3); -uint8 __ovld __cnfn as_uint8(double4); -uint16 __ovld __cnfn as_uint16(double8); -long __ovld __cnfn as_long(double); -long2 __ovld __cnfn as_long2(double2); -long3 __ovld __cnfn as_long3(double3); -long3 __ovld __cnfn as_long3(double4); -long4 __ovld __cnfn as_long4(double3); -long4 __ovld __cnfn as_long4(double4); -long8 __ovld __cnfn as_long8(double8); -long16 __ovld __cnfn as_long16(double16); -ulong __ovld __cnfn as_ulong(double); -ulong2 __ovld __cnfn as_ulong2(double2); -ulong3 __ovld __cnfn as_ulong3(double3); -ulong3 __ovld __cnfn as_ulong3(double4); -ulong4 __ovld __cnfn as_ulong4(double3); -ulong4 __ovld __cnfn as_ulong4(double4); -ulong8 __ovld __cnfn as_ulong8(double8); -ulong16 __ovld __cnfn as_ulong16(double16); -float2 __ovld __cnfn as_float2(double); -float3 __ovld __cnfn as_float3(double2); -float4 __ovld __cnfn as_float4(double2); -float8 __ovld __cnfn as_float8(double3); -float8 __ovld __cnfn as_float8(double4); -float16 __ovld __cnfn as_float16(double8); -double __ovld __cnfn as_double(char8); -double __ovld __cnfn as_double(uchar8); -double __ovld __cnfn as_double(short3); -double __ovld __cnfn as_double(short4); -double __ovld __cnfn as_double(ushort3); -double __ovld __cnfn as_double(ushort4); -double __ovld __cnfn as_double(int2); -double __ovld __cnfn as_double(uint2); -double __ovld __cnfn as_double(long); -double __ovld __cnfn as_double(ulong); -double __ovld __cnfn as_double(float2); -double __ovld __cnfn as_double(double); -double2 __ovld __cnfn as_double2(char16); -double2 __ovld __cnfn as_double2(uchar16); -double2 __ovld __cnfn as_double2(short8); -double2 __ovld __cnfn as_double2(ushort8); -double2 __ovld __cnfn as_double2(int3); -double2 __ovld __cnfn as_double2(int4); -double2 __ovld __cnfn as_double2(uint3); -double2 __ovld __cnfn as_double2(uint4); -double2 __ovld __cnfn as_double2(long2); -double2 __ovld __cnfn as_double2(ulong2); -double2 __ovld __cnfn as_double2(float3); -double2 __ovld __cnfn as_double2(float4); -double2 __ovld __cnfn as_double2(double2); -double3 __ovld __cnfn as_double3(short16); -double3 __ovld __cnfn as_double3(ushort16); -double3 __ovld __cnfn as_double3(int8); -double3 __ovld __cnfn as_double3(uint8); -double3 __ovld __cnfn as_double3(long3); -double3 __ovld __cnfn as_double3(long4); -double3 __ovld __cnfn as_double3(ulong3); -double3 __ovld __cnfn as_double3(ulong4); -double3 __ovld __cnfn as_double3(float8); -double3 __ovld __cnfn as_double3(double3); -double3 __ovld __cnfn as_double3(double4); -double4 __ovld __cnfn as_double4(short16); -double4 __ovld __cnfn as_double4(ushort16); -double4 __ovld __cnfn as_double4(int8); -double4 __ovld __cnfn as_double4(uint8); -double4 __ovld __cnfn as_double4(long3); -double4 __ovld __cnfn as_double4(long4); -double4 __ovld __cnfn as_double4(ulong3); -double4 __ovld __cnfn as_double4(ulong4); -double4 __ovld __cnfn as_double4(float8); -double4 __ovld __cnfn as_double4(double3); -double4 __ovld __cnfn as_double4(double4); -double8 __ovld __cnfn as_double8(int16); -double8 __ovld __cnfn as_double8(uint16); -double8 __ovld __cnfn as_double8(long8); -double8 __ovld __cnfn as_double8(ulong8); -double8 __ovld __cnfn as_double8(float16); -double8 __ovld __cnfn as_double8(double8); -double16 __ovld __cnfn as_double16(long16); -double16 __ovld __cnfn as_double16(ulong16); -double16 __ovld __cnfn as_double16(double16); +#define as_double(x) __builtin_astype((x), double) +#define as_double2(x) __builtin_astype((x), double2) +#define as_double3(x) __builtin_astype((x), double3) +#define as_double4(x) __builtin_astype((x), double4) +#define as_double8(x) __builtin_astype((x), double8) +#define as_double16(x) __builtin_astype((x), double16) #endif //cl_khr_fp64 #ifdef cl_khr_fp16 -char2 __ovld __cnfn as_char2(half); -char3 __ovld __cnfn as_char3(half2); -char4 __ovld __cnfn as_char4(half2); -char8 __ovld __cnfn as_char8(half3); -char8 __ovld __cnfn as_char8(half4); -char16 __ovld __cnfn as_char16(half8); -uchar2 __ovld __cnfn as_uchar2(half); -uchar3 __ovld __cnfn as_uchar3(half2); -uchar4 __ovld __cnfn as_uchar4(half2); -uchar8 __ovld __cnfn as_uchar8(half3); -uchar8 __ovld __cnfn as_uchar8(half4); -uchar16 __ovld __cnfn as_uchar16(half8); -short __ovld __cnfn as_short(half); -short2 __ovld __cnfn as_short2(half2); -short3 __ovld __cnfn as_short3(half3); -short3 __ovld __cnfn as_short3(half4); -short4 __ovld __cnfn as_short4(half3); -short4 __ovld __cnfn as_short4(half4); -short8 __ovld __cnfn as_short8(half8); -short16 __ovld __cnfn as_short16(half16); -ushort __ovld __cnfn as_ushort(half); -ushort2 __ovld __cnfn as_ushort2(half2); -ushort3 __ovld __cnfn as_ushort3(half3); -ushort3 __ovld __cnfn as_ushort3(half4); -ushort4 __ovld __cnfn as_ushort4(half3); -ushort4 __ovld __cnfn as_ushort4(half4); -ushort8 __ovld __cnfn as_ushort8(half8); -ushort16 __ovld __cnfn as_ushort16(half16); -int __ovld __cnfn as_int(half2); -int2 __ovld __cnfn as_int2(half3); -int2 __ovld __cnfn as_int2(half4); -int3 __ovld __cnfn as_int3(half8); -int4 __ovld __cnfn as_int4(half8); -int8 __ovld __cnfn as_int8(half16); -uint __ovld __cnfn as_uint(half2); -uint2 __ovld __cnfn as_uint2(half3); -uint2 __ovld __cnfn as_uint2(half4); -uint3 __ovld __cnfn as_uint3(half8); -uint4 __ovld __cnfn as_uint4(half8); -uint8 __ovld __cnfn as_uint8(half16); -long __ovld __cnfn as_long(half3); -long __ovld __cnfn as_long(half4); -long2 __ovld __cnfn as_long2(half8); -long3 __ovld __cnfn as_long3(half16); -long4 __ovld __cnfn as_long4(half16); -ulong __ovld __cnfn as_ulong(half3); -ulong __ovld __cnfn as_ulong(half4); -ulong2 __ovld __cnfn as_ulong2(half8); -ulong3 __ovld __cnfn as_ulong3(half16); -ulong4 __ovld __cnfn as_ulong4(half16); -half __ovld __cnfn as_half(char2); -half __ovld __cnfn as_half(uchar2); -half __ovld __cnfn as_half(short); -half __ovld __cnfn as_half(ushort); -half __ovld __cnfn as_half(half); -half2 __ovld __cnfn as_half2(char3); -half2 __ovld __cnfn as_half2(char4); -half2 __ovld __cnfn as_half2(uchar3); -half2 __ovld __cnfn as_half2(uchar4); -half2 __ovld __cnfn as_half2(short2); -half2 __ovld __cnfn as_half2(ushort2); -half2 __ovld __cnfn as_half2(int); -half2 __ovld __cnfn as_half2(uint); -half2 __ovld __cnfn as_half2(half2); -half2 __ovld __cnfn as_half2(float); -half3 __ovld __cnfn as_half3(char8); -half3 __ovld __cnfn as_half3(uchar8); -half3 __ovld __cnfn as_half3(short3); -half3 __ovld __cnfn as_half3(short4); -half3 __ovld __cnfn as_half3(ushort3); -half3 __ovld __cnfn as_half3(ushort4); -half3 __ovld __cnfn as_half3(int2); -half3 __ovld __cnfn as_half3(uint2); -half3 __ovld __cnfn as_half3(long); -half3 __ovld __cnfn as_half3(ulong); -half3 __ovld __cnfn as_half3(half3); -half3 __ovld __cnfn as_half3(half4); -half3 __ovld __cnfn as_half3(float2); -half4 __ovld __cnfn as_half4(char8); -half4 __ovld __cnfn as_half4(uchar8); -half4 __ovld __cnfn as_half4(short3); -half4 __ovld __cnfn as_half4(short4); -half4 __ovld __cnfn as_half4(ushort3); -half4 __ovld __cnfn as_half4(ushort4); -half4 __ovld __cnfn as_half4(int2); -half4 __ovld __cnfn as_half4(uint2); -half4 __ovld __cnfn as_half4(long); -half4 __ovld __cnfn as_half4(ulong); -half4 __ovld __cnfn as_half4(half3); -half4 __ovld __cnfn as_half4(half4); -half4 __ovld __cnfn as_half4(float2); -half8 __ovld __cnfn as_half8(char16); -half8 __ovld __cnfn as_half8(uchar16); -half8 __ovld __cnfn as_half8(short8); -half8 __ovld __cnfn as_half8(ushort8); -half8 __ovld __cnfn as_half8(int3); -half8 __ovld __cnfn as_half8(int4); -half8 __ovld __cnfn as_half8(uint3); -half8 __ovld __cnfn as_half8(uint4); -half8 __ovld __cnfn as_half8(long2); -half8 __ovld __cnfn as_half8(ulong2); -half8 __ovld __cnfn as_half8(half8); -half8 __ovld __cnfn as_half8(float3); -half8 __ovld __cnfn as_half8(float4); -half16 __ovld __cnfn as_half16(short16); -half16 __ovld __cnfn as_half16(ushort16); -half16 __ovld __cnfn as_half16(int8); -half16 __ovld __cnfn as_half16(uint8); -half16 __ovld __cnfn as_half16(long3); -half16 __ovld __cnfn as_half16(long4); -half16 __ovld __cnfn as_half16(ulong3); -half16 __ovld __cnfn as_half16(ulong4); -half16 __ovld __cnfn as_half16(half16); -half16 __ovld __cnfn as_half16(float8); -float __ovld __cnfn as_float(half2); -float2 __ovld __cnfn as_float2(half3); -float2 __ovld __cnfn as_float2(half4); -float3 __ovld __cnfn as_float3(half8); -float4 __ovld __cnfn as_float4(half8); -float8 __ovld __cnfn as_float8(half16); - -#ifdef cl_khr_fp64 -half3 __ovld __cnfn as_half3(double); -half4 __ovld __cnfn as_half4(double); -half8 __ovld __cnfn as_half8(double2); -half16 __ovld __cnfn as_half16(double3); -half16 __ovld __cnfn as_half16(double4); -double __ovld __cnfn as_double(half3); -double __ovld __cnfn as_double(half4); -double2 __ovld __cnfn as_double2(half8); -double3 __ovld __cnfn as_double3(half16); -double4 __ovld __cnfn as_double4(half16); -#endif //cl_khr_fp64 +#define as_half(x) __builtin_astype((x), half) +#define as_half2(x) __builtin_astype((x), half2) +#define as_half3(x) __builtin_astype((x), half3) +#define as_half4(x) __builtin_astype((x), half4) +#define as_half8(x) __builtin_astype((x), half8) +#define as_half16(x) __builtin_astype((x), half16) #endif //cl_khr_fp16 // OpenCL v1.1 s6.9, v1.2/2.0 s6.10 - Function qualifiers @@ -14389,10 +13703,10 @@ float __ovld atomic_xchg(volatile __local float *p, float val); #if defined(cl_khr_global_int32_base_atomics) int __ovld atom_xchg(volatile __global int *p, int val); -int __ovld atom_xchg(volatile __local int *p, int val); +unsigned int __ovld atom_xchg(volatile __global unsigned int *p, unsigned int val); #endif #if defined(cl_khr_local_int32_base_atomics) -unsigned int __ovld atom_xchg(volatile __global unsigned int *p, unsigned int val); +int __ovld atom_xchg(volatile __local int *p, int val); unsigned int __ovld atom_xchg(volatile __local unsigned int *p, unsigned int val); #endif @@ -14509,8 +13823,6 @@ unsigned int __ovld atom_min(volatile __local unsigned int *p, unsigned int val) #if defined(cl_khr_int64_extended_atomics) long __ovld atom_min(volatile __global long *p, long val); unsigned long __ovld atom_min(volatile __global unsigned long *p, unsigned long val); -#endif -#if defined(cl_khr_local_int32_extended_atomics) long __ovld atom_min(volatile __local long *p, long val); unsigned long __ovld atom_min(volatile __local unsigned long *p, unsigned long val); #endif @@ -15650,6 +14962,7 @@ float __purefn __ovld read_imagef(read_only image2d_array_msaa_depth_t image, in #endif //cl_khr_gl_msaa_sharing // OpenCL Extension v2.0 s9.18 - Mipmaps +#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0 #ifdef cl_khr_mipmap_image float4 __purefn __ovld read_imagef(read_only image1d_t image, sampler_t sampler, float coord, float lod); @@ -15725,6 +15038,7 @@ int4 __purefn __ovld read_imagei(read_only image3d_t image, sampler_t sampler, f uint4 __purefn __ovld read_imageui(read_only image3d_t image, sampler_t sampler, float4 coord, float lod); #endif //cl_khr_mipmap_image +#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0 /** * Sampler-less Image Access @@ -15823,6 +15137,7 @@ float __purefn __ovld read_imagef(read_write image2d_msaa_depth_t image, int2 co float __purefn __ovld read_imagef(read_write image2d_array_msaa_depth_t image, int4 coord, int sample); #endif //cl_khr_gl_msaa_sharing +#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0 #ifdef cl_khr_mipmap_image float4 __purefn __ovld read_imagef(read_write image1d_t image, sampler_t sampler, float coord, float lod); int4 __purefn __ovld read_imagei(read_write image1d_t image, sampler_t sampler, float coord, float lod); @@ -15896,6 +15211,7 @@ float4 __purefn __ovld read_imagef(read_write image3d_t image, sampler_t sampler int4 __purefn __ovld read_imagei(read_write image3d_t image, sampler_t sampler, float4 coord, float lod); uint4 __purefn __ovld read_imageui(read_write image3d_t image, sampler_t sampler, float4 coord, float lod); #endif //cl_khr_mipmap_image +#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0 // Image read functions returning half4 type #ifdef cl_khr_fp16 @@ -15995,9 +15311,11 @@ void __ovld write_imagef(write_only image1d_array_t image_array, int2 coord, flo void __ovld write_imagei(write_only image1d_array_t image_array, int2 coord, int4 color); void __ovld write_imageui(write_only image1d_array_t image_array, int2 coord, uint4 color); +#ifdef cl_khr_3d_image_writes void __ovld write_imagef(write_only image3d_t image, int4 coord, float4 color); void __ovld write_imagei(write_only image3d_t image, int4 coord, int4 color); void __ovld write_imageui(write_only image3d_t image, int4 coord, uint4 color); +#endif #ifdef cl_khr_depth_images void __ovld write_imagef(write_only image2d_depth_t image, int2 coord, float color); @@ -16005,6 +15323,7 @@ void __ovld write_imagef(write_only image2d_array_depth_t image, int4 coord, flo #endif //cl_khr_depth_images // OpenCL Extension v2.0 s9.18 - Mipmaps +#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0 #ifdef cl_khr_mipmap_image void __ovld write_imagef(write_only image1d_t image, int coord, int lod, float4 color); void __ovld write_imagei(write_only image1d_t image, int coord, int lod, int4 color); @@ -16025,16 +15344,21 @@ void __ovld write_imageui(write_only image2d_array_t image_array, int4 coord, in void __ovld write_imagef(write_only image2d_depth_t image, int2 coord, int lod, float color); void __ovld write_imagef(write_only image2d_array_depth_t image, int4 coord, int lod, float color); +#ifdef cl_khr_3d_image_writes void __ovld write_imagef(write_only image3d_t image, int4 coord, int lod, float4 color); void __ovld write_imagei(write_only image3d_t image, int4 coord, int lod, int4 color); void __ovld write_imageui(write_only image3d_t image, int4 coord, int lod, uint4 color); +#endif #endif //cl_khr_mipmap_image +#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0 // Image write functions for half4 type #ifdef cl_khr_fp16 void __ovld write_imageh(write_only image1d_t image, int coord, half4 color); void __ovld write_imageh(write_only image2d_t image, int2 coord, half4 color); +#ifdef cl_khr_3d_image_writes void __ovld write_imageh(write_only image3d_t image, int4 coord, half4 color); +#endif void __ovld write_imageh(write_only image1d_array_t image, int2 coord, half4 color); void __ovld write_imageh(write_only image2d_array_t image, int4 coord, half4 color); void __ovld write_imageh(write_only image1d_buffer_t image, int coord, half4 color); @@ -16062,15 +15386,18 @@ void __ovld write_imagef(read_write image1d_array_t image_array, int2 coord, flo void __ovld write_imagei(read_write image1d_array_t image_array, int2 coord, int4 color); void __ovld write_imageui(read_write image1d_array_t image_array, int2 coord, uint4 color); +#ifdef cl_khr_3d_image_writes void __ovld write_imagef(read_write image3d_t image, int4 coord, float4 color); void __ovld write_imagei(read_write image3d_t image, int4 coord, int4 color); void __ovld write_imageui(read_write image3d_t image, int4 coord, uint4 color); +#endif #ifdef cl_khr_depth_images void __ovld write_imagef(read_write image2d_depth_t image, int2 coord, float color); void __ovld write_imagef(read_write image2d_array_depth_t image, int4 coord, float color); #endif //cl_khr_depth_images +#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0 #ifdef cl_khr_mipmap_image void __ovld write_imagef(read_write image1d_t image, int coord, int lod, float4 color); void __ovld write_imagei(read_write image1d_t image, int coord, int lod, int4 color); @@ -16091,16 +15418,21 @@ void __ovld write_imageui(read_write image2d_array_t image_array, int4 coord, in void __ovld write_imagef(read_write image2d_depth_t image, int2 coord, int lod, float color); void __ovld write_imagef(read_write image2d_array_depth_t image, int4 coord, int lod, float color); +#ifdef cl_khr_3d_image_writes void __ovld write_imagef(read_write image3d_t image, int4 coord, int lod, float4 color); void __ovld write_imagei(read_write image3d_t image, int4 coord, int lod, int4 color); void __ovld write_imageui(read_write image3d_t image, int4 coord, int lod, uint4 color); +#endif #endif //cl_khr_mipmap_image +#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0 // Image write functions for half4 type #ifdef cl_khr_fp16 void __ovld write_imageh(read_write image1d_t image, int coord, half4 color); void __ovld write_imageh(read_write image2d_t image, int2 coord, half4 color); +#ifdef cl_khr_3d_image_writes void __ovld write_imageh(read_write image3d_t image, int4 coord, half4 color); +#endif void __ovld write_imageh(read_write image1d_array_t image, int2 coord, half4 color); void __ovld write_imageh(read_write image2d_array_t image, int4 coord, half4 color); void __ovld write_imageh(read_write image1d_buffer_t image, int coord, half4 color); @@ -16118,7 +15450,9 @@ void __ovld write_imageh(read_write image1d_buffer_t image, int coord, half4 col int __ovld __cnfn get_image_width(read_only image1d_t image); int __ovld __cnfn get_image_width(read_only image1d_buffer_t image); int __ovld __cnfn get_image_width(read_only image2d_t image); +#ifdef cl_khr_3d_image_writes int __ovld __cnfn get_image_width(read_only image3d_t image); +#endif int __ovld __cnfn get_image_width(read_only image1d_array_t image); int __ovld __cnfn get_image_width(read_only image2d_array_t image); #ifdef cl_khr_depth_images @@ -16135,7 +15469,9 @@ int __ovld __cnfn get_image_width(read_only image2d_array_msaa_depth_t image); int __ovld __cnfn get_image_width(write_only image1d_t image); int __ovld __cnfn get_image_width(write_only image1d_buffer_t image); int __ovld __cnfn get_image_width(write_only image2d_t image); +#ifdef cl_khr_3d_image_writes int __ovld __cnfn get_image_width(write_only image3d_t image); +#endif int __ovld __cnfn get_image_width(write_only image1d_array_t image); int __ovld __cnfn get_image_width(write_only image2d_array_t image); #ifdef cl_khr_depth_images @@ -16186,7 +15522,9 @@ int __ovld __cnfn get_image_height(read_only image2d_array_msaa_depth_t image); #endif //cl_khr_gl_msaa_sharing int __ovld __cnfn get_image_height(write_only image2d_t image); +#ifdef cl_khr_3d_image_writes int __ovld __cnfn get_image_height(write_only image3d_t image); +#endif int __ovld __cnfn get_image_height(write_only image2d_array_t image); #ifdef cl_khr_depth_images int __ovld __cnfn get_image_height(write_only image2d_depth_t image); @@ -16220,13 +15558,16 @@ int __ovld __cnfn get_image_height(read_write image2d_array_msaa_depth_t image); */ int __ovld __cnfn get_image_depth(read_only image3d_t image); +#ifdef cl_khr_3d_image_writes int __ovld __cnfn get_image_depth(write_only image3d_t image); +#endif #if __OPENCL_C_VERSION__ >= CL_VERSION_2_0 int __ovld __cnfn get_image_depth(read_write image3d_t image); #endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0 // OpenCL Extension v2.0 s9.18 - Mipmaps +#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0 #ifdef cl_khr_mipmap_image /** * Return the image miplevels. @@ -16238,13 +15579,13 @@ int __ovld get_image_num_mip_levels(read_only image3d_t image); int __ovld get_image_num_mip_levels(write_only image1d_t image); int __ovld get_image_num_mip_levels(write_only image2d_t image); +#ifdef cl_khr_3d_image_writes int __ovld get_image_num_mip_levels(write_only image3d_t image); +#endif -#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0 int __ovld get_image_num_mip_levels(read_write image1d_t image); int __ovld get_image_num_mip_levels(read_write image2d_t image); int __ovld get_image_num_mip_levels(read_write image3d_t image); -#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0 int __ovld get_image_num_mip_levels(read_only image1d_array_t image); int __ovld get_image_num_mip_levels(read_only image2d_array_t image); @@ -16256,14 +15597,13 @@ int __ovld get_image_num_mip_levels(write_only image2d_array_t image); int __ovld get_image_num_mip_levels(write_only image2d_array_depth_t image); int __ovld get_image_num_mip_levels(write_only image2d_depth_t image); -#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0 int __ovld get_image_num_mip_levels(read_write image1d_array_t image); int __ovld get_image_num_mip_levels(read_write image2d_array_t image); int __ovld get_image_num_mip_levels(read_write image2d_array_depth_t image); int __ovld get_image_num_mip_levels(read_write image2d_depth_t image); -#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0 #endif //cl_khr_mipmap_image +#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0 /** * Return the channel data type. Valid values are: @@ -16324,7 +15664,9 @@ int __ovld __cnfn get_image_channel_data_type(read_only image2d_array_msaa_depth int __ovld __cnfn get_image_channel_data_type(write_only image1d_t image); int __ovld __cnfn get_image_channel_data_type(write_only image1d_buffer_t image); int __ovld __cnfn get_image_channel_data_type(write_only image2d_t image); +#ifdef cl_khr_3d_image_writes int __ovld __cnfn get_image_channel_data_type(write_only image3d_t image); +#endif int __ovld __cnfn get_image_channel_data_type(write_only image1d_array_t image); int __ovld __cnfn get_image_channel_data_type(write_only image2d_array_t image); #ifdef cl_khr_depth_images @@ -16418,7 +15760,9 @@ int __ovld __cnfn get_image_channel_order(read_only image2d_array_msaa_depth_t i int __ovld __cnfn get_image_channel_order(write_only image1d_t image); int __ovld __cnfn get_image_channel_order(write_only image1d_buffer_t image); int __ovld __cnfn get_image_channel_order(write_only image2d_t image); +#ifdef cl_khr_3d_image_writes int __ovld __cnfn get_image_channel_order(write_only image3d_t image); +#endif int __ovld __cnfn get_image_channel_order(write_only image1d_array_t image); int __ovld __cnfn get_image_channel_order(write_only image2d_array_t image); #ifdef cl_khr_depth_images @@ -16504,7 +15848,9 @@ int2 __ovld __cnfn get_image_dim(read_write image2d_array_msaa_depth_t image); * component and the w component is 0. */ int4 __ovld __cnfn get_image_dim(read_only image3d_t image); +#ifdef cl_khr_3d_image_writes int4 __ovld __cnfn get_image_dim(write_only image3d_t image); +#endif #if __OPENCL_C_VERSION__ >= CL_VERSION_2_0 int4 __ovld __cnfn get_image_dim(read_write image3d_t image); #endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0 @@ -16714,16 +16060,12 @@ typedef int clk_profiling_info; #define MAX_WORK_DIM 3 -// ToDo: Remove definition of ndrange_t in Clang as an opaque type and add back -// the following ndrange_t definition. -#if 0 typedef struct { unsigned int workDimension; size_t globalWorkOffset[MAX_WORK_DIM]; size_t globalWorkSize[MAX_WORK_DIM]; size_t localWorkSize[MAX_WORK_DIM]; } ndrange_t; -#endif ndrange_t __ovld ndrange_1D(size_t); ndrange_t __ovld ndrange_1D(size_t, size_t); |