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.

Reply via email to