From dbdc476b797a86897d09c72dffe74ecf81bead6c Mon Sep 17 00:00:00 2001 From: vbystricky Date: Mon, 7 Apr 2014 14:17:22 +0400 Subject: [PATCH] Check results of ipp function --- modules/core/src/matmul.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/core/src/matmul.cpp b/modules/core/src/matmul.cpp index b3004707e6..8891bb05f8 100644 --- a/modules/core/src/matmul.cpp +++ b/modules/core/src/matmul.cpp @@ -2799,11 +2799,11 @@ static double dotProd_8u(const uchar* src1, const uchar* src2, int len) { double r = 0; #if ARITHM_USE_IPP - ippiDotProd_8u64f_C1R(src1, (int)(len*sizeof(src1[0])), - src2, (int)(len*sizeof(src2[0])), - ippiSize(len, 1), &r); - return r; -#else + if (0 <= ippiDotProd_8u64f_C1R(src1, (int)(len*sizeof(src1[0])), + src2, (int)(len*sizeof(src2[0])), + ippiSize(len, 1), &r)) + return r; +#endif int i = 0; #if CV_SSE2 @@ -2849,7 +2849,6 @@ static double dotProd_8u(const uchar* src1, const uchar* src2, int len) } #endif return r + dotProd_(src1, src2, len - i); -#endif }