From 421405b6a21b124288a750e2da26dc01eb7391cb Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Fri, 26 Oct 2018 19:05:32 +0100 Subject: COMPMID-1675: Add SVE support Change-Id: I86679adff556b6ffc9929b35cbf1b59b3958bdb1 --- tests/TensorCache.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'tests/TensorCache.h') diff --git a/tests/TensorCache.h b/tests/TensorCache.h index 7cf64ffbe5..c8f21116d6 100644 --- a/tests/TensorCache.h +++ b/tests/TensorCache.h @@ -26,6 +26,8 @@ #include "RawTensor.h" +#include "support/Mutex.h" + #include #include #include @@ -84,10 +86,10 @@ private: using FormatMap = std::map, RawTensor>; using ChannelMap = std::map, 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 key) @@ -104,13 +106,13 @@ inline RawTensor *TensorCache::find(std::tuple key, RawTensor raw) { - std::lock_guard lock(_raw_tensor_channel_cache_mutex); + std::lock_guard 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 key, RawTensor raw) { - std::lock_guard lock(_raw_tensor_channel_cache_mutex); + std::lock_guard lock(_raw_tensor_channel_cache_mutex); return std::get<0>(_raw_tensor_channel_cache.emplace(std::move(key), std::move(raw)))->second; } } // namespace test -- cgit v1.2.1