Lines Matching refs:fVec
33 AI SkNx(float32x2_t vec) : fVec(vec) {} in SkNx()
36 AI SkNx(float val) : fVec(vdup_n_f32(val)) {} in SkNx()
37 AI SkNx(float a, float b) { fVec = (float32x2_t) { a, b }; } in SkNx()
40 AI void store(void* ptr) const { vst1_f32((float*)ptr, fVec); } in store()
50 a.fVec, in Store2()
51 b.fVec, in Store2()
58 a.fVec, in Store3()
59 b.fVec, in Store3()
60 c.fVec, in Store3()
67 a.fVec, in Store4()
68 b.fVec, in Store4()
69 c.fVec, in Store4()
70 d.fVec, in Store4()
75 AI SkNx operator - () const { return vneg_f32(fVec); }
77 AI SkNx operator + (const SkNx& o) const { return vadd_f32(fVec, o.fVec); }
78 AI SkNx operator - (const SkNx& o) const { return vsub_f32(fVec, o.fVec); }
79 AI SkNx operator * (const SkNx& o) const { return vmul_f32(fVec, o.fVec); }
82 return vdiv_f32(fVec, o.fVec);
84 float32x2_t est0 = vrecpe_f32(o.fVec),
85 est1 = vmul_f32(vrecps_f32(est0, o.fVec), est0),
86 est2 = vmul_f32(vrecps_f32(est1, o.fVec), est1);
87 return vmul_f32(fVec, est2);
91 AI SkNx operator==(const SkNx& o) const { return vreinterpret_f32_u32(vceq_f32(fVec, o.fVec)); }
92 AI SkNx operator <(const SkNx& o) const { return vreinterpret_f32_u32(vclt_f32(fVec, o.fVec)); }
93 AI SkNx operator >(const SkNx& o) const { return vreinterpret_f32_u32(vcgt_f32(fVec, o.fVec)); }
94 AI SkNx operator<=(const SkNx& o) const { return vreinterpret_f32_u32(vcle_f32(fVec, o.fVec)); }
95 AI SkNx operator>=(const SkNx& o) const { return vreinterpret_f32_u32(vcge_f32(fVec, o.fVec)); }
97 return vreinterpret_f32_u32(vmvn_u32(vceq_f32(fVec, o.fVec)));
100 AI static SkNx Min(const SkNx& l, const SkNx& r) { return vmin_f32(l.fVec, r.fVec); } in Min()
101 AI static SkNx Max(const SkNx& l, const SkNx& r) { return vmax_f32(l.fVec, r.fVec); } in Max()
103 AI SkNx abs() const { return vabs_f32(fVec); } in abs()
106 return vrndm_f32(fVec); in floor()
108 return emulate_vrndm_f32(fVec); in floor()
114 return vsqrt_f32(fVec); in sqrt()
116 float32x2_t est0 = vrsqrte_f32(fVec), in sqrt()
117 est1 = vmul_f32(vrsqrts_f32(fVec, vmul_f32(est0, est0)), est0), in sqrt()
118 est2 = vmul_f32(vrsqrts_f32(fVec, vmul_f32(est1, est1)), est1); in sqrt()
119 return vmul_f32(fVec, est2); in sqrt()
125 union { float32x2_t v; float fs[2]; } pun = {fVec};
131 return 0 != vminv_u32(vreinterpret_u32_f32(fVec)); in allTrue()
133 auto v = vreinterpret_u32_f32(fVec); in allTrue()
139 return 0 != vmaxv_u32(vreinterpret_u32_f32(fVec)); in anyTrue()
141 auto v = vreinterpret_u32_f32(fVec); in anyTrue()
147 return vbsl_f32(vreinterpret_u32_f32(fVec), t.fVec, e.fVec); in thenElse()
150 float32x2_t fVec; variable
156 AI SkNx(float32x4_t vec) : fVec(vec) {} in SkNx()
159 AI SkNx(float val) : fVec(vdupq_n_f32(val)) {} in SkNx()
160 AI SkNx(float a, float b, float c, float d) { fVec = (float32x4_t) { a, b, c, d }; } in SkNx()
163 AI void store(void* ptr) const { vst1q_f32((float*)ptr, fVec); } in store()
180 r.fVec, in Store4()
181 g.fVec, in Store4()
182 b.fVec, in Store4()
183 a.fVec, in Store4()
188 AI SkNx operator - () const { return vnegq_f32(fVec); }
190 AI SkNx operator + (const SkNx& o) const { return vaddq_f32(fVec, o.fVec); }
191 AI SkNx operator - (const SkNx& o) const { return vsubq_f32(fVec, o.fVec); }
192 AI SkNx operator * (const SkNx& o) const { return vmulq_f32(fVec, o.fVec); }
195 return vdivq_f32(fVec, o.fVec);
197 float32x4_t est0 = vrecpeq_f32(o.fVec),
198 est1 = vmulq_f32(vrecpsq_f32(est0, o.fVec), est0),
199 est2 = vmulq_f32(vrecpsq_f32(est1, o.fVec), est1);
200 return vmulq_f32(fVec, est2);
204 AI SkNx operator==(const SkNx& o) const {return vreinterpretq_f32_u32(vceqq_f32(fVec, o.fVec));}
205 AI SkNx operator <(const SkNx& o) const {return vreinterpretq_f32_u32(vcltq_f32(fVec, o.fVec));}
206 AI SkNx operator >(const SkNx& o) const {return vreinterpretq_f32_u32(vcgtq_f32(fVec, o.fVec));}
207 AI SkNx operator<=(const SkNx& o) const {return vreinterpretq_f32_u32(vcleq_f32(fVec, o.fVec));}
208 AI SkNx operator>=(const SkNx& o) const {return vreinterpretq_f32_u32(vcgeq_f32(fVec, o.fVec));}
210 return vreinterpretq_f32_u32(vmvnq_u32(vceqq_f32(fVec, o.fVec)));
213 AI static SkNx Min(const SkNx& l, const SkNx& r) { return vminq_f32(l.fVec, r.fVec); } in Min()
214 AI static SkNx Max(const SkNx& l, const SkNx& r) { return vmaxq_f32(l.fVec, r.fVec); } in Max()
216 AI SkNx abs() const { return vabsq_f32(fVec); } in abs()
219 return vrndmq_f32(fVec); in floor()
221 return emulate_vrndmq_f32(fVec); in floor()
228 return vsqrtq_f32(fVec); in sqrt()
230 float32x4_t est0 = vrsqrteq_f32(fVec), in sqrt()
231 est1 = vmulq_f32(vrsqrtsq_f32(fVec, vmulq_f32(est0, est0)), est0), in sqrt()
232 est2 = vmulq_f32(vrsqrtsq_f32(fVec, vmulq_f32(est1, est1)), est1); in sqrt()
233 return vmulq_f32(fVec, est2); in sqrt()
239 union { float32x4_t v; float fs[4]; } pun = {fVec};
245 return vminvq_f32(fVec); in min()
247 SkNx min = Min(*this, vrev64q_f32(fVec)); in min()
254 return vmaxvq_f32(fVec); in max()
256 SkNx max = Max(*this, vrev64q_f32(fVec)); in max()
263 return 0 != vminvq_u32(vreinterpretq_u32_f32(fVec)); in allTrue()
265 auto v = vreinterpretq_u32_f32(fVec); in allTrue()
272 return 0 != vmaxvq_u32(vreinterpretq_u32_f32(fVec)); in anyTrue()
274 auto v = vreinterpretq_u32_f32(fVec); in anyTrue()
281 return vbslq_f32(vreinterpretq_u32_f32(fVec), t.fVec, e.fVec); in thenElse()
284 float32x4_t fVec; variable
289 return vfmaq_f32(a.fVec, f.fVec, m.fVec); in SkNx_fma()
299 AI SkNx(const uint16x4_t& vec) : fVec(vec) {} in SkNx()
302 AI SkNx(uint16_t val) : fVec(vdup_n_u16(val)) {} in SkNx()
304 fVec = (uint16x4_t) { a,b,c,d }; in SkNx()
308 AI void store(void* ptr) const { vst1_u16((uint16_t*)ptr, fVec); } in store()
325 r.fVec, in Store4()
326 g.fVec, in Store4()
327 b.fVec, in Store4()
328 a.fVec, in Store4()
333 AI SkNx operator + (const SkNx& o) const { return vadd_u16(fVec, o.fVec); }
334 AI SkNx operator - (const SkNx& o) const { return vsub_u16(fVec, o.fVec); }
335 AI SkNx operator * (const SkNx& o) const { return vmul_u16(fVec, o.fVec); }
336 AI SkNx operator & (const SkNx& o) const { return vand_u16(fVec, o.fVec); }
337 AI SkNx operator | (const SkNx& o) const { return vorr_u16(fVec, o.fVec); }
339 AI SkNx operator << (int bits) const { return fVec << SkNx(bits).fVec; }
340 AI SkNx operator >> (int bits) const { return fVec >> SkNx(bits).fVec; }
342 AI static SkNx Min(const SkNx& a, const SkNx& b) { return vmin_u16(a.fVec, b.fVec); } in Min()
346 union { uint16x4_t v; uint16_t us[4]; } pun = {fVec};
351 return vbsl_u16(fVec, t.fVec, e.fVec); in thenElse()
354 uint16x4_t fVec; variable
360 AI SkNx(const uint16x8_t& vec) : fVec(vec) {} in SkNx()
363 AI SkNx(uint16_t val) : fVec(vdupq_n_u16(val)) {} in SkNx()
368 fVec = (uint16x8_t) { a,b,c,d, e,f,g,h }; in SkNx()
371 AI void store(void* ptr) const { vst1q_u16((uint16_t*)ptr, fVec); } in store()
373 AI SkNx operator + (const SkNx& o) const { return vaddq_u16(fVec, o.fVec); }
374 AI SkNx operator - (const SkNx& o) const { return vsubq_u16(fVec, o.fVec); }
375 AI SkNx operator * (const SkNx& o) const { return vmulq_u16(fVec, o.fVec); }
376 AI SkNx operator & (const SkNx& o) const { return vandq_u16(fVec, o.fVec); }
377 AI SkNx operator | (const SkNx& o) const { return vorrq_u16(fVec, o.fVec); }
379 AI SkNx operator << (int bits) const { return fVec << SkNx(bits).fVec; }
380 AI SkNx operator >> (int bits) const { return fVec >> SkNx(bits).fVec; }
382 AI static SkNx Min(const SkNx& a, const SkNx& b) { return vminq_u16(a.fVec, b.fVec); } in Min()
386 union { uint16x8_t v; uint16_t us[8]; } pun = {fVec};
391 uint32x4_t hi = vmull_u16(vget_high_u16(fVec), vget_high_u16(m.fVec)); in mulHi()
392 uint32x4_t lo = vmull_u16( vget_low_u16(fVec), vget_low_u16(m.fVec)); in mulHi()
398 return vbslq_u16(fVec, t.fVec, e.fVec); in thenElse()
401 uint16x8_t fVec; variable
409 AI SkNx(const uint8x8_t& vec) : fVec(vec) {} in SkNx()
413 fVec = (uint8x8_t){a,b,c,d, 0,0,0,0}; in SkNx()
419 return vst1_lane_u32((unaligned_uint32_t*)ptr, (uint32x2_t)fVec, 0); in store()
423 union { uint8x8_t v; uint8_t us[8]; } pun = {fVec};
429 uint8x8_t fVec; variable
435 AI SkNx(const uint8x8_t& vec) : fVec(vec) {} in SkNx()
438 AI SkNx(uint8_t val) : fVec(vdup_n_u8(val)) {} in SkNx()
441 fVec = (uint8x8_t) { a,b,c,d, e,f,g,h }; in SkNx()
445 AI void store(void* ptr) const { vst1_u8((uint8_t*)ptr, fVec); } in store()
449 union { uint8x8_t v; uint8_t us[8]; } pun = {fVec};
453 uint8x8_t fVec; variable
459 AI SkNx(const uint8x16_t& vec) : fVec(vec) {} in SkNx()
462 AI SkNx(uint8_t val) : fVec(vdupq_n_u8(val)) {} in SkNx()
467 fVec = (uint8x16_t) { a,b,c,d, e,f,g,h, i,j,k,l, m,n,o,p }; in SkNx()
471 AI void store(void* ptr) const { vst1q_u8((uint8_t*)ptr, fVec); } in store()
473 AI SkNx saturatedAdd(const SkNx& o) const { return vqaddq_u8(fVec, o.fVec); } in saturatedAdd()
475 AI SkNx operator + (const SkNx& o) const { return vaddq_u8(fVec, o.fVec); }
476 AI SkNx operator - (const SkNx& o) const { return vsubq_u8(fVec, o.fVec); }
477 AI SkNx operator & (const SkNx& o) const { return vandq_u8(fVec, o.fVec); }
479 AI static SkNx Min(const SkNx& a, const SkNx& b) { return vminq_u8(a.fVec, b.fVec); } in Min()
480 AI SkNx operator < (const SkNx& o) const { return vcltq_u8(fVec, o.fVec); }
484 union { uint8x16_t v; uint8_t us[16]; } pun = {fVec};
489 return vbslq_u8(fVec, t.fVec, e.fVec); in thenElse()
492 uint8x16_t fVec; variable
498 AI SkNx(const int32x4_t& vec) : fVec(vec) {} in SkNx()
502 fVec = vdupq_n_s32(v); in SkNx()
505 fVec = (int32x4_t){a,b,c,d}; in SkNx()
511 return vst1q_s32((int32_t*)ptr, fVec); in store()
515 union { int32x4_t v; int32_t is[4]; } pun = {fVec};
519 AI SkNx operator + (const SkNx& o) const { return vaddq_s32(fVec, o.fVec); }
520 AI SkNx operator - (const SkNx& o) const { return vsubq_s32(fVec, o.fVec); }
521 AI SkNx operator * (const SkNx& o) const { return vmulq_s32(fVec, o.fVec); }
523 AI SkNx operator & (const SkNx& o) const { return vandq_s32(fVec, o.fVec); }
524 AI SkNx operator | (const SkNx& o) const { return vorrq_s32(fVec, o.fVec); }
525 AI SkNx operator ^ (const SkNx& o) const { return veorq_s32(fVec, o.fVec); }
527 AI SkNx operator << (int bits) const { return fVec << SkNx(bits).fVec; }
528 AI SkNx operator >> (int bits) const { return fVec >> SkNx(bits).fVec; }
531 return vreinterpretq_s32_u32(vceqq_s32(fVec, o.fVec));
534 return vreinterpretq_s32_u32(vcltq_s32(fVec, o.fVec));
537 return vreinterpretq_s32_u32(vcgtq_s32(fVec, o.fVec));
540 AI static SkNx Min(const SkNx& a, const SkNx& b) { return vminq_s32(a.fVec, b.fVec); } in Min()
541 AI static SkNx Max(const SkNx& a, const SkNx& b) { return vmaxq_s32(a.fVec, b.fVec); } in Max()
545 return vbslq_s32(vreinterpretq_u32_s32(fVec), t.fVec, e.fVec); in thenElse()
548 AI SkNx abs() const { return vabsq_s32(fVec); } in abs()
550 int32x4_t fVec; variable
556 AI SkNx(const uint32x4_t& vec) : fVec(vec) {} in SkNx()
560 fVec = vdupq_n_u32(v); in SkNx()
563 fVec = (uint32x4_t){a,b,c,d}; in SkNx()
569 return vst1q_u32((uint32_t*)ptr, fVec); in store()
573 union { uint32x4_t v; uint32_t us[4]; } pun = {fVec};
577 AI SkNx operator + (const SkNx& o) const { return vaddq_u32(fVec, o.fVec); }
578 AI SkNx operator - (const SkNx& o) const { return vsubq_u32(fVec, o.fVec); }
579 AI SkNx operator * (const SkNx& o) const { return vmulq_u32(fVec, o.fVec); }
581 AI SkNx operator & (const SkNx& o) const { return vandq_u32(fVec, o.fVec); }
582 AI SkNx operator | (const SkNx& o) const { return vorrq_u32(fVec, o.fVec); }
583 AI SkNx operator ^ (const SkNx& o) const { return veorq_u32(fVec, o.fVec); }
585 AI SkNx operator << (int bits) const { return fVec << SkNx(bits).fVec; }
586 AI SkNx operator >> (int bits) const { return fVec >> SkNx(bits).fVec; }
588 AI SkNx operator == (const SkNx& o) const { return vceqq_u32(fVec, o.fVec); }
589 AI SkNx operator < (const SkNx& o) const { return vcltq_u32(fVec, o.fVec); }
590 AI SkNx operator > (const SkNx& o) const { return vcgtq_u32(fVec, o.fVec); }
592 AI static SkNx Min(const SkNx& a, const SkNx& b) { return vminq_u32(a.fVec, b.fVec); } in Min()
596 uint64x2_t hi = vmull_u32(vget_high_u32(fVec), vget_high_u32(m.fVec)); in mulHi()
597 uint64x2_t lo = vmull_u32( vget_low_u32(fVec), vget_low_u32(m.fVec)); in mulHi()
603 return vbslq_u32(fVec, t.fVec, e.fVec); in thenElse()
606 uint32x4_t fVec; variable
610 return vcvtq_s32_f32(src.fVec);
614 return vcvtq_f32_s32(src.fVec);
621 return vqmovn_u32(vcvtq_u32_f32(src.fVec));
625 return vcvtq_f32_u32(vmovl_u16(src.fVec));
629 uint32x4_t _32 = vcvtq_u32_f32(src.fVec);
635 uint16x8_t _16 = vmovl_u8(src.fVec);
640 return vreinterpretq_s32_u32(SkNx_cast<uint32_t>(src).fVec);
644 return vcvtq_f32_s32(SkNx_cast<int32_t>(src).fVec);
654 return vuzpq_u8(vuzpq_u8((uint8x16_t)vcvtq_u32_f32(a.fVec),
655 (uint8x16_t)vcvtq_u32_f32(b.fVec)).val[0],
656 vuzpq_u8((uint8x16_t)vcvtq_u32_f32(c.fVec),
657 (uint8x16_t)vcvtq_u32_f32(d.fVec)).val[0]).val[0];
663 uint16x4_t a16 = vqmovun_s32(a.fVec);
664 uint16x4_t b16 = vqmovun_s32(b.fVec);
670 return vget_low_u16(vmovl_u8(src.fVec));
674 return vmovl_u8(src.fVec);
678 return vmovn_u16(vcombine_u16(src.fVec, src.fVec));
682 return vqmovn_u16(src.fVec);
686 uint16x4_t _16 = vqmovun_s32(src.fVec);
691 uint16x4_t _16 = vqmovn_u32(src.fVec);
696 return vreinterpretq_s32_u32(vmovl_u16(src.fVec));
700 return vmovn_u32(vreinterpretq_u32_s32(src.fVec));
704 return vreinterpretq_s32_u32(src.fVec);
708 return vcvtq_s32_f32((x + 0.5f).fVec); in Sk4f_round()