diff options
author | Thomas White <taw@physics.org> | 2018-03-22 16:08:59 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-03-22 16:08:59 +0100 |
commit | 5c8489859d9c3d6a071ad5817d669694a811553d (patch) | |
tree | e34a78b6ec87fd6351ef13381593630ef3c05a04 | |
parent | 00e75c577fa1069d24188bb7750fea1bc3723865 (diff) |
OpenCL stuff
-rw-r--r-- | src/cl-utils.c | 4 | ||||
-rw-r--r-- | src/diffraction-gpu.c | 4 | ||||
-rw-r--r-- | src/diffraction-gpu.h | 2 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 7 |
4 files changed, 5 insertions, 12 deletions
diff --git a/src/cl-utils.c b/src/cl-utils.c index a7e500cd..b3ce0de0 100644 --- a/src/cl-utils.c +++ b/src/cl-utils.c @@ -34,11 +34,7 @@ #include <stdio.h> #include <string.h> -#ifdef HAVE_CL_CL_H #include <CL/cl.h> -#else -#include <cl.h> -#endif #include "utils.h" diff --git a/src/diffraction-gpu.c b/src/diffraction-gpu.c index ea50b3fa..8c21586a 100644 --- a/src/diffraction-gpu.c +++ b/src/diffraction-gpu.c @@ -38,11 +38,7 @@ #include <string.h> #include <complex.h> -#ifdef HAVE_CL_CL_H #include <CL/cl.h> -#else -#include <cl.h> -#endif #include "image.h" #include "utils.h" diff --git a/src/diffraction-gpu.h b/src/diffraction-gpu.h index 0b0e364b..bef12a8e 100644 --- a/src/diffraction-gpu.h +++ b/src/diffraction-gpu.h @@ -38,7 +38,7 @@ struct gpu_context; -#if HAVE_OPENCL +#ifdef HAVE_OPENCL extern int get_diffraction_gpu(struct gpu_context *gctx, struct image *image, int na, int nb, int nc, UnitCell *ucell, diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1ec0bcbb..84624d98 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -70,9 +70,10 @@ target_link_libraries(transformation_check ${COMMON_LIBRARIES}) add_test(transformation_check transformation_check) if (HAVE_OPENCL) - add_executable(gpu_sim_check gpu_sim_check.c ../src/diffraction.c ../src/diffraction-gpu.c) - target_include_directories(gpu_sim_check PRIVATE ${COMMON_INCLUDES}) - target_link_libraries(gpu_sim_check ${COMMON_LIBRARIES}) + add_executable(gpu_sim_check gpu_sim_check.c ../src/diffraction.c + ../src/diffraction-gpu.c ../src/cl-utils.c) + target_include_directories(gpu_sim_check PRIVATE ${COMMON_INCLUDES} ${OpenCL_INCLUDE_DIRS}) + target_link_libraries(gpu_sim_check ${COMMON_LIBRARIES} ${OpenCL_LIBRARIES}) add_test(gpu_sim_check gpu_sim_check) endif (HAVE_OPENCL) |