[libclc] 93/291: Add missing as_{float,double} functions

Andreas Beckmann anbe at moszumanska.debian.org
Tue Sep 8 10:53:37 UTC 2015


This is an automated email from the git hooks/post-receive script.

anbe pushed a commit to branch master
in repository libclc.

commit bb01526ad8850ed3618c0810276bc231f89d8953
Author: Tom Stellard <thomas.stellard at amd.com>
Date:   Thu Oct 10 19:08:29 2013 +0000

    Add missing as_{float,double} functions
    
    git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@192381 91177308-0d34-0410-b5e6-96231b3b80d8
---
 generic/include/clc/as_type.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/generic/include/clc/as_type.h b/generic/include/clc/as_type.h
index ef7b2b1..0bb9ee2 100644
--- a/generic/include/clc/as_type.h
+++ b/generic/include/clc/as_type.h
@@ -6,6 +6,7 @@
 #define as_uint(x) __builtin_astype(x, uint)
 #define as_long(x) __builtin_astype(x, long)
 #define as_ulong(x) __builtin_astype(x, ulong)
+#define as_float(x) __builtin_astype(x, float)
 
 #define as_char2(x) __builtin_astype(x, char2)
 #define as_uchar2(x) __builtin_astype(x, uchar2)
@@ -15,6 +16,7 @@
 #define as_uint2(x) __builtin_astype(x, uint2)
 #define as_long2(x) __builtin_astype(x, long2)
 #define as_ulong2(x) __builtin_astype(x, ulong2)
+#define as_float2(x) __builtin_astype(x, float2)
 
 #define as_char3(x) __builtin_astype(x, char3)
 #define as_uchar3(x) __builtin_astype(x, uchar3)
@@ -24,6 +26,7 @@
 #define as_uint3(x) __builtin_astype(x, uint3)
 #define as_long3(x) __builtin_astype(x, long3)
 #define as_ulong3(x) __builtin_astype(x, ulong3)
+#define as_float3(x) __builtin_astype(x, float3)
 
 #define as_char4(x) __builtin_astype(x, char4)
 #define as_uchar4(x) __builtin_astype(x, uchar4)
@@ -33,6 +36,7 @@
 #define as_uint4(x) __builtin_astype(x, uint4)
 #define as_long4(x) __builtin_astype(x, long4)
 #define as_ulong4(x) __builtin_astype(x, ulong4)
+#define as_float4(x) __builtin_astype(x, float4)
 
 #define as_char8(x) __builtin_astype(x, char8)
 #define as_uchar8(x) __builtin_astype(x, uchar8)
@@ -42,6 +46,7 @@
 #define as_uint8(x) __builtin_astype(x, uint8)
 #define as_long8(x) __builtin_astype(x, long8)
 #define as_ulong8(x) __builtin_astype(x, ulong8)
+#define as_float8(x) __builtin_astype(x, float8)
 
 #define as_char16(x) __builtin_astype(x, char16)
 #define as_uchar16(x) __builtin_astype(x, uchar16)
@@ -51,3 +56,13 @@
 #define as_uint16(x) __builtin_astype(x, uint16)
 #define as_long16(x) __builtin_astype(x, long16)
 #define as_ulong16(x) __builtin_astype(x, ulong16)
+#define as_float16(x) __builtin_astype(x, float16)
+
+#ifdef cl_khr_fp64
+#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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/libclc.git



More information about the Pkg-opencl-commits mailing list