From 485e71bcc22184fc46f18f7605748a6696f36f2f Mon Sep 17 00:00:00 2001 From: Alexey Spizhevoy Date: Mon, 12 Sep 2011 14:58:56 +0000 Subject: [PATCH] Bug in multiply was fixed (by Vlad Vinogradov) --- modules/gpu/src/cuda/element_operations.cu | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/gpu/src/cuda/element_operations.cu b/modules/gpu/src/cuda/element_operations.cu index d301ea0f14..9f47dabdaa 100644 --- a/modules/gpu/src/cuda/element_operations.cu +++ b/modules/gpu/src/cuda/element_operations.cu @@ -613,10 +613,10 @@ namespace cv { namespace gpu { namespace device { uint res = 0; - res |= 0xffu & (saturate_cast((0xffu & (a )) * b) ); - res |= 0xffu & (saturate_cast((0xffu & (a >> 8)) * b) << 8); - res |= 0xffu & (saturate_cast((0xffu & (a >> 16)) * b) << 16); - res |= 0xffu & (saturate_cast((0xffu & (a >> 24)) * b) << 24); + res |= (saturate_cast((0xffu & (a )) * b) ); + res |= (saturate_cast((0xffu & (a >> 8)) * b) << 8); + res |= (saturate_cast((0xffu & (a >> 16)) * b) << 16); + res |= (saturate_cast((0xffu & (a >> 24)) * b) << 24); return res; }