3 ms·
Have you actually tried and verified that? Reading the docs I've had an impression that it says that the "aligned" is for the alignment inside of the structures
by acqq 10y ago
Have you actually tried and verified that? Reading the docs I've had an impression that it says that the "aligned" is for the alignment inside of the structures, and you here declare the simple type?
- qb45 10y agoI wouldn't have posted this without checking. And as far as documentation goes, they say this attribute applies to "types" and the example they give is struct S { short f[3]; } __attribute__ ((aligned (8))); where it actually is used outside of a struct so that this whole 6B thing is aligned to 8B instead of the default 2B.
- acqq 10y agoThanks! Are you able to post how the generated asm of their innermost loop looks like with SSE2 turned on? I mean the equivalent of theirs .L13: movdqa (%r8), %xmm2 ...
- qb45 10y agomovdqu, obviously. And the code is shorter now, I guess it drops this part responsible for processing the first 1~3 elements of the array to reach 16B alignment.