From fc59498b2b3fee27d7dbcb6be7f19090a50024ed Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Fri, 6 Jul 2018 15:31:25 +0300 Subject: [PATCH] cuda: fix build use cv::AutoBuffer::data() to get data pointer --- modules/cudaimgproc/src/hough_circles.cpp | 4 ++-- modules/cudastereo/src/stereocsbp.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/cudaimgproc/src/hough_circles.cpp b/modules/cudaimgproc/src/hough_circles.cpp index b706967..2a5c025 100644 --- a/modules/cudaimgproc/src/hough_circles.cpp +++ b/modules/cudaimgproc/src/hough_circles.cpp @@ -215,8 +215,8 @@ namespace AutoBuffer newBuf_(centersCount); int newCount = 0; - ushort2* oldBuf = oldBuf_; - ushort2* newBuf = newBuf_; + ushort2* oldBuf = oldBuf_.data(); + ushort2* newBuf = newBuf_.data(); cudaSafeCall( cudaMemcpy(oldBuf, centers, centersCount * sizeof(ushort2), cudaMemcpyDeviceToHost) ); diff --git a/modules/cudastereo/src/stereocsbp.cpp b/modules/cudastereo/src/stereocsbp.cpp index ded5fa2..bc5a230 100644 --- a/modules/cudastereo/src/stereocsbp.cpp +++ b/modules/cudastereo/src/stereocsbp.cpp @@ -172,7 +172,7 @@ namespace // compute sizes AutoBuffer buf(levels_ * 3); - int* cols_pyr = buf; + int* cols_pyr = buf.data(); int* rows_pyr = cols_pyr + levels_; int* nr_plane_pyr = rows_pyr + levels_; -- 2.7.4