## digitalmars.D - Is there anybody working on a linear algebra library for D2?

- Michael Chen (9/9) Oct 05 2010 I remember that one of D's goal is easy scientific computation.
- jcc7 (7/16) Oct 05 2010 You might be able to find something useful for you in this list on this ...
- dsimcha (10/26) Oct 05 2010 Lars Kyllingstad's SciD library (http://dsource.org/projects/scid) is a ...
- Lars T. Kyllingstad (21/48) Oct 06 2010 Let me just start off by saying that if you are using Linux, there's les...
- Gareth Charnock (14/23) Oct 05 2010 I've attempted this in the past, however, each time I manage to work up
- Don (7/34) Oct 05 2010 Please don't. That was a proof of concept, which had a big influence on
- Gareth Charnock (4/38) Oct 05 2010 Okay, sorry, I may have somewhat misunderstood the purpose of that
- Tomek =?UTF-8?B?U293acWEc2tp?= (7/11) Oct 05 2010 Welcome to the club:) I'm writing matrix modules for my QuantLibD projec...
- Trass3r (5/5) Oct 09 2010 I think lyla was aiming at that. I don't know how usable it is though

I remember that one of D's goal is easy scientific computation. However I haven't seen any linear algebra package for D2. My work heavily relays on all kinds of matrix stuff (matrix multiplication, factorization, linear system etc). I like D and am willing to work with D. However without these facilities I can hardly start. I'd like to have a matrix library of which the API is kind of like Matlab. Is there anybody working on this or planning to work on this? Regards, Michael

Oct 05 2010

== Quote from Michael Chen (sth4nth gmail.com)'s articleI remember that one of D's goal is easy scientific computation. However I haven't seen any linear algebra package for D2. My work heavily relays on all kinds of matrix stuff (matrix multiplication, factorization, linear system etc). I like D and am willing to work with D. However without these facilities I can hardly start. I'd like to have a matrix library of which the API is kind of like Matlab. Is there anybody working on this or planning to work on this? Regards, MichaelYou might be able to find something useful for you in this list on this page: http://www.prowiki.org/wiki4d/wiki.cgi?ScientificLibraries (You might not be able to find a D 2.x project for what you need, but it might not be much effort to make a minimal port from a D 1.x project.) Good luck. jcc7

Oct 05 2010

== Quote from jcc7 (jccalvarese gmail.com)'s article== Quote from Michael Chen (sth4nth gmail.com)'s articlenot be much effort toI remember that one of D's goal is easy scientific computation. However I haven't seen any linear algebra package for D2. My work heavily relays on all kinds of matrix stuff (matrix multiplication, factorization, linear system etc). I like D and am willing to work with D. However without these facilities I can hardly start. I'd like to have a matrix library of which the API is kind of like Matlab. Is there anybody working on this or planning to work on this? Regards, MichaelYou might be able to find something useful for you in this list on this page: http://www.prowiki.org/wiki4d/wiki.cgi?ScientificLibraries (You might not be able to find a D 2.x project for what you need, but it mightmake a minimal port from a D 1.x project.) Good luck. jcc7Lars Kyllingstad's SciD library (http://dsource.org/projects/scid) is a good work in progress. Unfortunately it depends heavily on Blas and Lapack. I haven't figured out how to set these up on Windows yet. However, it's definitely off the ground and looks pretty usable for those wizards sufficiently skilled in the art of fiddling with linker settings to get crufty old C and Fortran libraries to link with D code. IMHO there should eventually be pure D versions of this functionality. I tried to get started writing it, but got sidetracked by about a million other things.

Oct 05 2010

On Tue, 05 Oct 2010 15:01:03 +0000, dsimcha wrote:== Quote from jcc7 (jccalvarese gmail.com)'s articleLet me just start off by saying that if you are using Linux, there's less need for fiddling and wizardry. :) On a 32-bit system the libraries should be available through your package manager, and all you need to do is to pass the -L-lblas and -L-llapack switches to DMD. On a 64-bit system you may have to download them manually, but after that it's only a matter of telling DMD where to find them with -L-L/location/of/libs. But I have to admit, the linear algebra stuff in SciD is fairly limited. I've mostly added stuff whenever I've needed it for work. There's no full-fledged matrix type, just the scid.matrix.MatrixView type which provides a two-dimensional view (i.e. only getting and setting elements supported, no arithmetic) on an ordinary D array. In addition, there's the scid.linalg package which provides user-friently interfaces to a few LAPACK algorithms.== Quote from Michael Chen (sth4nth gmail.com)'s articlenot be much effort tomake a minimal port from a D 1.x project.) Good luck. jcc7Lars Kyllingstad's SciD library (http://dsource.org/projects/scid) is a good work in progress. Unfortunately it depends heavily on Blas and Lapack. I haven't figured out how to set these up on Windows yet. However, it's definitely off the ground and looks pretty usable for those wizards sufficiently skilled in the art of fiddling with linker settings to get crufty old C and Fortran libraries to link with D code.IMHO there should eventually be pure D versions of this functionality.I completely agree. More annoying than figuring out the BLAS/LAPACK library setup, which you only have to do once, is the fact that BLAS and LAPACK don't have support for the real and Complex!real types.I tried to get started writing it, but got sidetracked by about a million other things.I see a real need for this, so when I get the time, and if dsimcha (or anyone else) doesn't beat me to it, I'll probably start working on this myself. -Lars

Oct 06 2010

On 05/10/10 14:41, Michael Chen wrote:

Oct 05 2010

Gareth Charnock wrote:On 05/10/10 14:41, Michael Chen wrote:Please don't. That was a proof of concept, which had a big influence on D's array operations and the design of D's metaprogramming support. All of the ideas from BLADE will eventually be completely incorporated into array operations. Basically, right now D has DAXPY and SAXPY from BLAS1, implemented as array operations. But it doesn't have anything else at present.

Oct 05 2010

On 05/10/10 16:31, Don wrote:Gareth Charnock wrote:Okay, sorry, I may have somewhat misunderstood the purpose of that library, I hadn't really looked at it in great detail, I just knew it was a math library.On 05/10/10 14:41, Michael Chen wrote:Please don't. That was a proof of concept, which had a big influence on D's array operations and the design of D's metaprogramming support. All of the ideas from BLADE will eventually be completely incorporated into array operations. Basically, right now D has DAXPY and SAXPY from BLAS1, implemented as array operations. But it doesn't have anything else at present.

Oct 05 2010

Gareth Charnock napisaĆ:I've attempted this in the past, however, each time I manage to work up renewed enthusiasm I keep running into compiler bugs that put me off. My current feeling is I should sit back at wait for the language to mature a little.Welcome to the club:) I'm writing matrix modules for my QuantLibD project but compiler/Phobos bugs/changes are slowing me down. I wonder how many people belong to that 'club'. If we join forces, we *might* end up with a usable matrix lib:) -- Tomek

Oct 05 2010

I think lyla was aiming at that. I don't know how usable it is though since it isn't maintained anymore. I just remember he tried to make it kinda backend-independent so you can choose between BLAS and other implementations. http://www.dsource.org/projects/lyla

Oct 09 2010