Re: [fpc-pascal] Optimized matrix multiplication functions for pascal?

2010-10-10 Thread Sven Barth
Am 09.10.2010 07:59, schrieb Bo Berglund: I am translating a bunch of Fortran functions to FPC and I have now come across a problem with a couple of built-in Fortran90 functions: MATMUL multiplies two matrices (arrays) and returns the result. TRANSPOSE reorders the array elemsnts in some

Re: [fpc-pascal] Optimized matrix multiplication functions for pascal?

2010-10-10 Thread Marco van de Voort
In our previous episode, Sven Barth said: Try the unit matrix.pp which is part of FPC's RTL. It also includes overloaded operators if you need them. ^^ Afaik matrix only defines 4x4 or less. Numlib also has a large number of matrix routines (including determinant, eigen values etc), but is

Re: [fpc-pascal] Optimized matrix multiplication functions for pascal?

2010-10-10 Thread Sven Barth
On 10.10.2010 14:17, Marco van de Voort wrote: In our previous episode, Sven Barth said: Try the unit matrix.pp which is part of FPC's RTL. It also includes overloaded operators if you need them. ^^ Afaik matrix only defines 4x4 or less. Numlib also has a large number of matrix routines

[fpc-pascal] Optimized matrix multiplication functions for pascal?

2010-10-09 Thread Bo Berglund
I am translating a bunch of Fortran functions to FPC and I have now come across a problem with a couple of built-in Fortran90 functions: MATMUL multiplies two matrices (arrays) and returns the result. TRANSPOSE reorders the array elemsnts in some predefined way. The call in the Fortran

[fpc-pascal] Optimized matrix multiplication functions for pascal?

2010-10-09 Thread Bo Berglund
I am translating a bunch of Fortran functions to FPC and I have now come across a problem with a couple of built-in Fortran90 functions: MATMUL multiplies two matrices (arrays) and returns the result. TRANSPOSE reorders the array elemsnts in some predefined way. The call in the Fortran

Re: [fpc-pascal] Optimized matrix multiplication functions for pascal?

2010-10-09 Thread Honza
2010/10/9 Bo Berglund bo.bergl...@gmail.com: So I need to get hold of two Delphi functions: function matmul(X, Y: array of double): array of double; and function transpose(X: array of double): array of double; Where can I find such functions? I am not a matematician myself so I don't know

Re: [fpc-pascal] Optimized matrix multiplication functions for pascal?

2010-10-09 Thread Michael Van Canneyt
You may want to look at the matrix.pp unit included in the rtl. It contains many matrix operations. Michael. On Sat, 9 Oct 2010, Bo Berglund wrote: I am translating a bunch of Fortran functions to FPC and I have now come across a problem with a couple of built-in Fortran90 functions:

Re: [fpc-pascal] Optimized matrix multiplication functions for pascal?

2010-10-09 Thread Reimar Grabowski
On Sat, 9 Oct 2010 14:42:47 +0200 Bo Berglund bo.bergl...@gmail.com wrote: Where can I find such functions? I am not a matematician myself so I don't know what these functions really do... Take a look here: http://www.j3d.org/matrix_faq/matrfaq_latest.html R. -- A: Because it messes up the

Re: [fpc-pascal] Optimized matrix multiplication functions for pascal?

2010-10-09 Thread Paulo Costa
On 09/10/2010 06:59, Bo Berglund wrote: I am translating a bunch of Fortran functions to FPC and I have now come across a problem with a couple of built-in Fortran90 functions: MATMUL multiplies two matrices (arrays) and returns the result. TRANSPOSE reorders the array elemsnts in some

Re: [fpc-pascal] Optimized matrix multiplication functions for pascal?

2010-10-09 Thread Adriaan van Os
Bo Berglund wrote: I am translating a bunch of Fortran functions to FPC and I have now come across a problem with a couple of built-in Fortran90 functions: Matrix functions can be implemented efficiently using SSE, see e.g. http://www.cortstratton.org/articles/OptimizingForSSE.php.

Re: [fpc-pascal] Optimized matrix multiplication functions for pascal?

2010-10-09 Thread Reimar Grabowski
On Sat, 09 Oct 2010 16:40:12 +0200 Adriaan van Os f...@microbizz.nl wrote: Matrix functions can be implemented efficiently using SSE, see e.g. http://www.cortstratton.org/articles/OptimizingForSSE.php. FPC can generate the SSE instructions for you on compilation. My tests showed that this is

Re: [fpc-pascal] Optimized matrix multiplication functions for pascal?

2010-10-09 Thread David W Noon
On Sat, 9 Oct 2010 07:59:26 +0200, Bo Berglund wrote about [fpc-pascal] Optimized matrix multiplication functions for pascal?: [snip] Where can I find such functions? They are available in a library named LAPACK. You can find downloads by doing a Google search on this name. It is coded

Re: [fpc-pascal] Optimized matrix multiplication functions for pascal?

2010-10-09 Thread Adriaan van Os
David W Noon wrote: On Sat, 9 Oct 2010 07:59:26 +0200, Bo Berglund wrote about [fpc-pascal] Optimized matrix multiplication functions for pascal?: [snip] Where can I find such functions? They are available in a library named LAPACK. You can find downloads by doing a Google search