fixed several problems with CUDA 5.0

* gpu::LUT, uses device memory instead of host memory
* gpu::multiply, round mod for CV_8U depth
This commit is contained in:
Vladislav Vinogradov
2012-05-28 12:09:40 +00:00
parent 71625ad458
commit 2582464e51
4 changed files with 88 additions and 47 deletions

View File

@@ -658,7 +658,11 @@ void cv::gpu::multiply(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, doub
dst.create(src1.size(), CV_MAKE_TYPE(CV_MAT_DEPTH(dtype), src1.channels()));
#if (CUDA_VERSION <= 4020)
if (scale == 1 && dst.type() == src1.type() && src1.depth() <= CV_32F)
#else
if (scale == 1 && dst.type() == src1.type() && src1.depth() <= CV_32F && src1.depth() > CV_8U)
#endif
{
npp_funcs[src1.depth()](src1.reshape(1), src2.reshape(1), dst.reshape(1), stream);
return;