diff options
Diffstat (limited to 'src/core/NEON/kernels/arm_conv/depthwise')
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) { |