diff options
author | Michalis Spyrou <michalis.spyrou@arm.com> | 2019-10-16 17:41:33 +0100 |
---|---|---|
committer | Michalis Spyrou <michalis.spyrou@arm.com> | 2019-10-17 15:36:33 +0000 |
commit | fae513c5585b9ba09c3aa8bfd4f7119208b7b5f9 (patch) | |
tree | 4c87da93a765e880d22a53904543e2e91660f7a5 /tests/validation/reference/DFT.cpp | |
parent | ebaddb600795911dc4e4c446d4f612caa009aaa1 (diff) | |
download | ComputeLibrary-fae513c5585b9ba09c3aa8bfd4f7119208b7b5f9.tar.gz |
COMPMID-2486: Remove/add disabled compiler warnings
Removed the following flags:
-Wno-vla
-Wno-strict-overflow
Added:
-Wformat-security
Change-Id: I49eb3d724e14db796e543164295674617c37cb65
Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com>
Reviewed-on: https://review.mlplatform.org/c/2109
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Diffstat (limited to 'tests/validation/reference/DFT.cpp')
-rw-r--r-- | tests/validation/reference/DFT.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/validation/reference/DFT.cpp b/tests/validation/reference/DFT.cpp index 6ad1b9e150..b3c2c6b0b9 100644 --- a/tests/validation/reference/DFT.cpp +++ b/tests/validation/reference/DFT.cpp @@ -237,11 +237,11 @@ void scale(SimpleTensor<T> &tensor, T scaling_factor) template <typename T> SimpleTensor<T> complex_mul_and_reduce(const SimpleTensor<T> &input, const SimpleTensor<T> &weights) { - const int W = input.shape().x(); - const int H = input.shape().y(); - const int Ci = input.shape().z(); - const int Co = weights.shape()[3]; - const int N = input.shape().total_size() / (W * H * Ci); + const uint32_t W = input.shape().x(); + const uint32_t H = input.shape().y(); + const uint32_t Ci = input.shape().z(); + const uint32_t Co = weights.shape()[3]; + const uint32_t N = input.shape().total_size() / (W * H * Ci); TensorShape output_shape = input.shape(); output_shape.set(2, Co); @@ -250,19 +250,19 @@ SimpleTensor<T> complex_mul_and_reduce(const SimpleTensor<T> &input, const Simpl // MemSet dst memory to zero std::memset(dst.data(), 0, dst.size()); - for(int b = 0; b < N; ++b) + for(uint32_t b = 0; b < N; ++b) { - for(int co = 0; co < Co; ++co) + for(uint32_t co = 0; co < Co; ++co) { - for(int ci = 0; ci < Ci; ++ci) + for(uint32_t ci = 0; ci < Ci; ++ci) { - for(int h = 0; h < H; ++h) + for(uint32_t h = 0; h < H; ++h) { - for(int w = 0; w < W; ++w) + for(uint32_t w = 0; w < W; ++w) { - size_t i_index = w + h * W + ci * H * W + b * H * W * Ci; - size_t w_index = w + h * W + ci * H * W + co * H * W * Ci; - size_t o_index = w + h * W + co * H * W + b * H * W * Co; + const uint32_t i_index = w + h * W + ci * H * W + b * H * W * Ci; + const uint32_t w_index = w + h * W + ci * H * W + co * H * W * Ci; + const uint32_t o_index = w + h * W + co * H * W + b * H * W * Co; const Coordinates i_coords = index2coords(input.shape(), i_index); const Coordinates w_coords = index2coords(weights.shape(), w_index); const Coordinates o_coords = index2coords(dst.shape(), o_index); |