aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2019-10-10 14:33:47 +0100
committerMichalis Spyrou <michalis.spyrou@arm.com>2019-10-16 12:04:25 +0000
commit7c60c990fbed62aab1369c0e4462c4081dc3cfeb (patch)
tree94329c7a6214b1385b15bc5225c198fd77cec5c9 /src/runtime
parenta07ce151674e28a3e755f1c48785b599f1d34827 (diff)
downloadComputeLibrary-7c60c990fbed62aab1369c0e4462c4081dc3cfeb.tar.gz
COMPMID-2486: Remove disabled compiler warnings
Removed the following flags: -Wno-format-nonliteral: This had a side effect on Error.h that resulted in rewriting most of the macros. Since I was at it I removed all the va_args in order to comply with DCL50-CPP. -Wno-deprecated-increment-bool -Wno-vla-extension -Wno-mismatched-tags -Wno-redundant-move Change-Id: I7c593854ecc3b7d595b8edcbd6a86d3c2563c6bd Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Reviewed-on: https://review.mlplatform.org/c/2069 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/CL/CLTuner.cpp6
-rw-r--r--src/runtime/CL/functions/CLCannyEdge.cpp2
-rw-r--r--src/runtime/CPP/functions/CPPDetectionOutputLayer.cpp8
-rw-r--r--src/runtime/CPP/functions/CPPDetectionPostProcessLayer.cpp6
-rw-r--r--src/runtime/GLES_COMPUTE/GCScheduler.cpp12
-rw-r--r--src/runtime/NEON/functions/NECannyEdge.cpp3
6 files changed, 19 insertions, 18 deletions
diff --git a/src/runtime/CL/CLTuner.cpp b/src/runtime/CL/CLTuner.cpp
index a079503671..cba4ddc5e3 100644
--- a/src/runtime/CL/CLTuner.cpp
+++ b/src/runtime/CL/CLTuner.cpp
@@ -237,7 +237,7 @@ void CLTuner::load_from_file(const std::string &filename)
fs.open(filename, std::ios::in);
if(!fs.is_open())
{
- ARM_COMPUTE_ERROR("Failed to open '%s' (%s [%d])", filename.c_str(), strerror(errno), errno);
+ ARM_COMPUTE_ERROR_VAR("Failed to open '%s' (%s [%d])", filename.c_str(), strerror(errno), errno);
}
std::string line;
while(!std::getline(fs, line).fail())
@@ -246,7 +246,7 @@ void CLTuner::load_from_file(const std::string &filename)
std::string token;
if(std::getline(ss, token, ';').fail())
{
- ARM_COMPUTE_ERROR("Malformed row '%s' in %s (Should be of the form 'kernel_id;lws[0];lws[1];lws[2]')", ss.str().c_str(), filename.c_str());
+ ARM_COMPUTE_ERROR_VAR("Malformed row '%s' in %s (Should be of the form 'kernel_id;lws[0];lws[1];lws[2]')", ss.str().c_str(), filename.c_str());
}
std::string kernel_id = token;
cl::NDRange lws(1, 1, 1);
@@ -254,7 +254,7 @@ void CLTuner::load_from_file(const std::string &filename)
{
if(std::getline(ss, token, ';').fail())
{
- ARM_COMPUTE_ERROR("Malformed row '%s' in %s (Should be of the form 'kernel_id;lws[0];lws[1];lws[2]')", ss.str().c_str(), filename.c_str());
+ ARM_COMPUTE_ERROR_VAR("Malformed row '%s' in %s (Should be of the form 'kernel_id;lws[0];lws[1];lws[2]')", ss.str().c_str(), filename.c_str());
}
lws.get()[i] = support::cpp11::stoi(token);
}
diff --git a/src/runtime/CL/functions/CLCannyEdge.cpp b/src/runtime/CL/functions/CLCannyEdge.cpp
index 4c7458d1ed..dbaea81bff 100644
--- a/src/runtime/CL/functions/CLCannyEdge.cpp
+++ b/src/runtime/CL/functions/CLCannyEdge.cpp
@@ -128,7 +128,7 @@ void CLCannyEdge::configure(ICLTensor *input, ICLTensor *output, int32_t upper_t
}
else
{
- ARM_COMPUTE_ERROR("Gradient size %d not supported", gradient_size);
+ ARM_COMPUTE_ERROR_VAR("Gradient size %d not supported", gradient_size);
}
// Manage intermediate buffers
diff --git a/src/runtime/CPP/functions/CPPDetectionOutputLayer.cpp b/src/runtime/CPP/functions/CPPDetectionOutputLayer.cpp
index 13a34b43cd..e0acf06d49 100644
--- a/src/runtime/CPP/functions/CPPDetectionOutputLayer.cpp
+++ b/src/runtime/CPP/functions/CPPDetectionOutputLayer.cpp
@@ -464,7 +464,7 @@ void CPPDetectionOutputLayer::run()
// Ignore background class.
continue;
}
- ARM_COMPUTE_ERROR_ON_MSG(_all_location_predictions[i].find(label) == _all_location_predictions[i].end(), "Could not find location predictions for label %d.", label);
+ ARM_COMPUTE_ERROR_ON_MSG_VAR(_all_location_predictions[i].find(label) == _all_location_predictions[i].end(), "Could not find location predictions for label %d.", label);
const std::vector<BBox> &label_loc_preds = _all_location_predictions[i].find(label)->second;
@@ -497,7 +497,7 @@ void CPPDetectionOutputLayer::run()
const int label = _info.share_location() ? -1 : c;
if(conf_scores.find(c) == conf_scores.end() || decode_bboxes.find(label) == decode_bboxes.end())
{
- ARM_COMPUTE_ERROR("Could not find predictions for label %d.", label);
+ ARM_COMPUTE_ERROR_VAR("Could not find predictions for label %d.", label);
}
const std::vector<float> &scores = conf_scores.find(c)->second;
const std::vector<BBox> &bboxes = decode_bboxes.find(label)->second;
@@ -518,7 +518,7 @@ void CPPDetectionOutputLayer::run()
if(conf_scores.find(label) == conf_scores.end())
{
- ARM_COMPUTE_ERROR("Could not find predictions for label %d.", label);
+ ARM_COMPUTE_ERROR_VAR("Could not find predictions for label %d.", label);
}
const std::vector<float> &scores = conf_scores.find(label)->second;
@@ -570,7 +570,7 @@ void CPPDetectionOutputLayer::run()
{
// Either if there are no confidence predictions
// or there are no location predictions for current label.
- ARM_COMPUTE_ERROR("Could not find predictions for the label %d.", label);
+ ARM_COMPUTE_ERROR_VAR("Could not find predictions for the label %d.", label);
}
const std::vector<BBox> &bboxes = decode_bboxes.find(loc_label)->second;
const std::vector<int> &indices = it.second;
diff --git a/src/runtime/CPP/functions/CPPDetectionPostProcessLayer.cpp b/src/runtime/CPP/functions/CPPDetectionPostProcessLayer.cpp
index 7b4f7b97c4..0addb0ead3 100644
--- a/src/runtime/CPP/functions/CPPDetectionPostProcessLayer.cpp
+++ b/src/runtime/CPP/functions/CPPDetectionPostProcessLayer.cpp
@@ -46,16 +46,16 @@ Status validate_arguments(const ITensorInfo *input_box_encoding, const ITensorIn
ARM_COMPUTE_RETURN_ERROR_ON_MSG(input_box_encoding->num_dimensions() > 3, "The location input tensor shape should be [4, N, kBatchSize].");
if(input_box_encoding->num_dimensions() > 2)
{
- ARM_COMPUTE_RETURN_ERROR_ON_MSG(input_box_encoding->dimension(2) != kBatchSize, "The third dimension of the input box_encoding tensor should be equal to %d.", kBatchSize);
+ ARM_COMPUTE_RETURN_ERROR_ON_MSG_VAR(input_box_encoding->dimension(2) != kBatchSize, "The third dimension of the input box_encoding tensor should be equal to %d.", kBatchSize);
}
- ARM_COMPUTE_RETURN_ERROR_ON_MSG(input_box_encoding->dimension(0) != kNumCoordBox, "The first dimension of the input box_encoding tensor should be equal to %d.", kNumCoordBox);
+ ARM_COMPUTE_RETURN_ERROR_ON_MSG_VAR(input_box_encoding->dimension(0) != kNumCoordBox, "The first dimension of the input box_encoding tensor should be equal to %d.", kNumCoordBox);
ARM_COMPUTE_RETURN_ERROR_ON_MSG(input_class_score->dimension(0) != (info.num_classes() + 1),
"The first dimension of the input class_prediction should be equal to the number of classes plus one.");
ARM_COMPUTE_RETURN_ERROR_ON_MSG(input_anchors->num_dimensions() > 3, "The anchors input tensor shape should be [4, N, kBatchSize].");
if(input_anchors->num_dimensions() > 2)
{
- ARM_COMPUTE_RETURN_ERROR_ON_MSG(input_anchors->dimension(0) != kNumCoordBox, "The first dimension of the input anchors tensor should be equal to %d.", kNumCoordBox);
+ ARM_COMPUTE_RETURN_ERROR_ON_MSG_VAR(input_anchors->dimension(0) != kNumCoordBox, "The first dimension of the input anchors tensor should be equal to %d.", kNumCoordBox);
}
ARM_COMPUTE_RETURN_ERROR_ON_MSG((input_box_encoding->dimension(1) != input_class_score->dimension(1))
|| (input_box_encoding->dimension(1) != input_anchors->dimension(1)),
diff --git a/src/runtime/GLES_COMPUTE/GCScheduler.cpp b/src/runtime/GLES_COMPUTE/GCScheduler.cpp
index 6a39e7c360..0824af3ed4 100644
--- a/src/runtime/GLES_COMPUTE/GCScheduler.cpp
+++ b/src/runtime/GLES_COMPUTE/GCScheduler.cpp
@@ -85,11 +85,11 @@ void GCScheduler::setup_context()
EGLBoolean res;
_display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- ARM_COMPUTE_ERROR_ON_MSG(_display == EGL_NO_DISPLAY, "Failed to get display: 0x%x.", eglGetError());
+ ARM_COMPUTE_ERROR_ON_MSG_VAR(_display == EGL_NO_DISPLAY, "Failed to get display: 0x%x.", eglGetError());
res = eglInitialize(_display, nullptr, nullptr);
- ARM_COMPUTE_ERROR_ON_MSG(res == EGL_FALSE, "Failed to initialize egl: 0x%x.", eglGetError());
+ ARM_COMPUTE_ERROR_ON_MSG_VAR(res == EGL_FALSE, "Failed to initialize egl: 0x%x.", eglGetError());
ARM_COMPUTE_UNUSED(res);
const char *egl_extension_st = eglQueryString(_display, EGL_EXTENSIONS);
@@ -107,12 +107,12 @@ void GCScheduler::setup_context()
res = eglChooseConfig(_display, config_attribs.data(), &cfg, 1, &count);
- ARM_COMPUTE_ERROR_ON_MSG(res == EGL_FALSE, "Failed to choose config: 0x%x.", eglGetError());
+ ARM_COMPUTE_ERROR_ON_MSG_VAR(res == EGL_FALSE, "Failed to choose config: 0x%x.", eglGetError());
ARM_COMPUTE_UNUSED(res);
res = eglBindAPI(EGL_OPENGL_ES_API);
- ARM_COMPUTE_ERROR_ON_MSG(res == EGL_FALSE, "Failed to bind api: 0x%x.", eglGetError());
+ ARM_COMPUTE_ERROR_ON_MSG_VAR(res == EGL_FALSE, "Failed to bind api: 0x%x.", eglGetError());
const std::array<EGLint, 3> attribs =
{
@@ -124,11 +124,11 @@ void GCScheduler::setup_context()
EGL_NO_CONTEXT,
attribs.data());
- ARM_COMPUTE_ERROR_ON_MSG(_context == EGL_NO_CONTEXT, "Failed to create context: 0x%x.", eglGetError());
+ ARM_COMPUTE_ERROR_ON_MSG_VAR(_context == EGL_NO_CONTEXT, "Failed to create context: 0x%x.", eglGetError());
ARM_COMPUTE_UNUSED(res);
res = eglMakeCurrent(_display, EGL_NO_SURFACE, EGL_NO_SURFACE, _context);
- ARM_COMPUTE_ERROR_ON_MSG(res == EGL_FALSE, "Failed to make current: 0x%x.", eglGetError());
+ ARM_COMPUTE_ERROR_ON_MSG_VAR(res == EGL_FALSE, "Failed to make current: 0x%x.", eglGetError());
ARM_COMPUTE_UNUSED(res);
}
diff --git a/src/runtime/NEON/functions/NECannyEdge.cpp b/src/runtime/NEON/functions/NECannyEdge.cpp
index 032e617b1b..3d5fbfbfaa 100644
--- a/src/runtime/NEON/functions/NECannyEdge.cpp
+++ b/src/runtime/NEON/functions/NECannyEdge.cpp
@@ -37,6 +37,7 @@
#include "support/ToolchainSupport.h"
#include <cstring>
+#include <inttypes.h>
#include <utility>
using namespace arm_compute;
@@ -118,7 +119,7 @@ void NECannyEdge::configure(ITensor *input, ITensor *output, int32_t upper_thr,
}
else
{
- ARM_COMPUTE_ERROR("Gradient size %d not supported\n", gradient_size);
+ ARM_COMPUTE_ERROR_VAR("Gradient size %+" PRId32 " not supported\n", gradient_size);
}
// Manage intermediate buffers