diff options
author | Jan Vesely <jan.vesely@rutgers.edu> | 2015-05-09 22:31:03 +0000 |
---|---|---|
committer | Jan Vesely <jan.vesely@rutgers.edu> | 2015-05-09 22:31:03 +0000 |
commit | 4b9633368bda721d76efb4c8a68e720a0501e052 (patch) | |
tree | 6f9155595c47c0dae5f62b3964118308f38c87d8 | |
parent | b25cbb32d726217f60c9ac24ba6cdeeff2c80b8c (diff) |
math: limit half_sqrt to single precision
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@236941 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | generic/include/clc/math/half_sqrt.h | 4 | ||||
-rw-r--r-- | generic/lib/math/half_sqrt.cl | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/generic/include/clc/math/half_sqrt.h b/generic/include/clc/math/half_sqrt.h index 5e9c8a9..cec80f5 100644 --- a/generic/include/clc/math/half_sqrt.h +++ b/generic/include/clc/math/half_sqrt.h @@ -24,8 +24,8 @@ #define __CLC_BODY <clc/math/unary_decl.inc> #define __CLC_FUNCTION half_sqrt - +#define __FLOAT_ONLY #include <clc/math/gentype.inc> - +#undef __FLOAT_ONLY #undef __CLC_BODY #undef __CLC_FUNCTION diff --git a/generic/lib/math/half_sqrt.cl b/generic/lib/math/half_sqrt.cl index e1716cf..a02896a 100644 --- a/generic/lib/math/half_sqrt.cl +++ b/generic/lib/math/half_sqrt.cl @@ -22,9 +22,7 @@ #include <clc/clc.h> -#ifdef cl_khr_fp64 -#pragma OPENCL EXTENSION cl_khr_fp64 : enable -#endif - #define __CLC_BODY <half_sqrt.inc> +#define __FLOAT_ONLY #include <clc/math/gentype.inc> +#undef __FLOAT_ONLY |