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

Unified Diff: src/opts/SkNx_neon.h

Issue 1133933004: add Min to SkNi, specialized for u8 and u16 on SSE and NEON (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: fixes Created 5 years, 7 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/SkNx.h ('k') | src/opts/SkNx_sse.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkNx_neon.h
diff --git a/src/opts/SkNx_neon.h b/src/opts/SkNx_neon.h
index e4dbec90830a294994023dd5784f6337c3f08539..08691fef423aaaa185de0d756d9ebe49c9dab7fd 100644
--- a/src/opts/SkNx_neon.h
+++ b/src/opts/SkNx_neon.h
@@ -329,6 +329,8 @@ public:
SkNi operator << (int bits) const { SHIFT16(vshlq_n_u16, fVec, bits); }
SkNi operator >> (int bits) const { SHIFT16(vshrq_n_u16, fVec, bits); }
+ static SkNi Min(const SkNi& a, const SkNi& b) { return vminq_u16(a.fVec, b.fVec); }
+
template <int k> uint16_t kth() const {
SkASSERT(0 <= k && k < 8);
return vgetq_lane_u16(fVec, k&7);
@@ -364,6 +366,8 @@ public:
SkNi operator << (int bits) const { SHIFT8(vshlq_n_u8, fVec, bits); }
SkNi operator >> (int bits) const { SHIFT8(vshrq_n_u8, fVec, bits); }
+ static SkNi Min(const SkNi& a, const SkNi& b) { return vminq_u8(a.fVec, b.fVec); }
+
template <int k> uint8_t kth() const {
SkASSERT(0 <= k && k < 15);
return vgetq_lane_u8(fVec, k&16);
« no previous file with comments | « src/core/SkNx.h ('k') | src/opts/SkNx_sse.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698