equivalent of __declspec(align(32)) double aligned_array[size] ?

equivalent of __declspec(align(32)) double aligned_array[size] ?


What's the equivalent using the Intel compiler of the MSVC __declspec(align(32)) double aligned_array[size] ?

Or just using the -align compiler option and declaring as shown below is enough to ensure AVX alignment?

double aligned_array[size];

btw I would like to find the official Intel Compiler release 13 beta user guide and extensive documentation in PDF is there any?

Best regards,

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Best Reply

Hello Giovanni,

it's the same (both for Windows* & Linux*/Mac OS* X). The following links to our documentation might be useful for you:

Function Annotations and the SIMD Directive for Vectorization:

Alignment Support:

Details of Intel® Advanced Vector Extensions Intrinsics:

BETA phase is already over and there's no access to it anymore. However, in one month there will be the new version out.

Best regards,

Georg Zitzlsberger

declspec usage is the same in ICL as in MSVC.  Setting AVX option by itself doesn't increase data alignments.
I see nothing in the docs to indicate that -Qsfalign may have been extended beyond 16-byte alignment, so you will need the declspec or equivalent if you want 32-byte alignment.  You would only require 32-byte alignment if you specify syntax which requires it, such as #pragma vector aligned,  __assume_aligned__, or aligned move intrinsics.  Other AVX intrinsics support unaligned data (but 32-byte alignment may show performance advantage).
You have a contradiction in terms between "official" release and beta.  If you have the beta compiler, you have what documentation there was.  It looks somewhat preliminary to me.  Don't expect a .pdf.
As Georg implied, the 2011 documentation should still be useful (and more "official") until we have a 2013 release.

Leave a Comment

Please sign in to add a comment. Not a member? Join today