Lines Matching refs:SkNx
46 class SkNx<2, float> {
48 SkNx(float32x2_t vec) : fVec(vec) {} in SkNx() function
50 SkNx() {} in SkNx() function
51 SkNx(float val) : fVec(vdup_n_f32(val)) {} in SkNx() function
52 static SkNx Load(const void* ptr) { return vld1_f32((const float*)ptr); } in Load()
53 SkNx(float a, float b) { fVec = (float32x2_t) { a, b }; } in SkNx() function
57 SkNx approxInvert() const { in approxInvert()
62 SkNx invert() const { in invert()
68 SkNx operator + (const SkNx& o) const { return vadd_f32(fVec, o.fVec); }
69 SkNx operator - (const SkNx& o) const { return vsub_f32(fVec, o.fVec); }
70 SkNx operator * (const SkNx& o) const { return vmul_f32(fVec, o.fVec); }
71 SkNx operator / (const SkNx& o) const {
79 SkNx operator == (const SkNx& o) const { return vreinterpret_f32_u32(vceq_f32(fVec, o.fVec)); }
80 SkNx operator < (const SkNx& o) const { return vreinterpret_f32_u32(vclt_f32(fVec, o.fVec)); }
81 SkNx operator > (const SkNx& o) const { return vreinterpret_f32_u32(vcgt_f32(fVec, o.fVec)); }
82 SkNx operator <= (const SkNx& o) const { return vreinterpret_f32_u32(vcle_f32(fVec, o.fVec)); }
83 SkNx operator >= (const SkNx& o) const { return vreinterpret_f32_u32(vcge_f32(fVec, o.fVec)); }
84 SkNx operator != (const SkNx& o) const {
88 static SkNx Min(const SkNx& l, const SkNx& r) { return vmin_f32(l.fVec, r.fVec); } in Min()
89 static SkNx Max(const SkNx& l, const SkNx& r) { return vmax_f32(l.fVec, r.fVec); } in Max()
91 SkNx rsqrt0() const { return vrsqrte_f32(fVec); } in rsqrt0()
92 SkNx rsqrt1() const { in rsqrt1()
96 SkNx rsqrt2() const { in rsqrt2()
101 SkNx sqrt() const { in sqrt()
128 class SkNx<4, float> {
130 SkNx(float32x4_t vec) : fVec(vec) {} in SkNx() function
132 SkNx() {} in SkNx() function
133 SkNx(float val) : fVec(vdupq_n_f32(val)) {} in SkNx() function
134 static SkNx Load(const void* ptr) { return vld1q_f32((const float*)ptr); } in Load()
135 SkNx(float a, float b, float c, float d) { fVec = (float32x4_t) { a, b, c, d }; } in SkNx() function
138 SkNx approxInvert() const { in approxInvert()
143 SkNx invert() const { in invert()
149 SkNx operator + (const SkNx& o) const { return vaddq_f32(fVec, o.fVec); }
150 SkNx operator - (const SkNx& o) const { return vsubq_f32(fVec, o.fVec); }
151 SkNx operator * (const SkNx& o) const { return vmulq_f32(fVec, o.fVec); }
152 SkNx operator / (const SkNx& o) const {
160 SkNx operator==(const SkNx& o) const { return vreinterpretq_f32_u32(vceqq_f32(fVec, o.fVec)); }
161 SkNx operator <(const SkNx& o) const { return vreinterpretq_f32_u32(vcltq_f32(fVec, o.fVec)); }
162 SkNx operator >(const SkNx& o) const { return vreinterpretq_f32_u32(vcgtq_f32(fVec, o.fVec)); }
163 SkNx operator<=(const SkNx& o) const { return vreinterpretq_f32_u32(vcleq_f32(fVec, o.fVec)); }
164 SkNx operator>=(const SkNx& o) const { return vreinterpretq_f32_u32(vcgeq_f32(fVec, o.fVec)); }
165 SkNx operator!=(const SkNx& o) const {
169 static SkNx Min(const SkNx& l, const SkNx& r) { return vminq_f32(l.fVec, r.fVec); } in Min()
170 static SkNx Max(const SkNx& l, const SkNx& r) { return vmaxq_f32(l.fVec, r.fVec); } in Max()
172 SkNx abs() const { return vabsq_f32(fVec); } in abs()
173 SkNx floor() const { in floor()
182 SkNx rsqrt0() const { return vrsqrteq_f32(fVec); } in rsqrt0()
183 SkNx rsqrt1() const { in rsqrt1()
187 SkNx rsqrt2() const { in rsqrt2()
192 SkNx sqrt() const { in sqrt()
217 SkNx thenElse(const SkNx& t, const SkNx& e) const { in thenElse()
228 class SkNx<4, uint16_t> {
230 SkNx(const uint16x4_t& vec) : fVec(vec) {} in SkNx() function
232 SkNx() {} in SkNx() function
233 SkNx(uint16_t val) : fVec(vdup_n_u16(val)) {} in SkNx() function
234 static SkNx Load(const void* ptr) { return vld1_u16((const uint16_t*)ptr); } in Load()
236 SkNx(uint16_t a, uint16_t b, uint16_t c, uint16_t d) { in SkNx() function
242 SkNx operator + (const SkNx& o) const { return vadd_u16(fVec, o.fVec); }
243 SkNx operator - (const SkNx& o) const { return vsub_u16(fVec, o.fVec); }
244 SkNx operator * (const SkNx& o) const { return vmul_u16(fVec, o.fVec); }
246 SkNx operator << (int bits) const { SHIFT16(vshl_n_u16, fVec, bits); }
247 SkNx operator >> (int bits) const { SHIFT16(vshr_n_u16, fVec, bits); }
249 static SkNx Min(const SkNx& a, const SkNx& b) { return vmin_u16(a.fVec, b.fVec); } in Min()
257 SkNx thenElse(const SkNx& t, const SkNx& e) const { in thenElse()
265 class SkNx<8, uint16_t> {
267 SkNx(const uint16x8_t& vec) : fVec(vec) {} in SkNx() function
269 SkNx() {} in SkNx() function
270 SkNx(uint16_t val) : fVec(vdupq_n_u16(val)) {} in SkNx() function
271 static SkNx Load(const void* ptr) { return vld1q_u16((const uint16_t*)ptr); } in Load()
273 SkNx(uint16_t a, uint16_t b, uint16_t c, uint16_t d, in SkNx() function
280 SkNx operator + (const SkNx& o) const { return vaddq_u16(fVec, o.fVec); }
281 SkNx operator - (const SkNx& o) const { return vsubq_u16(fVec, o.fVec); }
282 SkNx operator * (const SkNx& o) const { return vmulq_u16(fVec, o.fVec); }
284 SkNx operator << (int bits) const { SHIFT16(vshlq_n_u16, fVec, bits); }
285 SkNx operator >> (int bits) const { SHIFT16(vshrq_n_u16, fVec, bits); }
287 static SkNx Min(const SkNx& a, const SkNx& b) { return vminq_u16(a.fVec, b.fVec); } in Min()
295 SkNx thenElse(const SkNx& t, const SkNx& e) const { in thenElse()
303 class SkNx<4, uint8_t> {
305 SkNx(const uint8x8_t& vec) : fVec(vec) {} in SkNx() function
307 SkNx() {} in SkNx() function
308 static SkNx Load(const void* ptr) { in Load()
321 class SkNx<16, uint8_t> {
323 SkNx(const uint8x16_t& vec) : fVec(vec) {} in SkNx() function
325 SkNx() {} in SkNx() function
326 SkNx(uint8_t val) : fVec(vdupq_n_u8(val)) {} in SkNx() function
327 static SkNx Load(const void* ptr) { return vld1q_u8((const uint8_t*)ptr); } in Load()
329 SkNx(uint8_t a, uint8_t b, uint8_t c, uint8_t d, in SkNx() function
338 SkNx saturatedAdd(const SkNx& o) const { return vqaddq_u8(fVec, o.fVec); } in saturatedAdd()
340 SkNx operator + (const SkNx& o) const { return vaddq_u8(fVec, o.fVec); }
341 SkNx operator - (const SkNx& o) const { return vsubq_u8(fVec, o.fVec); }
343 static SkNx Min(const SkNx& a, const SkNx& b) { return vminq_u8(a.fVec, b.fVec); } in Min()
344 SkNx operator < (const SkNx& o) const { return vcltq_u8(fVec, o.fVec); }
352 SkNx thenElse(const SkNx& t, const SkNx& e) const { in thenElse()