[Visual C++]Forcing memory alignment of variables/data-structures
- by John
I'm looking at using SSE and I gather aligning data on 16byte boundaries is recommended. There are two cases to consider:
float data[4];
struct myystruct
{
float x,y,z,w;
};
I'm not sure the first case can be done explicitly, though there's perhaps a compiler option I could use? In the second case I remember being able to control packing in old versions of GCC several years back, is this still possible?