remove unused SkNx::invert()
The instructions used to implement it don't deliever the same results across processors, even on the same architecture. Bug: skia:11861 Change-Id: Ifb87fc04a4ec866f84d7c2f2472c7f4b65661d28 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396721 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
parent
b3d14873d4
commit
940ec1ca0e
@ -114,7 +114,6 @@ struct SkNx {
|
||||
AI SkNx sqrt() const { return { fLo. sqrt(), fHi. sqrt() }; }
|
||||
AI SkNx rsqrt() const { return { fLo. rsqrt(), fHi. rsqrt() }; }
|
||||
AI SkNx floor() const { return { fLo. floor(), fHi. floor() }; }
|
||||
AI SkNx invert() const { return { fLo.invert(), fHi.invert() }; }
|
||||
|
||||
AI SkNx operator!() const { return { !fLo, !fHi }; }
|
||||
AI SkNx operator-() const { return { -fLo, -fHi }; }
|
||||
@ -224,7 +223,6 @@ struct SkNx<1,T> {
|
||||
AI SkNx sqrt() const { return Sqrt(fVal); }
|
||||
AI SkNx rsqrt() const { return T(1) / this->sqrt(); }
|
||||
AI SkNx floor() const { return Floor(fVal); }
|
||||
AI SkNx invert() const { return T(1) / *this; }
|
||||
|
||||
AI SkNx operator!() const { return !fVal; }
|
||||
AI SkNx operator-() const { return -fVal; }
|
||||
|
@ -72,12 +72,6 @@ public:
|
||||
vst4_f32((float*) dst, abcd);
|
||||
}
|
||||
|
||||
AI SkNx invert() const {
|
||||
float32x2_t est0 = vrecpe_f32(fVec),
|
||||
est1 = vmul_f32(vrecps_f32(est0, fVec), est0);
|
||||
return est1;
|
||||
}
|
||||
|
||||
AI SkNx operator - () const { return vneg_f32(fVec); }
|
||||
|
||||
AI SkNx operator + (const SkNx& o) const { return vadd_f32(fVec, o.fVec); }
|
||||
@ -196,12 +190,6 @@ public:
|
||||
vst4q_f32((float*) dst, rgba);
|
||||
}
|
||||
|
||||
AI SkNx invert() const {
|
||||
float32x4_t est0 = vrecpeq_f32(fVec),
|
||||
est1 = vmulq_f32(vrecpsq_f32(est0, fVec), est0);
|
||||
return est1;
|
||||
}
|
||||
|
||||
AI SkNx operator - () const { return vnegq_f32(fVec); }
|
||||
|
||||
AI SkNx operator + (const SkNx& o) const { return vaddq_f32(fVec, o.fVec); }
|
||||
|
@ -101,7 +101,6 @@ public:
|
||||
|
||||
AI SkNx sqrt() const { return _mm_sqrt_ps (fVec); }
|
||||
AI SkNx rsqrt() const { return _mm_rsqrt_ps(fVec); }
|
||||
AI SkNx invert() const { return _mm_rcp_ps(fVec); }
|
||||
|
||||
AI float operator[](int k) const {
|
||||
SkASSERT(0 <= k && k < 2);
|
||||
@ -194,7 +193,6 @@ public:
|
||||
|
||||
AI SkNx sqrt() const { return _mm_sqrt_ps (fVec); }
|
||||
AI SkNx rsqrt() const { return _mm_rsqrt_ps(fVec); }
|
||||
AI SkNx invert() const { return _mm_rcp_ps(fVec); }
|
||||
|
||||
AI float operator[](int k) const {
|
||||
SkASSERT(0 <= k && k < 4);
|
||||
|
@ -55,8 +55,6 @@ static void test_Nf(skiatest::Reporter* r) {
|
||||
assert_eq(fours.sqrt(), 2,2,2,2);
|
||||
assert_nearly_eq(0.001f, fours.rsqrt(), 0.5, 0.5, 0.5, 0.5);
|
||||
|
||||
assert_nearly_eq(0.001f, fours.invert(), 0.25, 0.25, 0.25, 0.25);
|
||||
|
||||
assert_eq(SkNx<N,float>::Min(a, fours), 3, 4, 4, 4);
|
||||
assert_eq(SkNx<N,float>::Max(a, fours), 4, 4, 5, 6);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user