Home | History | Annotate | Download | only in opts

Lines Matching defs:fVec

29     SkNx(const __m128& vec) : fVec(vec) {}
32 SkNx(float val) : fVec(_mm_set1_ps(val)) {}
36 SkNx(float a, float b) : fVec(_mm_setr_ps(a,b,0,0)) {}
38 void store(void* ptr) const { _mm_storel_pi((__m64*)ptr, fVec); }
40 SkNx operator + (const SkNx& o) const { return _mm_add_ps(fVec, o.fVec); }
41 SkNx operator - (const SkNx& o) const { return _mm_sub_ps(fVec, o.fVec); }
42 SkNx operator * (const SkNx& o) const { return _mm_mul_ps(fVec, o.fVec); }
43 SkNx operator / (const SkNx& o) const { return _mm_div_ps(fVec, o.fVec); }
45 SkNx operator == (const SkNx& o) const { return _mm_cmpeq_ps (fVec, o.fVec); }
46 SkNx operator != (const SkNx& o) const { return _mm_cmpneq_ps(fVec, o.fVec); }
47 SkNx operator < (const SkNx& o) const { return _mm_cmplt_ps (fVec, o.fVec); }
48 SkNx operator > (const SkNx& o) const { return _mm_cmpgt_ps (fVec, o.fVec); }
49 SkNx operator <= (const SkNx& o) const { return _mm_cmple_ps (fVec, o.fVec); }
50 SkNx operator >= (const SkNx& o) const { return _mm_cmpge_ps (fVec, o.fVec); }
52 static SkNx Min(const SkNx& l, const SkNx& r) { return _mm_min_ps(l.fVec, r.fVec); }
53 static SkNx Max(const SkNx& l, const SkNx& r) { return _mm_max_ps(l.fVec, r.fVec); }
55 SkNx sqrt () const { return _mm_sqrt_ps (fVec); }
56 SkNx rsqrt0() const { return _mm_rsqrt_ps(fVec); }
61 SkNx approxInvert() const { return _mm_rcp_ps(fVec); }
65 union { __m128 v; float fs[4]; } pun = {fVec};
69 bool allTrue() const { return 0xff == (_mm_movemask_epi8(_mm_castps_si128(fVec)) & 0xff); }
70 bool anyTrue() const { return 0x00 != (_mm_movemask_epi8(_mm_castps_si128(fVec)) & 0xff); }
72 __m128 fVec;
78 SkNx(const __m128& vec) : fVec(vec) {}
81 SkNx(float val) : fVec( _mm_set1_ps(val) ) {}
84 SkNx(float a, float b, float c, float d) : fVec(_mm_setr_ps(a,b,c,d)) {}
86 void store(void* ptr) const { _mm_storeu_ps((float*)ptr, fVec); }
88 SkNx operator + (const SkNx& o) const { return _mm_add_ps(fVec, o.fVec); }
89 SkNx operator - (const SkNx& o) const { return _mm_sub_ps(fVec, o.fVec); }
90 SkNx operator * (const SkNx& o) const { return _mm_mul_ps(fVec, o.fVec); }
91 SkNx operator / (const SkNx& o) const { return _mm_div_ps(fVec, o.fVec); }
93 SkNx operator == (const SkNx& o) const { return _mm_cmpeq_ps (fVec, o.fVec); }
94 SkNx operator != (const SkNx& o) const { return _mm_cmpneq_ps(fVec, o.fVec); }
95 SkNx operator < (const SkNx& o) const { return _mm_cmplt_ps (fVec, o.fVec); }
96 SkNx operator > (const SkNx& o) const { return _mm_cmpgt_ps (fVec, o.fVec); }
97 SkNx operator <= (const SkNx& o) const { return _mm_cmple_ps (fVec, o.fVec); }
98 SkNx operator >= (const SkNx& o) const { return _mm_cmpge_ps (fVec, o.fVec); }
100 static SkNx Min(const SkNx& l, const SkNx& r) { return _mm_min_ps(l.fVec, r.fVec); }
101 static SkNx Max(const SkNx& l, const SkNx& r) { return _mm_max_ps(l.fVec, r.fVec); }
103 SkNx abs() const { return _mm_andnot_ps(_mm_set1_ps(-0.0f), fVec); }
104 SkNx floor() const { return sse2_mm_floor_ps(fVec); }
106 SkNx sqrt () const { return _mm_sqrt_ps (fVec); }
107 SkNx rsqrt0() const { return _mm_rsqrt_ps(fVec); }
112 SkNx approxInvert() const { return _mm_rcp_ps(fVec); }
116 union { __m128 v; float fs[4]; } pun = {fVec};
120 bool allTrue() const { return 0xffff == _mm_movemask_epi8(_mm_castps_si128(fVec)); }
121 bool anyTrue() const { return 0x0000 != _mm_movemask_epi8(_mm_castps_si128(fVec)); }
124 return _mm_or_ps(_mm_and_ps (fVec, t.fVec),
125 _mm_andnot_ps(fVec, e.fVec));
128 __m128 fVec;
134 SkNx(const __m128i& vec) : fVec(vec) {}
137 SkNx(int val) : fVec(_mm_set1_epi32(val)) {}
139 SkNx(int a, int b, int c, int d) : fVec(_mm_setr_epi32(a,b,c,d)) {}
141 void store(void* ptr) const { _mm_storeu_si128((__m128i*)ptr, fVec); }
143 SkNx operator + (const SkNx& o) const { return _mm_add_epi32(fVec, o.fVec); }
144 SkNx operator - (const SkNx& o) const { return _mm_sub_epi32(fVec, o.fVec); }
146 __m128i mul20 = _mm_mul_epu32(fVec, o.fVec),
147 mul31 = _mm_mul_epu32(_mm_srli_si128(fVec, 4), _mm_srli_si128(o.fVec, 4));
152 SkNx operator << (int bits) const { return _mm_slli_epi32(fVec, bits); }
153 SkNx operator >> (int bits) const { return _mm_srai_epi32(fVec, bits); }
157 union { __m128i v; int is[4]; } pun = {fVec};
161 __m128i fVec;
167 SkNx(const __m128i& vec) : fVec(vec) {}
170 SkNx(uint16_t val) : fVec(_mm_set1_epi16(val)) {}
172 SkNx(uint16_t a, uint16_t b, uint16_t c, uint16_t d) : fVec(_mm_setr_epi16(a,b,c,d,0,0,0,0)) {}
174 void store(void* ptr) const { _mm_storel_epi64((__m128i*)ptr, fVec); }
176 SkNx operator + (const SkNx& o) const { return _mm_add_epi16(fVec, o.fVec); }
177 SkNx operator - (const SkNx& o) const { return _mm_sub_epi16(fVec, o.fVec); }
178 SkNx operator * (const SkNx& o) const { return _mm_mullo_epi16(fVec, o.fVec); }
180 SkNx operator << (int bits) const { return _mm_slli_epi16(fVec, bits); }
181 SkNx operator >> (int bits) const { return _mm_srli_epi16(fVec, bits); }
185 union { __m128i v; uint16_t us[8]; } pun = {fVec};
189 __m128i fVec;
195 SkNx(const __m128i& vec) : fVec(vec) {}
198 SkNx(uint16_t val) : fVec(_mm_set1_epi16(val)) {}
201 uint16_t e, uint16_t f, uint16_t g, uint16_t h) : fVec(_mm_setr_epi16(a,b,c,d,e,f,g,h)) {}
203 void store(void* ptr) const { _mm_storeu_si128((__m128i*)ptr, fVec); }
205 SkNx operator + (const SkNx& o) const { return _mm_add_epi16(fVec, o.fVec); }
206 SkNx operator - (const SkNx& o) const { return _mm_sub_epi16(fVec, o.fVec); }
207 SkNx operator * (const SkNx& o) const { return _mm_mullo_epi16(fVec, o.fVec); }
209 SkNx operator << (int bits) const { return _mm_slli_epi16(fVec, bits); }
210 SkNx operator >> (int bits) const { return _mm_srli_epi16(fVec, bits); }
217 return _mm_add_epi8(top_8x, _mm_min_epi16(_mm_sub_epi8(a.fVec, top_8x),
218 _mm_sub_epi8(b.fVec, top_8x)));
222 return _mm_or_si128(_mm_and_si128 (fVec, t.fVec),
223 _mm_andnot_si128(fVec, e.fVec));
228 union { __m128i v; uint16_t us[8]; } pun = {fVec};
232 __m128i fVec;
238 SkNx(const __m128i& vec) : fVec(vec) {}
242 void store(void* ptr) const { *(int*)ptr = _mm_cvtsi128_si32(fVec); }
246 __m128i fVec;
252 SkNx(const __m128i& vec) : fVec(vec) {}
255 SkNx(uint8_t val) : fVec(_mm_set1_epi8(val)) {}
261 : fVec(_mm_setr_epi8(a,b,c,d, e,f,g,h, i,j,k,l, m,n,o,p)) {}
263 void store(void* ptr) const { _mm_storeu_si128((__m128i*)ptr, fVec); }
265 SkNx saturatedAdd(const SkNx& o) const { return _mm_adds_epu8(fVec, o.fVec); }
267 SkNx operator + (const SkNx& o) const { return _mm_add_epi8(fVec, o.fVec); }
268 SkNx operator - (const SkNx& o) const { return _mm_sub_epi8(fVec, o.fVec); }
270 static SkNx Min(const SkNx& a, const SkNx& b) { return _mm_min_epu8(a.fVec, b.fVec); }
274 return _mm_cmplt_epi8(_mm_xor_si128(flip, fVec), _mm_xor_si128(flip, o.fVec));
279 union { __m128i v; uint8_t us[16]; } pun = {fVec};
284 return _mm_or_si128(_mm_and_si128 (fVec, t.fVec),
285 _mm_andnot_si128(fVec, e.fVec));
288 __m128i fVec;
292 return _mm_cvtepi32_ps(src.fVec);
296 return _mm_cvttps_epi32(src.fVec);
300 auto _32 = _mm_cvttps_epi32(src.fVec);
314 auto _32 = _mm_cvttps_epi32(src.fVec);
327 auto _32 = _mm_shuffle_epi8(src.fVec, _mm_setr_epi8(0,_,_,_, 1,_,_,_, 2,_,_,_, 3,_,_,_));
329 auto _16 = _mm_unpacklo_epi8(src.fVec, _mm_setzero_si128()),
336 auto _32 = _mm_unpacklo_epi16(src.fVec, _mm_setzero_si128());
343 _mm_packus_epi16(_mm_packus_epi16(_mm_cvttps_epi32(a.fVec),
344 _mm_cvttps_epi32(b.fVec)),
345 _mm_packus_epi16(_mm_cvttps_epi32(c.fVec),
346 _mm_cvttps_epi32(d.fVec))));
350 return _mm_unpacklo_epi8(src.fVec, _mm_setzero_si128());
354 return _mm_packus_epi16(src.fVec, src.fVec);