Layout in memory
From: David Sagan (dcs16_at_cornell.edu.deletethis)
Date: 07/31/04
- Next message: Robert Corbett: "Re: Sun f90 bad optimization for assumed-shape array"
- Previous message: beliavsky_at_aol.com: "Re: passing an allocatable matrix in a subroutine to the main program"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Jul 2004 23:36:25 -0400
Hello:
I want to pass structures between F95 and C and one way I thought of
doing it was to create a structure that had the same layout in memory on
both the Fortran side and the C side.
I did a little testing and I see that this works but my question is can
I count on different compilers on the *same* platform laying out the
same structure in the same way in memory? (I know I cannot count on the
memory layout to be the same on different platforms). For example, if I
had the structure:
type this_type
real abc
type (sub_type) xyz
... etc.
end type
Will on linux, say, the NAG and Lahey compilers create the same memory
layout for this structure?
-- Thanks for any help, David Sagan
- Next message: Robert Corbett: "Re: Sun f90 bad optimization for assumed-shape array"
- Previous message: beliavsky_at_aol.com: "Re: passing an allocatable matrix in a subroutine to the main program"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|