Re: [eigen] On a flexible API for submatrices, slicing, indexing, masking, etc. |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
- The word "range" is overloaded much more than span. There's boost::range, the WIP range v3, and the "range-based" for loops. These big shots can have different conventions, some times [first, last) (range-based for), some times [begin, end) (boost's irange). For span, the only conflict is gsl::span right now (which should really be named array_view anyway, akin to std::string_view. It also takes in (base_ptr, length), so it's categorically different from our use).gsl::span was initially called array_view, so I doubt they will change its name back. It is also interesting that gsl::span is defined as a "start"+"length" as in my initial distinction between range(start,stop) and span(start,size). Writing span(start,stop) does not sounds right to me.Yeah I was aware of the original name. They changed it cause there's a different array_view akin to eigen's map being developed.
I wasn't aware of Eigen::size(). Is it going to be similar to std::size, but works for Eigen types?
Still I'd say that changing the case to avoid a name collision is against most sane coding conventions, especially when the particular coding convention uses case to differentiate between the type of the name.
So at this stage of the discutions, if we could find a good name for a generic Zzzz<N>, then I would lean for option (A).Just to throw around some:Static<V>,CompileTime<V>
Maybe we should find a block of example code that makes heavy use of various ranged index, and convert it to the alternative indexing API notations, and have people judge which looks better.
Why can "_" only be defined through a macro? The following compiles on https://godbolt.org/ using gcc 6.2:struct all_tag{};constexpr all_tag _{};int f(all_tag) {return 0;};int main() {return f(_);}
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |