aboutsummaryrefslogtreecommitdiff
path: root/src/core/NEON/kernels/NEDirectConvolutionLayerKernel.cpp
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2018-10-25 17:25:54 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:55:45 +0000
commit201c37ce1362f2ba1fcfe25e4f3d180c40f037ab (patch)
tree4785d3aecc1f9c066fc9f11976f14777642683a0 /src/core/NEON/kernels/NEDirectConvolutionLayerKernel.cpp
parent517055bbb99b899d366bc79446188548ba0aeda0 (diff)
downloadComputeLibrary-201c37ce1362f2ba1fcfe25e4f3d180c40f037ab.tar.gz
COMPMID-1530 error: dereferencing type-punned pointer will break strict-aliasing rules
Change-Id: I9e54d07cf1d77c14f124056d3724b49981bf3f97 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/155292 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: bsgcomp <bsgcomp@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/NEDirectConvolutionLayerKernel.cpp')
-rw-r--r--src/core/NEON/kernels/NEDirectConvolutionLayerKernel.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/NEON/kernels/NEDirectConvolutionLayerKernel.cpp b/src/core/NEON/kernels/NEDirectConvolutionLayerKernel.cpp
index f525d93e83..162c4b1ace 100644
--- a/src/core/NEON/kernels/NEDirectConvolutionLayerKernel.cpp
+++ b/src/core/NEON/kernels/NEDirectConvolutionLayerKernel.cpp
@@ -36,6 +36,7 @@
#include "arm_compute/core/Validate.h"
#include "arm_compute/core/utils/misc/ShapeCalculator.h"
+#include "arm_compute/core/NEON/wrapper/wrapper.h"
#include <algorithm>
#include <arm_neon.h>
@@ -603,10 +604,9 @@ public:
out_values = internal_vmlal(out_values, in_values, we_values);
}
- out_val += out_values[0];
- out_val += out_values[1];
- out_val += out_values[2];
- out_val += out_values[3];
+ auto carry_addition = wrapper::vpadd(wrapper::vgethigh(out_values), wrapper::vgetlow(out_values));
+ carry_addition = wrapper::vpadd(carry_addition, carry_addition);
+ out_val += wrapper::vgetlane(carry_addition, 0);
// Leftover
for(; x < input_width; ++x)