|
Ublas : |
Subject: [ublas] possible redundant copy
From: Andrey Asadchev (asadchev_at_[hidden])
Date: 2010-07-20 16:03:52
hello, I am not sure if this is intended, but it appears that there is
redundant copy in
matrix.hpp
139 // Resizing
140 BOOST_UBLAS_INLINE
141 void resize (size_type size1, size_type size2, bool preserve =
true) {
142 if (preserve) {
143 self_type temporary (size1, size2);
144 detail::matrix_resize_preserve<layout_type> (*this,
temporary);
145 }
146 else {
147 data ().resize (layout_type::storage_size (size1,
size2));
148 size1_ = size1;
149 size2_ = size2;
150 }
151 }
should line 147 read
data ().resize (layout_type::storage_size (size1, size2), false);
thank you