Re: user-defined alignment in gfortran
- From: Timo Schneider <timos@xxxxxxxxxxxxxxx>
- Date: Tue, 29 May 2007 10:00:35 +0000 (UTC)
glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx> schrieb:
Dr Ivan D. Reid wrote:
On Tue, 29 May 2007 00:22:30 +0000 (UTC), Timo Schneider
<timos@xxxxxxxxxxxxxxxxxx> wrote in <slrnf5ms51.2q2.timos@xxxxxxxxxxxxxxxx>:
How do I tell gfortran to allign a complex*16 array at 16 byte
boundaries? This is necessary on the Cell BE architecture for being able
to do DMA transfer. In C I can write __attribute__((aligned(16))) and
it works. How can I do that with gfortran?
I wouldn't think you'd have to. I'd expect it to happen
automagically. ...or are you trying to align things up within a derived
type? Usual advice in that case is to assign your type/structure from
the largest elements down to the smallest, with character*? at the end.
Since a COMPLEX*16 variable is operated on, as far as Fortran is
concerned, as two eight byte real values it would seem in that
sense that eight byte alignment would be good enough. (It would
be interesting to have a processor with complex operations.)
Mm, why? If I have a COMPLEX*16 variable placed somwhere with eight byte
alignment, there can be two cases: It is 16 Byte aligned or not, in
that case only the second part of the variable falls together wih a 16
bit boundary.
I presume your statement about C is really about a specificYep, gcc.
C compiler.
Regards,
Timo
.
- Follow-Ups:
- Re: user-defined alignment in gfortran
- From: glen herrmannsfeldt
- Re: user-defined alignment in gfortran
- References:
- user-defined alignment in gfortran
- From: Timo Schneider
- Re: user-defined alignment in gfortran
- From: Dr Ivan D. Reid
- Re: user-defined alignment in gfortran
- From: glen herrmannsfeldt
- user-defined alignment in gfortran
- Prev by Date: Re: user-defined alignment in gfortran
- Next by Date: Re: user-defined alignment in gfortran
- Previous by thread: Re: user-defined alignment in gfortran
- Next by thread: Re: user-defined alignment in gfortran
- Index(es):
Relevant Pages
|