summaryrefslogtreecommitdiffstats
path: root/libclc/generic/include/clc/shared
diff options
context:
space:
mode:
authorJan Vesely <jan.vesely@rutgers.edu>2017-09-08 23:58:57 +0000
committerJan Vesely <jan.vesely@rutgers.edu>2017-09-08 23:58:57 +0000
commit661ac03a1bef271698a92fb39eff369063bfcca0 (patch)
tree49f1bd1beff826ac5251d3d11a2e53a7bfc0d4ce /libclc/generic/include/clc/shared
parentb9dbaae3fb167317d75d04d0cef00f9577abd53d (diff)
downloadbcm5719-llvm-661ac03a1bef271698a92fb39eff369063bfcca0.tar.gz
bcm5719-llvm-661ac03a1bef271698a92fb39eff369063bfcca0.zip
vstore: Cleanup and add vstore(half)
Add missing undefs Make helpers amdgpu specific (NVPTX uses different numbering for private AS) Use clang builtins on clang >= 6 Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tom Stellard <tstellar@redhat.com> llvm-svn: 312838
Diffstat (limited to 'libclc/generic/include/clc/shared')
-rw-r--r--libclc/generic/include/clc/shared/vstore.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/libclc/generic/include/clc/shared/vstore.h b/libclc/generic/include/clc/shared/vstore.h
index b450491df11..0e3f694b90c 100644
--- a/libclc/generic/include/clc/shared/vstore.h
+++ b/libclc/generic/include/clc/shared/vstore.h
@@ -29,7 +29,6 @@
_CLC_VECTOR_VSTORE_PRIM3(_half, half, float)
#ifdef cl_khr_fp64
-#pragma OPENCL EXTENSION cl_khr_fp64: enable
_CLC_VECTOR_VSTORE_PRIM1(double)
_CLC_VECTOR_VSTORE_PRIM3(_half, half, double)
_CLC_VSTORE_DECL(_half, half, double, , __private)
@@ -37,7 +36,17 @@
_CLC_VSTORE_DECL(_half, half, double, , __global)
#endif
+#ifdef cl_khr_fp16
+ _CLC_VECTOR_VSTORE_PRIM1(half)
+#endif
+
_CLC_VECTOR_VSTORE_PRIM()
_CLC_VSTORE_DECL(_half, half, float, , __private)
_CLC_VSTORE_DECL(_half, half, float, , __local)
_CLC_VSTORE_DECL(_half, half, float, , __global)
+
+#undef _CLC_VSTORE_DECL
+#undef _CLC_VECTOR_VSTORE_DECL
+#undef _CLC_VECTOR_VSTORE_PRIM3
+#undef _CLC_VECTOR_VSTORE_PRIM1
+#undef _CLC_VECTOR_VSTORE_PRIM
OpenPOWER on IntegriCloud