Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Unified Diff: src/core/SkNx.h

Issue 1105233003: Revert of Split rsqrt into rsqrt{0,1,2}, with increasing cost and precision on ARM (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/effects/gradients/SkRadialGradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkNx.h
diff --git a/src/core/SkNx.h b/src/core/SkNx.h
index 4cfc6e3d9ae05aff619c590f9ef57ff5fe9d2e10..65b5b97a83e536cc928b897f17653b8c5622143f 100644
--- a/src/core/SkNx.h
+++ b/src/core/SkNx.h
@@ -119,11 +119,7 @@
}
SkNf sqrt() const { return SkNf(fLo. sqrt(), fHi. sqrt()); }
-
- // Generally, increasing precision, increasing cost.
- SkNf rsqrt0() const { return SkNf(fLo.rsqrt0(), fHi.rsqrt0()); }
- SkNf rsqrt1() const { return SkNf(fLo.rsqrt1(), fHi.rsqrt1()); }
- SkNf rsqrt2() const { return SkNf(fLo.rsqrt2(), fHi.rsqrt2()); }
+ SkNf rsqrt() const { return SkNf(fLo.rsqrt(), fHi.rsqrt()); }
SkNf invert() const { return SkNf(fLo. invert(), fHi. invert()); }
SkNf approxInvert() const { return SkNf(fLo.approxInvert(), fHi.approxInvert()); }
@@ -211,9 +207,7 @@
static SkNf Max(const SkNf& l, const SkNf& r) { return SkNf(SkTMax(l.fVal, r.fVal)); }
SkNf sqrt() const { return SkNf(Sqrt(fVal)); }
- SkNf rsqrt0() const { return SkNf((T)1 / Sqrt(fVal)); }
- SkNf rsqrt1() const { return this->rsqrt0(); }
- SkNf rsqrt2() const { return this->rsqrt1(); }
+ SkNf rsqrt() const { return SkNf((T)1 / Sqrt(fVal)); }
SkNf invert() const { return SkNf((T)1 / fVal); }
SkNf approxInvert() const { return this->invert(); }
« no previous file with comments | « no previous file | src/effects/gradients/SkRadialGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698