Modules | |
Private implementation helpers | |
Classes | |
struct | cv::v_reg< _Tp, n > |
Macros | |
#define | CV__HAL_INTRIN_EXPAND_WITH_INTEGER_TYPES(macro_name, ...) |
#define | CV__HAL_INTRIN_EXPAND_WITH_FP_TYPES(macro_name, ...) |
#define | CV__HAL_INTRIN_EXPAND_WITH_ALL_TYPES(macro_name, ...) |
#define | CV__HAL_INTRIN_IMPL_BIN_OP_(_Tp, bin_op) |
#define | CV__HAL_INTRIN_IMPL_BIN_OP(bin_op) CV__HAL_INTRIN_EXPAND_WITH_ALL_TYPES(CV__HAL_INTRIN_IMPL_BIN_OP_, bin_op) |
#define | CV__HAL_INTRIN_IMPL_BIT_OP_(_Tp, bit_op) |
#define | CV__HAL_INTRIN_IMPL_BIT_OP(bit_op) |
#define | CV__HAL_INTRIN_IMPL_BITWISE_NOT_(_Tp, dummy) |
Typedefs | |
typedef v_reg< uchar, 16 > | cv::v_uint8x16 |
Sixteen 8-bit unsigned integer values. More... | |
typedef v_reg< schar, 16 > | cv::v_int8x16 |
Sixteen 8-bit signed integer values. More... | |
typedef v_reg< ushort, 8 > | cv::v_uint16x8 |
Eight 16-bit unsigned integer values. More... | |
typedef v_reg< short, 8 > | cv::v_int16x8 |
Eight 16-bit signed integer values. More... | |
typedef v_reg< unsigned, 4 > | cv::v_uint32x4 |
Four 32-bit unsigned integer values. More... | |
typedef v_reg< int, 4 > | cv::v_int32x4 |
Four 32-bit signed integer values. More... | |
typedef v_reg< float, 4 > | cv::v_float32x4 |
Four 32-bit floating point values (single precision) More... | |
typedef v_reg< double, 2 > | cv::v_float64x2 |
Two 64-bit floating point values (double precision) More... | |
typedef v_reg< uint64, 2 > | cv::v_uint64x2 |
Two 64-bit unsigned integer values. More... | |
typedef v_reg< int64, 2 > | cv::v_int64x2 |
Two 64-bit signed integer values. More... | |
Enumerations | |
enum | { cv::simd128_width = 16 , cv::simdmax_width = simd128_width } |
Functions | |
template<typename _Tp , int n> | |
CV_INLINE v_reg< _Tp, n > | cv::operator+ (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Add values. More... | |
template<typename _Tp , int n> | |
CV_INLINE v_reg< _Tp, n > & | cv::operator+= (v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
template<typename _Tp , int n> | |
CV_INLINE v_reg< _Tp, n > | cv::operator- (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Subtract values. More... | |
template<typename _Tp , int n> | |
CV_INLINE v_reg< _Tp, n > & | cv::operator-= (v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
template<typename _Tp , int n> | |
CV_INLINE v_reg< _Tp, n > | cv::operator* (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Multiply values. More... | |
template<typename _Tp , int n> | |
CV_INLINE v_reg< _Tp, n > & | cv::operator*= (v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
template<typename _Tp , int n> | |
CV_INLINE v_reg< _Tp, n > | cv::operator/ (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Divide values. More... | |
template<typename _Tp , int n> | |
CV_INLINE v_reg< _Tp, n > & | cv::operator/= (v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
template<typename _Tp , int n> | |
CV_INLINE v_reg< _Tp, n > | cv::operator& (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Bitwise AND. More... | |
template<typename _Tp , int n> | |
CV_INLINE v_reg< _Tp, n > & | cv::operator&= (v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
template<typename _Tp , int n> | |
CV_INLINE v_reg< _Tp, n > | cv::operator| (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Bitwise OR. More... | |
template<typename _Tp , int n> | |
CV_INLINE v_reg< _Tp, n > & | cv::operator|= (v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
template<typename _Tp , int n> | |
CV_INLINE v_reg< _Tp, n > | cv::operator^ (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Bitwise XOR. More... | |
template<typename _Tp , int n> | |
CV_INLINE v_reg< _Tp, n > & | cv::operator^= (v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
template<typename _Tp , int n> | |
CV_INLINE v_reg< _Tp, n > | cv::operator~ (const v_reg< _Tp, n > &a) |
Bitwise NOT. More... | |
template<typename _Tp , int n> | |
v_reg< typename V_TypeTraits< _Tp >::abs_type, n > | cv::v_popcount (const v_reg< _Tp, n > &a) |
Count the 1 bits in the vector lanes and return result as corresponding unsigned type. More... | |
template<int n> | |
v_reg< float, n > | cv::v_not_nan (const v_reg< float, n > &a) |
Less-than comparison. More... | |
template<int n> | |
v_reg< double, n > | cv::v_not_nan (const v_reg< double, n > &a) |
template<typename _Tp , int n> | |
v_reg< typename V_TypeTraits< _Tp >::abs_type, n > | cv::v_absdiff (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Add values without saturation. More... | |
template<int n> | |
v_reg< float, n > | cv::v_absdiff (const v_reg< float, n > &a, const v_reg< float, n > &b) |
template<int n> | |
v_reg< double, n > | cv::v_absdiff (const v_reg< double, n > &a, const v_reg< double, n > &b) |
template<typename _Tp , int n> | |
v_reg< _Tp, n > | cv::v_absdiffs (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Saturating absolute difference. More... | |
template<typename _Tp , int n> | |
v_reg< _Tp, n > | cv::v_invsqrt (const v_reg< _Tp, n > &a) |
Inversed square root. More... | |
template<typename _Tp , int n> | |
v_reg< _Tp, n > | cv::v_magnitude (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Magnitude. More... | |
template<typename _Tp , int n> | |
v_reg< _Tp, n > | cv::v_sqr_magnitude (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Square of the magnitude. More... | |
template<typename _Tp , int n> | |
v_reg< _Tp, n > | cv::v_fma (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b, const v_reg< _Tp, n > &c) |
Multiply and add. More... | |
template<typename _Tp , int n> | |
v_reg< _Tp, n > | cv::v_muladd (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b, const v_reg< _Tp, n > &c) |
A synonym for v_fma. More... | |
template<typename _Tp , int n> | |
v_reg< typename V_TypeTraits< _Tp >::w_type, n/2 > | cv::v_dotprod (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Dot product of elements. More... | |
template<typename _Tp , int n> | |
v_reg< typename V_TypeTraits< _Tp >::w_type, n/2 > | cv::v_dotprod (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b, const v_reg< typename V_TypeTraits< _Tp >::w_type, n/2 > &c) |
Dot product of elements. More... | |
template<typename _Tp , int n> | |
v_reg< typename V_TypeTraits< _Tp >::w_type, n/2 > | cv::v_dotprod_fast (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Fast Dot product of elements. More... | |
template<typename _Tp , int n> | |
v_reg< typename V_TypeTraits< _Tp >::w_type, n/2 > | cv::v_dotprod_fast (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b, const v_reg< typename V_TypeTraits< _Tp >::w_type, n/2 > &c) |
Fast Dot product of elements. More... | |
template<typename _Tp , int n> | |
v_reg< typename V_TypeTraits< _Tp >::q_type, n/4 > | cv::v_dotprod_expand (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Dot product of elements and expand. More... | |
template<typename _Tp , int n> | |
v_reg< typename V_TypeTraits< _Tp >::q_type, n/4 > | cv::v_dotprod_expand (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b, const v_reg< typename V_TypeTraits< _Tp >::q_type, n/4 > &c) |
Dot product of elements. More... | |
template<typename _Tp , int n> | |
v_reg< typename V_TypeTraits< _Tp >::q_type, n/4 > | cv::v_dotprod_expand_fast (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Fast Dot product of elements and expand. More... | |
template<typename _Tp , int n> | |
v_reg< typename V_TypeTraits< _Tp >::q_type, n/4 > | cv::v_dotprod_expand_fast (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b, const v_reg< typename V_TypeTraits< _Tp >::q_type, n/4 > &c) |
Fast Dot product of elements. More... | |
template<typename _Tp , int n> | |
void | cv::v_mul_expand (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b, v_reg< typename V_TypeTraits< _Tp >::w_type, n/2 > &c, v_reg< typename V_TypeTraits< _Tp >::w_type, n/2 > &d) |
Multiply and expand. More... | |
template<typename _Tp , int n> | |
v_reg< _Tp, n > | cv::v_mul_hi (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Multiply and extract high part. More... | |
template<typename _Tp , int n> | |
V_TypeTraits< _Tp >::sum_type | cv::v_reduce_sum (const v_reg< _Tp, n > &a) |
Element shift left among vector. More... | |
template<int n> | |
v_reg< float, n > | cv::v_reduce_sum4 (const v_reg< float, n > &a, const v_reg< float, n > &b, const v_reg< float, n > &c, const v_reg< float, n > &d) |
Sums all elements of each input vector, returns the vector of sums. More... | |
template<typename _Tp , int n> | |
V_TypeTraits< typename V_TypeTraits< _Tp >::abs_type >::sum_type | cv::v_reduce_sad (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Sum absolute differences of values. More... | |
template<typename _Tp , int n> | |
int | cv::v_signmask (const v_reg< _Tp, n > &a) |
Get negative values mask. More... | |
template<typename _Tp , int n> | |
int | cv::v_scan_forward (const v_reg< _Tp, n > &a) |
Get first negative lane index. More... | |
template<typename _Tp , int n> | |
bool | cv::v_check_all (const v_reg< _Tp, n > &a) |
Check if all packed values are less than zero. More... | |
template<typename _Tp , int n> | |
bool | cv::v_check_any (const v_reg< _Tp, n > &a) |
Check if any of packed values is less than zero. More... | |
template<typename _Tp , int n> | |
v_reg< _Tp, n > | cv::v_select (const v_reg< _Tp, n > &mask, const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Per-element select (blend operation) More... | |
template<typename _Tp , int n> | |
void | cv::v_expand (const v_reg< _Tp, n > &a, v_reg< typename V_TypeTraits< _Tp >::w_type, n/2 > &b0, v_reg< typename V_TypeTraits< _Tp >::w_type, n/2 > &b1) |
Expand values to the wider pack type. More... | |
template<typename _Tp , int n> | |
v_reg< typename V_TypeTraits< _Tp >::w_type, n/2 > | cv::v_expand_low (const v_reg< _Tp, n > &a) |
Expand lower values to the wider pack type. More... | |
template<typename _Tp , int n> | |
v_reg< typename V_TypeTraits< _Tp >::w_type, n/2 > | cv::v_expand_high (const v_reg< _Tp, n > &a) |
Expand higher values to the wider pack type. More... | |
template<typename _Tp , int n> | |
void | cv::v_zip (const v_reg< _Tp, n > &a0, const v_reg< _Tp, n > &a1, v_reg< _Tp, n > &b0, v_reg< _Tp, n > &b1) |
Interleave two vectors. More... | |
template<typename _Tp > | |
v_reg< _Tp, simd128_width/sizeof(_Tp)> | cv::v_load (const _Tp *ptr) |
Load register contents from memory. More... | |
template<typename _Tp > | |
v_reg< _Tp, simd128_width/sizeof(_Tp)> | cv::v_load_aligned (const _Tp *ptr) |
Load register contents from memory (aligned) More... | |
template<typename _Tp > | |
v_reg< _Tp, simd128_width/sizeof(_Tp)> | cv::v_load_low (const _Tp *ptr) |
Load 64-bits of data to lower part (high part is undefined). More... | |
template<typename _Tp > | |
v_reg< _Tp, simd128_width/sizeof(_Tp)> | cv::v_load_halves (const _Tp *loptr, const _Tp *hiptr) |
Load register contents from two memory blocks. More... | |
template<typename _Tp > | |
v_reg< typename V_TypeTraits< _Tp >::w_type, simd128_width/sizeof(typename V_TypeTraits< _Tp >::w_type)> | cv::v_load_expand (const _Tp *ptr) |
Load register contents from memory with double expand. More... | |
template<typename _Tp > | |
v_reg< typename V_TypeTraits< _Tp >::q_type, simd128_width/sizeof(typename V_TypeTraits< _Tp >::q_type)> | cv::v_load_expand_q (const _Tp *ptr) |
Load register contents from memory with quad expand. More... | |
template<typename _Tp , int n> | |
void | cv::v_load_deinterleave (const _Tp *ptr, v_reg< _Tp, n > &a, v_reg< _Tp, n > &b) |
Load and deinterleave (2 channels) More... | |
template<typename _Tp , int n> | |
void | cv::v_load_deinterleave (const _Tp *ptr, v_reg< _Tp, n > &a, v_reg< _Tp, n > &b, v_reg< _Tp, n > &c) |
Load and deinterleave (3 channels) More... | |
template<typename _Tp , int n> | |
void | cv::v_load_deinterleave (const _Tp *ptr, v_reg< _Tp, n > &a, v_reg< _Tp, n > &b, v_reg< _Tp, n > &c, v_reg< _Tp, n > &d) |
Load and deinterleave (4 channels) More... | |
template<typename _Tp , int n> | |
void | cv::v_store_interleave (_Tp *ptr, const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b, hal::StoreMode=hal::STORE_UNALIGNED) |
Interleave and store (2 channels) More... | |
template<typename _Tp , int n> | |
void | cv::v_store_interleave (_Tp *ptr, const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b, const v_reg< _Tp, n > &c, hal::StoreMode=hal::STORE_UNALIGNED) |
Interleave and store (3 channels) More... | |
template<typename _Tp , int n> | |
void | cv::v_store_interleave (_Tp *ptr, const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b, const v_reg< _Tp, n > &c, const v_reg< _Tp, n > &d, hal::StoreMode=hal::STORE_UNALIGNED) |
Interleave and store (4 channels) More... | |
template<typename _Tp , int n> | |
void | cv::v_store (_Tp *ptr, const v_reg< _Tp, n > &a) |
Store data to memory. More... | |
template<typename _Tp , int n> | |
void | cv::v_store (_Tp *ptr, const v_reg< _Tp, n > &a, hal::StoreMode) |
template<typename _Tp , int n> | |
void | cv::v_store_low (_Tp *ptr, const v_reg< _Tp, n > &a) |
Store data to memory (lower half) More... | |
template<typename _Tp , int n> | |
void | cv::v_store_high (_Tp *ptr, const v_reg< _Tp, n > &a) |
Store data to memory (higher half) More... | |
template<typename _Tp , int n> | |
void | cv::v_store_aligned (_Tp *ptr, const v_reg< _Tp, n > &a) |
Store data to memory (aligned) More... | |
template<typename _Tp , int n> | |
void | cv::v_store_aligned_nocache (_Tp *ptr, const v_reg< _Tp, n > &a) |
template<typename _Tp , int n> | |
void | cv::v_store_aligned (_Tp *ptr, const v_reg< _Tp, n > &a, hal::StoreMode) |
template<typename _Tp , int n> | |
v_reg< _Tp, n > | cv::v_combine_low (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Combine vector from first elements of two vectors. More... | |
template<typename _Tp , int n> | |
v_reg< _Tp, n > | cv::v_combine_high (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Combine vector from last elements of two vectors. More... | |
template<typename _Tp , int n> | |
void | cv::v_recombine (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b, v_reg< _Tp, n > &low, v_reg< _Tp, n > &high) |
Combine two vectors from lower and higher parts of two other vectors. More... | |
template<typename _Tp , int n> | |
v_reg< _Tp, n > | cv::v_reverse (const v_reg< _Tp, n > &a) |
Vector reverse order. More... | |
template<int s, typename _Tp , int n> | |
v_reg< _Tp, n > | cv::v_extract (const v_reg< _Tp, n > &a, const v_reg< _Tp, n > &b) |
Vector extract. More... | |
template<int s, typename _Tp , int n> | |
_Tp | cv::v_extract_n (const v_reg< _Tp, n > &v) |
Vector extract. More... | |
template<int i, typename _Tp , int n> | |
v_reg< _Tp, n > | cv::v_broadcast_element (const v_reg< _Tp, n > &a) |
Broadcast i-th element of vector. More... | |
template<int n> | |
v_reg< int, n > | cv::v_round (const v_reg< float, n > &a) |
Round elements. More... | |
template<int n> | |
v_reg< int, n *2 > | cv::v_round (const v_reg< double, n > &a, const v_reg< double, n > &b) |
template<int n> | |
v_reg< int, n > | cv::v_floor (const v_reg< float, n > &a) |
Floor elements. More... | |
template<int n> | |
v_reg< int, n > | cv::v_ceil (const v_reg< float, n > &a) |
Ceil elements. More... | |
template<int n> | |
v_reg< int, n > | cv::v_trunc (const v_reg< float, n > &a) |
Truncate elements. More... | |
template<int n> | |
v_reg< int, n *2 > | cv::v_round (const v_reg< double, n > &a) |
template<int n> | |
v_reg< int, n *2 > | cv::v_floor (const v_reg< double, n > &a) |
template<int n> | |
v_reg< int, n *2 > | cv::v_ceil (const v_reg< double, n > &a) |
template<int n> | |
v_reg< int, n *2 > | cv::v_trunc (const v_reg< double, n > &a) |
template<int n> | |
v_reg< float, n > | cv::v_cvt_f32 (const v_reg< int, n > &a) |
Convert to float. More... | |
template<int n> | |
v_reg< float, n *2 > | cv::v_cvt_f32 (const v_reg< double, n > &a) |
Convert lower half to float. More... | |
template<int n> | |
v_reg< float, n *2 > | cv::v_cvt_f32 (const v_reg< double, n > &a, const v_reg< double, n > &b) |
Convert to float. More... | |
template<int n> | |
CV_INLINE v_reg< double, n/2 > | cv::v_cvt_f64 (const v_reg< int, n > &a) |
Convert lower half to double. More... | |
template<int n> | |
CV_INLINE v_reg< double,(n/2)> | cv::v_cvt_f64_high (const v_reg< int, n > &a) |
Convert to double high part of vector. More... | |
template<int n> | |
CV_INLINE v_reg< double,(n/2)> | cv::v_cvt_f64 (const v_reg< float, n > &a) |
Convert lower half to double. More... | |
template<int n> | |
CV_INLINE v_reg< double,(n/2)> | cv::v_cvt_f64_high (const v_reg< float, n > &a) |
Convert to double high part of vector. More... | |
template<int n> | |
CV_INLINE v_reg< double, n > | cv::v_cvt_f64 (const v_reg< int64, n > &a) |
Convert to double. More... | |
template<typename _Tp > | |
v_reg< _Tp, simd128_width/sizeof(_Tp)> | cv::v_lut (const _Tp *tab, const int *idx) |
template<typename _Tp > | |
v_reg< _Tp, simd128_width/sizeof(_Tp)> | cv::v_lut_pairs (const _Tp *tab, const int *idx) |
template<typename _Tp > | |
v_reg< _Tp, simd128_width/sizeof(_Tp)> | cv::v_lut_quads (const _Tp *tab, const int *idx) |
template<int n> | |
v_reg< int, n > | cv::v_lut (const int *tab, const v_reg< int, n > &idx) |
template<int n> | |
v_reg< unsigned, n > | cv::v_lut (const unsigned *tab, const v_reg< int, n > &idx) |
template<int n> | |
v_reg< float, n > | cv::v_lut (const float *tab, const v_reg< int, n > &idx) |
template<int n> | |
v_reg< double, n/2 > | cv::v_lut (const double *tab, const v_reg< int, n > &idx) |
template<int n> | |
void | cv::v_lut_deinterleave (const float *tab, const v_reg< int, n > &idx, v_reg< float, n > &x, v_reg< float, n > &y) |
template<int n> | |
void | cv::v_lut_deinterleave (const double *tab, const v_reg< int, n *2 > &idx, v_reg< double, n > &x, v_reg< double, n > &y) |
template<typename _Tp , int n> | |
v_reg< _Tp, n > | cv::v_interleave_pairs (const v_reg< _Tp, n > &vec) |
template<typename _Tp , int n> | |
v_reg< _Tp, n > | cv::v_interleave_quads (const v_reg< _Tp, n > &vec) |
template<typename _Tp , int n> | |
v_reg< _Tp, n > | cv::v_pack_triplets (const v_reg< _Tp, n > &vec) |
template<typename _Tp , int n> | |
void | cv::v_transpose4x4 (v_reg< _Tp, n > &a0, const v_reg< _Tp, n > &a1, const v_reg< _Tp, n > &a2, const v_reg< _Tp, n > &a3, v_reg< _Tp, n > &b0, v_reg< _Tp, n > &b1, v_reg< _Tp, n > &b2, v_reg< _Tp, n > &b3) |
Transpose 4x4 matrix. More... | |
template<int n> | |
v_reg< float, n > | cv::v_matmul (const v_reg< float, n > &v, const v_reg< float, n > &a, const v_reg< float, n > &b, const v_reg< float, n > &c, const v_reg< float, n > &d) |
Matrix multiplication. More... | |
template<int n> | |
v_reg< float, n > | cv::v_matmuladd (const v_reg< float, n > &v, const v_reg< float, n > &a, const v_reg< float, n > &b, const v_reg< float, n > &c, const v_reg< float, n > &d) |
Matrix multiplication and add. More... | |
template<int n> | |
v_reg< double, n/2 > | cv::v_dotprod_expand (const v_reg< int, n > &a, const v_reg< int, n > &b) |
template<int n> | |
v_reg< double, n/2 > | cv::v_dotprod_expand (const v_reg< int, n > &a, const v_reg< int, n > &b, const v_reg< double, n/2 > &c) |
template<int n> | |
v_reg< double, n/2 > | cv::v_dotprod_expand_fast (const v_reg< int, n > &a, const v_reg< int, n > &b) |
template<int n> | |
v_reg< double, n/2 > | cv::v_dotprod_expand_fast (const v_reg< int, n > &a, const v_reg< int, n > &b, const v_reg< double, n/2 > &c) |
v_reg< float, simd128_width/sizeof(float)> | cv::v_load_expand (const hfloat *ptr) |
template<int n> | |
void | cv::v_pack_store (hfloat *ptr, const v_reg< float, n > &v) |
void | cv::v_cleanup () |
Pack boolean values | |
Pack boolean values from multiple vectors to one unsigned 8-bit integer vector
| |
template<int n> | |
v_reg< uchar, 2 *n > | cv::v_pack_b (const v_reg< ushort, n > &a, const v_reg< ushort, n > &b) |
! For 16-bit boolean values More... | |
template<int n> | |
v_reg< uchar, 4 *n > | cv::v_pack_b (const v_reg< unsigned, n > &a, const v_reg< unsigned, n > &b, const v_reg< unsigned, n > &c, const v_reg< unsigned, n > &d) |
template<int n> | |
v_reg< uchar, 8 *n > | cv::v_pack_b (const v_reg< uint64, n > &a, const v_reg< uint64, n > &b, const v_reg< uint64, n > &c, const v_reg< uint64, n > &d, const v_reg< uint64, n > &e, const v_reg< uint64, n > &f, const v_reg< uint64, n > &g, const v_reg< uint64, n > &h) |
"Universal intrinsics" is a types and functions set intended to simplify vectorization of code on different platforms. Currently a few different SIMD extensions on different architectures are supported. 128 bit registers of various types support is implemented for a wide range of architectures including x86(SSE/SSE2/SSE4.2), ARM(NEON), PowerPC(VSX), MIPS(MSA). 256 bit long registers are supported on x86(AVX2) and 512 bit long registers are supported on x86(AVX512). In case when there is no SIMD extension available during compilation, fallback C++ implementation of intrinsics will be chosen and code will work as expected although it could be slower.
There are several types representing packed values vector registers, each type is implemented as a structure based on a one SIMD register.
Exact bit length(and value quantity) of listed types is compile time deduced and depends on architecture SIMD capabilities chosen as available during compilation of the library. All the types contains nlanes enumeration to check for exact value quantity of the type.
In case the exact bit length of the type is important it is possible to use specific fixed length register types.
There are several types representing 128-bit registers.
There are several types representing 256-bit registers.
There are several types representing 512-bit registers.
These operations allow to set contents of the register explicitly or by loading it from some memory block and to save contents of the register to memory block.
There are variable size register load operations that provide result of maximum available size depending on chosen platform capabilities.
Also there are fixed size register load/store operations.
For 128 bit registers
For 256 bit registers(check CV_SIMD256 preprocessor definition)
For 512 bit registers(check CV_SIMD512 preprocessor definition)
Store to memory operations are similar across different platform capabilities: v_store, v_store_aligned, v_store_high, v_store_low
These operations allow to reorder or recombine elements in one or multiple vectors.
Element-wise binary and unary operations.
Most of these operations return only one value.
Different type conversions and casts:
In these operations vectors represent matrix rows/columns: v_dotprod, v_dotprod_fast, v_dotprod_expand, v_dotprod_expand_fast, v_matmul, v_transpose4x4
Most operations are implemented only for some subset of the available types, following matrices shows the applicability of different operations to the types.
Regular integers:
Operations\Types | uint 8 | int 8 | uint 16 | int 16 | uint 32 | int 32 |
---|---|---|---|---|---|---|
load, store | x | x | x | x | x | x |
interleave | x | x | x | x | x | x |
expand | x | x | x | x | x | x |
expand_low | x | x | x | x | x | x |
expand_high | x | x | x | x | x | x |
expand_q | x | x | ||||
add, sub | x | x | x | x | x | x |
add_wrap, sub_wrap | x | x | x | x | ||
mul_wrap | x | x | x | x | ||
mul | x | x | x | x | x | x |
mul_expand | x | x | x | x | x | |
compare | x | x | x | x | x | x |
shift | x | x | x | x | ||
dotprod | x | x | ||||
dotprod_fast | x | x | ||||
dotprod_expand | x | x | x | x | x | |
dotprod_expand_fast | x | x | x | x | x | |
logical | x | x | x | x | x | x |
min, max | x | x | x | x | x | x |
absdiff | x | x | x | x | x | x |
absdiffs | x | x | ||||
reduce | x | x | x | x | x | x |
mask | x | x | x | x | x | x |
pack | x | x | x | x | x | x |
pack_u | x | x | ||||
pack_b | x | |||||
unpack | x | x | x | x | x | x |
extract | x | x | x | x | x | x |
rotate (lanes) | x | x | x | x | x | x |
cvt_flt32 | x | |||||
cvt_flt64 | x | |||||
transpose4x4 | x | x | ||||
reverse | x | x | x | x | x | x |
extract_n | x | x | x | x | x | x |
broadcast_element | x | x |
Big integers:
Operations\Types | uint 64 | int 64 |
---|---|---|
load, store | x | x |
add, sub | x | x |
shift | x | x |
logical | x | x |
reverse | x | x |
extract | x | x |
rotate (lanes) | x | x |
cvt_flt64 | x | |
extract_n | x | x |
Floating point:
Operations\Types | float 32 | float 64 |
---|---|---|
load, store | x | x |
interleave | x | |
add, sub | x | x |
mul | x | x |
div | x | x |
compare | x | x |
min, max | x | x |
absdiff | x | x |
reduce | x | |
mask | x | x |
unpack | x | x |
cvt_flt32 | x | |
cvt_flt64 | x | |
sqrt, abs | x | x |
float math | x | x |
transpose4x4 | x | |
extract | x | x |
rotate (lanes) | x | x |
reverse | x | x |
extract_n | x | x |
broadcast_element | x |
#define CV__HAL_INTRIN_EXPAND_WITH_ALL_TYPES | ( | macro_name, | |
... | |||
) |
#define CV__HAL_INTRIN_EXPAND_WITH_FP_TYPES | ( | macro_name, | |
... | |||
) |
#define CV__HAL_INTRIN_EXPAND_WITH_INTEGER_TYPES | ( | macro_name, | |
... | |||
) |
#define CV__HAL_INTRIN_IMPL_BIN_OP | ( | bin_op | ) | CV__HAL_INTRIN_EXPAND_WITH_ALL_TYPES(CV__HAL_INTRIN_IMPL_BIN_OP_, bin_op) |
#define CV__HAL_INTRIN_IMPL_BIN_OP_ | ( | _Tp, | |
bin_op | |||
) |
#define CV__HAL_INTRIN_IMPL_BIT_OP | ( | bit_op | ) |
#define CV__HAL_INTRIN_IMPL_BIT_OP_ | ( | _Tp, | |
bit_op | |||
) |
#define CV__HAL_INTRIN_IMPL_BITWISE_NOT_ | ( | _Tp, | |
dummy | |||
) |
typedef v_reg<float, 4> cv::v_float32x4 |
Four 32-bit floating point values (single precision)
typedef v_reg<double, 2> cv::v_float64x2 |
Two 64-bit floating point values (double precision)
typedef v_reg<short, 8> cv::v_int16x8 |
Eight 16-bit signed integer values.
typedef v_reg<int, 4> cv::v_int32x4 |
Four 32-bit signed integer values.
typedef v_reg<int64, 2> cv::v_int64x2 |
Two 64-bit signed integer values.
typedef v_reg<schar, 16> cv::v_int8x16 |
Sixteen 8-bit signed integer values.
typedef v_reg<ushort, 8> cv::v_uint16x8 |
Eight 16-bit unsigned integer values.
typedef v_reg<unsigned, 4> cv::v_uint32x4 |
Four 32-bit unsigned integer values.
typedef v_reg<uint64, 2> cv::v_uint64x2 |
Two 64-bit unsigned integer values.
typedef v_reg<uchar, 16> cv::v_uint8x16 |
Sixteen 8-bit unsigned integer values.
CV_INLINE v_reg<_Tp, n> cv::operator& | ( | const v_reg< _Tp, n > & | a, |
const v_reg< _Tp, n > & | b | ||
) |
Bitwise AND.
Only for integer types.
CV_INLINE v_reg<_Tp, n>& cv::operator&= | ( | v_reg< _Tp, n > & | a, |
const v_reg< _Tp, n > & | b | ||
) |
CV_INLINE v_reg<_Tp, n> cv::operator* | ( | const v_reg< _Tp, n > & | a, |
const v_reg< _Tp, n > & | b | ||
) |
Multiply values.
For 16- and 32-bit integer types and floating types.
CV_INLINE v_reg<_Tp, n>& cv::operator*= | ( | v_reg< _Tp, n > & | a, |
const v_reg< _Tp, n > & | b | ||
) |
CV_INLINE v_reg<_Tp, n> cv::operator+ | ( | const v_reg< _Tp, n > & | a, |
const v_reg< _Tp, n > & | b | ||
) |
Add values.
For all types.
CV_INLINE v_reg<_Tp, n>& cv::operator+= | ( | v_reg< _Tp, n > & | a, |
const v_reg< _Tp, n > & | b | ||
) |
CV_INLINE v_reg<_Tp, n> cv::operator- | ( | const v_reg< _Tp, n > & | a, |
const v_reg< _Tp, n > & | b | ||
) |
Subtract values.
For all types.
CV_INLINE v_reg<_Tp, n>& cv::operator-= | ( | v_reg< _Tp, n > & | a, |
const v_reg< _Tp, n > & | b | ||
) |
CV_INLINE v_reg<_Tp, n> cv::operator/ | ( | const v_reg< _Tp, n > & | a, |
const v_reg< _Tp, n > & | b | ||
) |
Divide values.
For floating types only.
CV_INLINE v_reg<_Tp, n>& cv::operator/= | ( | v_reg< _Tp, n > & | a, |
const v_reg< _Tp, n > & | b | ||
) |
CV_INLINE v_reg<_Tp, n> cv::operator^ | ( | const v_reg< _Tp, n > & | a, |
const v_reg< _Tp, n > & | b | ||
) |
Bitwise XOR.
Only for integer types.
CV_INLINE v_reg<_Tp, n>& cv::operator^= | ( | v_reg< _Tp, n > & | a, |
const v_reg< _Tp, n > & | b | ||
) |
CV_INLINE v_reg<_Tp, n> cv::operator| | ( | const v_reg< _Tp, n > & | a, |
const v_reg< _Tp, n > & | b | ||
) |
Bitwise OR.
Only for integer types.
CV_INLINE v_reg<_Tp, n>& cv::operator|= | ( | v_reg< _Tp, n > & | a, |
const v_reg< _Tp, n > & | b | ||
) |
Bitwise NOT.
Only for integer types.
|
inline |
Add values without saturation.
For 8- and 16-bit integer values.
Subtract values without saturation
For 8- and 16-bit integer values.
Multiply values without saturation
For 8- and 16-bit integer values.
Absolute difference
Returns converted to corresponding unsigned type. Example:
For 8-, 16-, 32-bit integer source types.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
For 64-bit floating point values
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
For 32-bit floating point values
|
inline |
Saturating absolute difference.
Returns . For 8-, 16-bit signed integer source types.
|
inline |
Broadcast i-th element of vector.
Scheme:
Restriction: 0 <= i < nlanes Supported types: 32-bit integers and floats (s32/u32/f32)
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Ceil elements.
Ceil each value. Input type is float vector ==> output type is int vector.
|
inline |
Check if all packed values are less than zero.
Unsigned values will be casted to signed: uchar 254 => char -2
.
|
inline |
Check if any of packed values is less than zero.
Unsigned values will be casted to signed: uchar 254 => char -2
.
|
inline |
|
inline |
Combine vector from last elements of two vectors.
Scheme:
For all types except 64-bit.
|
inline |
Combine vector from first elements of two vectors.
Scheme:
For all types except 64-bit.
Convert lower half to float.
Supported input type is cv::v_float64.
|
inline |
Convert to float.
Supported input type is cv::v_float64.
Convert to float.
Supported input type is cv::v_int32.
Convert lower half to double.
Supported input type is cv::v_float32.
Convert lower half to double.
Supported input type is cv::v_int32.
Convert to double.
Supported input type is cv::v_int64.
Convert to double high part of vector.
Supported input type is cv::v_float32.
Convert to double high part of vector.
Supported input type is cv::v_int32.
|
inline |
|
inline |
Dot product of elements.
Same as cv::v_dotprod, but add a third element to the sum of adjacent pairs. Scheme:
|
inline |
Dot product of elements and expand.
Multiply values in two registers and expand the sum of adjacent result pairs.
Scheme:
|
inline |
Dot product of elements.
Same as cv::v_dotprod_expand, but add a third element to the sum of adjacent pairs. Scheme:
|
inline |
|
inline |
|
inline |
Fast Dot product of elements and expand.
Multiply values in two registers and expand the sum of adjacent result pairs.
Same as cv::v_dotprod_expand, but it may perform unorder sum between result pairs in some platforms, this intrinsic can be used if the sum among all lanes is only matters and also it should be yielding better performance on the affected platforms.
|
inline |
Fast Dot product of elements.
Same as cv::v_dotprod_expand_fast, but add a third element to the sum of adjacent pairs.
|
inline |
|
inline |
|
inline |
Fast Dot product of elements.
Same as cv::v_dotprod, but it may perform unorder sum between result pairs in some platforms, this intrinsic can be used if the sum among all lanes is only matters and also it should be yielding better performance on the affected platforms.
|
inline |
Fast Dot product of elements.
Same as cv::v_dotprod_fast, but add a third element to the sum of adjacent pairs.
|
inline |
|
inline |
Expand higher values to the wider pack type.
Same as cv::v_expand_low, but expand higher half of the vector instead.
Scheme:
|
inline |
Expand lower values to the wider pack type.
Same as cv::v_expand, but return lower half of the vector.
Scheme:
|
inline |
Vector extract.
Scheme:
Restriction: 0 <= shift < nlanes
Usage:
For all types.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Floor elements.
Floor each value. Input type is float vector ==> output type is int vector.
|
inline |
Multiply and add.
Returns For floating point types and signed 32bit int only.
|
inline |
|
inline |
Inversed square root.
Returns For floating point types only.
|
inline |
Load register contents from memory.
ptr | pointer to memory block with data |
sizeof(lane type)
should be enough). Do not cast pointer types without runtime check for pointer alignment (like uchar*
=> int*
).
|
inline |
Load register contents from memory (aligned)
similar to cv::v_load, but source memory block should be aligned (to 16-byte boundary in case of SIMD128, 32-byte - SIMD256, etc)
|
inline |
Load and deinterleave (2 channels)
Load data from memory deinterleave and store to 2 registers. Scheme:
For all types except 64-bit.
|
inline |
Load and deinterleave (3 channels)
Load data from memory deinterleave and store to 3 registers. Scheme:
For all types except 64-bit.
|
inline |
Load and deinterleave (4 channels)
Load data from memory deinterleave and store to 4 registers. Scheme:
For all types except 64-bit.
|
inline |
Load register contents from memory with double expand.
Same as cv::v_load, but result pack type will be 2x wider than memory type.
For 8-, 16-, 32-bit integer source types.
|
inline |
|
inline |
Load register contents from memory with quad expand.
Same as cv::v_load_expand, but result type is 4 times wider than source.
For 8-bit integer source types.
|
inline |
Load register contents from two memory blocks.
loptr | memory block containing data for first half (0..n/2) |
hiptr | memory block containing data for second half (n/2..n) |
|
inline |
Load 64-bits of data to lower part (high part is undefined).
ptr | memory block containing data for first half (0..n/2) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Magnitude.
Returns For floating point types only.
|
inline |
Matrix multiplication.
Scheme:
|
inline |
Matrix multiplication and add.
Scheme:
|
inline |
Multiply and expand.
Multiply values two registers and store results in two registers with wider pack type. Scheme:
Example:
Implemented only for 16- and unsigned 32-bit source types (v_int16x8, v_uint16x8, v_uint32x4).
|
inline |
Multiply and extract high part.
Multiply values two registers and store high part of the results. Implemented only for 16-bit source types (v_int16x8, v_uint16x8). Returns
|
inline |
A synonym for v_fma.
Less-than comparison.
For all types except 64-bit integer values.
Greater-than comparison
For all types except 64-bit integer values.
Less-than or equal comparison
For all types except 64-bit integer values.
Greater-than or equal comparison
For all types except 64-bit integer values.
Equal comparison
Not equal comparison
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. For 64-bit boolean values
Scheme:
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. For 32-bit boolean values
Scheme:
|
inline |
! For 16-bit boolean values
Scheme:
|
inline |
|
inline |
|
inline |
Count the 1 bits in the vector lanes and return result as corresponding unsigned type.
Scheme:
For all integer types.
|
inline |
Combine two vectors from lower and higher parts of two other vectors.
|
inline |
|
inline |
Element shift left among vector.
For all type
Element shift right among vector
For all type
Sum packed values
Scheme:
Vector reverse order.
Reverse the order of the vector Scheme:
For all types.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Round elements.
Rounds each value. Input type is float vector ==> output type is int vector.
|
inline |
|
inline |
Per-element select (blend operation)
Return value will be built by combining values a and b using the following scheme: result[i] = mask[i] ? a[i] : b[i];
|
inline |
Get negative values mask.
Returned value is a bit mask with bits set to 1 on places corresponding to negative packed values indexes. Example:
|
inline |
Square of the magnitude.
Returns For floating point types only.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Store data to memory (higher half)
Store higher half of register contents to memory. Scheme:
|
inline |
Interleave and store (4 channels)
Interleave and store data from 4 registers to memory. Scheme:
For all types except 64-bit.
|
inline |
Interleave and store (3 channels)
Interleave and store data from 3 registers to memory. Scheme:
For all types except 64-bit.
|
inline |
Interleave and store (2 channels)
Interleave and store data from 2 registers to memory. Scheme:
For all types except 64-bit.
|
inline |
|
inline |
Transpose 4x4 matrix.
Scheme:
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Truncate elements.
Truncate each value. Input type is float vector ==> output type is int vector.