Re: user-defined alignment in gfortran
- From: Louis Krupp <lkrupp@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 29 May 2007 15:17:58 -0600
Timo Schneider wrote:
Richard Maine <nospam@xxxxxxxxxxxxx> schrieb:glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx> wrote:
No hardware that I know of has instruction that operate onReread the original post. He was not talking about Fortran operations 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.
the complex data. He specifically cited DMA transfer as the reason for
the request and he said it was a specific array. Doesn't sound to me as
though it directly had anything to do with it being complex, but just
that this particular array was the one involved withthe DMA transfer.
Yes! I dont care about the type of the array, I just want the array to
be 16-byte aligned.
I can tell you how I would do it in C; you could probably do something similar in Fortran, although you might give up some portability.
Start with the assumption that dynamic allocation will give you an address that is eight-byte aligned, so figure out how many real*8 elements you need, and add one. Do the allocation. Pass the returned address to a C routine that will tell you if it's on a 16-byte boundary. If it's on a 16-byte boundary, use that address. If it's not, check to make sure that it *is* on an 8-byte boundary, and use the address of the next element, which *will* be on a 16-byte boundary.
I wouldn't be surprised if there were better, easier ways to do it.
Louis
.
- 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
- Re: user-defined alignment in gfortran
- From: glen herrmannsfeldt
- Re: user-defined alignment in gfortran
- From: Timo Schneider
- Re: user-defined alignment in gfortran
- From: glen herrmannsfeldt
- Re: user-defined alignment in gfortran
- From: Richard Maine
- Re: user-defined alignment in gfortran
- From: Timo Schneider
- user-defined alignment in gfortran
- Prev by Date: Re: IF statements
- Next by Date: Re: Salford Fortran - Double Precision product
- Previous by thread: Re: user-defined alignment in gfortran
- Next by thread: Re: user-defined alignment in gfortran
- Index(es):
Relevant Pages
|