added nppSafeCall

This commit is contained in:
Vladislav Vinogradov
2010-09-15 14:34:41 +00:00
parent 912f8ff34c
commit b803c24345
3 changed files with 63 additions and 54 deletions

View File

@@ -171,7 +171,7 @@ GpuMat& GpuMat::setTo(const Scalar& s, const GpuMat& mask)
sz.width = cols;
sz.height = rows;
Npp8u nVal = (Npp8u)s[0];
nppiSet_8u_C1R(nVal, (Npp8u*)ptr<char>(), step, sz);
nppSafeCall( nppiSet_8u_C1R(nVal, (Npp8u*)ptr<char>(), step, sz) );
break;
}
case CV_8UC4:
@@ -180,7 +180,7 @@ GpuMat& GpuMat::setTo(const Scalar& s, const GpuMat& mask)
sz.width = cols;
sz.height = rows;
Npp8u nVal[] = {(Npp8u)s[0], (Npp8u)s[1], (Npp8u)s[2], (Npp8u)s[3]};
nppiSet_8u_C4R(nVal, (Npp8u*)ptr<char>(), step, sz);
nppSafeCall( nppiSet_8u_C4R(nVal, (Npp8u*)ptr<char>(), step, sz) );
break;
}
case CV_32SC1:
@@ -189,7 +189,7 @@ GpuMat& GpuMat::setTo(const Scalar& s, const GpuMat& mask)
sz.width = cols;
sz.height = rows;
Npp32s nVal = (Npp32s)s[0];
nppiSet_32s_C1R(nVal, (Npp32s*)ptr<char>(), step, sz);
nppSafeCall( nppiSet_32s_C1R(nVal, (Npp32s*)ptr<char>(), step, sz) );
break;
}
case CV_32FC1:
@@ -198,7 +198,7 @@ GpuMat& GpuMat::setTo(const Scalar& s, const GpuMat& mask)
sz.width = cols;
sz.height = rows;
Npp32f nVal = (Npp32f)s[0];
nppiSet_32f_C1R(nVal, (Npp32f*)ptr<char>(), step, sz);
nppSafeCall( nppiSet_32f_C1R(nVal, (Npp32f*)ptr<char>(), step, sz) );
break;
}
default: