From d8f698ab2e0a336696988cfc3bda57748bbb113e Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Sat, 29 Sep 2018 21:47:58 +0200 Subject: [PATCH] complexmat.cu: Remove unused member foreign_data --- src/complexmat.cu | 1 - src/complexmat.cuh | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/complexmat.cu b/src/complexmat.cu index a2134c2..d06e66f 100644 --- a/src/complexmat.cu +++ b/src/complexmat.cu @@ -268,7 +268,6 @@ void ComplexMat::operator=(ComplexMat &rhs) rows = rhs.rows; n_channels = rhs.n_channels; n_scales = rhs.n_scales; - foreign_data = true; p_data = rhs.p_data; } diff --git a/src/complexmat.cuh b/src/complexmat.cuh index 0385243..cf2e6ca 100644 --- a/src/complexmat.cuh +++ b/src/complexmat.cuh @@ -15,7 +15,6 @@ class ComplexMat { uint rows; uint n_channels; uint n_scales = 1; - bool foreign_data = false; ComplexMat() : cols(0), rows(0), n_channels(0) {} @@ -44,7 +43,7 @@ class ComplexMat { ~ComplexMat() { - if (p_data != nullptr && !foreign_data) { + if (p_data != nullptr) { CudaSafeCall(cudaFree(p_data)); p_data = nullptr; } -- 2.39.2