1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-21 19:33:03 +04:00

cudaMemset2D fix: Correct buffer height parameter

Changed the height parameter in the cudaMemset2D function call to use
minSSD_buf.rows instead of disp.rows. This enures the correct buffer
height is used for memory initialization.
This commit is contained in:
ajithvallabai
2023-11-22 15:52:51 +05:30
parent 52c33f4af3
commit 258b062295
+1 -1
View File
@@ -391,7 +391,7 @@ namespace cv { namespace cuda { namespace device
//cudaSafeCall( cudaFuncSetCacheConfig(&stereoKernel, cudaFuncCachePreferShared) );
cudaSafeCall( cudaMemset2D(disp.data, disp.step, 0, disp.cols, disp.rows) );
cudaSafeCall( cudaMemset2D(minSSD_buf.data, minSSD_buf.step, 0xFF, minSSD_buf.cols * minSSD_buf.elemSize(), disp.rows) );
cudaSafeCall( cudaMemset2D(minSSD_buf.data, minSSD_buf.step, 0xFF, minSSD_buf.cols * minSSD_buf.elemSize(), minSSD_buf.rows) );
cudaSafeCall( cudaMemcpyToSymbol( cwidth, &left.cols, sizeof(left.cols) ) );
cudaSafeCall( cudaMemcpyToSymbol( cheight, &left.rows, sizeof(left.rows) ) );