aboutsummaryrefslogtreecommitdiff
path: root/src/backends/test/ClContextControlFixture.hpp
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2018-10-01 09:26:39 +0100
committerMatthew Bentham <matthew.bentham@arm.com>2018-10-10 16:16:58 +0100
commit539b44dbd620c9f793f84933c1bcc51ce3ff085e (patch)
tree4d75b13cd8ac213f16279ecf54b2ce9c20d04b9a /src/backends/test/ClContextControlFixture.hpp
parent084523a492efd8001cd8e07956d45c9aeb2bb046 (diff)
downloadarmnn-539b44dbd620c9f793f84933c1bcc51ce3ff085e.tar.gz
IVGCVSW-1863 Unit tests for NHWC L2Normalization
* Added NHWC unit test implementation * Programmatically selected the channel dimension when creating the ACL Normalization layer info * Set the input/output data layout in the constructor of the L2Normalization workload Change-Id: Ie69f1a360022c29d1a3a3808c1f26b69243fa8f9
Diffstat (limited to 'src/backends/test/ClContextControlFixture.hpp')
-rw-r--r--src/backends/test/ClContextControlFixture.hpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/backends/test/ClContextControlFixture.hpp b/src/backends/test/ClContextControlFixture.hpp
index c81428ff82..fd53e3fcf3 100644
--- a/src/backends/test/ClContextControlFixture.hpp
+++ b/src/backends/test/ClContextControlFixture.hpp
@@ -10,9 +10,22 @@
template<bool ProfilingEnabled>
struct ClContextControlFixtureBase
{
+ static ClContextControlFixtureBase*& Instance()
+ {
+ static ClContextControlFixtureBase* s_Instance = nullptr;
+ return s_Instance;
+ }
+
// Initialising ClContextControl to ensure OpenCL is loaded correctly for each test case
- ClContextControlFixtureBase() : m_ClContextControl(nullptr, ProfilingEnabled) {}
- ~ClContextControlFixtureBase() {}
+ ClContextControlFixtureBase()
+ : m_ClContextControl(nullptr, ProfilingEnabled)
+ {
+ Instance() = this;
+ }
+ ~ClContextControlFixtureBase()
+ {
+ Instance() = nullptr;
+ }
armnn::ClContextControl m_ClContextControl;
};