Commit 5c3880d3 authored by Alexander Alekhin's avatar Alexander Alekhin

core(intrin): avoid symbols duplication from SIMD128/256 cases

All vx_call() must be wrapped into own simd128/simd256/simd512 namespace

```
namespace CV__SIMD_NAMESPACE {
... vx_call declaration is here ...
}
```
parent 6500700d
...@@ -296,11 +296,17 @@ template<typename _Tp> struct V_RegTraits ...@@ -296,11 +296,17 @@ template<typename _Tp> struct V_RegTraits
#endif #endif
#if CV_SIMD512 && (!defined(CV__SIMD_FORCE_WIDTH) || CV__SIMD_FORCE_WIDTH == 512) #if CV_SIMD512 && (!defined(CV__SIMD_FORCE_WIDTH) || CV__SIMD_FORCE_WIDTH == 512)
#define CV__SIMD_NAMESPACE simd512
namespace CV__SIMD_NAMESPACE {
#define CV_SIMD 1 #define CV_SIMD 1
#define CV_SIMD_64F CV_SIMD512_64F #define CV_SIMD_64F CV_SIMD512_64F
#define CV_SIMD_WIDTH 64 #define CV_SIMD_WIDTH 64
// TODO typedef v_uint8 / v_int32 / etc types here // TODO typedef v_uint8 / v_int32 / etc types here
} // namespace
using namespace CV__SIMD_NAMESPACE;
#elif CV_SIMD256 && (!defined(CV__SIMD_FORCE_WIDTH) || CV__SIMD_FORCE_WIDTH == 256) #elif CV_SIMD256 && (!defined(CV__SIMD_FORCE_WIDTH) || CV__SIMD_FORCE_WIDTH == 256)
#define CV__SIMD_NAMESPACE simd256
namespace CV__SIMD_NAMESPACE {
#define CV_SIMD 1 #define CV_SIMD 1
#define CV_SIMD_64F CV_SIMD256_64F #define CV_SIMD_64F CV_SIMD256_64F
#define CV_SIMD_WIDTH 32 #define CV_SIMD_WIDTH 32
...@@ -323,7 +329,11 @@ template<typename _Tp> struct V_RegTraits ...@@ -323,7 +329,11 @@ template<typename _Tp> struct V_RegTraits
CV_INTRIN_DEFINE_WIDE_INTRIN_ALL_TYPES(v256) CV_INTRIN_DEFINE_WIDE_INTRIN_ALL_TYPES(v256)
CV_INTRIN_DEFINE_WIDE_INTRIN(double, v_float64, f64, v256, load) CV_INTRIN_DEFINE_WIDE_INTRIN(double, v_float64, f64, v256, load)
inline void vx_cleanup() { v256_cleanup(); } inline void vx_cleanup() { v256_cleanup(); }
} // namespace
using namespace CV__SIMD_NAMESPACE;
#elif (CV_SIMD128 || CV_SIMD128_CPP) && (!defined(CV__SIMD_FORCE_WIDTH) || CV__SIMD_FORCE_WIDTH == 128) #elif (CV_SIMD128 || CV_SIMD128_CPP) && (!defined(CV__SIMD_FORCE_WIDTH) || CV__SIMD_FORCE_WIDTH == 128)
#define CV__SIMD_NAMESPACE simd128
namespace CV__SIMD_NAMESPACE {
#define CV_SIMD CV_SIMD128 #define CV_SIMD CV_SIMD128
#define CV_SIMD_64F CV_SIMD128_64F #define CV_SIMD_64F CV_SIMD128_64F
#define CV_SIMD_WIDTH 16 #define CV_SIMD_WIDTH 16
...@@ -348,6 +358,8 @@ template<typename _Tp> struct V_RegTraits ...@@ -348,6 +358,8 @@ template<typename _Tp> struct V_RegTraits
CV_INTRIN_DEFINE_WIDE_INTRIN(double, v_float64, f64, v, load) CV_INTRIN_DEFINE_WIDE_INTRIN(double, v_float64, f64, v, load)
#endif #endif
inline void vx_cleanup() { v_cleanup(); } inline void vx_cleanup() { v_cleanup(); }
} // namespace
using namespace CV__SIMD_NAMESPACE;
#endif #endif
inline unsigned int trailingZeros32(unsigned int value) { inline unsigned int trailingZeros32(unsigned int value) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment