• 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((int)val)) {} in SkNx()
317 AI SkNx(uint32_t a, uint32_t b) : fVec(_mm_setr_epi32((int)a,(int)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((int)val)) {} in SkNx()
365 : fVec(_mm_setr_epi32((int)a,(int)b,(int)c,(int)d)) {} in SkNx()
367 AI void store(void* ptr) const { _mm_storeu_si128((__m128i*)ptr, fVec); } in store()
369 AI SkNx operator + (const SkNx& o) const { return _mm_add_epi32(fVec, o.fVec); }
370 AI SkNx operator - (const SkNx& o) const { return _mm_sub_epi32(fVec, o.fVec); }
371 AI SkNx operator * (const SkNx& o) const { return mullo32(fVec, o.fVec); }
373 AI SkNx operator & (const SkNx& o) const { return _mm_and_si128(fVec, o.fVec); }
374 AI SkNx operator | (const SkNx& o) const { return _mm_or_si128(fVec, o.fVec); }
375 AI SkNx operator ^ (const SkNx& o) const { return _mm_xor_si128(fVec, o.fVec); }
377 AI SkNx operator << (int bits) const { return _mm_slli_epi32(fVec, bits); }
378 AI SkNx operator >> (int bits) const { return _mm_srli_epi32(fVec, bits); }
380 AI SkNx operator == (const SkNx& o) const { return _mm_cmpeq_epi32 (fVec, o.fVec); }
387 union { __m128i v; uint32_t us[4]; } pun = {fVec};
393 return _mm_blendv_epi8(e.fVec, t.fVec, fVec); in thenElse()
395 return _mm_or_si128(_mm_and_si128 (fVec, t.fVec), in thenElse()
396 _mm_andnot_si128(fVec, e.fVec)); in thenElse()
401 SkNx v20{_mm_mul_epu32(m.fVec, fVec)}; in mulHi()
402 SkNx v31{_mm_mul_epu32(_mm_srli_si128(m.fVec, 4), _mm_srli_si128(fVec, 4))}; in mulHi()
407 __m128i fVec; variable
413 AI SkNx(const __m128i& vec) : fVec(vec) {} in SkNx()
416 AI SkNx(uint16_t val) : fVec(_mm_set1_epi16((short)val)) {} in SkNx()
418 : fVec(_mm_setr_epi16((short)a,(short)b,(short)c,(short)d,0,0,0,0)) {} in SkNx()
421 AI void store(void* ptr) const { _mm_storel_epi64((__m128i*)ptr, fVec); } in store()
448 *g = _mm_srli_si128(r->fVec, 4*2); in Load3()
452 __m128i rg = _mm_unpacklo_epi16(r.fVec, g.fVec); in Store4()
453 __m128i ba = _mm_unpacklo_epi16(b.fVec, a.fVec); in Store4()
460 AI SkNx operator + (const SkNx& o) const { return _mm_add_epi16(fVec, o.fVec); }
461 AI SkNx operator - (const SkNx& o) const { return _mm_sub_epi16(fVec, o.fVec); }
462 AI SkNx operator * (const SkNx& o) const { return _mm_mullo_epi16(fVec, o.fVec); }
463 AI SkNx operator & (const SkNx& o) const { return _mm_and_si128(fVec, o.fVec); }
464 AI SkNx operator | (const SkNx& o) const { return _mm_or_si128(fVec, o.fVec); }
466 AI SkNx operator << (int bits) const { return _mm_slli_epi16(fVec, bits); }
467 AI SkNx operator >> (int bits) const { return _mm_srli_epi16(fVec, bits); }
471 union { __m128i v; uint16_t us[8]; } pun = {fVec};
475 __m128i fVec; variable
481 AI SkNx(const __m128i& vec) : fVec(vec) {} in SkNx()
484 AI SkNx(uint16_t val) : fVec(_mm_set1_epi16((short)val)) {} in SkNx()
487 : fVec(_mm_setr_epi16((short)a,(short)b,(short)c,(short)d, in SkNx()
491 AI void store(void* ptr) const { _mm_storeu_si128((__m128i*)ptr, fVec); } in store()
540 __m128i rg0123 = _mm_unpacklo_epi16(r.fVec, g.fVec), // r0 g0 r1 g1 r2 g2 r3 g3 in Store4()
541 rg4567 = _mm_unpackhi_epi16(r.fVec, g.fVec), // r4 g4 r5 g5 r6 g6 r7 g7 in Store4()
542 ba0123 = _mm_unpacklo_epi16(b.fVec, a.fVec), in Store4()
543 ba4567 = _mm_unpackhi_epi16(b.fVec, a.fVec); in Store4()
551 AI SkNx operator + (const SkNx& o) const { return _mm_add_epi16(fVec, o.fVec); }
552 AI SkNx operator - (const SkNx& o) const { return _mm_sub_epi16(fVec, o.fVec); }
553 AI SkNx operator * (const SkNx& o) const { return _mm_mullo_epi16(fVec, o.fVec); }
554 AI SkNx operator & (const SkNx& o) const { return _mm_and_si128(fVec, o.fVec); }
555 AI SkNx operator | (const SkNx& o) const { return _mm_or_si128(fVec, o.fVec); }
557 AI SkNx operator << (int bits) const { return _mm_slli_epi16(fVec, bits); }
558 AI SkNx operator >> (int bits) const { return _mm_srli_epi16(fVec, bits); }
565 return _mm_add_epi8(top_8x, _mm_min_epi16(_mm_sub_epi8(a.fVec, top_8x), in Min()
566 _mm_sub_epi8(b.fVec, top_8x))); in Min()
570 return _mm_mulhi_epu16(fVec, m.fVec); in mulHi()
574 return _mm_or_si128(_mm_and_si128 (fVec, t.fVec), in thenElse()
575 _mm_andnot_si128(fVec, e.fVec)); in thenElse()
580 union { __m128i v; uint16_t us[8]; } pun = {fVec};
584 __m128i fVec; variable
591 AI SkNx(const __m128i& vec) : fVec(vec) {} in SkNx()
593 : fVec(_mm_setr_epi8((char)a,(char)b,(char)c,(char)d, 0,0,0,0, 0,0,0,0, 0,0,0,0)) {} in SkNx()
596 AI void store(void* ptr) const { *(int*)ptr = _mm_cvtsi128_si32(fVec); } in store()
600 union { __m128i v; uint8_t us[16]; } pun = {fVec};
606 __m128i fVec; variable
612 AI SkNx(const __m128i& vec) : fVec(vec) {} in SkNx()
615 AI SkNx(uint8_t val) : fVec(_mm_set1_epi8((char)val)) {} in SkNx()
619 : fVec(_mm_setr_epi8((char)a,(char)b,(char)c,(char)d, in SkNx()
623 AI void store(void* ptr) const {_mm_storel_epi64((__m128i*)ptr, fVec);} in store()
625 AI SkNx saturatedAdd(const SkNx& o) const { return _mm_adds_epu8(fVec, o.fVec); } in saturatedAdd()
627 AI SkNx operator + (const SkNx& o) const { return _mm_add_epi8(fVec, o.fVec); }
628 AI SkNx operator - (const SkNx& o) const { return _mm_sub_epi8(fVec, o.fVec); }
630 AI static SkNx Min(const SkNx& a, const SkNx& b) { return _mm_min_epu8(a.fVec, b.fVec); } in Min()
634 return _mm_cmplt_epi8(_mm_xor_si128(flip, fVec), _mm_xor_si128(flip, o.fVec));
639 union { __m128i v; uint8_t us[16]; } pun = {fVec};
644 return _mm_or_si128(_mm_and_si128 (fVec, t.fVec), in thenElse()
645 _mm_andnot_si128(fVec, e.fVec)); in thenElse()
648 __m128i fVec; variable
654 AI SkNx(const __m128i& vec) : fVec(vec) {} in SkNx()
657 AI SkNx(uint8_t val) : fVec(_mm_set1_epi8((char)val)) {} in SkNx()
663 : fVec(_mm_setr_epi8((char)a,(char)b,(char)c,(char)d, in SkNx()
668 AI void store(void* ptr) const { _mm_storeu_si128((__m128i*)ptr, fVec); } in store()
670 AI SkNx saturatedAdd(const SkNx& o) const { return _mm_adds_epu8(fVec, o.fVec); } in saturatedAdd()
672 AI SkNx operator + (const SkNx& o) const { return _mm_add_epi8(fVec, o.fVec); }
673 AI SkNx operator - (const SkNx& o) const { return _mm_sub_epi8(fVec, o.fVec); }
674 AI SkNx operator & (const SkNx& o) const { return _mm_and_si128(fVec, o.fVec); }
676 AI static SkNx Min(const SkNx& a, const SkNx& b) { return _mm_min_epu8(a.fVec, b.fVec); } in Min()
680 return _mm_cmplt_epi8(_mm_xor_si128(flip, fVec), _mm_xor_si128(flip, o.fVec));
685 union { __m128i v; uint8_t us[16]; } pun = {fVec};
690 return _mm_or_si128(_mm_and_si128 (fVec, t.fVec), in thenElse()
691 _mm_andnot_si128(fVec, e.fVec)); in thenElse()
694 __m128i fVec; variable
698 return _mm_cvtepi32_ps(src.fVec);
706 return _mm_cvttps_epi32(src.fVec);
712 return _mm_packus_epi32(src.fVec);
716 return _mm_shuffle_epi8(src.fVec, _mm_setr_epi8(0,1, 4,5, 8,9, 12,13, _,_,_,_,_,_,_,_));
719 __m128i x = _mm_srai_epi32(_mm_slli_epi32(src.fVec, 16), 16);
729 auto _32 = _mm_cvttps_epi32(src.fVec);
742 return _mm_shuffle_epi8(src.fVec, _mm_setr_epi8(0,_,_,_, 1,_,_,_, 2,_,_,_, 3,_,_,_));
744 auto _16 = _mm_unpacklo_epi8(src.fVec, _mm_setzero_si128());
750 return SkNx_cast<uint32_t>(src).fVec;
754 return _mm_cvtepi32_ps(SkNx_cast<int32_t>(src).fVec);
758 auto _32 = _mm_unpacklo_epi16(src.fVec, _mm_setzero_si128());
766 auto t = _mm_packs_epi32(lo.fVec, hi.fVec);
778 return _mm_packus_epi16(_mm_packus_epi16(_mm_cvttps_epi32(a.fVec),
779 _mm_cvttps_epi32(b.fVec)),
780 _mm_packus_epi16(_mm_cvttps_epi32(c.fVec),
781 _mm_cvttps_epi32(d.fVec)));
785 return _mm_unpacklo_epi8(src.fVec, _mm_setzero_si128());
789 return _mm_unpacklo_epi8(src.fVec, _mm_setzero_si128());
793 return _mm_packus_epi16(src.fVec, src.fVec);
797 return _mm_packus_epi16(src.fVec, src.fVec);
801 return _mm_unpacklo_epi16(src.fVec, _mm_setzero_si128());
806 return _mm_packus_epi16(_mm_packus_epi16(src.fVec, src.fVec), src.fVec);
810 return _mm_packus_epi16(_mm_packus_epi16(src.fVec, src.fVec), src.fVec);
814 return src.fVec;
818 return _mm_cvtps_epi32(x.fVec); in Sk4f_round()