This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Passing matrices from c++ to fortran


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]