C++ Logo

SG14

Advanced search

Subject: Re: Linear algebra library proposal
From: Gael Guennebaud (gael.guennebaud_at_[hidden])
Date: 2019-06-18 17:08:28


Great work!
As the main developer of the Eigen library I follow those LA proposals with great interest. I do support the idea of a low-level C++ BLAS-like API as I ended up writing something similar within Eigen’s internals.

I appreciated reading the detailed discussions on design choices, but I did not find any on the “Side” parameters. In my opinion, they are dangerous and error prone because they make harder to parse which operation is going to be performed (have you to reverse the arguments or not?), and they are also (slightly) ambiguous (which one is on the left/right of the other?). So I strongly advice to find a way to get rid of the “Side” parameters.
To this end, the most obvious solution is probably to follow your “option 2” of paragraph "Retain view functions?" [1]. This option also makes it easier to generalize beyond BLAS limits, but that’s another topic!
Another naive solution would be to add more overloads, e.g.:

triangular_matrix_product(…);
matrix_triangular_product(…);

Anyway, I mostly wanted to draw your attention on those “Side” parameters. The technical solution to get rid of them is, in some sense, less important, and it also depends on other feedbacks and more general design choices.

[1] https://github.com/mhoemmen/cpp-proposals-pub/blob/Pre-COL2019-BLAS/D1673/blas_interface.md#retain-view-functions-modest-expression-templates <https://github.com/mhoemmen/cpp-proposals-pub/blob/Pre-COL2019-BLAS/D1673/blas_interface.md#retain-view-functions-modest-expression-templates>

best,
Gaël.

> On 17 Jun 2019, at 20:16, Hoemmen, Mark via SG14 <sg14_at_[hidden]> wrote:
>
> Hi all! We submitted a proposal for a C++ Standard linear algebra library.
>
> Here is the proposal itself:
> https://github.com/mhoemmen/cpp-proposals-pub/blob/Pre-COL2019-BLAS/D1673/blas_interface.md <https://github.com/mhoemmen/cpp-proposals-pub/blob/Pre-COL2019-BLAS/D1673/blas_interface.md>
>
> Here is a design discussion and justification:
> https://github.com/mhoemmen/cpp-proposals-pub/blob/Pre-COL2019-BLAS/D1674/evolving-from-blas.md <https://github.com/mhoemmen/cpp-proposals-pub/blob/Pre-COL2019-BLAS/D1674/evolving-from-blas.md>
>
> We also have an “mdarray” proposal – that is a container variant of mdspan, that might be a better option for very small matrices and vectors:
> https://isocpp.org/files/papers/P1684R0.pdf <https://isocpp.org/files/papers/P1684R0.pdf>
>
> The first two are LONG so maybe fix yourself a nice beverage beforehand ; - ) .
>
> Best,
> mfh
> _______________________________________________
> SG14 mailing list
> SG14_at_[hidden] <mailto:SG14_at_[hidden]>
> http://lists.isocpp.org/mailman/listinfo.cgi/sg14 <http://lists.isocpp.org/mailman/listinfo.cgi/sg14>



SG14 list run by sg14-owner@lists.isocpp.org

Older Archives on Google Groups