]> rtime.felk.cvut.cz Git - hercules2020/kcf.git/commitdiff
Convert leftovers from vector to DynMem conversion few commit ago
authorMichal Sojka <michal.sojka@cvut.cz>
Tue, 2 Oct 2018 08:24:48 +0000 (10:24 +0200)
committerMichal Sojka <michal.sojka@cvut.cz>
Tue, 2 Oct 2018 08:24:48 +0000 (10:24 +0200)
Since these are not used, the compiler does not complain.

src/complexmat.hpp

index eca36a75b9106fe50152a00a6164718aa15c4b8a..3d6f29579104516263a5c6a519056291335a9750 100644 (file)
@@ -55,7 +55,7 @@ template <typename T> class ComplexMat_ {
         int n_channels_per_scale = n_channels / n_scales;
         T sum_sqr_norm = 0;
         for (int i = 0; i < n_channels_per_scale; ++i) {
-            for (auto lhs = p_data.begin() + i * rows * cols; lhs != p_data.begin() + (i + 1) * rows * cols; ++lhs)
+            for (auto lhs = p_data.hostMem() + i * rows * cols; lhs != p_data.hostMem() + (i + 1) * rows * cols; ++lhs)
                 sum_sqr_norm += lhs->real() * lhs->real() + lhs->imag() * lhs->imag();
         }
         sum_sqr_norm = sum_sqr_norm / static_cast<T>(cols * rows);
@@ -235,9 +235,9 @@ template <typename T> class ComplexMat_ {
         ComplexMat_<T> result = *this;
         for (uint i = 0; i < n_scales; ++i) {
             for (int j = 0; j < n_channels_per_scale; ++j) {
-                auto lhs = result.p_data.begin() + (j * rows * cols) + (i * scale_offset);
-                auto rhs = mat_rhs.p_data.begin() + (j * rows * cols);
-                for (; lhs != result.p_data.begin() + ((j + 1) * rows * cols) + (i * scale_offset); ++lhs, ++rhs)
+                auto lhs = result.p_data.hostMem() + (j * rows * cols) + (i * scale_offset);
+                auto rhs = mat_rhs.p_data.hostMem() + (j * rows * cols);
+                for (; lhs != result.p_data.hostMem() + ((j + 1) * rows * cols) + (i * scale_offset); ++lhs, ++rhs)
                     op(*lhs, *rhs);
             }
         }