Hi Mark!
I guess I should’ve prefaced my question with, great work! Certainly a good step forward for C++.
1 & 2 I’ve only skimmed the proposal, it’s a bit beefy 😉 I’ll go through it all soonTM. Since this is a free function API, I would imagine various industries will extend the library with domain specific operations. I also believe this is a stepping stone. If successful, it should be up to domain experts to propose additions to it. The library/proposal should (hopefully) be flexible enough to allow this.
3. Yes 😊 I’d be happy to be that person.
mdarray seems like a good choice if it supports alignment. No problem there.
The reason I bring up quaternions is, they should be treated quite differently than lets say a vec4 (mdarray<float, 1, 4> I believe). Affine matrices can also be treated differently. So the point isn’t so much about features (though quaternions should be considered a requirement for 3D), but how the APIs might be too general in accepting any rank-1 types, for example. There needs to be a way to specify extra mathematical properties that have no bearing on storage.
Have you considered tag dispatching for algorithm overloads? One simple example, multiplying a vec4 to a matrix vs. multiplying a quaternion to a matrix.
I guess my point boils down to : working on md_span and md_array directly seems too general as input. I would propose to accept more specialized wrappers, that contain an md_span or md_array and fulfill a required interface. For example, matrix_span<…>, matrix<…>, affine_matrix<…>, vec<…>, quaternion<…>, user_provided_type<…>.
Just as we implement iterator contracts, the same can be enforced here with traits. Food for thought.
Best and congrats on reaching this milestone,
Philippe
From: Hoemmen, Mark
Sent: Tuesday, June 18, 2019 11:24 AM
To: sg14@lists.isocpp.org
Cc: Philippe Groarke
Subject: Re: [EXTERNAL] Re: [SG14] Linear algebra library proposal
Greetings!
Thanks!
mfh
On 6/18/19, 1:54 AM, "SG14 on behalf of Philippe Groarke via SG14" <sg14-bounces@lists.isocpp.org on behalf of sg14@lists.isocpp.org> wrote:
There is no mention of affine matrices or quaternions/octonions. Are those being left out?
From: Hoemmen, Mark via SG14
Sent: Monday, June 17, 2019 2:16 PM
To: sg14@lists.isocpp.org
Cc: Hoemmen, Mark
Subject: [SG14] Linear algebra library proposal
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
Here is a design discussion and justification:
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
The first two are LONG so maybe fix yourself a nice beverage beforehand ; - ) .
Best,
mfh