COMPMID-1675: Add SVE support

Change-Id: I86679adff556b6ffc9929b35cbf1b59b3958bdb1
diff --git a/tests/AssetsLibrary.cpp b/tests/AssetsLibrary.cpp
index ee876f9..c6d86d1 100644
--- a/tests/AssetsLibrary.cpp
+++ b/tests/AssetsLibrary.cpp
@@ -416,7 +416,7 @@
 
 const RawTensor &AssetsLibrary::find_or_create_raw_tensor(const std::string &name, Format format) const
 {
-    std::lock_guard<std::mutex> guard(_format_lock);
+    std::lock_guard<arm_compute::Mutex> guard(_format_lock);
 
     const RawTensor *ptr = _cache.find(std::forward_as_tuple(name, format));
 
@@ -440,7 +440,7 @@
 
 const RawTensor &AssetsLibrary::find_or_create_raw_tensor(const std::string &name, Format format, Channel channel) const
 {
-    std::lock_guard<std::mutex> guard(_channel_lock);
+    std::lock_guard<arm_compute::Mutex> guard(_channel_lock);
 
     const RawTensor *ptr = _cache.find(std::forward_as_tuple(name, format, channel));
 
diff --git a/tests/AssetsLibrary.h b/tests/AssetsLibrary.h
index b1c8c43..7af036d 100644
--- a/tests/AssetsLibrary.h
+++ b/tests/AssetsLibrary.h
@@ -414,8 +414,8 @@
     const RawTensor &find_or_create_raw_tensor(const std::string &name, Format format, Channel channel) const;
 
     mutable TensorCache             _cache{};
-    mutable std::mutex              _format_lock{};
-    mutable std::mutex              _channel_lock{};
+    mutable arm_compute::Mutex      _format_lock{};
+    mutable arm_compute::Mutex      _channel_lock{};
     const std::string               _library_path;
     std::random_device::result_type _seed;
 };
diff --git a/tests/SConscript b/tests/SConscript
index ac826f8..24714ef 100644
--- a/tests/SConscript
+++ b/tests/SConscript
@@ -124,7 +124,7 @@
 
 if env['os'] == 'android':
     test_env.Append(LIBS = ["log"])
-else:
+elif env['os'] != 'bare_metal':
     test_env.Append(LIBS = ["rt"])
 
 if test_env['benchmark_tests']:
diff --git a/tests/TensorCache.h b/tests/TensorCache.h
index 7cf64ff..c8f2111 100644
--- a/tests/TensorCache.h
+++ b/tests/TensorCache.h
@@ -26,6 +26,8 @@
 
 #include "RawTensor.h"
 
+#include "support/Mutex.h"
+
 #include <map>
 #include <mutex>
 #include <utility>
@@ -84,10 +86,10 @@
     using FormatMap  = std::map<std::tuple<std::string, Format>, RawTensor>;
     using ChannelMap = std::map<std::tuple<std::string, Format, Channel>, RawTensor>;
 
-    FormatMap  _raw_tensor_cache{};
-    ChannelMap _raw_tensor_channel_cache{};
-    std::mutex _raw_tensor_cache_mutex{};
-    std::mutex _raw_tensor_channel_cache_mutex{};
+    FormatMap          _raw_tensor_cache{};
+    ChannelMap         _raw_tensor_channel_cache{};
+    arm_compute::Mutex _raw_tensor_cache_mutex{};
+    arm_compute::Mutex _raw_tensor_channel_cache_mutex{};
 };
 
 inline RawTensor *TensorCache::find(std::tuple<const std::string &, Format> key)
@@ -104,13 +106,13 @@
 
 inline RawTensor &TensorCache::add(std::tuple<const std::string &, Format> key, RawTensor raw)
 {
-    std::lock_guard<std::mutex> lock(_raw_tensor_channel_cache_mutex);
+    std::lock_guard<arm_compute::Mutex> lock(_raw_tensor_cache_mutex);
     return std::get<0>(_raw_tensor_cache.emplace(std::move(key), std::move(raw)))->second;
 }
 
 inline RawTensor &TensorCache::add(std::tuple<const std::string &, Format, Channel> key, RawTensor raw)
 {
-    std::lock_guard<std::mutex> lock(_raw_tensor_channel_cache_mutex);
+    std::lock_guard<arm_compute::Mutex> lock(_raw_tensor_channel_cache_mutex);
     return std::get<0>(_raw_tensor_channel_cache.emplace(std::move(key), std::move(raw)))->second;
 }
 } // namespace test
diff --git a/tests/framework/instruments/Instruments.h b/tests/framework/instruments/Instruments.h
index 705fc59..77c74b7 100644
--- a/tests/framework/instruments/Instruments.h
+++ b/tests/framework/instruments/Instruments.h
@@ -24,10 +24,12 @@
 #ifndef ARM_COMPUTE_TEST_INSTRUMENTS
 #define ARM_COMPUTE_TEST_INSTRUMENTS
 
+#if !defined(BARE_METAL)
 #include "MaliCounter.h"
 #include "OpenCLMemoryUsage.h"
 #include "OpenCLTimer.h"
 #include "PMUCounter.h"
+#endif /* !defined(BARE_METAL) */
 #include "SchedulerTimer.h"
 #include "WallClockTimer.h"