From 50ecb31042033fae56e55d82932c96c669792bbe Mon Sep 17 00:00:00 2001 From: Uldis Locans Date: Tue, 6 Jun 2017 14:23:24 +0200 Subject: [PATCH] remove any OpenCL calls when DKS compiled without OpenCL --- src/DKSBase.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/DKSBase.h b/src/DKSBase.h index 7887541..be10898 100644 --- a/src/DKSBase.h +++ b/src/DKSBase.h @@ -888,9 +888,10 @@ public: * TODO: opencl and mic imlementation */ int callMemInfo() { + #ifdef DKS_CUDA if (apiCuda()) return CUDA_SAFECALL(cbase->cuda_memInfo()); - + #endif return DKS_ERROR; } @@ -899,11 +900,13 @@ public: * Used for debuging and timing purposes only. */ void oclEventInfo() { + #ifdef DKS_OPENCL if (apiOpenCL()) return OPENCL_SAFECALL(oclbase->ocl_eventInfo()); - + #endif } + /** * Test function to profile opencl kernel calls. * Used for debuging and timing purposes only.