[libclc] 30/58: 64 bit integers are legal in full profile without an extension
Andreas Boll
aboll-guest at moszumanska.debian.org
Thu Oct 6 08:16:31 UTC 2016
This is an automated email from the git hooks/post-receive script.
aboll-guest pushed a commit to branch master
in repository libclc.
commit ca880ed40331fac9b883e783a5fe504f66ac910e
Author: Jan Vesely <jan.vesely at rutgers.edu>
Date: Fri Jun 17 20:30:41 2016 +0000
64 bit integers are legal in full profile without an extension
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
Reviewed-by: Tom Stellard <tom at stellard.net>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@273042 91177308-0d34-0410-b5e6-96231b3b80d8
---
configure.py | 1 -
generic/lib/gen_convert.py | 17 ++++++++++++-----
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/configure.py b/configure.py
index 63f5ada..43ab69d 100755
--- a/configure.py
+++ b/configure.py
@@ -198,7 +198,6 @@ for target in targets:
"-fno-builtin " \
"-Dcl_clang_storage_class_specifiers " \
"%s " \
- "-Dcles_khr_int64 " \
"-D__CLC_INTERNAL " \
"-emit-llvm" % (target, clang_cl_includes, device_defines)
if device['gpu'] != '':
diff --git a/generic/lib/gen_convert.py b/generic/lib/gen_convert.py
index f91a89a..5c87fcb 100644
--- a/generic/lib/gen_convert.py
+++ b/generic/lib/gen_convert.py
@@ -97,14 +97,12 @@ def conditional_guard(src, dst):
int64_count = int64_count +1
elif dst in float64_types:
float64_count = float64_count + 1
- if float64_count > 0 and int64_count > 0:
- print("#if defined(cl_khr_fp64) && defined(cles_khr_int64)")
- return True
- elif float64_count > 0:
+ if float64_count > 0:
+ #In embedded profile, if cl_khr_fp64 is supported cles_khr_int64 has to be
print("#ifdef cl_khr_fp64")
return True
elif int64_count > 0:
- print("#ifdef cles_khr_int64")
+ print("#if defined cles_khr_int64 || !defined(__EMBEDDED_PROFILE__)")
return True
return False
@@ -142,6 +140,15 @@ print("""/* !!!! AUTOGENERATED FILE generated by convert_type.py !!!!!
#ifdef cl_khr_fp64
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
+
+#if defined(__EMBEDDED_PROFILE__) && !defined(cles_khr_int64)
+#error Embedded profile that supports cl_khr_fp64 also has to support cles_khr_int64
+#endif
+
+#endif
+
+#ifdef cles_khr_int64
+#pragma OPENCL EXTENSION cles_khr_int64 : enable
#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