Re: getting offset of allocatable derived types
- From: nospam@xxxxxxxxxxxxx (Richard Maine)
- Date: Tue, 6 Jan 2009 16:32:05 -0800
<hatingspam2009@xxxxxxxxx> wrote:
and find the offset between wdata(1) and wdata(2) this would give the
sizeof sensor_t. It appears that this does not work for allocatable
arrays as mentioned.
No, it works fine and does get you the size in question. I think you
don't yet understand that the problem is far more fundamental. It is not
just a matter of computing some size.
The actual data for the allocatable component is stored "elsewhere" in
memory. If you are trying to send an object with such a componen via
something like HDF or anything else that wants to send a contiguous
chunck of memory (i.e. anything that doesn't explicitly know details
about the implementation of the particular type in question), then it
isn't going to work at all. The size isn't the problem. The assumption
that all the data is contiguously stored in *ANY* size is the problem.
--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
.
- Follow-Ups:
- Re: getting offset of allocatable derived types
- From: James Van Buskirk
- Re: getting offset of allocatable derived types
- References:
- getting offset of allocatable derived types
- From: hatingspam2009
- Re: getting offset of allocatable derived types
- From: Craig Powers
- Re: getting offset of allocatable derived types
- From: hatingspam2009
- getting offset of allocatable derived types
- Prev by Date: Re: What is the value of pi?
- Next by Date: Internal read from parameter
- Previous by thread: Re: getting offset of allocatable derived types
- Next by thread: Re: getting offset of allocatable derived types
- Index(es):
Relevant Pages
|