From 34e2c78cec2af87fa35cb2fc4377f986350aff11 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Wed, 18 May 2011 07:18:30 +0000 Subject: [PATCH] minor fix --- modules/gpu/src/matrix_operations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gpu/src/matrix_operations.cpp b/modules/gpu/src/matrix_operations.cpp index e4d50593f6..c60fcdb070 100644 --- a/modules/gpu/src/matrix_operations.cpp +++ b/modules/gpu/src/matrix_operations.cpp @@ -454,7 +454,7 @@ GpuMat& GpuMat::setTo(const Scalar& s, const GpuMat& mask) if (cn == 1 || (cn == 2 && s[0] == s[1]) || (cn == 3 && s[0] == s[1] && s[0] == s[2]) || (cn == 4 && s[0] == s[1] && s[0] == s[2] && s[0] == s[3])) { int val = saturate_cast(s[0]); - cudaSafeCall( cudaMemset2D(data, step, val, cols, rows) ); + cudaSafeCall( cudaMemset2D(data, step, val, cols * elemSize(), rows) ); return *this; } } -- GitLab