Re: Fortran to C array convertor
- From: Tim Prince <timothyprince@xxxxxxxxxxxxx>
- Date: Thu, 16 Nov 2006 14:40:42 GMT
Peter wrote:
Hi guys,I'm not clear on your aims, but you might use f2c as a starter for C code which accesses f77 arrays, so you could copy them to the format you like. You could write a macro for each number of Fortran subscripts you want to support, if you are into that style of C. Or, you could use a Fortran program with TRANSPOSE, if that's what you have in mind. If the problem with complexity is in your C formats, this may not be the place to ask.
I'm writing a wrapper in C for one of our libraries that we want users
to be able to call from Fortran. The one problem we have is converting
Fortran arrays into row-major C arrays. We don't want our users to
have to worry about array formats, instead we want to convert the
Fortran array into the C array before it is passed onto the library.
Does anyone know of a simple way of doing this? I'm finding it very
hard to write an algorithm that does this for more than 2 dimensions.
.
- References:
- Fortran to C array convertor
- From: Peter
- Fortran to C array convertor
- Prev by Date: Fortran to C array convertor
- Next by Date: Re: Fortran to C array convertor
- Previous by thread: Fortran to C array convertor
- Next by thread: Re: Fortran to C array convertor
- Index(es):
Relevant Pages
|