OLD | NEW |
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 #include "SkNx.h" | 5 #include "SkNx.h" |
6 | 6 |
7 #define SK4X_PREAMBLE 1 | 7 #define SK4X_PREAMBLE 1 |
8 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 && !defined(SKNX_NO_SIMD) | 8 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 && !defined(SKNX_NO_SIMD) |
9 #include "../opts/Sk4x_sse.h" | 9 #include "../opts/Sk4x_sse.h" |
10 #elif defined(SK_ARM_HAS_NEON) && !defined(SKNX_NO_SIMD) | 10 #elif defined(SK_ARM_HAS_NEON) && !defined(SKNX_NO_SIMD) |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 Sk4x operator *(const Sk4x& o) const { return this->multiply(o); } | 62 Sk4x operator *(const Sk4x& o) const { return this->multiply(o); } |
63 Sk4x operator /(const Sk4x& o) const { return this->divide(o); } | 63 Sk4x operator /(const Sk4x& o) const { return this->divide(o); } |
64 | 64 |
65 Sk4x& operator &=(const Sk4x& o) { return (*this = *this & o); } | 65 Sk4x& operator &=(const Sk4x& o) { return (*this = *this & o); } |
66 Sk4x& operator |=(const Sk4x& o) { return (*this = *this | o); } | 66 Sk4x& operator |=(const Sk4x& o) { return (*this = *this | o); } |
67 Sk4x& operator +=(const Sk4x& o) { return (*this = *this + o); } | 67 Sk4x& operator +=(const Sk4x& o) { return (*this = *this + o); } |
68 Sk4x& operator -=(const Sk4x& o) { return (*this = *this - o); } | 68 Sk4x& operator -=(const Sk4x& o) { return (*this = *this - o); } |
69 Sk4x& operator *=(const Sk4x& o) { return (*this = *this * o); } | 69 Sk4x& operator *=(const Sk4x& o) { return (*this = *this * o); } |
70 Sk4x& operator /=(const Sk4x& o) { return (*this = *this / o); } | 70 Sk4x& operator /=(const Sk4x& o) { return (*this = *this / o); } |
71 | 71 |
72 Sk4x negate() const { return Sk4x(0) - *this; } | 72 Sk4x negate() const { return Sk4x((T)0) - *this; } |
73 Sk4x operator -() const { return this->negate(); } | 73 Sk4x operator -() const { return this->negate(); } |
74 | 74 |
75 Sk4x rsqrt() const; // Approximate reciprocal sqrt(). | 75 Sk4x rsqrt() const; // Approximate reciprocal sqrt(). |
76 Sk4x sqrt() const; // this->multiply(this->rsqrt()) may be faster, but le
ss precise. | 76 Sk4x sqrt() const; // this->multiply(this->rsqrt()) may be faster, but le
ss precise. |
77 | 77 |
78 Sk4i equal(const Sk4x&) const; | 78 Sk4i equal(const Sk4x&) const; |
79 Sk4i notEqual(const Sk4x&) const; | 79 Sk4i notEqual(const Sk4x&) const; |
80 Sk4i lessThan(const Sk4x&) const; | 80 Sk4i lessThan(const Sk4x&) const; |
81 Sk4i greaterThan(const Sk4x&) const; | 81 Sk4i greaterThan(const Sk4x&) const; |
82 Sk4i lessThanEqual(const Sk4x&) const; | 82 Sk4i lessThanEqual(const Sk4x&) const; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 120 |
121 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 && !defined(SKNX_NO_SIMD) | 121 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 && !defined(SKNX_NO_SIMD) |
122 #include "../opts/Sk4x_sse.h" | 122 #include "../opts/Sk4x_sse.h" |
123 #elif defined(SK_ARM_HAS_NEON) && !defined(SKNX_NO_SIMD) | 123 #elif defined(SK_ARM_HAS_NEON) && !defined(SKNX_NO_SIMD) |
124 #include "../opts/Sk4x_neon.h" | 124 #include "../opts/Sk4x_neon.h" |
125 #else | 125 #else |
126 #include "../opts/Sk4x_none.h" | 126 #include "../opts/Sk4x_none.h" |
127 #endif | 127 #endif |
128 | 128 |
129 #endif//Sk4x_DEFINED | 129 #endif//Sk4x_DEFINED |
OLD | NEW |