From 02c245236aef90552601e82197f0738fa34d9e89 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 6 Oct 2019 14:18:53 +0200 Subject: Explicitly enable double precision floating point when required --- template/kernel.mako | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'template') 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 { -- cgit v1.2.3