• Home
  • Raw
  • Download

Lines Matching refs:fVec

40     AI SkNx(const __m128& vec) : fVec(vec) {}  in SkNx()
43 AI SkNx(float val) : fVec(_mm_set1_ps(val)) {} in SkNx()
47 AI SkNx(float a, float b) : fVec(_mm_setr_ps(a,b,0,0)) {} in SkNx()
49 AI void store(void* ptr) const { _mm_storel_pi((__m64*)ptr, fVec); } in store()
58 auto vals = _mm_unpacklo_ps(a.fVec, b.fVec); in Store2()
76 AI SkNx operator - () const { return _mm_xor_ps(_mm_set1_ps(-0.0f), fVec); }
78 AI SkNx operator + (const SkNx& o) const { return _mm_add_ps(fVec, o.fVec); }
79 AI SkNx operator - (const SkNx& o) const { return _mm_sub_ps(fVec, o.fVec); }
80 AI SkNx operator * (const SkNx& o) const { return _mm_mul_ps(fVec, o.fVec); }
81 AI SkNx operator / (const SkNx& o) const { return _mm_div_ps(fVec, o.fVec); }
83 AI SkNx operator == (const SkNx& o) const { return _mm_cmpeq_ps (fVec, o.fVec); }
84 AI SkNx operator != (const SkNx& o) const { return _mm_cmpneq_ps(fVec, o.fVec); }
85 AI SkNx operator < (const SkNx& o) const { return _mm_cmplt_ps (fVec, o.fVec); }
86 AI SkNx operator > (const SkNx& o) const { return _mm_cmpgt_ps (fVec, o.fVec); }
87 AI SkNx operator <= (const SkNx& o) const { return _mm_cmple_ps (fVec, o.fVec); }
88 AI SkNx operator >= (const SkNx& o) const { return _mm_cmpge_ps (fVec, o.fVec); }
90 AI static SkNx Min(const SkNx& l, const SkNx& r) { return _mm_min_ps(l.fVec, r.fVec); } in Min()
91 AI static SkNx Max(const SkNx& l, const SkNx& r) { return _mm_max_ps(l.fVec, r.fVec); } in Max()
93 AI SkNx abs() const { return _mm_andnot_ps(_mm_set1_ps(-0.0f), fVec); } in abs()
96 return _mm_floor_ps(fVec); in floor()
98 return emulate_mm_floor_ps(fVec); in floor()
102 AI SkNx sqrt() const { return _mm_sqrt_ps (fVec); } in sqrt()
106 union { __m128 v; float fs[4]; } pun = {fVec};
110 AI bool allTrue() const { return 0b11 == (_mm_movemask_ps(fVec) & 0b11); } in allTrue()
111 AI bool anyTrue() const { return 0b00 != (_mm_movemask_ps(fVec) & 0b11); } in anyTrue()
115 return _mm_blendv_ps(e.fVec, t.fVec, fVec); in thenElse()
117 return _mm_or_ps(_mm_and_ps (fVec, t.fVec), in thenElse()
118 _mm_andnot_ps(fVec, e.fVec)); in thenElse()
122 __m128 fVec; variable
128 AI SkNx(const __m128& vec) : fVec(vec) {} in SkNx()
131 AI SkNx(float val) : fVec( _mm_set1_ps(val) ) {} in SkNx()
132 AI SkNx(float a, float b, float c, float d) : fVec(_mm_setr_ps(a,b,c,d)) {} in SkNx()
135 AI void store(void* ptr) const { _mm_storeu_ps((float*)ptr, fVec); } in store()
156 __m128 v0 = r.fVec, in Store4()
157 v1 = g.fVec, in Store4()
158 v2 = b.fVec, in Store4()
159 v3 = a.fVec; in Store4()
167 AI SkNx operator - () const { return _mm_xor_ps(_mm_set1_ps(-0.0f), fVec); }
169 AI SkNx operator + (const SkNx& o) const { return _mm_add_ps(fVec, o.fVec); }
170 AI SkNx operator - (const SkNx& o) const { return _mm_sub_ps(fVec, o.fVec); }
171 AI SkNx operator * (const SkNx& o) const { return _mm_mul_ps(fVec, o.fVec); }
172 AI SkNx operator / (const SkNx& o) const { return _mm_div_ps(fVec, o.fVec); }
174 AI SkNx operator == (const SkNx& o) const { return _mm_cmpeq_ps (fVec, o.fVec); }
175 AI SkNx operator != (const SkNx& o) const { return _mm_cmpneq_ps(fVec, o.fVec); }
176 AI SkNx operator < (const SkNx& o) const { return _mm_cmplt_ps (fVec, o.fVec); }
177 AI SkNx operator > (const SkNx& o) const { return _mm_cmpgt_ps (fVec, o.fVec); }
178 AI SkNx operator <= (const SkNx& o) const { return _mm_cmple_ps (fVec, o.fVec); }
179 AI SkNx operator >= (const SkNx& o) const { return _mm_cmpge_ps (fVec, o.fVec); }
181 AI static SkNx Min(const SkNx& l, const SkNx& r) { return _mm_min_ps(l.fVec, r.fVec); } in Min()
182 AI static SkNx Max(const SkNx& l, const SkNx& r) { return _mm_max_ps(l.fVec, r.fVec); } in Max()
184 AI SkNx abs() const { return _mm_andnot_ps(_mm_set1_ps(-0.0f), fVec); } in abs()
187 return _mm_floor_ps(fVec); in floor()
189 return emulate_mm_floor_ps(fVec); in floor()
193 AI SkNx sqrt() const { return _mm_sqrt_ps (fVec); } in sqrt()
197 union { __m128 v; float fs[4]; } pun = {fVec};
202 SkNx min = Min(*this, _mm_shuffle_ps(fVec, fVec, _MM_SHUFFLE(2,3,0,1))); in min()
203 min = Min(min, _mm_shuffle_ps(min.fVec, min.fVec, _MM_SHUFFLE(0,1,2,3))); in min()
208 SkNx max = Max(*this, _mm_shuffle_ps(fVec, fVec, _MM_SHUFFLE(2,3,0,1))); in max()
209 max = Max(max, _mm_shuffle_ps(max.fVec, max.fVec, _MM_SHUFFLE(0,1,2,3))); in max()
213 AI bool allTrue() const { return 0b1111 == _mm_movemask_ps(fVec); } in allTrue()
214 AI bool anyTrue() const { return 0b0000 != _mm_movemask_ps(fVec); } in anyTrue()
218 return _mm_blendv_ps(e.fVec, t.fVec, fVec); in thenElse()
220 return _mm_or_ps(_mm_and_ps (fVec, t.fVec), in thenElse()
221 _mm_andnot_ps(fVec, e.fVec)); in thenElse()
225 __m128 fVec; variable
242 AI SkNx(const __m128i& vec) : fVec(vec) {} in SkNx()
245 AI SkNx(int32_t val) : fVec(_mm_set1_epi32(val)) {} in SkNx()
247 AI SkNx(int32_t a, int32_t b, int32_t c, int32_t d) : fVec(_mm_setr_epi32(a,b,c,d)) {} in SkNx()
249 AI void store(void* ptr) const { _mm_storeu_si128((__m128i*)ptr, fVec); } in store()
251 AI SkNx operator + (const SkNx& o) const { return _mm_add_epi32(fVec, o.fVec); }
252 AI SkNx operator - (const SkNx& o) const { return _mm_sub_epi32(fVec, o.fVec); }
253 AI SkNx operator * (const SkNx& o) const { return mullo32(fVec, o.fVec); }
255 AI SkNx operator & (const SkNx& o) const { return _mm_and_si128(fVec, o.fVec); }
256 AI SkNx operator | (const SkNx& o) const { return _mm_or_si128(fVec, o.fVec); }
257 AI SkNx operator ^ (const SkNx& o) const { return _mm_xor_si128(fVec, o.fVec); }
259 AI SkNx operator << (int bits) const { return _mm_slli_epi32(fVec, bits); }
260 AI SkNx operator >> (int bits) const { return _mm_srai_epi32(fVec, bits); }
262 AI SkNx operator == (const SkNx& o) const { return _mm_cmpeq_epi32 (fVec, o.fVec); }
263 AI SkNx operator < (const SkNx& o) const { return _mm_cmplt_epi32 (fVec, o.fVec); }
264 AI SkNx operator > (const SkNx& o) const { return _mm_cmpgt_epi32 (fVec, o.fVec); }
268 union { __m128i v; int32_t is[4]; } pun = {fVec};
274 return _mm_blendv_epi8(e.fVec, t.fVec, fVec); in thenElse()
276 return _mm_or_si128(_mm_and_si128 (fVec, t.fVec), in thenElse()
277 _mm_andnot_si128(fVec, e.fVec)); in thenElse()
283 return _mm_abs_epi32(fVec); in abs()
292 return _mm_min_epi32(x.fVec, y.fVec); in Min()
300 return _mm_max_epi32(x.fVec, y.fVec); in Max()
306 __m128i fVec; variable
312 AI SkNx(const __m128i& vec) : fVec(vec) {} in SkNx()
315 AI SkNx(uint32_t val) : fVec(_mm_set1_epi32(val)) {} in SkNx()
317 AI SkNx(uint32_t a, uint32_t b) : fVec(_mm_setr_epi32(a,b,0,0)) {} in SkNx()
319 AI void store(void* ptr) const { _mm_storel_epi64((__m128i*)ptr, fVec); } in store()
321 AI SkNx operator + (const SkNx& o) const { return _mm_add_epi32(fVec, o.fVec); }
322 AI SkNx operator - (const SkNx& o) const { return _mm_sub_epi32(fVec, o.fVec); }
323 AI SkNx operator * (const SkNx& o) const { return mullo32(fVec, o.fVec); }
325 AI SkNx operator & (const SkNx& o) const { return _mm_and_si128(fVec, o.fVec); }
326 AI SkNx operator | (const SkNx& o) const { return _mm_or_si128(fVec, o.fVec); }
327 AI SkNx operator ^ (const SkNx& o) const { return _mm_xor_si128(fVec, o.fVec); }
329 AI SkNx operator << (int bits) const { return _mm_slli_epi32(fVec, bits); }
330 AI SkNx operator >> (int bits) const { return _mm_srli_epi32(fVec, bits); }
332 AI SkNx operator == (const SkNx& o) const { return _mm_cmpeq_epi32 (fVec, o.fVec); }
338 union { __m128i v; uint32_t us[4]; } pun = {fVec};
344 return _mm_blendv_epi8(e.fVec, t.fVec, fVec); in thenElse()
346 return _mm_or_si128(_mm_and_si128 (fVec, t.fVec), in thenElse()
347 _mm_andnot_si128(fVec, e.fVec)); in thenElse()
351 AI bool allTrue() const { return 0xff == (_mm_movemask_epi8(fVec) & 0xff); } in allTrue()
353 __m128i fVec; variable
359 AI SkNx(const __m128i& vec) : fVec(vec) {} in SkNx()
362 AI SkNx(uint32_t val) : fVec(_mm_set1_epi32(val)) {} in SkNx()
364 AI SkNx(uint32_t a, uint32_t b, uint32_t c, uint32_t d) : fVec(_mm_setr_epi32(a,b,c,d)) {} in SkNx()
366 AI void store(void* ptr) const { _mm_storeu_si128((__m128i*)ptr, fVec); } in store()
368 AI SkNx operator + (const SkNx& o) const { return _mm_add_epi32(fVec, o.fVec); }
369 AI SkNx operator - (const SkNx& o) const { return _mm_sub_epi32(fVec, o.fVec); }
370 AI SkNx operator * (const SkNx& o) const { return mullo32(fVec, o.fVec); }
372 AI SkNx operator & (const SkNx& o) const { return _mm_and_si128(fVec, o.fVec); }
373 AI SkNx operator | (const SkNx& o) const { return _mm_or_si128(fVec, o.fVec); }
374 AI SkNx operator ^ (const SkNx& o) const { return _mm_xor_si128(fVec, o.fVec); }
376 AI SkNx operator << (int bits) const { return _mm_slli_epi32(fVec, bits); }
377 AI SkNx operator >> (int bits) const { return _mm_srli_epi32(fVec, bits); }
379 AI SkNx operator == (const SkNx& o) const { return _mm_cmpeq_epi32 (fVec, o.fVec); }
386 union { __m128i v; uint32_t us[4]; } pun = {fVec};
392 return _mm_blendv_epi8(e.fVec, t.fVec, fVec); in thenElse()
394 return _mm_or_si128(_mm_and_si128 (fVec, t.fVec), in thenElse()
395 _mm_andnot_si128(fVec, e.fVec)); in thenElse()
400 SkNx v20{_mm_mul_epu32(m.fVec, fVec)}; in mulHi()
401 SkNx v31{_mm_mul_epu32(_mm_srli_si128(m.fVec, 4), _mm_srli_si128(fVec, 4))}; in mulHi()
406 __m128i fVec; variable
412 AI SkNx(const __m128i& vec) : fVec(vec) {} in SkNx()
415 AI SkNx(uint16_t val) : fVec(_mm_set1_epi16(val)) {} in SkNx()
417 : fVec(_mm_setr_epi16(a,b,c,d,0,0,0,0)) {} in SkNx()
420 AI void store(void* ptr) const { _mm_storel_epi64((__m128i*)ptr, fVec); } in store()
447 *g = _mm_srli_si128(r->fVec, 4*2); in Load3()
451 __m128i rg = _mm_unpacklo_epi16(r.fVec, g.fVec); in Store4()
452 __m128i ba = _mm_unpacklo_epi16(b.fVec, a.fVec); in Store4()
459 AI SkNx operator + (const SkNx& o) const { return _mm_add_epi16(fVec, o.fVec); }
460 AI SkNx operator - (const SkNx& o) const { return _mm_sub_epi16(fVec, o.fVec); }
461 AI SkNx operator * (const SkNx& o) const { return _mm_mullo_epi16(fVec, o.fVec); }
462 AI SkNx operator & (const SkNx& o) const { return _mm_and_si128(fVec, o.fVec); }
463 AI SkNx operator | (const SkNx& o) const { return _mm_or_si128(fVec, o.fVec); }
465 AI SkNx operator << (int bits) const { return _mm_slli_epi16(fVec, bits); }
466 AI SkNx operator >> (int bits) const { return _mm_srli_epi16(fVec, bits); }
470 union { __m128i v; uint16_t us[8]; } pun = {fVec};
474 __m128i fVec; variable
480 AI SkNx(const __m128i& vec) : fVec(vec) {} in SkNx()
483 AI SkNx(uint16_t val) : fVec(_mm_set1_epi16(val)) {} in SkNx()
486 : fVec(_mm_setr_epi16(a,b,c,d,e,f,g,h)) {} in SkNx()
489 AI void store(void* ptr) const { _mm_storeu_si128((__m128i*)ptr, fVec); } in store()
538 __m128i rg0123 = _mm_unpacklo_epi16(r.fVec, g.fVec), // r0 g0 r1 g1 r2 g2 r3 g3 in Store4()
539 rg4567 = _mm_unpackhi_epi16(r.fVec, g.fVec), // r4 g4 r5 g5 r6 g6 r7 g7 in Store4()
540 ba0123 = _mm_unpacklo_epi16(b.fVec, a.fVec), in Store4()
541 ba4567 = _mm_unpackhi_epi16(b.fVec, a.fVec); in Store4()
549 AI SkNx operator + (const SkNx& o) const { return _mm_add_epi16(fVec, o.fVec); }
550 AI SkNx operator - (const SkNx& o) const { return _mm_sub_epi16(fVec, o.fVec); }
551 AI SkNx operator * (const SkNx& o) const { return _mm_mullo_epi16(fVec, o.fVec); }
552 AI SkNx operator & (const SkNx& o) const { return _mm_and_si128(fVec, o.fVec); }
553 AI SkNx operator | (const SkNx& o) const { return _mm_or_si128(fVec, o.fVec); }
555 AI SkNx operator << (int bits) const { return _mm_slli_epi16(fVec, bits); }
556 AI SkNx operator >> (int bits) const { return _mm_srli_epi16(fVec, bits); }
563 return _mm_add_epi8(top_8x, _mm_min_epi16(_mm_sub_epi8(a.fVec, top_8x), in Min()
564 _mm_sub_epi8(b.fVec, top_8x))); in Min()
568 return _mm_mulhi_epu16(fVec, m.fVec); in mulHi()
572 return _mm_or_si128(_mm_and_si128 (fVec, t.fVec), in thenElse()
573 _mm_andnot_si128(fVec, e.fVec)); in thenElse()
578 union { __m128i v; uint16_t us[8]; } pun = {fVec};
582 __m128i fVec; variable
589 AI SkNx(const __m128i& vec) : fVec(vec) {} in SkNx()
591 : fVec(_mm_setr_epi8(a,b,c,d, 0,0,0,0, 0,0,0,0, 0,0,0,0)) {} in SkNx()
594 AI void store(void* ptr) const { *(int*)ptr = _mm_cvtsi128_si32(fVec); } in store()
598 union { __m128i v; uint8_t us[16]; } pun = {fVec};
604 __m128i fVec; variable
610 AI SkNx(const __m128i& vec) : fVec(vec) {} in SkNx()
613 AI SkNx(uint8_t val) : fVec(_mm_set1_epi8(val)) {} in SkNx()
617 : fVec(_mm_setr_epi8(a,b,c,d, e,f,g,h, 0,0,0,0, 0,0,0,0)) {} in SkNx()
619 AI void store(void* ptr) const {_mm_storel_epi64((__m128i*)ptr, fVec);} in store()
621 AI SkNx saturatedAdd(const SkNx& o) const { return _mm_adds_epu8(fVec, o.fVec); } in saturatedAdd()
623 AI SkNx operator + (const SkNx& o) const { return _mm_add_epi8(fVec, o.fVec); }
624 AI SkNx operator - (const SkNx& o) const { return _mm_sub_epi8(fVec, o.fVec); }
626 AI static SkNx Min(const SkNx& a, const SkNx& b) { return _mm_min_epu8(a.fVec, b.fVec); } in Min()
630 return _mm_cmplt_epi8(_mm_xor_si128(flip, fVec), _mm_xor_si128(flip, o.fVec));
635 union { __m128i v; uint8_t us[16]; } pun = {fVec};
640 return _mm_or_si128(_mm_and_si128 (fVec, t.fVec), in thenElse()
641 _mm_andnot_si128(fVec, e.fVec)); in thenElse()
644 __m128i fVec; variable
650 AI SkNx(const __m128i& vec) : fVec(vec) {} in SkNx()
653 AI SkNx(uint8_t val) : fVec(_mm_set1_epi8(val)) {} in SkNx()
659 : fVec(_mm_setr_epi8(a,b,c,d, e,f,g,h, i,j,k,l, m,n,o,p)) {} in SkNx()
661 AI void store(void* ptr) const { _mm_storeu_si128((__m128i*)ptr, fVec); } in store()
663 AI SkNx saturatedAdd(const SkNx& o) const { return _mm_adds_epu8(fVec, o.fVec); } in saturatedAdd()
665 AI SkNx operator + (const SkNx& o) const { return _mm_add_epi8(fVec, o.fVec); }
666 AI SkNx operator - (const SkNx& o) const { return _mm_sub_epi8(fVec, o.fVec); }
667 AI SkNx operator & (const SkNx& o) const { return _mm_and_si128(fVec, o.fVec); }
669 AI static SkNx Min(const SkNx& a, const SkNx& b) { return _mm_min_epu8(a.fVec, b.fVec); } in Min()
673 return _mm_cmplt_epi8(_mm_xor_si128(flip, fVec), _mm_xor_si128(flip, o.fVec));
678 union { __m128i v; uint8_t us[16]; } pun = {fVec};
683 return _mm_or_si128(_mm_and_si128 (fVec, t.fVec), in thenElse()
684 _mm_andnot_si128(fVec, e.fVec)); in thenElse()
687 __m128i fVec; variable
691 return _mm_cvtepi32_ps(src.fVec);
699 return _mm_cvttps_epi32(src.fVec);
705 return _mm_packus_epi32(src.fVec);
709 return _mm_shuffle_epi8(src.fVec, _mm_setr_epi8(0,1, 4,5, 8,9, 12,13, _,_,_,_,_,_,_,_));
712 __m128i x = _mm_srai_epi32(_mm_slli_epi32(src.fVec, 16), 16);
722 auto _32 = _mm_cvttps_epi32(src.fVec);
735 return _mm_shuffle_epi8(src.fVec, _mm_setr_epi8(0,_,_,_, 1,_,_,_, 2,_,_,_, 3,_,_,_));
737 auto _16 = _mm_unpacklo_epi8(src.fVec, _mm_setzero_si128());
743 return SkNx_cast<uint32_t>(src).fVec;
747 return _mm_cvtepi32_ps(SkNx_cast<int32_t>(src).fVec);
751 auto _32 = _mm_unpacklo_epi16(src.fVec, _mm_setzero_si128());
759 auto t = _mm_packs_epi32(lo.fVec, hi.fVec);
771 return _mm_packus_epi16(_mm_packus_epi16(_mm_cvttps_epi32(a.fVec),
772 _mm_cvttps_epi32(b.fVec)),
773 _mm_packus_epi16(_mm_cvttps_epi32(c.fVec),
774 _mm_cvttps_epi32(d.fVec)));
778 return _mm_unpacklo_epi8(src.fVec, _mm_setzero_si128());
782 return _mm_unpacklo_epi8(src.fVec, _mm_setzero_si128());
786 return _mm_packus_epi16(src.fVec, src.fVec);
790 return _mm_packus_epi16(src.fVec, src.fVec);
794 return _mm_unpacklo_epi16(src.fVec, _mm_setzero_si128());
799 return _mm_packus_epi16(_mm_packus_epi16(src.fVec, src.fVec), src.fVec);
803 return _mm_packus_epi16(_mm_packus_epi16(src.fVec, src.fVec), src.fVec);
807 return src.fVec;
811 return _mm_cvtps_epi32(x.fVec); in Sk4f_round()