[phobos] byte alignment for arrays
Steve Schveighoffer
schveiguy at yahoo.com
Mon Jun 28 14:07:56 PDT 2010
All,
Should there be something in the runtime that defines the minimum align size for things like memory blocks? That might make this easier to deal with from a design perspective...
-Steve
----- Original Message ----
> From: Jason Spencer <spencer8 at sbcglobal.net>
>
> Hmmm. The natural thing would be to have some type to describe these
> 128-bit values (akin to __m128 in gcc, Intel and MS compilers) and use sizeof on
> that. I don't see that D has any MMX/SSE intrinsics, so I don't know if
> there is a standard type. If you don't have such a thing defined by the
> compiler, I'd be tempted to define it, based on which version of the compiler
> will compile this code (i.e. 32- or 64-bit dmd). Then you can use that in
> your sizeof. Maybe you'll get lucky, and that will become standard
> :)
More information about the phobos
mailing list