From 081127c74f916d251304b12b0f4283af1eb5cecf Mon Sep 17 00:00:00 2001 From: "W. Michael Brown" Date: Mon, 14 Nov 2011 17:40:30 -0500 Subject: [PATCH] Fixing bug where precision preprocessor definition didn't make it neighbor list build. --- lib/gpu/lal_neighbor_shared.cpp | 3 ++- lib/gpu/lal_preprocessor.h | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/gpu/lal_neighbor_shared.cpp b/lib/gpu/lal_neighbor_shared.cpp index 1547eac4f2..aeac76062a 100644 --- a/lib/gpu/lal_neighbor_shared.cpp +++ b/lib/gpu/lal_neighbor_shared.cpp @@ -50,7 +50,8 @@ void NeighborShared::compile_kernels(UCL_Device &dev, const int gpu_nbor) { return; _gpu_nbor=gpu_nbor; - std::string flags="-cl-fast-relaxed-math -cl-mad-enable -D"+ + std::string flags="-cl-fast-relaxed-math -cl-mad-enable "+ + std::string(OCL_PRECISION_COMPILE)+" -D"+ std::string(OCL_VENDOR); if (_gpu_nbor==0) { diff --git a/lib/gpu/lal_preprocessor.h b/lib/gpu/lal_preprocessor.h index 722860f512..7c1019ce90 100644 --- a/lib/gpu/lal_preprocessor.h +++ b/lib/gpu/lal_preprocessor.h @@ -255,6 +255,10 @@ typedef struct _double4 double4; #define ucl_ceil ceil #define ucl_abs fabs +#ifdef _DOUBLE_DOUBLE +#define NO_HARDWARE_TRANSCENDENTALS +#endif + #ifdef NO_HARDWARE_TRANSCENDENTALS #define ucl_exp exp