
2 Aug
2012
2 Aug
'12
5:09 a.m.
On Thu, 2 Aug 2012, Daniel Larimer wrote:
I am sure that some types will require proper alignment. Options include always allocating arrays in chunks of 8 bytes by switching to an int64 array and eating the 'overhead'. Anything require alignment greater than 8 bytes?
Note that int64 could have an alignment of 4 while double would have one of 8, or other strange combinations. Also, vector (as in SSE, not std::vector) elements may want bigger alignment (and malloc has a bug on several platforms that it returns insufficiently aligned memory for those). -- Marc Glisse