[GD-Windows] Data alignment...
Brought to you by:
vexxed72
From: Wayne C. <wc...@re...> - 2002-01-25 09:52:01
|
I've been doing some SSE optimisations lately using VC7. Does anyone know of a built-in way of allocating data on 16 byte bounds (or preferably user specified alignment)? I've flagged the structure to be aligned on 16 bytes which works when declaring it, but not after calling new (I wouldn't expect malloc to align, as it knows nothing of the type of allocation, but I thought new would, ahhh I'm so naive :). According to an intel doc, there is an intrinsic function _mm_malloc which allows you to specify an alignment but VC7 doesn't have this function nor can I find something similar. I've resorted to writing my own _mm_malloc and overloading operator new and delete. Just wondering if I missed something obvious and wasted my time (this a home project, so waste of time isn't as bad but just as irritating :). Thanks, Wayne -Virus scanned and cleared ok |