aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/CPP/kernels/CPPCornerCandidatesKernel.cpp6
-rw-r--r--src/core/NEON/kernels/NEHOGDetectorKernel.cpp4
-rw-r--r--src/core/NEON/kernels/NEHistogramKernel.cpp2
-rw-r--r--src/core/NEON/kernels/NEMeanStdDevKernel.cpp2
-rw-r--r--src/core/NEON/kernels/NEMinMaxLayerKernel.cpp2
-rw-r--r--src/core/NEON/kernels/NEMinMaxLocationKernel.cpp2
-rw-r--r--src/core/utils/logging/LoggerRegistry.cpp9
7 files changed, 15 insertions, 12 deletions
diff --git a/src/core/CPP/kernels/CPPCornerCandidatesKernel.cpp b/src/core/CPP/kernels/CPPCornerCandidatesKernel.cpp
index 418d34983..739f389fd 100644
--- a/src/core/CPP/kernels/CPPCornerCandidatesKernel.cpp
+++ b/src/core/CPP/kernels/CPPCornerCandidatesKernel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -33,6 +33,8 @@
#include "arm_compute/core/Validate.h"
#include "arm_compute/core/Window.h"
+#include "support/Mutex.h"
+
using namespace arm_compute;
namespace
@@ -42,7 +44,7 @@ inline void check_corner(float x, float y, float strength, InternalKeypoint *out
if(strength != 0.0f)
{
/* Set index and update num_corner_candidate */
- std::unique_lock<arm_compute::Mutex> lock(*corner_candidates_mutex);
+ arm_compute::unique_lock<arm_compute::Mutex> lock(*corner_candidates_mutex);
const int32_t idx = *num_corner_candidates;
diff --git a/src/core/NEON/kernels/NEHOGDetectorKernel.cpp b/src/core/NEON/kernels/NEHOGDetectorKernel.cpp
index 2c02ab899..8f523998d 100644
--- a/src/core/NEON/kernels/NEHOGDetectorKernel.cpp
+++ b/src/core/NEON/kernels/NEHOGDetectorKernel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018 ARM Limited.
+ * Copyright (c) 2016-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -177,7 +177,7 @@ void NEHOGDetectorKernel::run(const Window &window, const ThreadInfo &info)
win.idx_class = _idx_class;
win.score = score;
- std::unique_lock<arm_compute::Mutex> lock(_mutex);
+ arm_compute::unique_lock<arm_compute::Mutex> lock(_mutex);
_detection_windows->push_back(win);
lock.unlock();
}
diff --git a/src/core/NEON/kernels/NEHistogramKernel.cpp b/src/core/NEON/kernels/NEHistogramKernel.cpp
index b088a232a..211ea1ff9 100644
--- a/src/core/NEON/kernels/NEHistogramKernel.cpp
+++ b/src/core/NEON/kernels/NEHistogramKernel.cpp
@@ -41,7 +41,7 @@ class Coordinates;
inline void NEHistogramKernel::merge_histogram(uint32_t *global_hist, const uint32_t *local_hist, size_t bins)
{
- std::lock_guard<arm_compute::Mutex> lock(_hist_mtx);
+ arm_compute::lock_guard<arm_compute::Mutex> lock(_hist_mtx);
const unsigned int v_end = (bins / 4) * 4;
diff --git a/src/core/NEON/kernels/NEMeanStdDevKernel.cpp b/src/core/NEON/kernels/NEMeanStdDevKernel.cpp
index 0af63059f..afab6d6e5 100644
--- a/src/core/NEON/kernels/NEMeanStdDevKernel.cpp
+++ b/src/core/NEON/kernels/NEMeanStdDevKernel.cpp
@@ -142,7 +142,7 @@ void NEMeanStdDevKernel::run(const Window &window, const ThreadInfo &info)
const float num_pixels = _input->info()->dimension(0) * _input->info()->dimension(1);
// Merge sum and calculate mean and stddev
- std::unique_lock<arm_compute::Mutex> lock(_mtx);
+ arm_compute::unique_lock<arm_compute::Mutex> lock(_mtx);
*_global_sum += vget_lane_u64(local_sum, 0);
diff --git a/src/core/NEON/kernels/NEMinMaxLayerKernel.cpp b/src/core/NEON/kernels/NEMinMaxLayerKernel.cpp
index fe3af0b44..f69c88324 100644
--- a/src/core/NEON/kernels/NEMinMaxLayerKernel.cpp
+++ b/src/core/NEON/kernels/NEMinMaxLayerKernel.cpp
@@ -212,7 +212,7 @@ void NEMinMaxLayerKernel::reset()
void NEMinMaxLayerKernel::update_min_max(float *out_ptr, float min, float max)
{
- std::lock_guard<Mutex> lock(_mtx);
+ arm_compute::lock_guard<Mutex> lock(_mtx);
const float32x2_t old_min = vld1_dup_f32(out_ptr);
const float32x2_t old_max = vld1_dup_f32(out_ptr + 1);
diff --git a/src/core/NEON/kernels/NEMinMaxLocationKernel.cpp b/src/core/NEON/kernels/NEMinMaxLocationKernel.cpp
index 08b27e319..7fa2dc1c8 100644
--- a/src/core/NEON/kernels/NEMinMaxLocationKernel.cpp
+++ b/src/core/NEON/kernels/NEMinMaxLocationKernel.cpp
@@ -117,7 +117,7 @@ void NEMinMaxKernel::reset()
template <typename T>
void NEMinMaxKernel::update_min_max(const T min, const T max)
{
- std::lock_guard<arm_compute::Mutex> lock(_mtx);
+ arm_compute::lock_guard<arm_compute::Mutex> lock(_mtx);
using type = typename std::conditional<std::is_same<T, float>::value, float, int32_t>::type;
diff --git a/src/core/utils/logging/LoggerRegistry.cpp b/src/core/utils/logging/LoggerRegistry.cpp
index 055e770c7..fe71902ec 100644
--- a/src/core/utils/logging/LoggerRegistry.cpp
+++ b/src/core/utils/logging/LoggerRegistry.cpp
@@ -24,6 +24,7 @@
#include "arm_compute/core/utils/logging/LoggerRegistry.h"
#include "arm_compute/core/Error.h"
+#include "support/Mutex.h"
#include "support/ToolchainSupport.h"
using namespace arm_compute::logging;
@@ -44,7 +45,7 @@ LoggerRegistry &LoggerRegistry::get()
void LoggerRegistry::create_logger(const std::string &name, LogLevel log_level, const std::vector<std::shared_ptr<Printer>> &printers)
{
- std::lock_guard<arm_compute::Mutex> lock(_mtx);
+ arm_compute::lock_guard<arm_compute::Mutex> lock(_mtx);
if((_loggers.find(name) == _loggers.end()) && (_reserved_loggers.find(name) == _reserved_loggers.end()))
{
_loggers[name] = std::make_shared<Logger>(name, log_level, printers);
@@ -53,7 +54,7 @@ void LoggerRegistry::create_logger(const std::string &name, LogLevel log_level,
void LoggerRegistry::remove_logger(const std::string &name)
{
- std::lock_guard<arm_compute::Mutex> lock(_mtx);
+ arm_compute::lock_guard<arm_compute::Mutex> lock(_mtx);
if(_loggers.find(name) != _loggers.end())
{
_loggers.erase(name);
@@ -62,13 +63,13 @@ void LoggerRegistry::remove_logger(const std::string &name)
std::shared_ptr<Logger> LoggerRegistry::logger(const std::string &name)
{
- std::lock_guard<arm_compute::Mutex> lock(_mtx);
+ arm_compute::lock_guard<arm_compute::Mutex> lock(_mtx);
return (_loggers.find(name) != _loggers.end()) ? _loggers[name] : nullptr;
}
void LoggerRegistry::create_reserved_loggers(LogLevel log_level, const std::vector<std::shared_ptr<Printer>> &printers)
{
- std::lock_guard<arm_compute::Mutex> lock(_mtx);
+ arm_compute::lock_guard<arm_compute::Mutex> lock(_mtx);
for(const auto &r : _reserved_loggers)
{
if(_loggers.find(r) == _loggers.end())