This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Passing matrices from c++ to fortran
- From: "Timothy C Prince" <tprince at myrealbox dot com>
- To: americojunior at mec dot puc-rio dot br
- Cc: gcc-help at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Tue, 31 Oct 2006 19:57:17 +0000
- Subject: 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