aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-10-06 14:18:53 +0200
committerAdrian Kummerlaender2019-10-06 14:18:53 +0200
commit02c245236aef90552601e82197f0738fa34d9e89 (patch)
tree5fbd99a98be28933b86ffa75cf71db6f3412490d
parent72286b36e8ce478af9f62507b5aea762db4ea46b (diff)
downloadsymlbm_playground-02c245236aef90552601e82197f0738fa34d9e89.tar
symlbm_playground-02c245236aef90552601e82197f0738fa34d9e89.tar.gz
symlbm_playground-02c245236aef90552601e82197f0738fa34d9e89.tar.bz2
symlbm_playground-02c245236aef90552601e82197f0738fa34d9e89.tar.lz
symlbm_playground-02c245236aef90552601e82197f0738fa34d9e89.tar.xz
symlbm_playground-02c245236aef90552601e82197f0738fa34d9e89.tar.zst
symlbm_playground-02c245236aef90552601e82197f0738fa34d9e89.zip
Explicitly enable double precision floating point when required
-rw-r--r--template/kernel.mako8
1 files changed, 8 insertions, 0 deletions
diff --git a/template/kernel.mako b/template/kernel.mako
index bf7b29b..dd8eaee 100644
--- a/template/kernel.mako
+++ b/template/kernel.mako
@@ -1,3 +1,11 @@
+% if float_type == 'double':
+#if defined(cl_khr_fp64)
+#pragma OPENCL EXTENSION cl_khr_fp64 : enable
+#elif defined(cl_amd_fp64)
+#pragma OPENCL EXTENSION cl_amd_fp64 : enable
+#endif
+% endif
+
<%
def gid():
return {