Re: user-defined alignment in gfortran



glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx> schrieb:

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.

Maybe I didn't say it quite right.

No hardware that I know of has instruction that operate on
complex data. There is no complex add or complex multiply
instruction. Operations are done on separate real and imaginary
parts using ordinary floating point instructions.

I think this is rather irrelevant for my problem. On the Cell-BE
architecture DMA transfers have to be 16 byte aligned. So I want my
Array or whatever I allocate in Fortran 16 byte aligned so that I can
DMA-transfer it to the Cell's SPU's later.

Regards,
Timo
.



Relevant Pages

  • Re: InterlockedExchange And Memory Alignment
    ... There is a Windows API that has an alignment ... Intel documentation says that memory ... alignment is not required for LOCK. ... LOCK instruction Causes the processor?s LOCK# signal to be asserted ...
    (microsoft.public.win32.programmer.kernel)
  • Re: get/put unaligned helpers
    ... Because the aligned version on lots of CPUs is one instruction ... The compiler is always told by the programmer what alignment to expect -- ... You can use packed structs to ask GCC to emit code sequences ...
    (Linux-Kernel)
  • Re: Need to execute an assembly instruction from C
    ... I need to continue executing as if nothing happened. ... easiest way of doing that would be to turn off alignment exceptions, ... a hardware breakpoint at the instruction+4, jump back to the instruction, ...
    (comp.sys.arm)
  • Re: Need to execute an assembly instruction from C
    ... I need to continue executing as if nothing happened. ... easiest way of doing that would be to turn off alignment exceptions, ... a hardware breakpoint at the instruction+4, jump back to the instruction, ...
    (comp.sys.arm)
  • Re: Menu Button
    ... "S Shulman" schrieb: ... If you want to be able to set the alignment of the context menu, ...
    (microsoft.public.dotnet.languages.vb)