[fpc-pascal] Optimized matrix multiplication functions for pascal?
Paulo Costa
paco at fe.up.pt
Sat Oct 9 16:27:56 CEST 2010
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 predefined way.
>
> The call in the Fortran routine is like this:
>
> b = matmul(transpose(a), a)
>
> where a and b are equal sized dynamic arrays of double.
>
> 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 what these
> functions really do...
Try:
http://paginas.fe.up.pt/~paco/pmwiki/index.php?n=DynMatrix.DynMatrix
It is a bit more than just those functions but it could solve, for a
while, your problem.
Paulo Costa
More information about the fpc-pascal
mailing list