Community
cancel
Showing results for 
Search instead for 
Did you mean: 
jmorgie
Beginner
102 Views

Align data

Jump to solution

I have several large static arrays which I would like aligned on 64 byte boundaries.

static complex R[4096][2048];

static complex Q[2048][2048];

using icpc, Linux, running on Itanium2 cores.

I am guessing that there is a #pragma for this?

is there a good reference for the icpc #pragma allowed?

thanks

0 Kudos
1 Solution
TimP
Black Belt
102 Views

icpc should accept the same __attribute__((aligned(16))) as g++, and also the MSVC style stuff. You could try increasing it from 16 to 64, but that may depend on binutils glibc and kernel as to whether it is actually effective. You might look up the ld ALIGN in the binutils manual, as well as references about supporting larger than default values for g++ -mpreferred-stack-boundary (default value 4 means 2^4).

16-byte alignment is sufficient for all the alignment analyses required by icpc on either ia64 or current Xeon.

View solution in original post

2 Replies
TimP
Black Belt
103 Views

icpc should accept the same __attribute__((aligned(16))) as g++, and also the MSVC style stuff. You could try increasing it from 16 to 64, but that may depend on binutils glibc and kernel as to whether it is actually effective. You might look up the ld ALIGN in the binutils manual, as well as references about supporting larger than default values for g++ -mpreferred-stack-boundary (default value 4 means 2^4).

16-byte alignment is sufficient for all the alignment analyses required by icpc on either ia64 or current Xeon.

View solution in original post

jmorgie
Beginner
102 Views
I had no idea this attribute thing existed. thanks
Reply