aboutsummaryrefslogtreecommitdiff
path: root/src/core/NEON/kernels/NEGEMMMatrixMultiplyKernel.cpp
diff options
context:
space:
mode:
authorGian Marco Iodice <gianmarco.iodice@arm.com>2019-06-10 16:45:40 +0100
committerGian Marco Iodice <gianmarco.iodice@arm.com>2019-06-11 14:42:21 +0000
commit82d9dd1c750d9a9a64650239b6ed3f955555a728 (patch)
treee2b56bd2381defc64e50a8e97d5e5c5f293bbb35 /src/core/NEON/kernels/NEGEMMMatrixMultiplyKernel.cpp
parent62404a58d4b6f5ddbf0e551764b314d1b2da2478 (diff)
downloadComputeLibrary-82d9dd1c750d9a9a64650239b6ed3f955555a728.tar.gz
COMPMID-2380: Create utility functions for is_one and is_zero with float
Change-Id: If5b968e19cf830d5472395a1b43bf72a456fd331 Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Reviewed-on: https://review.mlplatform.org/c/1322 Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/NEGEMMMatrixMultiplyKernel.cpp')
-rw-r--r--src/core/NEON/kernels/NEGEMMMatrixMultiplyKernel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/NEON/kernels/NEGEMMMatrixMultiplyKernel.cpp b/src/core/NEON/kernels/NEGEMMMatrixMultiplyKernel.cpp
index a82fae7521..e3508a1234 100644
--- a/src/core/NEON/kernels/NEGEMMMatrixMultiplyKernel.cpp
+++ b/src/core/NEON/kernels/NEGEMMMatrixMultiplyKernel.cpp
@@ -35,7 +35,7 @@
#include "arm_compute/core/Utils.h"
#include "arm_compute/core/Validate.h"
#include "arm_compute/core/Window.h"
-
+#include "arm_compute/core/utils/helpers/float_ops.h"
#include "arm_compute/core/utils/misc/ShapeCalculator.h"
#include <arm_neon.h>
@@ -998,7 +998,7 @@ void NEGEMMMatrixMultiplyKernel::run(const Window &window, const ThreadInfo &inf
ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(INEKernel::window(), window);
- bool multiply_alpha = std::abs(1.0f - _alpha) > 0.00001f;
+ const bool multiply_alpha = !(helpers::float_ops::is_one(_alpha));
// Check if the output tensor is a vector. If so,the kernel runs the vector-matrix multiplication
if((_output->info()->dimension(1) == 1))