From cb2b9219bea05405000f0df5c5aab3fb9644093e Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nwpope@utu.fi>
Date: Thu, 12 Dec 2019 14:12:08 +0200
Subject: [PATCH] Use cv cuda swap

---
 .../rgbd-sources/src/sources/stereovideo/stereovideo.cpp  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/components/rgbd-sources/src/sources/stereovideo/stereovideo.cpp b/components/rgbd-sources/src/sources/stereovideo/stereovideo.cpp
index 1a90f915c..e8eff732b 100644
--- a/components/rgbd-sources/src/sources/stereovideo/stereovideo.cpp
+++ b/components/rgbd-sources/src/sources/stereovideo/stereovideo.cpp
@@ -221,8 +221,8 @@ bool StereoVideoSource::compute(int n, int b) {
 		}
 
 		if (resize) {
-			std::swap(fullres_left_, left);
-			std::swap(fullres_right_, right);
+			cv::cuda::swap(fullres_left_, left);
+			cv::cuda::swap(fullres_right_, right);
 			cv::cuda::resize(fullres_left_, left, depth_size_, 0, 0, cv::INTER_CUBIC, stream_);
 			cv::cuda::resize(fullres_right_, right, depth_size_, 0, 0, cv::INTER_CUBIC, stream_);
 		}
@@ -231,8 +231,8 @@ bool StereoVideoSource::compute(int n, int b) {
 		stream_.waitForCompletion();
 		
 		if (resize) {
-			std::swap(fullres_left_, left);
-			std::swap(fullres_right_, right);
+			cv::cuda::swap(fullres_left_, left);
+			cv::cuda::swap(fullres_right_, right);
 		}
 
 		host_->notify(timestamp_,
-- 
GitLab