Commit e37930b6 authored by Kirill Kornyakov's avatar Kirill Kornyakov

Optimized version of Sum functions added

parent daf50f8e
......@@ -193,12 +193,19 @@ static int sum64f( const double* src, const uchar* mask, double* dst, int len, i
typedef int (*SumFunc)(const uchar*, const uchar* mask, uchar*, int, int);
#ifdef HAVE_TEGRA_OPTIMIZATION
static SumFunc sumTab[] =
{
(SumFunc)tegra::sum8u, (SumFunc)sum8s, (SumFunc)sum16u, (SumFunc)sum16s,
(SumFunc)sum32s, (SumFunc)tegra::sum32f, (SumFunc)sum64f, 0
};
#else
static SumFunc sumTab[] =
{
(SumFunc)sum8u, (SumFunc)sum8s, (SumFunc)sum16u, (SumFunc)sum16s,
(SumFunc)sum32s, (SumFunc)sum32f, (SumFunc)sum64f, 0
};
#endif
template<typename T>
static int countNonZero_(const T* src, int len )
......
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