• Home
  • Raw
  • Download

Lines Matching refs:SkNx

21 class SkNx {
23 SkNx() {} in SkNx() function
24 SkNx(T val) : fLo(val), fHi(val) {} in SkNx() function
26 typedef SkNx<N/2, T> Half;
27 SkNx(const Half& lo, const Half& hi) : fLo(lo), fHi(hi) {} in SkNx() function
29 SkNx(T a, T b) : fLo(a), fHi(b) {} in SkNx() function
30 SkNx(T a, T b, T c, T d) : fLo(a,b), fHi(c,d) {} in SkNx() function
31 SkNx(T a, T b, T c, T d, T e, T f, T g, T h) : fLo(a,b,c,d), fHi(e,f,g,h) {} in SkNx() function
32 SkNx(T a, T b, T c, T d, T e, T f, T g, T h, in SkNx() function
35 static SkNx Load(const void* ptr) { in Load()
37 return SkNx(Half::Load(vals), Half::Load(vals+N/2)); in Load()
46 #define OP(op) SkNx operator op(const SkNx& o) const { return {fLo op o.fLo, fHi op o.fHi}; }
52 #define OP(op) SkNx op() const { return {fLo.op(), fHi.op()}; }
58 SkNx operator << (int bits) const { return SkNx(fLo << bits, fHi << bits); }
59 SkNx operator >> (int bits) const { return SkNx(fLo >> bits, fHi >> bits); }
61 SkNx saturatedAdd(const SkNx& o) const { in saturatedAdd()
65 static SkNx Min(const SkNx& a, const SkNx& b) { in Min()
68 static SkNx Max(const SkNx& a, const SkNx& b) { in Max()
79 SkNx thenElse(const SkNx& t, const SkNx& e) const { in thenElse()
80 return SkNx(fLo.thenElse(t.fLo, e.fLo), fHi.thenElse(t.fHi, e.fHi)); in thenElse()
91 class SkNx<1, T> {
93 SkNx() {} in SkNx() function
94 SkNx(T val) : fVal(val) {} in SkNx() function
96 static SkNx Load(const void* ptr) { in Load()
98 return SkNx(vals[0]); in Load()
106 #define OP(op) SkNx operator op(const SkNx& o) const { return fVal op o.fVal; }
112 SkNx operator << (int bits) const { return fVal << bits; }
113 SkNx operator >> (int bits) const { return fVal >> bits; }
115 SkNx saturatedAdd(const SkNx& o) const { in saturatedAdd()
121 static SkNx Min(const SkNx& a, const SkNx& b) { return SkTMin(a.fVal, b.fVal); } in Min()
122 static SkNx Max(const SkNx& a, const SkNx& b) { return SkTMax(a.fVal, b.fVal); } in Max()
124 SkNx abs() const { return SkTAbs(fVal); } in abs()
125 SkNx floor() const { return Floor(fVal); } in floor()
127 SkNx sqrt () const { return Sqrt(fVal); } in sqrt()
128 SkNx rsqrt0() const { return this->sqrt().invert(); } in rsqrt0()
129 SkNx rsqrt1() const { return this->rsqrt0(); } in rsqrt1()
130 SkNx rsqrt2() const { return this->rsqrt1(); } in rsqrt2()
132 SkNx invert() const { return 1 / fVal; } in invert()
133 SkNx approxInvert() const { return this->invert(); } in approxInvert()
142 SkNx thenElse(const SkNx& t, const SkNx& e) const { return fVal != 0 ? t : e; } in thenElse()
158 static inline SkNx<sizeof...(Ix), T> SkNx_shuffle(const SkNx<N,T>& src) { return { src[Ix]... }; } in SkNx_shuffle()
165 static inline SkNx<2,D> SkNx_cast(const SkNx<2,S>& src) { in SkNx_cast()
170 static inline SkNx<4,D> SkNx_cast(const SkNx<4,S>& src) { in SkNx_cast()
175 static inline SkNx<8,D> SkNx_cast(const SkNx<8,S>& src) { in SkNx_cast()
181 static inline SkNx<16,D> SkNx_cast(const SkNx<16,S>& src) { in SkNx_cast()
188 typedef SkNx<2, float> Sk2f;
189 typedef SkNx<4, float> Sk4f;
190 typedef SkNx<2, SkScalar> Sk2s;
191 typedef SkNx<4, SkScalar> Sk4s;
193 typedef SkNx<4, uint8_t> Sk4b;
194 typedef SkNx<16, uint8_t> Sk16b;
195 typedef SkNx<4, uint16_t> Sk4h;
196 typedef SkNx<16, uint16_t> Sk16h;
197 typedef SkNx<4, int> Sk4i;
199 typedef SkNx<4, int> Sk4i;