Matrix begin() and end() are broken
Issue #178
duplicate
Hi Klaus,
The matrix begin() and end() are not conforming to the STL interface of what they should do. Could you fix this and add different functions that allow only row/column-wise iteration? This makes using Matrix
in generic code a huge pain.
Cheers,
Nils
Comments (2)
-
-
- changed status to duplicate
Duplicate of
#59. - Log in to comment
Hi Nils!
We understand the motivation for this issue, but do not consider the current, well defined, tested and performant behavior as a bug. Therefore we will take no further action.
There is many reasons for the current design:
std::deque
may already incur a 5x performance penalty).begin()
andend()
function for a 2D data structure. Therefore there is no according interface.There is several possible solutions/workarounds:
begin()
andend()
function yourself, with the semantics that match your expectations (also from a performance point of view). If you are interested in truly generic code than you are using the free versions ofbegin()
andend()
, anyway (see the talk Free Your Functions!).CustomVector
. Please make sure that you disable padding viaBLAZE_USE_PADDING
(see<blaze/config/Optimizations.h>
).Best regards,
Klaus!