aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Virginas-Tar <Aron.Virginas-Tar@arm.com>2018-11-16 10:26:23 +0000
committerAron Virginas-Tar <aron.virginas-tar@arm.com>2018-11-16 10:56:02 +0000
commitd46e647bad045f635b8a81b0d74237c3a4dbd2de (patch)
tree4bb694448f8d8cb5eabde033736f2b93e6499bd1
parenta65b7aeafc0ef6acf40e4a8a6d36206bf53d717c (diff)
downloadarmnn-d46e647bad045f635b8a81b0d74237c3a4dbd2de.tar.gz
IVGCVSW-2157: Remove conditional compilation directives from ClBackendContext
Change-Id: I0b9818c3bc09101aa6563ea8e4a886483d3b09d1
-rw-r--r--src/backends/cl/ClBackendContext.cpp14
1 files 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 <boost/log/trivial.hpp>
-
-#ifdef ARMCOMPUTECL_ENABLED
#include <arm_compute/core/CL/OpenCL.h>
#include <arm_compute/core/CL/CLKernelLibrary.h>
#include <arm_compute/runtime/CL/CLScheduler.h>
-#endif
+
+#include <boost/log/trivial.hpp>
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;
};