Csound Csound-dev Csound-tekno Search About

[Csnd] Linear algebra opcodes

Date2007-12-11 18:37
FromMichael Gogins
Subject[Csnd] Linear algebra opcodes
I am designing a set of Csound opcodes to bring standard linear algebra routines into the Csound orchestra language. 

This would essentially be most of BLAS levels 1, 2, and 3 plus LAPACK: all arithmetic between real and complex scalars, vectors, and matrices including dot products; norms and determinants; powers and exponents; and matrix inverse, linear solutions, and matrix decompositions including eigenvalues. 

The Csound data types that would work with these opcodes would include irate and krate scalars and complex, arate real vectors, function tables as real vectors, fsigs as complex vectors, wsigs as complex vectors, and irate custom-allocated real and complex vectors and matrices.

I will probably go ahead and just do this, but if people are interested enough perhaps we could get it into the next release. All of the work required is creating opcode wrappers for existing libraries, and documentation.

For the sake of efficiency, the results of operations should probably go into preallocated objects at the leftmost position in the argument list (except for scalar results). I am not sure about opcode names and signatures. Perhaps names reminiscent of BLAS and LAPACK routines, but with simplified arguments, would be a good idea (e.g. la_dgemv vecout, matin, vecin). Alternatively, more mathematically styled names could be used (e.g. la_dot vecout, matin, vecin).

These opcodes would make it possible to do a good deal of matlab-style DSP directly in the Csound orchestra language, instead of writing new opcodes in C.

Please let me know your thoughts...

Mike



-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Date2007-12-11 20:15
From"Oeyvind Brandtsegg"
SubjectRe: [Cs-dev] Linear algebra opcodes
AttachmentsNone  None  None  None  

Date2007-12-11 20:17
FromAnthony Kozar
SubjectRe: [Cs-dev] Linear algebra opcodes
I am sure many people will find these to be useful additions, Mike.  It is
too bad that Csound does not really have proper data structures for vectors
and matrices, though.

I would prefer longer, more descriptive opcode names than "la_dgemv" which
means nothing to me, personally.

I think I have an old port of LAPACK to MacOS 9 somewhere, but it may be too
old to be compatible with your wrapper ...

Anthony

Michael Gogins wrote on 12/11/07 1:37 PM:

> I am designing a set of Csound opcodes to bring standard linear algebra
> routines into the Csound orchestra language.

> I am not sure about opcode names and signatures. Perhaps
> names reminiscent of BLAS and LAPACK routines, but with simplified arguments,
> would be a good idea (e.g. la_dgemv vecout, matin, vecin). Alternatively, more
> mathematically styled names could be used (e.g. la_dot vecout, matin, vecin).


-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net