This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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



-----Original Message-----
From: "Americo Junior" <americojunior@mec.puc-rio.br>
To: gcc-help@gcc.gnu.org
Date: Tue, 31 Oct 2006 16:02:53 -0300 (EST)
Subject: Passing matrices from c++ to fortran

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.

________________________________-
You leave us to guess what you are talking about; no doubt you want to do something implementation dependent.  If you are running on a system where your Fortran supports f2c style assumed-size arrays, you might model your implementation on that.  You would require a flat C array packed by columns, with the column length passed (by reference?) as the explicit-shape specification.



Tim Prince


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