aboutsummaryrefslogtreecommitdiff
path: root/src/core/NEON/kernels/arm_conv
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/NEON/kernels/arm_conv')
-rw-r--r--src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp11
-rw-r--r--src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst_generic.hpp11
-rw-r--r--src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst_generic_multiplier.hpp11
3 files changed, 3 insertions, 30 deletions
diff --git a/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp b/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp
index a92817bb14..53ad5b5c6b 100644
--- a/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp
+++ b/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp
@@ -154,16 +154,7 @@ class DepthwiseDepthfirst : public DepthwiseCommon<typename strategy::input_type
// Compute activation values
TAccum activation_min, activation_max;
- if (std::numeric_limits<TAccum>::is_integer)
- {
- activation_min = std::numeric_limits<TAccum>::min();
- activation_max = std::numeric_limits<TAccum>::max();
- }
- else
- {
- activation_min = static_cast<TAccum>(-std::numeric_limits<float>::infinity());
- activation_max = static_cast<TAccum>(std::numeric_limits<float>::infinity());
- }
+ std::tie(activation_min, activation_max) = get_default_activation_values<TAccum>();
switch (this->m_args.activation.type)
{
diff --git a/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst_generic.hpp b/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst_generic.hpp
index ee5ab84d14..f04f7751db 100644
--- a/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst_generic.hpp
+++ b/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst_generic.hpp
@@ -333,16 +333,7 @@ class DepthwiseDepthfirstGeneric : public DepthwiseDepthfirstGenericBase<Strateg
// Compute activation values
TAccum activation_min, activation_max;
- if (std::numeric_limits<TAccum>::is_integer)
- {
- activation_min = std::numeric_limits<TAccum>::min();
- activation_max = std::numeric_limits<TAccum>::max();
- }
- else
- {
- activation_min = static_cast<TAccum>(-std::numeric_limits<float>::infinity());
- activation_max = static_cast<TAccum>(std::numeric_limits<float>::infinity());
- }
+ std::tie(activation_min, activation_max) = get_default_activation_values<TAccum>();
switch (this->m_args.activation.type)
{
diff --git a/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst_generic_multiplier.hpp b/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst_generic_multiplier.hpp
index 31e5834366..bb580e605a 100644
--- a/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst_generic_multiplier.hpp
+++ b/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst_generic_multiplier.hpp
@@ -426,16 +426,7 @@ class DepthwiseDepthfirstGenericWithMultiplier : public DepthwiseDepthfirstGener
// Compute activation values
TAccum activation_min, activation_max;
- if (std::numeric_limits<TAccum>::is_integer)
- {
- activation_min = std::numeric_limits<TAccum>::min();
- activation_max = std::numeric_limits<TAccum>::max();
- }
- else
- {
- activation_min = static_cast<TAccum>(-std::numeric_limits<float>::infinity());
- activation_max = static_cast<TAccum>(std::numeric_limits<float>::infinity());
- }
+ std::tie(activation_min, activation_max) = get_default_activation_values<TAccum>();
switch (this->m_args.activation.type)
{