Jan 11, 2015 at 8:38 PM
Edited Jan 11, 2015 at 8:38 PM
Thank you for your hard work on this. I saw Łukasz Mendakiewicz talk at CppCon 2014 on
youtube and I am really excited to see where array_view is going.
I am just wondering if you have considered accepting an additional template argument
to array view to describe padding? Something along the lines of:
template <typename ValueType, int Rank = 1, int Pad = 0>
class array_view : public details::any_array_view_base<ValueType, Rank, Pad>
this is important for interoperability with e.g. BLAS (cf. dgemm signature for example)
and LAPACK since most functions accept a "leading dimension" argument (which would be nrows+pad for a Column Major matrix for example and ncols+pad for a Row Major matrix respectively).
The possibilty to pad is also a feature even when disregarding Fortran interoperability
due to possible performance gain from cache alignment.
I have written a home grown object like array_view (although not nearly as rich in features
as yours) but there I opt:ed to templatize on both "padding" and memory layout ColMajor/RowMajor.
I just wanted to share my thoughts, I hope it's not disruptive to your work.