std.linalg

FreeSlave freeslave93 at gmail.com
Fri Oct 11 23:24:56 PDT 2013


On Saturday, 12 October 2013 at 05:20:11 UTC, SomeDude wrote:
> On Friday, 11 October 2013 at 16:10:21 UTC, FreeSlave wrote:
>> There is "Matrices and linear algebra" module in wish list. 
>> Let's discuss its design. D is complicated language so it's 
>> difficult to choose the right way here. We need to find 
>> compromise between efficiency and convenient interface. I'm 
>> going to make some suggestions how this module should look 
>> like.
>>
>
>>
>> Please, make your suggestions too.
>
> Firstly, my opinion is, it shouldn't be in the std package.
>
> Secondly, if it's not super highly performant, noone will use 
> it. The highest performing linalg libraries implement the low 
> level BLAS API or are vendor specific, like the Intel MKL. 
> These are super optimized libraries where the asm code is hand 
> optimized by specialists (GotoBLAS and the derived OpenBLAS for 
> instance), and these will be *very* hard to beat. So much so 
> that if BLAS isn't used as the engine, it's very unlikely that 
> your library will be used for serious number crunching.
>
> Built above BLAS, you can find a number of libraries that make 
> using linear algebra more pleasant. One such library, currently 
> the best IMHO is Armadillo C++. It has the very big advantage 
> that it mimics Matlab functions. This feature is extremely 
> useful, because scientists very often model their algorithms in 
> Matlab before porting them to C++. This is what is done in the 
> company I work for.
>
> So the best I could suggest is to study the Armadillo C++ 
> library and port it to D.

For these cases we may let users to choose low-level backend if 
they need. High-level interface and default implementation are 
needed anyway.

I called it std.linalg because there is website 
http://www.linalg.org/ about C++ library for exact computational 
linear algebra. Also SciD has module scid.linalg. We can use 
std.linearalgebra or something else. Names are not really 
important now.

Ok, things are more clear now. Today I look what I can do.


More information about the Digitalmars-d mailing list