Re: Passing a 2 dimensional array from fortran to c++
- From: Jan Vorbrüggen <jvorbrueggen-not@xxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 15:01:59 +0200
Two things:
- Between Fortran and C, arrays will be virtually transposed because they use the array indices in inverse order.
- From what little I understand of C, it seems to me that you are allocating each column seperately. Fortran doesn't do that: by default, a 2D array will occupy contiguous memory. Try allocating all of the array's memory in one chunk.
Jan .
- References:
- Passing a 2 dimensional array from fortran to c++
- From: Sam
- Re: Passing a 2 dimensional array from fortran to c++
- From: glen herrmannsfeldt
- Re: Passing a 2 dimensional array from fortran to c++
- From: Rich Townsend
- Re: Passing a 2 dimensional array from fortran to c++
- From: glen herrmannsfeldt
- Re: Passing a 2 dimensional array from fortran to c++
- From: Sam
- Passing a 2 dimensional array from fortran to c++
- Prev by Date: Re: Recursion
- Next by Date: Re: Recursion
- Previous by thread: Re: Passing a 2 dimensional array from fortran to c++
- Next by thread: moduel VS parameters
- Index(es):