Re: Multi Mini-Review Begins Today
Ruben Perez via Boost <[email protected]>
| Newsgroups | gmane.comp.lib.boost.devel |
|---|---|
| Message-ID | <CACR-mdJzZ8Sci4Xt-4Xke2Hgr9PcvgMi5C5jnZSe-1qgeExHBg@mail.gmail.com> |
On Fri, 7 Aug 2026 at 14:01, Matt Borland via Boost <[email protected]> wrote: > > Hello, > > Today begins the mini-review of Multi, authored by Alfredo Correa. Multi is a modern C++ library that provides manipulation and access of data in multidimensional arrays for both CPU and GPU memory. The review will run through Wednesday 12 August. > > You can find the library and documentation links below: > - https://github.com/correaa/boost-multi > - https://correaa.github.io/boost-multi/multi/intro.html > > The review earlier this year raised a number of issues that primarily revolved around the state of the documentation, not the library itself. I have labeled all of the issues related to conditions found in last review, and many have notes or resolution from Alfredo: Hi all, This is my re-review of Boost.Multi. I'll be checking the points that I raised during my previous review [1] and a couple more new findings. * The discussion has improved since last review. The page on concepts [2] is worth reading. Although it is called "reference", but it is not. * The reference section [3] needs a lot more work. The front page needs a table organizing the entities (see how Boost.Url does it, for example [4]). There must be no entries with blank documentation. All adapters are also missing there. * I like seeing std::mdspan compatibility through multi::array::to_mdspan(), but the function is absent from the documentation. There is an example in Godbolt about it that doesn't compile. * Examples have no comments yet, and are still under examples/ (rather than example/), and aren't built by CI. * The operator& overloads are still there, and subarrays still don't work with fmtlib (the example [5] doesn't built in my machine). * strided() with a stride not divisible by the corresponding dimension causes an infinite loop in my machine. I was trying to see if Asan complained about the invalid pointer formation issue [6]. It doesn't, but the code misbehaves. The following causes an infinite loop: #include <boost/multi/array.hpp> namespace multi = boost::multi; int main() { multi::array<double, 2> arr = { {1.0, 2.0, 3.0}, {3.0, 4.0, 5.0}, {6.0, 7.0, 8.0}, }; for(auto&& elm : arr.strided(2)) { std::cout << elm.size() << std::endl; } } * strided() with negative indices and dimensionality greater than 1 causes an infinite loop, too: #include <boost/multi/array.hpp> #include <iostream> namespace multi = boost::multi; int main() { multi::array<double, 2> arr = { {1.0, 2.0, 3.0, 4.0}, {3.0, 4.0, 5.0, 8.0}, {6.0, 7.0, 8.0, 10.0}, }; for(auto&& subarr : arr.strided(-1)) std::cout << subarr.size() << std::endl; } * Uninitialized elements still happen by default. The library has gained a trait to treat std::complex as trivial: template<> inline constexpr bool multi::force_element_trivial_default_construction<std::complex<double>> = true; // should be defined as early as possible This is only well-defined in C++20 (and UB in C++17). It is also prone to ODR violations, especially since the specializations are controlled by a macro definition. * The include/ directory still has lots of files that don't belong there. * There are still many #if 0 preprocessor blocks. * The NOEXCEPT_ASSIGNMENT macro is still there. * The min and max functions are still unguarded. * Many tests are still missing from Jamfile. * The dynamic_array_cast leftover is still there. I feel the library is at a similar point as last time I looked at it, so I keep my original vote: REJECT with the encouragement of a re-review, once the feedback is incorporated into it. Regards, Ruben. [1] https://lists.boost.org/archives/list/[email protected]/message/Q4GLGQVJ26LVQE5INMF73PKBSJ67FUCH/ [2] https://correaa.github.io/boost-multi/multi/reference.html [3] https://correaa.github.io/boost-multi/multi/reference/index.html [4] https://www.boost.org/doc/libs/latest/doc/antora/url/reference.html [5] https://correaa.github.io/boost-multi/multi/interop.html#interop_fmt [6] https://correaa.github.io/boost-multi/multi/technical.html#technical_iteration _______________________________________________ Boost mailing list -- [email protected] To unsubscribe send an email to [email protected] https://lists.boost.org/mailman3/lists/boost.lists.boost.org/ Archived at: https://lists.boost.org/archives/list/[email protected]/message/RMJXFTOV6PXBLQ2IQBZVVCFMX3HMBU3X/