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

Unified Diff: src/opts/SkFloatingPoint_opts.h

Issue 1616013003: de-proc sk_float_rsqrt (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: test both Created 4 years, 11 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 | « src/core/SkOpts.cpp ('k') | src/opts/SkOpts_neon.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkFloatingPoint_opts.h
diff --git a/src/opts/SkFloatingPoint_opts.h b/src/opts/SkFloatingPoint_opts.h
deleted file mode 100644
index 8b6536ad7f18dab0e72c7472803fe63deab9d777..0000000000000000000000000000000000000000
--- a/src/opts/SkFloatingPoint_opts.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2015 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkFloatingPoint_opts_DEFINED
-#define SkFloatingPoint_opts_DEFINED
-
-#include "SkFloatingPoint.h"
-
-namespace SK_OPTS_NS {
-
-#if defined(SK_ARM_HAS_NEON)
- static float rsqrt(float x) {
- return sk_float_rsqrt(x); // This sk_float_rsqrt copy will take the NEON compile-time path.
- }
-#else
- static float rsqrt(float x) {
- // Get initial estimate.
- int i = *SkTCast<int*>(&x);
- i = 0x5F1FFFF9 - (i>>1);
- float estimate = *SkTCast<float*>(&i);
-
- // One step of Newton's method to refine.
- const float estimate_sq = estimate*estimate;
- estimate *= 0.703952253f*(2.38924456f-x*estimate_sq);
- return estimate;
- }
-#endif
-
-} // namespace SK_OPTS_NS
-
-#endif//SkFloatingPoint_opts_DEFINED
« no previous file with comments | « src/core/SkOpts.cpp ('k') | src/opts/SkOpts_neon.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698