OpenCV  3.1.0
Open Source Computer Vision
Macros

Macros

#define OPENCV_HAL_IMPL_ADD_SUB_OP(func, bin_op, cast_op, _Tp2)
 Helper macro. More...
 
#define OPENCV_HAL_IMPL_BIN_OP(bin_op)
 Helper macro. More...
 
#define OPENCV_HAL_IMPL_BIT_OP(bit_op)
 Helper macro. More...
 
#define OPENCV_HAL_IMPL_C_INIT_VAL(_Tpvec, _Tp, suffix)   inline _Tpvec v_setall_##suffix(_Tp val) { return _Tpvec::all(val); }
 Helper macro. More...
 
#define OPENCV_HAL_IMPL_C_INIT_ZERO(_Tpvec, _Tp, suffix)   inline _Tpvec v_setzero_##suffix() { return _Tpvec::zero(); }
 Helper macro. More...
 
#define OPENCV_HAL_IMPL_C_PACK(_Tpvec, _Tpnvec, _Tpn, pack_suffix)
 Helper macro. More...
 
#define OPENCV_HAL_IMPL_C_PACK_STORE(_Tpvec, _Tp, _Tpnvec, _Tpn, pack_suffix)
 Helper macro. More...
 
#define OPENCV_HAL_IMPL_C_REINTERPRET(_Tpvec, _Tp, suffix)
 Helper macro. More...
 
#define OPENCV_HAL_IMPL_C_RSHIFTR(_Tpvec, _Tp)
 Helper macro. More...
 
#define OPENCV_HAL_IMPL_C_RSHR_PACK(_Tpvec, _Tp, _Tpnvec, _Tpn, pack_suffix)
 Helper macro. More...
 
#define OPENCV_HAL_IMPL_C_RSHR_PACK_STORE(_Tpvec, _Tp, _Tpnvec, _Tpn, pack_suffix)
 Helper macro. More...
 
#define OPENCV_HAL_IMPL_C_SHIFTL(_Tpvec, _Tp)
 Helper macro. More...
 
#define OPENCV_HAL_IMPL_C_SHIFTR(_Tpvec, _Tp)
 Helper macro. More...
 
#define OPENCV_HAL_IMPL_CMP_OP(cmp_op)
 Helper macro. More...
 
#define OPENCV_HAL_IMPL_MATH_FUNC(func, cfunc, _Tp2)
 Helper macro. More...
 
#define OPENCV_HAL_IMPL_MINMAX_FUNC(func, cfunc)
 Helper macro. More...
 
#define OPENCV_HAL_IMPL_REDUCE_MINMAX_FUNC(func, cfunc)
 Helper macro. More...
 
#define OPENCV_HAL_IMPL_SHIFT_OP(shift_op)
 Helper macro. More...
 

Detailed Description

Macro Definition Documentation

#define OPENCV_HAL_IMPL_ADD_SUB_OP (   func,
  bin_op,
  cast_op,
  _Tp2 
)
Value:
template<typename _Tp, int n> \
inline v_reg<_Tp2, n> func(const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b) \
{ \
typedef _Tp2 rtype; \
v_reg<rtype, n> c; \
for( int i = 0; i < n; i++ ) \
c.s[i] = cast_op(a.s[i] bin_op b.s[i]); \
return c; \
}
for i
Definition: modelConvert.m:63

Helper macro.

#define OPENCV_HAL_IMPL_BIN_OP (   bin_op)
Value:
template<typename _Tp, int n> inline v_reg<_Tp, n> \
operator bin_op (const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b) \
{ \
v_reg<_Tp, n> c; \
for( int i = 0; i < n; i++ ) \
c.s[i] = saturate_cast<_Tp>(a.s[i] bin_op b.s[i]); \
return c; \
} \
template<typename _Tp, int n> inline v_reg<_Tp, n>& \
operator bin_op##= (v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b) \
{ \
for( int i = 0; i < n; i++ ) \
a.s[i] = saturate_cast<_Tp>(a.s[i] bin_op b.s[i]); \
return a; \
}
for i
Definition: modelConvert.m:63

Helper macro.

#define OPENCV_HAL_IMPL_BIT_OP (   bit_op)
Value:
template<typename _Tp, int n> inline v_reg<_Tp, n> operator bit_op \
(const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b) \
{ \
v_reg<_Tp, n> c; \
typedef typename V_TypeTraits<_Tp>::int_type itype; \
for( int i = 0; i < n; i++ ) \
c.s[i] = V_TypeTraits<_Tp>::reinterpret_from_int((itype)(V_TypeTraits<_Tp>::reinterpret_int(a.s[i]) bit_op \
V_TypeTraits<_Tp>::reinterpret_int(b.s[i]))); \
return c; \
} \
template<typename _Tp, int n> inline v_reg<_Tp, n>& operator \
bit_op##= (v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b) \
{ \
typedef typename V_TypeTraits<_Tp>::int_type itype; \
for( int i = 0; i < n; i++ ) \
a.s[i] = V_TypeTraits<_Tp>::reinterpret_from_int((itype)(V_TypeTraits<_Tp>::reinterpret_int(a.s[i]) bit_op \
V_TypeTraits<_Tp>::reinterpret_int(b.s[i]))); \
return a; \
}
for i
Definition: modelConvert.m:63

Helper macro.

#define OPENCV_HAL_IMPL_C_INIT_VAL (   _Tpvec,
  _Tp,
  suffix 
)    inline _Tpvec v_setall_##suffix(_Tp val) { return _Tpvec::all(val); }

Helper macro.

#define OPENCV_HAL_IMPL_C_INIT_ZERO (   _Tpvec,
  _Tp,
  suffix 
)    inline _Tpvec v_setzero_##suffix() { return _Tpvec::zero(); }

Helper macro.

#define OPENCV_HAL_IMPL_C_PACK (   _Tpvec,
  _Tpnvec,
  _Tpn,
  pack_suffix 
)
Value:
inline _Tpnvec v_##pack_suffix(const _Tpvec& a, const _Tpvec& b) \
{ \
_Tpnvec c; \
for( int i = 0; i < _Tpvec::nlanes; i++ ) \
{ \
c.s[i] = saturate_cast<_Tpn>(a.s[i]); \
c.s[i+_Tpvec::nlanes] = saturate_cast<_Tpn>(b.s[i]); \
} \
return c; \
}
static _Tp saturate_cast(uchar v)
Template function for accurate conversion from one primitive type to another.
Definition: saturate.hpp:82
for i
Definition: modelConvert.m:63

Helper macro.

#define OPENCV_HAL_IMPL_C_PACK_STORE (   _Tpvec,
  _Tp,
  _Tpnvec,
  _Tpn,
  pack_suffix 
)
Value:
inline void v_##pack_suffix##_store(_Tpn* ptr, const _Tpvec& a) \
{ \
for( int i = 0; i < _Tpvec::nlanes; i++ ) \
ptr[i] = saturate_cast<_Tpn>(a.s[i]); \
}
for i
Definition: modelConvert.m:63

Helper macro.

#define OPENCV_HAL_IMPL_C_REINTERPRET (   _Tpvec,
  _Tp,
  suffix 
)
Value:
template<typename _Tp0, int n0> inline _Tpvec \
v_reinterpret_as_##suffix(const v_reg<_Tp0, n0>& a) \
{ return a.template reinterpret_as<_Tp, _Tpvec::nlanes>(); }

Helper macro.

#define OPENCV_HAL_IMPL_C_RSHIFTR (   _Tpvec,
  _Tp 
)
Value:
template<int n> inline _Tpvec v_rshr(const _Tpvec& a) \
{ \
_Tpvec c; \
for( int i = 0; i < _Tpvec::nlanes; i++ ) \
c.s[i] = (_Tp)((a.s[i] + ((_Tp)1 << (n - 1))) >> n); \
return c; \
}
for i
Definition: modelConvert.m:63
v_int64x2 v_rshr(const v_int64x2 &a)
Definition: intrin_cpp.hpp:1584

Helper macro.

#define OPENCV_HAL_IMPL_C_RSHR_PACK (   _Tpvec,
  _Tp,
  _Tpnvec,
  _Tpn,
  pack_suffix 
)
Value:
template<int n> inline _Tpnvec v_rshr_##pack_suffix(const _Tpvec& a, const _Tpvec& b) \
{ \
_Tpnvec c; \
for( int i = 0; i < _Tpvec::nlanes; i++ ) \
{ \
c.s[i] = saturate_cast<_Tpn>((a.s[i] + ((_Tp)1 << (n - 1))) >> n); \
c.s[i+_Tpvec::nlanes] = saturate_cast<_Tpn>((b.s[i] + ((_Tp)1 << (n - 1))) >> n); \
} \
return c; \
}
static _Tp saturate_cast(uchar v)
Template function for accurate conversion from one primitive type to another.
Definition: saturate.hpp:82
for i
Definition: modelConvert.m:63

Helper macro.

#define OPENCV_HAL_IMPL_C_RSHR_PACK_STORE (   _Tpvec,
  _Tp,
  _Tpnvec,
  _Tpn,
  pack_suffix 
)
Value:
template<int n> inline void v_rshr_##pack_suffix##_store(_Tpn* ptr, const _Tpvec& a) \
{ \
for( int i = 0; i < _Tpvec::nlanes; i++ ) \
ptr[i] = saturate_cast<_Tpn>((a.s[i] + ((_Tp)1 << (n - 1))) >> n); \
}
for i
Definition: modelConvert.m:63

Helper macro.

#define OPENCV_HAL_IMPL_C_SHIFTL (   _Tpvec,
  _Tp 
)
Value:
template<int n> inline _Tpvec v_shl(const _Tpvec& a) \
{ return a << n; }
v_int64x2 v_shl(const v_int64x2 &a)
Definition: intrin_cpp.hpp:1545

Helper macro.

#define OPENCV_HAL_IMPL_C_SHIFTR (   _Tpvec,
  _Tp 
)
Value:
template<int n> inline _Tpvec v_shr(const _Tpvec& a) \
{ return a >> n; }
v_int64x2 v_shr(const v_int64x2 &a)
Definition: intrin_cpp.hpp:1562

Helper macro.

#define OPENCV_HAL_IMPL_CMP_OP (   cmp_op)
Value:
template<typename _Tp, int n> \
inline v_reg<_Tp, n> operator cmp_op(const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b) \
{ \
typedef typename V_TypeTraits<_Tp>::int_type itype; \
v_reg<_Tp, n> c; \
for( int i = 0; i < n; i++ ) \
c.s[i] = V_TypeTraits<_Tp>::reinterpret_from_int((itype)-(int)(a.s[i] cmp_op b.s[i])); \
return c; \
}
for i
Definition: modelConvert.m:63

Helper macro.

#define OPENCV_HAL_IMPL_MATH_FUNC (   func,
  cfunc,
  _Tp2 
)
Value:
template<typename _Tp, int n> inline v_reg<_Tp2, n> func(const v_reg<_Tp, n>& a) \
{ \
v_reg<_Tp2, n> c; \
for( int i = 0; i < n; i++ ) \
c.s[i] = cfunc(a.s[i]); \
return c; \
}
for i
Definition: modelConvert.m:63

Helper macro.

#define OPENCV_HAL_IMPL_MINMAX_FUNC (   func,
  cfunc 
)
Value:
template<typename _Tp, int n> inline v_reg<_Tp, n> func(const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b) \
{ \
v_reg<_Tp, n> c; \
for( int i = 0; i < n; i++ ) \
c.s[i] = cfunc(a.s[i], b.s[i]); \
return c; \
}
for i
Definition: modelConvert.m:63

Helper macro.

#define OPENCV_HAL_IMPL_REDUCE_MINMAX_FUNC (   func,
  cfunc 
)
Value:
template<typename _Tp, int n> inline _Tp func(const v_reg<_Tp, n>& a) \
{ \
_Tp c = a.s[0]; \
for( int i = 1; i < n; i++ ) \
c = cfunc(c, a.s[i]); \
return c; \
}
for i
Definition: modelConvert.m:63

Helper macro.

#define OPENCV_HAL_IMPL_SHIFT_OP (   shift_op)
Value:
template<typename _Tp, int n> inline v_reg<_Tp, n> operator shift_op(const v_reg<_Tp, n>& a, int imm) \
{ \
v_reg<_Tp, n> c; \
for( int i = 0; i < n; i++ ) \
c.s[i] = (_Tp)(a.s[i] shift_op imm); \
return c; \
}
for i
Definition: modelConvert.m:63

Helper macro.