DIP80: phobos additions

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 9 09:08:45 PDT 2015


On 6/9/15 1:50 AM, John Colvin wrote:
> On Tuesday, 9 June 2015 at 06:59:07 UTC, Andrei Alexandrescu wrote:
>> (a) Provide standard data layouts in std.array for the typical shapes
>> supported by linear algebra libs: row major, column major, alongside
>> with striding primitives.
>
> I don't think this is quite the right approach. Multidimensional arrays
> and matrices are about accessing and iteration over data, not data
> structures themselves. The standard layouts are common special cases.

I see. So what would be the primitives necessary? Strides (in the form 
of e.g. special ranges)? What are the things that would make a library 
vendor or user go, "OK, now I know what steps to take to use my code 
with D"?

>> (b) Provide signatures for C and Fortran libraries so people who have
>> them can use them easily with D.
>>
>> (c) Provide high-level wrappers on top of those functions.
>>
>>
>> Andrei
>
> That is how e.g. numpy works and it's OK, but D can do better.
>
> Ilya, I'm very interested in discussing this further with you. I have a
> reasonable idea and implementation of how I would want the generic
> n-dimensional types in D to work, but you seem to have more experience
> with BLAS and LAPACK than me* and of course interfacing with them is
> critical.
>
> *I rarely interact with them directly.

Color me interested. This is another of those domains that hold great 
promise for D, but sadly a strong champion has been missing. Or two :o).


Andrei



More information about the Digitalmars-d mailing list