From 49433a86814a4b02970a644fcc8320a32b5eee37 Mon Sep 17 00:00:00 2001 From: Mohammad Azim Khan Date: Fri, 22 Nov 2024 18:32:47 +0000 Subject: [PATCH] Remove MaskedAbsOr(Zero) covered with arithmetic tests --- g3doc/quick_reference.md | 3 --- hwy/ops/arm_sve-inl.h | 6 ------ hwy/ops/generic_ops-inl.h | 12 ------------ 3 files changed, 21 deletions(-) diff --git a/g3doc/quick_reference.md b/g3doc/quick_reference.md index 8b9cf41d7d..0e4d224609 100644 --- a/g3doc/quick_reference.md +++ b/g3doc/quick_reference.md @@ -886,9 +886,6 @@ not a concern, these are equivalent to, and potentially more efficient than, V **MaskedSatSubOr**(V no, M m, V a, V b): returns `a[i] + b[i]` saturated to the minimum/maximum representable value, or `no[i]` if `m[i]` is false. -* `V`: `{i,f}` \ - V **MaskedAbsOr**(M m, V a, V b): returns the absolute value of - `a[i]` where m is active and returns `b[i]` otherwise. #### Shifts diff --git a/hwy/ops/arm_sve-inl.h b/hwy/ops/arm_sve-inl.h index e744c376f3..442020c487 100644 --- a/hwy/ops/arm_sve-inl.h +++ b/hwy/ops/arm_sve-inl.h @@ -892,12 +892,6 @@ HWY_SVE_FOREACH_IF(HWY_SVE_RETV_ARGPV, Abs, abs) HWY_SVE_FOREACH_I(HWY_SVE_RETV_ARGPV, SaturatedAbs, qabs) #endif // HWY_SVE_HAVE_2 -// ------------------------------ MaskedAbsOr -HWY_SVE_FOREACH_IF(HWY_SVE_RETV_ARGMV_M, MaskedAbsOr, abs) - -// ------------------------------ MaskedAbsOrZero -HWY_SVE_FOREACH_IF(HWY_SVE_RETV_ARGMV_Z, MaskedAbsOrZero, abs) - // ================================================== ARITHMETIC // Per-target flags to prevent generic_ops-inl.h defining Add etc. diff --git a/hwy/ops/generic_ops-inl.h b/hwy/ops/generic_ops-inl.h index dbde1377f1..16693bf9c5 100644 --- a/hwy/ops/generic_ops-inl.h +++ b/hwy/ops/generic_ops-inl.h @@ -672,18 +672,6 @@ HWY_API V SaturatedAbs(V v) { #endif -// ------------------------------ MaskedAbsOr -template -HWY_API V MaskedAbsOr(M m, V v, V no) { - return IfThenElse(m, Abs(v), no); -} - -// ------------------------------ MaskedAbsOrZero -template -HWY_API V MaskedAbsOrZero(M m, V v) { - return IfThenElseZero(m, Abs(v)); -} - // ------------------------------ Reductions // Targets follow one of two strategies. If HWY_NATIVE_REDUCE_SCALAR is toggled,