• 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()
103 AI SkNx rsqrt() const { return _mm_rsqrt_ps(fVec); } in rsqrt()
104 AI SkNx invert() const { return _mm_rcp_ps(fVec); } in invert()
108 union { __m128 v; float fs[4]; } pun = {fVec};
112 AI bool allTrue() const { return 0xff == (_mm_movemask_epi8(_mm_castps_si128(fVec)) & 0xff); } in allTrue()
113 AI bool anyTrue() const { return 0x00 != (_mm_movemask_epi8(_mm_castps_si128(fVec)) & 0xff); } in anyTrue()
117 return _mm_blendv_ps(e.fVec, t.fVec, fVec); in thenElse()
119 return _mm_or_ps(_mm_and_ps (fVec, t.fVec), in thenElse()
120 _mm_andnot_ps(fVec, e.fVec)); in thenElse()
124 __m128 fVec; variable
130 AI SkNx(const __m128& vec) : fVec(vec) {} in SkNx()
133 AI SkNx(float val) : fVec( _mm_set1_ps(val) ) {} in SkNx()
134 AI SkNx(float a, float b, float c, float d) : fVec(_mm_setr_ps(a,b,c,d)) {} in SkNx()
137 AI void store(void* ptr) const { _mm_storeu_ps((float*)ptr, fVec); } in store()
158 __m128 v0 = r.fVec, in Store4()
159 v1 = g.fVec, in Store4()
160 v2 = b.fVec, in Store4()
161 v3 = a.fVec; in Store4()
169 AI SkNx operator - () const { return _mm_xor_ps(_mm_set1_ps(-0.0f), fVec); }
171 AI SkNx operator + (const SkNx& o) const { return _mm_add_ps(fVec, o.fVec); }
172 AI SkNx operator - (const SkNx& o) const { return _mm_sub_ps(fVec, o.fVec); }
173 AI SkNx operator * (const SkNx& o) const { return _mm_mul_ps(fVec, o.fVec); }
174 AI SkNx operator / (const SkNx& o) const { return _mm_div_ps(fVec, o.fVec); }
176 AI SkNx operator == (const SkNx& o) const { return _mm_cmpeq_ps (fVec, o.fVec); }
177 AI SkNx operator != (const SkNx& o) const { return _mm_cmpneq_ps(fVec, o.fVec); }
178 AI SkNx operator < (const SkNx& o) const { return _mm_cmplt_ps (fVec, o.fVec); }
179 AI SkNx operator > (const SkNx& o) const { return _mm_cmpgt_ps (fVec, o.fVec); }
180 AI SkNx operator <= (const SkNx& o) const { return _mm_cmple_ps (fVec, o.fVec); }
181 AI SkNx operator >= (const SkNx& o) const { return _mm_cmpge_ps (fVec, o.fVec); }
183 AI static SkNx Min(const SkNx& l, const SkNx& r) { return _mm_min_ps(l.fVec, r.fVec); } in Min()
184 AI static SkNx Max(const SkNx& l, const SkNx& r) { return _mm_max_ps(l.fVec, r.fVec); } in Max()
186 AI SkNx abs() const { return _mm_andnot_ps(_mm_set1_ps(-0.0f), fVec); } in abs()
189 return _mm_floor_ps(fVec); in floor()
191 return emulate_mm_floor_ps(fVec); in floor()
195 AI SkNx sqrt() const { return _mm_sqrt_ps (fVec); } in sqrt()
196 AI SkNx rsqrt() const { return _mm_rsqrt_ps(fVec); } in rsqrt()
197 AI SkNx invert() const { return _mm_rcp_ps(fVec); } in invert()
201 union { __m128 v; float fs[4]; } pun = {fVec};
206 SkNx min = Min(*this, _mm_shuffle_ps(fVec, fVec, _MM_SHUFFLE(2,3,0,1))); in min()
207 min = Min(min, _mm_shuffle_ps(min.fVec, min.fVec, _MM_SHUFFLE(0,1,2,3))); in min()
212 SkNx max = Max(*this, _mm_shuffle_ps(fVec, fVec, _MM_SHUFFLE(2,3,0,1))); in max()
213 max = Max(max, _mm_shuffle_ps(max.fVec, max.fVec, _MM_SHUFFLE(0,1,2,3))); in max()
217 AI bool allTrue() const { return 0xffff == _mm_movemask_epi8(_mm_castps_si128(fVec)); } in allTrue()
218 AI bool anyTrue() const { return 0x0000 != _mm_movemask_epi8(_mm_castps_si128(fVec)); } in anyTrue()
222 return _mm_blendv_ps(e.fVec, t.fVec, fVec); in thenElse()
224 return _mm_or_ps(_mm_and_ps (fVec, t.fVec), in thenElse()
225 _mm_andnot_ps(fVec, e.fVec)); in thenElse()
229 __m128 fVec; variable
246 AI SkNx(const __m128i& vec) : fVec(vec) {} in SkNx()
249 AI SkNx(int32_t val) : fVec(_mm_set1_epi32(val)) {} in SkNx()
251 AI SkNx(int32_t a, int32_t b, int32_t c, int32_t d) : fVec(_mm_setr_epi32(a,b,c,d)) {} in SkNx()
253 AI void store(void* ptr) const { _mm_storeu_si128((__m128i*)ptr, fVec); } in store()
255 AI SkNx operator + (const SkNx& o) const { return _mm_add_epi32(fVec, o.fVec); }
256 AI SkNx operator - (const SkNx& o) const { return _mm_sub_epi32(fVec, o.fVec); }
257 AI SkNx operator * (const SkNx& o) const { return mullo32(fVec, o.fVec); }
259 AI SkNx operator & (const SkNx& o) const { return _mm_and_si128(fVec, o.fVec); }
260 AI SkNx operator | (const SkNx& o) const { return _mm_or_si128(fVec, o.fVec); }
261 AI SkNx operator ^ (const SkNx& o) const { return _mm_xor_si128(fVec, o.fVec); }
263 AI SkNx operator << (int bits) const { return _mm_slli_epi32(fVec, bits); }
264 AI SkNx operator >> (int bits) const { return _mm_srai_epi32(fVec, bits); }
266 AI SkNx operator == (const SkNx& o) const { return _mm_cmpeq_epi32 (fVec, o.fVec); }
267 AI SkNx operator < (const SkNx& o) const { return _mm_cmplt_epi32 (fVec, o.fVec); }
268 AI SkNx operator > (const SkNx& o) const { return _mm_cmpgt_epi32 (fVec, o.fVec); }
272 union { __m128i v; int32_t is[4]; } pun = {fVec};
278 return _mm_blendv_epi8(e.fVec, t.fVec, fVec); in thenElse()
280 return _mm_or_si128(_mm_and_si128 (fVec, t.fVec), in thenElse()
281 _mm_andnot_si128(fVec, e.fVec)); in thenElse()
287 return _mm_abs_epi32(fVec); in abs()
296 return _mm_min_epi32(x.fVec, y.fVec); in Min()
304 return _mm_max_epi32(x.fVec, y.fVec); in Max()
310 __m128i fVec; variable
316 AI SkNx(const __m128i& vec) : fVec(vec) {} in SkNx()
319 AI SkNx(uint32_t val) : fVec(_mm_set1_epi32(val)) {} in SkNx()
321 AI SkNx(uint32_t a, uint32_t b) : fVec(_mm_setr_epi32(a,b,0,0)) {} in SkNx()
323 AI void store(void* ptr) const { _mm_storel_epi64((__m128i*)ptr, fVec); } in store()
325 AI SkNx operator + (const SkNx& o) const { return _mm_add_epi32(fVec, o.fVec); }
326 AI SkNx operator - (const SkNx& o) const { return _mm_sub_epi32(fVec, o.fVec); }
327 AI SkNx operator * (const SkNx& o) const { return mullo32(fVec, o.fVec); }
329 AI SkNx operator & (const SkNx& o) const { return _mm_and_si128(fVec, o.fVec); }
330 AI SkNx operator | (const SkNx& o) const { return _mm_or_si128(fVec, o.fVec); }
331 AI SkNx operator ^ (const SkNx& o) const { return _mm_xor_si128(fVec, o.fVec); }
333 AI SkNx operator << (int bits) const { return _mm_slli_epi32(fVec, bits); }
334 AI SkNx operator >> (int bits) const { return _mm_srli_epi32(fVec, bits); }
336 AI SkNx operator == (const SkNx& o) const { return _mm_cmpeq_epi32 (fVec, o.fVec); }
342 union { __m128i v; uint32_t us[4]; } pun = {fVec};
348 return _mm_blendv_epi8(e.fVec, t.fVec, fVec); in thenElse()
350 return _mm_or_si128(_mm_and_si128 (fVec, t.fVec), in thenElse()
351 _mm_andnot_si128(fVec, e.fVec)); in thenElse()
355 AI bool allTrue() const { return 0xff == (_mm_movemask_epi8(fVec) & 0xff); } in allTrue()
357 __m128i fVec; variable
363 AI SkNx(const __m128i& vec) : fVec(vec) {} in SkNx()
366 AI SkNx(uint32_t val) : fVec(_mm_set1_epi32(val)) {} in SkNx()
368 AI SkNx(uint32_t a, uint32_t b, uint32_t c, uint32_t d) : fVec(_mm_setr_epi32(a,b,c,d)) {} in SkNx()
370 AI void store(void* ptr) const { _mm_storeu_si128((__m128i*)ptr, fVec); } in store()
372 AI SkNx operator + (const SkNx& o) const { return _mm_add_epi32(fVec, o.fVec); }
373 AI SkNx operator - (const SkNx& o) const { return _mm_sub_epi32(fVec, o.fVec); }
374 AI SkNx operator * (const SkNx& o) const { return mullo32(fVec, o.fVec); }
376 AI SkNx operator & (const SkNx& o) const { return _mm_and_si128(fVec, o.fVec); }
377 AI SkNx operator | (const SkNx& o) const { return _mm_or_si128(fVec, o.fVec); }
378 AI SkNx operator ^ (const SkNx& o) const { return _mm_xor_si128(fVec, o.fVec); }
380 AI SkNx operator << (int bits) const { return _mm_slli_epi32(fVec, bits); }
381 AI SkNx operator >> (int bits) const { return _mm_srli_epi32(fVec, bits); }
383 AI SkNx operator == (const SkNx& o) const { return _mm_cmpeq_epi32 (fVec, o.fVec); }
390 union { __m128i v; uint32_t us[4]; } pun = {fVec};
396 return _mm_blendv_epi8(e.fVec, t.fVec, fVec); in thenElse()
398 return _mm_or_si128(_mm_and_si128 (fVec, t.fVec), in thenElse()
399 _mm_andnot_si128(fVec, e.fVec)); in thenElse()
404 SkNx v20{_mm_mul_epu32(m.fVec, fVec)}; in mulHi()
405 SkNx v31{_mm_mul_epu32(_mm_srli_si128(m.fVec, 4), _mm_srli_si128(fVec, 4))}; in mulHi()
410 __m128i fVec; variable
416 AI SkNx(const __m128i& vec) : fVec(vec) {} in SkNx()
419 AI SkNx(uint16_t val) : fVec(_mm_set1_epi16(val)) {} in SkNx()
421 : fVec(_mm_setr_epi16(a,b,c,d,0,0,0,0)) {} in SkNx()
424 AI void store(void* ptr) const { _mm_storel_epi64((__m128i*)ptr, fVec); } in store()
451 *g = _mm_srli_si128(r->fVec, 4*2); in Load3()
455 __m128i rg = _mm_unpacklo_epi16(r.fVec, g.fVec); in Store4()
456 __m128i ba = _mm_unpacklo_epi16(b.fVec, a.fVec); in Store4()
463 AI SkNx operator + (const SkNx& o) const { return _mm_add_epi16(fVec, o.fVec); }
464 AI SkNx operator - (const SkNx& o) const { return _mm_sub_epi16(fVec, o.fVec); }
465 AI SkNx operator * (const SkNx& o) const { return _mm_mullo_epi16(fVec, o.fVec); }
466 AI SkNx operator & (const SkNx& o) const { return _mm_and_si128(fVec, o.fVec); }
467 AI SkNx operator | (const SkNx& o) const { return _mm_or_si128(fVec, o.fVec); }
469 AI SkNx operator << (int bits) const { return _mm_slli_epi16(fVec, bits); }
470 AI SkNx operator >> (int bits) const { return _mm_srli_epi16(fVec, bits); }
474 union { __m128i v; uint16_t us[8]; } pun = {fVec};
478 __m128i fVec; variable
484 AI SkNx(const __m128i& vec) : fVec(vec) {} in SkNx()
487 AI SkNx(uint16_t val) : fVec(_mm_set1_epi16(val)) {} in SkNx()
490 : fVec(_mm_setr_epi16(a,b,c,d,e,f,g,h)) {} in SkNx()
493 AI void store(void* ptr) const { _mm_storeu_si128((__m128i*)ptr, fVec); } in store()
542 __m128i rg0123 = _mm_unpacklo_epi16(r.fVec, g.fVec), // r0 g0 r1 g1 r2 g2 r3 g3 in Store4()
543 rg4567 = _mm_unpackhi_epi16(r.fVec, g.fVec), // r4 g4 r5 g5 r6 g6 r7 g7 in Store4()
544 ba0123 = _mm_unpacklo_epi16(b.fVec, a.fVec), in Store4()
545 ba4567 = _mm_unpackhi_epi16(b.fVec, a.fVec); in Store4()
553 AI SkNx operator + (const SkNx& o) const { return _mm_add_epi16(fVec, o.fVec); }
554 AI SkNx operator - (const SkNx& o) const { return _mm_sub_epi16(fVec, o.fVec); }
555 AI SkNx operator * (const SkNx& o) const { return _mm_mullo_epi16(fVec, o.fVec); }
556 AI SkNx operator & (const SkNx& o) const { return _mm_and_si128(fVec, o.fVec); }
557 AI SkNx operator | (const SkNx& o) const { return _mm_or_si128(fVec, o.fVec); }
559 AI SkNx operator << (int bits) const { return _mm_slli_epi16(fVec, bits); }
560 AI SkNx operator >> (int bits) const { return _mm_srli_epi16(fVec, bits); }
567 return _mm_add_epi8(top_8x, _mm_min_epi16(_mm_sub_epi8(a.fVec, top_8x), in Min()
568 _mm_sub_epi8(b.fVec, top_8x))); in Min()
572 return _mm_mulhi_epu16(fVec, m.fVec); in mulHi()
576 return _mm_or_si128(_mm_and_si128 (fVec, t.fVec), in thenElse()
577 _mm_andnot_si128(fVec, e.fVec)); in thenElse()
582 union { __m128i v; uint16_t us[8]; } pun = {fVec};
586 __m128i fVec; variable
593 AI SkNx(const __m128i& vec) : fVec(vec) {} in SkNx()
595 : fVec(_mm_setr_epi8(a,b,c,d, 0,0,0,0, 0,0,0,0, 0,0,0,0)) {} in SkNx()
598 AI void store(void* ptr) const { *(int*)ptr = _mm_cvtsi128_si32(fVec); } in store()
602 union { __m128i v; uint8_t us[16]; } pun = {fVec};
608 __m128i fVec; variable
614 AI SkNx(const __m128i& vec) : fVec(vec) {} in SkNx()
617 AI SkNx(uint8_t val) : fVec(_mm_set1_epi8(val)) {} in SkNx()
621 : fVec(_mm_setr_epi8(a,b,c,d, e,f,g,h, 0,0,0,0, 0,0,0,0)) {} 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(val)) {} in SkNx()
663 : fVec(_mm_setr_epi8(a,b,c,d, e,f,g,h, i,j,k,l, m,n,o,p)) {} in SkNx()
665 AI void store(void* ptr) const { _mm_storeu_si128((__m128i*)ptr, fVec); } in store()
667 AI SkNx saturatedAdd(const SkNx& o) const { return _mm_adds_epu8(fVec, o.fVec); } in saturatedAdd()
669 AI SkNx operator + (const SkNx& o) const { return _mm_add_epi8(fVec, o.fVec); }
670 AI SkNx operator - (const SkNx& o) const { return _mm_sub_epi8(fVec, o.fVec); }
671 AI SkNx operator & (const SkNx& o) const { return _mm_and_si128(fVec, o.fVec); }
673 AI static SkNx Min(const SkNx& a, const SkNx& b) { return _mm_min_epu8(a.fVec, b.fVec); } in Min()
677 return _mm_cmplt_epi8(_mm_xor_si128(flip, fVec), _mm_xor_si128(flip, o.fVec));
682 union { __m128i v; uint8_t us[16]; } pun = {fVec};
687 return _mm_or_si128(_mm_and_si128 (fVec, t.fVec), in thenElse()
688 _mm_andnot_si128(fVec, e.fVec)); in thenElse()
691 __m128i fVec; variable
695 return _mm_cvtepi32_ps(src.fVec);
703 return _mm_cvttps_epi32(src.fVec);
709 return _mm_packus_epi32(src.fVec);
713 return _mm_shuffle_epi8(src.fVec, _mm_setr_epi8(0,1, 4,5, 8,9, 12,13, _,_,_,_,_,_,_,_));
716 __m128i x = _mm_srai_epi32(_mm_slli_epi32(src.fVec, 16), 16);
726 auto _32 = _mm_cvttps_epi32(src.fVec);
739 return _mm_shuffle_epi8(src.fVec, _mm_setr_epi8(0,_,_,_, 1,_,_,_, 2,_,_,_, 3,_,_,_));
741 auto _16 = _mm_unpacklo_epi8(src.fVec, _mm_setzero_si128());
747 return SkNx_cast<uint32_t>(src).fVec;
751 return _mm_cvtepi32_ps(SkNx_cast<int32_t>(src).fVec);
755 auto _32 = _mm_unpacklo_epi16(src.fVec, _mm_setzero_si128());
763 auto t = _mm_packs_epi32(lo.fVec, hi.fVec);
775 return _mm_packus_epi16(_mm_packus_epi16(_mm_cvttps_epi32(a.fVec),
776 _mm_cvttps_epi32(b.fVec)),
777 _mm_packus_epi16(_mm_cvttps_epi32(c.fVec),
778 _mm_cvttps_epi32(d.fVec)));
782 return _mm_unpacklo_epi8(src.fVec, _mm_setzero_si128());
786 return _mm_unpacklo_epi8(src.fVec, _mm_setzero_si128());
790 return _mm_packus_epi16(src.fVec, src.fVec);
794 return _mm_packus_epi16(src.fVec, src.fVec);
798 return _mm_unpacklo_epi16(src.fVec, _mm_setzero_si128());
803 return _mm_packus_epi16(_mm_packus_epi16(src.fVec, src.fVec), src.fVec);
807 return _mm_packus_epi16(_mm_packus_epi16(src.fVec, src.fVec), src.fVec);
811 return src.fVec;
815 return _mm_cvtps_epi32(x.fVec); in Sk4f_round()