Passing matrices from c++ to fortran
Erik Edelmann
erik.edelmann@iki.fi
Tue Oct 31 20:03:00 GMT 2006
On Tue, Oct 31, 2006 at 04:02:53PM -0300, Americo Junior wrote:
> I want to pass a dynamically aloccated matrix from c++ code to a fortran
> subroutine.
>
> I know how to do this with a static matrix, but with dynamical matrix
> there are some difficulties.
It's some time ago I did anything like this, so I might be
overlooking/forgetting something now, but I think that if you make sure
your matrix is one big contiguous pice of memory, and take into account
that the matrix will appear transposed in your fortran code, it ought to
work.
Erik
More information about the Gcc-help
mailing list