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

Side by Side Diff: src/core/Sk4x.h

Issue 964603002: Add sqrt() and rsqrt() to Sk4f. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/core/Sk4x_portable.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #ifndef Sk4x_DEFINED 1 #ifndef Sk4x_DEFINED
2 #define Sk4x_DEFINED 2 #define Sk4x_DEFINED
3 3
4 #include "SkTypes.h" 4 #include "SkTypes.h"
5 5
6 #define SK4X_PREAMBLE 1 6 #define SK4X_PREAMBLE 1
7 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 7 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
8 #include "Sk4x_sse.h" 8 #include "Sk4x_sse.h"
9 #else 9 #else
10 #include "Sk4x_portable.h" 10 #include "Sk4x_portable.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 Sk4x bitNot() const; 44 Sk4x bitNot() const;
45 Sk4x bitAnd(const Sk4x&) const; 45 Sk4x bitAnd(const Sk4x&) const;
46 Sk4x bitOr(const Sk4x&) const; 46 Sk4x bitOr(const Sk4x&) const;
47 // TODO: Sk4x bitAndNot(const Sk4x&) const; is efficient in SSE. 47 // TODO: Sk4x bitAndNot(const Sk4x&) const; is efficient in SSE.
48 Sk4x add(const Sk4x&) const; 48 Sk4x add(const Sk4x&) const;
49 Sk4x subtract(const Sk4x&) const; 49 Sk4x subtract(const Sk4x&) const;
50 Sk4x multiply(const Sk4x&) const; 50 Sk4x multiply(const Sk4x&) const;
51 Sk4x divide(const Sk4x&) const; 51 Sk4x divide(const Sk4x&) const;
52 52
53 Sk4x rsqrt() const; // Approximate reciprocal sqrt().
54 Sk4x sqrt() const; // this->multiply(this->rsqrt()) may be faster, but le ss precise.
55
53 Sk4i equal(const Sk4x&) const; 56 Sk4i equal(const Sk4x&) const;
54 Sk4i notEqual(const Sk4x&) const; 57 Sk4i notEqual(const Sk4x&) const;
55 Sk4i lessThan(const Sk4x&) const; 58 Sk4i lessThan(const Sk4x&) const;
56 Sk4i greaterThan(const Sk4x&) const; 59 Sk4i greaterThan(const Sk4x&) const;
57 Sk4i lessThanEqual(const Sk4x&) const; 60 Sk4i lessThanEqual(const Sk4x&) const;
58 Sk4i greaterThanEqual(const Sk4x&) const; 61 Sk4i greaterThanEqual(const Sk4x&) const;
59 62
60 static Sk4x Min(const Sk4x& a, const Sk4x& b); 63 static Sk4x Min(const Sk4x& a, const Sk4x& b);
61 static Sk4x Max(const Sk4x& a, const Sk4x& b); 64 static Sk4x Max(const Sk4x& a, const Sk4x& b);
62 65
(...skipping 21 matching lines...) Expand all
84 #undef SK4X_PRIVATE 87 #undef SK4X_PRIVATE
85 }; 88 };
86 89
87 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 90 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
88 #include "Sk4x_sse.h" 91 #include "Sk4x_sse.h"
89 #else 92 #else
90 #include "Sk4x_portable.h" 93 #include "Sk4x_portable.h"
91 #endif 94 #endif
92 95
93 #endif//Sk4x_DEFINED 96 #endif//Sk4x_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/core/Sk4x_portable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698