Home | History | Annotate | Download | only in opts

Lines Matching refs:SkNx

46 class SkNx<2, float> {
48 SkNx(float32x2_t vec) : fVec(vec) {}
50 SkNx() {}
51 SkNx(float val) : fVec(vdup_n_f32(val)) {}
52 static SkNx Load(const void* ptr) { return vld1_f32((const float*)ptr); }
53 SkNx(float a, float b) { fVec = (float32x2_t) { a, b }; }
57 SkNx approxInvert() const {
62 SkNx invert() const {
68 SkNx operator + (const SkNx& o) const { return vadd_f32(fVec, o.fVec); }
69 SkNx operator - (const SkNx& o) const { return vsub_f32(fVec, o.fVec); }
70 SkNx operator * (const SkNx& o) const { return vmul_f32(fVec, o.fVec); }
71 SkNx operator / (const SkNx& o) const {
79 SkNx operator == (const SkNx& o) const { return vreinterpret_f32_u32(vceq_f32(fVec, o.fVec)); }
80 SkNx operator < (const SkNx& o) const { return vreinterpret_f32_u32(vclt_f32(fVec, o.fVec)); }
81 SkNx operator > (const SkNx& o) const { return vreinterpret_f32_u32(vcgt_f32(fVec, o.fVec)); }
82 SkNx operator <= (const SkNx& o) const { return vreinterpret_f32_u32(vcle_f32(fVec, o.fVec)); }
83 SkNx operator >= (const SkNx& o) const { return vreinterpret_f32_u32(vcge_f32(fVec, o.fVec)); }
84 SkNx operator != (const SkNx& o) const {
88 static SkNx Min(const SkNx& l, const SkNx& r) { return vmin_f32(l.fVec, r.fVec); }
89 static SkNx Max(const SkNx& l, const SkNx& r) { return vmax_f32(l.fVec, r.fVec); }
91 SkNx rsqrt0() const { return vrsqrte_f32(fVec); }
92 SkNx rsqrt1() const {
96 SkNx rsqrt2() const {
101 SkNx sqrt() const {
128 class SkNx<4, float> {
130 SkNx(float32x4_t vec) : fVec(vec) {}
132 SkNx() {}
133 SkNx(float val) : fVec(vdupq_n_f32(val)) {}
134 static SkNx Load(const void* ptr) { return vld1q_f32((const float*)ptr); }
135 SkNx(float a, float b, float c, float d) { fVec = (float32x4_t) { a, b, c, d }; }
138 SkNx approxInvert() const {
143 SkNx invert() const {
149 SkNx operator + (const SkNx& o) const { return vaddq_f32(fVec, o.fVec); }
150 SkNx operator - (const SkNx& o) const { return vsubq_f32(fVec, o.fVec); }
151 SkNx operator * (const SkNx& o) const { return vmulq_f32(fVec, o.fVec); }
152 SkNx operator / (const SkNx& o) const {
160 SkNx operator==(const SkNx& o) const { return vreinterpretq_f32_u32(vceqq_f32(fVec, o.fVec)); }
161 SkNx operator <(const SkNx& o) const { return vreinterpretq_f32_u32(vcltq_f32(fVec, o.fVec)); }
162 SkNx operator >(const SkNx& o) const { return vreinterpretq_f32_u32(vcgtq_f32(fVec, o.fVec)); }
163 SkNx operator<=(const SkNx& o) const { return vreinterpretq_f32_u32(vcleq_f32(fVec, o.fVec)); }
164 SkNx operator>=(const SkNx& o) const { return vreinterpretq_f32_u32(vcgeq_f32(fVec, o.fVec)); }
165 SkNx operator!=(const SkNx& o) const {
169 static SkNx Min(const SkNx& l, const SkNx& r) { return vminq_f32(l.fVec, r.fVec); }
170 static SkNx Max(const SkNx& l, const SkNx& r) { return vmaxq_f32(l.fVec, r.fVec); }
172 SkNx abs() const { return vabsq_f32(fVec); }
173 SkNx floor() const {
182 SkNx rsqrt0() const { return vrsqrteq_f32(fVec); }
183 SkNx rsqrt1() const {
187 SkNx rsqrt2() const {
192 SkNx sqrt() const {
217 SkNx thenElse(const SkNx& t, const SkNx& e) const {
228 class SkNx<4, uint16_t> {
230 SkNx(const uint16x4_t& vec) : fVec(vec) {}
232 SkNx() {}
233 SkNx(uint16_t val) : fVec(vdup_n_u16(val)) {}
234 static SkNx Load(const void* ptr) { return vld1_u16((const uint16_t*)ptr); }
236 SkNx(uint16_t a, uint16_t b, uint16_t c, uint16_t d) {
242 SkNx operator + (const SkNx& o) const { return vadd_u16(fVec, o.fVec); }
243 SkNx operator - (const SkNx& o) const { return vsub_u16(fVec, o.fVec); }
244 SkNx operator * (const SkNx& o) const { return vmul_u16(fVec, o.fVec); }
246 SkNx operator << (int bits) const { SHIFT16(vshl_n_u16, fVec, bits); }
247 SkNx operator >> (int bits) const { SHIFT16(vshr_n_u16, fVec, bits); }
249 static SkNx Min(const SkNx& a, const SkNx& b) { return vmin_u16(a.fVec, b.fVec); }
257 SkNx thenElse(const SkNx& t, const SkNx& e) const {
265 class SkNx<8, uint16_t> {
267 SkNx(const uint16x8_t& vec) : fVec(vec) {}
269 SkNx() {}
270 SkNx(uint16_t val) : fVec(vdupq_n_u16(val)) {}
271 static SkNx Load(const void* ptr) { return vld1q_u16((const uint16_t*)ptr); }
273 SkNx(uint16_t a, uint16_t b, uint16_t c, uint16_t d,
280 SkNx operator + (const SkNx& o) const { return vaddq_u16(fVec, o.fVec); }
281 SkNx operator - (const SkNx& o) const { return vsubq_u16(fVec, o.fVec); }
282 SkNx operator * (const SkNx& o) const { return vmulq_u16(fVec, o.fVec); }
284 SkNx operator << (int bits) const { SHIFT16(vshlq_n_u16, fVec, bits); }
285 SkNx operator >> (int bits) const { SHIFT16(vshrq_n_u16, fVec, bits); }
287 static SkNx Min(const SkNx& a, const SkNx& b) { return vminq_u16(a.fVec, b.fVec); }
295 SkNx thenElse(const SkNx& t, const SkNx& e) const {
303 class SkNx<4, uint8_t> {
305 SkNx(const uint8x8_t& vec) : fVec(vec) {}
307 SkNx() {}
308 static SkNx Load(const void* ptr) {
321 class SkNx<16, uint8_t> {
323 SkNx(const uint8x16_t& vec) : fVec(vec) {}
325 SkNx() {}
326 SkNx(uint8_t val) : fVec(vdupq_n_u8(val)) {}
327 static SkNx Load(const void* ptr) { return vld1q_u8((const uint8_t*)ptr); }
329 SkNx(uint8_t a, uint8_t b, uint8_t c, uint8_t d,
338 SkNx saturatedAdd(const SkNx& o) const { return vqaddq_u8(fVec, o.fVec); }
340 SkNx operator + (const SkNx& o) const { return vaddq_u8(fVec, o.fVec); }
341 SkNx operator - (const SkNx& o) const { return vsubq_u8(fVec, o.fVec); }
343 static SkNx Min(const SkNx& a, const SkNx& b) { return vminq_u8(a.fVec, b.fVec); }
344 SkNx operator < (const SkNx& o) const { return vcltq_u8(fVec, o.fVec); }
352 SkNx thenElse(const SkNx& t, const SkNx& e) const {