mirror of
https://github.com/opencv/opencv.git
synced 2024-11-26 04:00:30 +08:00
trying to eliminate warnings in Android build
This commit is contained in:
parent
d2aaa70e93
commit
f32f0486e2
@ -494,7 +494,13 @@ _AccTp normL2Sqr(const _Tp* a, const _Tp* b, int n)
|
|||||||
|
|
||||||
static inline float normL2Sqr(const float* a, const float* b, int n)
|
static inline float normL2Sqr(const float* a, const float* b, int n)
|
||||||
{
|
{
|
||||||
return normL2Sqr<float, float>(a, b, n);
|
float s = 0.f;
|
||||||
|
for( int i = 0; i < n; i++ )
|
||||||
|
{
|
||||||
|
float v = a[i] - b[i];
|
||||||
|
s += v*v;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename _Tp, typename _AccTp> static inline
|
template<typename _Tp, typename _AccTp> static inline
|
||||||
@ -519,12 +525,22 @@ _AccTp normL1(const _Tp* a, const _Tp* b, int n)
|
|||||||
|
|
||||||
inline float normL1(const float* a, const float* b, int n)
|
inline float normL1(const float* a, const float* b, int n)
|
||||||
{
|
{
|
||||||
return normL1<float, float>(a, b, n);
|
float s = 0.f;
|
||||||
|
for( int i = 0; i < n; i++ )
|
||||||
|
{
|
||||||
|
s += std::abs(a[i] - b[i]);
|
||||||
|
}
|
||||||
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int normL1(const uchar* a, const uchar* b, int n)
|
inline int normL1(const uchar* a, const uchar* b, int n)
|
||||||
{
|
{
|
||||||
return normL1<uchar, int>(a, b, n);
|
int s = 0;
|
||||||
|
for( int i = 0; i < n; i++ )
|
||||||
|
{
|
||||||
|
s += std::abs(a[i] - b[i]);
|
||||||
|
}
|
||||||
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename _Tp, typename _AccTp> static inline
|
template<typename _Tp, typename _AccTp> static inline
|
||||||
|
Loading…
Reference in New Issue
Block a user