Re: user-defined alignment in gfortran
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx>
- Date: Tue, 29 May 2007 01:56:52 -0800
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.)
Though I have complained much in the past about the Microsoft
compilers that didn't offer any more than four byte alignment since
that was good enough for the 486.
I presume your statement about C is really about a specific
C compiler. Also, some linkers may have the ability to
specify alignment for external symbols.
-- glen
.
- Follow-Ups:
- Re: user-defined alignment in gfortran
- From: Timo Schneider
- 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
- 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
|
|