Lines Matching defs:vint4
177 // vint4 data type
183 struct vint4
188 ASTCENC_SIMD_INLINE vint4() = default;
196 ASTCENC_SIMD_INLINE explicit vint4(const int *p)
204 ASTCENC_SIMD_INLINE explicit vint4(const uint8_t *p)
217 ASTCENC_SIMD_INLINE explicit vint4(int a)
227 ASTCENC_SIMD_INLINE explicit vint4(int a, int b, int c, int d)
236 ASTCENC_SIMD_INLINE explicit vint4(int32x4_t a)
260 static ASTCENC_SIMD_INLINE vint4 zero()
262 return vint4(0);
268 static ASTCENC_SIMD_INLINE vint4 load1(const int* p)
270 return vint4(*p);
276 static ASTCENC_SIMD_INLINE vint4 load(const uint8_t* p)
278 vint4 data;
286 static ASTCENC_SIMD_INLINE vint4 loada(const int* p)
288 return vint4(p);
294 static ASTCENC_SIMD_INLINE vint4 lane_id()
297 return vint4(vld1q_s32(data));
424 // vint4 operators and functions
430 ASTCENC_SIMD_INLINE vint4 operator+(vint4 a, vint4 b)
432 return vint4(vaddq_s32(a.m, b.m));
438 ASTCENC_SIMD_INLINE vint4 operator-(vint4 a, vint4 b)
440 return vint4(vsubq_s32(a.m, b.m));
446 ASTCENC_SIMD_INLINE vint4 operator*(vint4 a, vint4 b)
448 return vint4(vmulq_s32(a.m, b.m));
454 ASTCENC_SIMD_INLINE vint4 operator~(vint4 a)
456 return vint4(vmvnq_s32(a.m));
462 ASTCENC_SIMD_INLINE vint4 operator|(vint4 a, vint4 b)
464 return vint4(vorrq_s32(a.m, b.m));
470 ASTCENC_SIMD_INLINE vint4 operator&(vint4 a, vint4 b)
472 return vint4(vandq_s32(a.m, b.m));
478 ASTCENC_SIMD_INLINE vint4 operator^(vint4 a, vint4 b)
480 return vint4(veorq_s32(a.m, b.m));
486 ASTCENC_SIMD_INLINE vmask4 operator==(vint4 a, vint4 b)
494 ASTCENC_SIMD_INLINE vmask4 operator!=(vint4 a, vint4 b)
502 ASTCENC_SIMD_INLINE vmask4 operator<(vint4 a, vint4 b)
510 ASTCENC_SIMD_INLINE vmask4 operator>(vint4 a, vint4 b)
518 template <int s> ASTCENC_SIMD_INLINE vint4 lsl(vint4 a)
520 return vint4(vshlq_s32(a.m, vdupq_n_s32(s)));
526 template <int s> ASTCENC_SIMD_INLINE vint4 lsr(vint4 a)
530 return vint4(vreinterpretq_s32_u32(ua));
536 template <int s> ASTCENC_SIMD_INLINE vint4 asr(vint4 a)
538 return vint4(vshlq_s32(a.m, vdupq_n_s32(-s)));
544 ASTCENC_SIMD_INLINE vint4 min(vint4 a, vint4 b)
546 return vint4(vminq_s32(a.m, b.m));
552 ASTCENC_SIMD_INLINE vint4 max(vint4 a, vint4 b)
554 return vint4(vmaxq_s32(a.m, b.m));
560 ASTCENC_SIMD_INLINE vint4 hmin(vint4 a)
562 return vint4(vminvq_s32(a.m));
568 ASTCENC_SIMD_INLINE vint4 hmax(vint4 a)
570 return vint4(vmaxvq_s32(a.m));
576 ASTCENC_SIMD_INLINE int hadd_s(vint4 a)
604 ASTCENC_SIMD_INLINE void storea(vint4 a, int* p)
612 ASTCENC_SIMD_INLINE void store(vint4 a, int* p)
620 ASTCENC_SIMD_INLINE void store(vint4 a, uint8_t* p)
628 ASTCENC_SIMD_INLINE void store_nbytes(vint4 a, uint8_t* p)
636 ASTCENC_SIMD_INLINE vint4 gatheri(const int* base, vint4 indices)
645 return vint4(vals);
651 ASTCENC_SIMD_INLINE vint4 pack_low_bytes(vint4 a)
655 return vint4(vreinterpretq_s32_s8(vqtbl1q_s8(av, idx)));
661 ASTCENC_SIMD_INLINE vint4 select(vint4 a, vint4 b, vmask4 cond)
663 return vint4(vbslq_s32(cond.m, b.m, a.m));
846 ASTCENC_SIMD_INLINE vfloat4 gatherf(const float* base, vint4 indices)
877 ASTCENC_SIMD_INLINE vint4 float_to_int(vfloat4 a)
879 return vint4(vcvtq_s32_f32(a.m));
885 ASTCENC_SIMD_INLINE vint4 float_to_int_rtn(vfloat4 a)
888 return vint4(vcvtq_s32_f32(a.m));
894 ASTCENC_SIMD_INLINE vfloat4 int_to_float(vint4 a)
902 ASTCENC_SIMD_INLINE vint4 float_to_float16(vfloat4 a)
910 return vint4(vreinterpretq_s32_u32(u32));
925 ASTCENC_SIMD_INLINE vfloat4 float16_to_float(vint4 a)
941 vint4 av(a);
952 ASTCENC_SIMD_INLINE vint4 float_as_int(vfloat4 a)
954 return vint4(vreinterpretq_s32_f32(a.m));
964 ASTCENC_SIMD_INLINE vfloat4 int_as_float(vint4 v)
972 ASTCENC_SIMD_INLINE void vtable_prepare(vint4 t0, vint4& t0p)
981 ASTCENC_SIMD_INLINE void vtable_prepare(vint4 t0, vint4 t1, vint4& t0p, vint4& t1p)
991 vint4 t0, vint4 t1, vint4 t2, vint4 t3,
992 vint4& t0p, vint4& t1p, vint4& t2p, vint4& t3p)
1003 ASTCENC_SIMD_INLINE vint4 vtable_8bt_32bi(vint4 t0, vint4 idx)
1013 return vint4(vreinterpretq_s32_s8(vqtbl1q_s8(table, idx_bytes)));
1019 ASTCENC_SIMD_INLINE vint4 vtable_8bt_32bi(vint4 t0, vint4 t1, vint4 idx)
1030 return vint4(vreinterpretq_s32_s8(vqtbl2q_s8(table, idx_bytes)));
1036 ASTCENC_SIMD_INLINE vint4 vtable_8bt_32bi(vint4 t0, vint4 t1, vint4 t2, vint4 t3, vint4 idx)
1049 return vint4(vreinterpretq_s32_s8(vqtbl4q_s8(table, idx_bytes)));
1060 ASTCENC_SIMD_INLINE vint4 interleave_rgba8(vint4 r, vint4 g, vint4 b, vint4 a)
1078 ASTCENC_SIMD_INLINE void store_lanes_masked(uint8_t* base, vint4 data, vmask4 mask)