RE: [GD-Windows] Data alignment...
Brought to you by:
vexxed72
From: Gareth L. <GL...@cl...> - 2002-01-25 10:33:24
|
Hi. I'm not sure if vc7 comes with the proccecor pack built in, but if it doesn't you should download it from Microsoft's site. Then use the new __declspec (align) tags, and if needed use the align_malloc() and align_free() functions. Regards, Gareth Lewin > -----Original Message----- > From: Wayne Coles [mailto:wc...@re...] > Sent: 25 January 2002 09:46 > To: 'gam...@li...' > Subject: [GD-Windows] Data alignment... > > > 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 > > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > |