HAL math interfaces: fastAtan2, magnitude, sqrt, invSqrt, log, exp
This commit is contained in:
@@ -155,80 +155,4 @@ template <typename R> std::ostream & operator<<(std::ostream & out, const Data<R
|
||||
return out;
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
|
||||
template <typename R> struct RegTrait;
|
||||
|
||||
template <> struct RegTrait<cv::v_uint8x16> {
|
||||
typedef cv::v_uint16x8 w_reg;
|
||||
typedef cv::v_uint32x4 q_reg;
|
||||
typedef cv::v_uint8x16 u_reg;
|
||||
static cv::v_uint8x16 zero() { return cv::v_setzero_u8(); }
|
||||
static cv::v_uint8x16 all(uchar val) { return cv::v_setall_u8(val); }
|
||||
};
|
||||
template <> struct RegTrait<cv::v_int8x16> {
|
||||
typedef cv::v_int16x8 w_reg;
|
||||
typedef cv::v_int32x4 q_reg;
|
||||
typedef cv::v_uint8x16 u_reg;
|
||||
static cv::v_int8x16 zero() { return cv::v_setzero_s8(); }
|
||||
static cv::v_int8x16 all(schar val) { return cv::v_setall_s8(val); }
|
||||
};
|
||||
|
||||
template <> struct RegTrait<cv::v_uint16x8> {
|
||||
typedef cv::v_uint32x4 w_reg;
|
||||
typedef cv::v_int16x8 int_reg;
|
||||
typedef cv::v_uint16x8 u_reg;
|
||||
static cv::v_uint16x8 zero() { return cv::v_setzero_u16(); }
|
||||
static cv::v_uint16x8 all(ushort val) { return cv::v_setall_u16(val); }
|
||||
};
|
||||
|
||||
template <> struct RegTrait<cv::v_int16x8> {
|
||||
typedef cv::v_int32x4 w_reg;
|
||||
typedef cv::v_uint16x8 u_reg;
|
||||
static cv::v_int16x8 zero() { return cv::v_setzero_s16(); }
|
||||
static cv::v_int16x8 all(short val) { return cv::v_setall_s16(val); }
|
||||
};
|
||||
|
||||
template <> struct RegTrait<cv::v_uint32x4> {
|
||||
typedef cv::v_uint64x2 w_reg;
|
||||
typedef cv::v_int32x4 int_reg;
|
||||
typedef cv::v_uint32x4 u_reg;
|
||||
static cv::v_uint32x4 zero() { return cv::v_setzero_u32(); }
|
||||
static cv::v_uint32x4 all(unsigned val) { return cv::v_setall_u32(val); }
|
||||
};
|
||||
|
||||
template <> struct RegTrait<cv::v_int32x4> {
|
||||
typedef cv::v_int64x2 w_reg;
|
||||
typedef cv::v_uint32x4 u_reg;
|
||||
static cv::v_int32x4 zero() { return cv::v_setzero_s32(); }
|
||||
static cv::v_int32x4 all(int val) { return cv::v_setall_s32(val); }
|
||||
};
|
||||
|
||||
template <> struct RegTrait<cv::v_uint64x2> {
|
||||
static cv::v_uint64x2 zero() { return cv::v_setzero_u64(); }
|
||||
static cv::v_uint64x2 all(uint64 val) { return cv::v_setall_u64(val); }
|
||||
};
|
||||
|
||||
template <> struct RegTrait<cv::v_int64x2> {
|
||||
static cv::v_int64x2 zero() { return cv::v_setzero_s64(); }
|
||||
static cv::v_int64x2 all(int64 val) { return cv::v_setall_s64(val); }
|
||||
};
|
||||
|
||||
template <> struct RegTrait<cv::v_float32x4> {
|
||||
typedef cv::v_int32x4 int_reg;
|
||||
typedef cv::v_float32x4 u_reg;
|
||||
static cv::v_float32x4 zero() { return cv::v_setzero_f32(); }
|
||||
static cv::v_float32x4 all(float val) { return cv::v_setall_f32(val); }
|
||||
};
|
||||
|
||||
#if CV_SIMD128_64F
|
||||
template <> struct RegTrait<cv::v_float64x2> {
|
||||
typedef cv::v_int32x4 int_reg;
|
||||
typedef cv::v_float64x2 u_reg;
|
||||
static cv::v_float64x2 zero() { return cv::v_setzero_f64(); }
|
||||
static cv::v_float64x2 all(double val) { return cv::v_setall_f64(val); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user