From d46e647bad045f635b8a81b0d74237c3a4dbd2de Mon Sep 17 00:00:00 2001 From: Aron Virginas-Tar Date: Fri, 16 Nov 2018 10:26:23 +0000 Subject: IVGCVSW-2157: Remove conditional compilation directives from ClBackendContext Change-Id: I0b9818c3bc09101aa6563ea8e4a886483d3b09d1 --- src/backends/cl/ClBackendContext.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/backends/cl/ClBackendContext.cpp b/src/backends/cl/ClBackendContext.cpp index a2c1b87359..48682b90dd 100644 --- a/src/backends/cl/ClBackendContext.cpp +++ b/src/backends/cl/ClBackendContext.cpp @@ -6,13 +6,11 @@ #include "ClBackendContext.hpp" #include "ClContextControl.hpp" -#include - -#ifdef ARMCOMPUTECL_ENABLED #include #include #include -#endif + +#include namespace armnn { @@ -26,7 +24,6 @@ struct ClBackendContext::ClContextControlWrapper bool Sync() { -#ifdef ARMCOMPUTECL_ENABLED if (arm_compute::CLScheduler::get().context()() != NULL) { // Waits for all queued CL requests to finish before unloading the network they may be using. @@ -38,26 +35,23 @@ struct ClBackendContext::ClContextControlWrapper catch (const cl::Error&) { BOOST_LOG_TRIVIAL(warning) << "WARNING: Runtime::UnloadNetwork(): an error occurred while waiting for " - "the queued CL requests to finish"; + "the queued CL requests to finish"; return false; } } -#endif + return true; } void ClearClCache() { -#ifdef ARMCOMPUTECL_ENABLED if (arm_compute::CLScheduler::get().context()() != NULL) { // There are no loaded networks left, so clear the CL cache to free up memory m_ClContextControl.ClearClCache(); } -#endif } - ClContextControl m_ClContextControl; }; -- cgit v1.2.1