diff options
Diffstat (limited to 'src/opts')
-rw-r--r-- | src/opts/SkNx_neon.h | 2 | ||||
-rw-r--r-- | src/opts/SkNx_sse.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/opts/SkNx_neon.h b/src/opts/SkNx_neon.h index 0955cb2b5b..c04f4d5f91 100644 --- a/src/opts/SkNx_neon.h +++ b/src/opts/SkNx_neon.h @@ -187,6 +187,8 @@ public: static SkNx Min(const SkNx& l, const SkNx& r) { return vminq_f32(l.fVec, r.fVec); } static SkNx Max(const SkNx& l, const SkNx& r) { return vmaxq_f32(l.fVec, r.fVec); } + SkNx abs() const { return vabsq_f32(fVec); } + SkNx rsqrt0() const { return vrsqrteq_f32(fVec); } SkNx rsqrt1() const { float32x4_t est0 = this->rsqrt0().fVec; diff --git a/src/opts/SkNx_sse.h b/src/opts/SkNx_sse.h index b3f5091406..c6163b6a80 100644 --- a/src/opts/SkNx_sse.h +++ b/src/opts/SkNx_sse.h @@ -176,6 +176,8 @@ public: static SkNx Min(const SkNx& l, const SkNx& r) { return _mm_min_ps(l.fVec, r.fVec); } static SkNx Max(const SkNx& l, const SkNx& r) { return _mm_max_ps(l.fVec, r.fVec); } + SkNx abs() const { return _mm_andnot_ps(_mm_set1_ps(-0.0f), fVec); } + SkNx sqrt() const { return _mm_sqrt_ps (fVec); } SkNx rsqrt0() const { return _mm_rsqrt_ps(fVec); } SkNx rsqrt1() const { return this->rsqrt0(); } |