Complex arrays

The story for arrays of complex numbers is, well, a bit more complex. There are two possible aways of arranging complex numbers (the indexing below is for data centering):

Interleaved: In this approach, the real and imaginary parts are stored in successive array locations in arrays of [$x$,$y$,$z$]:
Re[0,0,0], Im[0,0,0], Re[1,0,0], Im[1,0,0], $\ldots$
This is the most common approach.
Split: In this approach, the entire real array part is stored contiguously, followed by the entire imaginary part in arrays of [$x$,$y$,$z$]:
Re[0,0,0], Re[1,0,0], Re[2,0,0], $\ldots$,
Im[0,0,0], Im[1,0,0], Im[2,0,0], $\ldots$
This approach turns out to be slightly faster on some parallel computers (such as the dist_fft routines on an Apple cluster; see Sec. 6.2).
To make code that will work in either of these two conventions, you must follow some special mechanisms to work with complex arrays: Also note that the typedefs of dm_array_real and dm_array_complex change between float and double according to the presence or absence of the #define variable DM_ARRAY_DOUBLE.

Microscope User 2008-11-25