Any chance of 128-bit alignment of static arrays?
Walter Bright
newshound1 at digitalmars.com
Mon Oct 29 11:36:08 PDT 2007
Don Clugston wrote:
> When using SSE/SSE2, it's necessary to have arrays aligned to 128-bit
> (16 byte) boundaries. For DMD Windows, this is satisfied for arrays
> allocated on the heap, but not for arrays on the stack, nor for static
> arrays.
>
> There's no workaround that I know of; for example, you cannot put the
> array in a struct and specify an alignment, because the struct itself
> will only be aligned to a 8 byte boundary.
>
> I recognize that there are major difficulties in aligning arrays on the
> stack, but could we get 16 byte -aligned double and float static arrays
> and array literals? Or is this an OPTLINK limitation?
It's not an optlink problem. Let me look into it.
More information about the Digitalmars-d
mailing list