Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

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

Azua_Garcia__Giovann
783 Views
Hello,

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?

TIA,
Best regards,
Giovanni
0 Kudos
1 Solution
Georg_Z_Intel
Employee
783 Views
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:
http://redfort-software.intel.com/sites/products/documentation/hpc/composerxe/en-us/2011Update/cpp/lin/optaps/common/optaps_vec_support.htm

Alignment Support:
http://redfort-software.intel.com/sites/products/documentation/hpc/composerxe/en-us/2011Update/cpp/lin/intref_cls/common/intref_alignment_support.htm

Details of Intel® Advanced Vector Extensions Intrinsics:
http://redfort-software.intel.com/sites/products/documentation/hpc/composerxe/en-us/2011Update/cpp/lin/intref_cls/common/intref_avx_details.htm

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

View solution in original post

0 Kudos
2 Replies
Georg_Z_Intel
Employee
784 Views
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:
http://redfort-software.intel.com/sites/products/documentation/hpc/composerxe/en-us/2011Update/cpp/lin/optaps/common/optaps_vec_support.htm

Alignment Support:
http://redfort-software.intel.com/sites/products/documentation/hpc/composerxe/en-us/2011Update/cpp/lin/intref_cls/common/intref_alignment_support.htm

Details of Intel® Advanced Vector Extensions Intrinsics:
http://redfort-software.intel.com/sites/products/documentation/hpc/composerxe/en-us/2011Update/cpp/lin/intref_cls/common/intref_avx_details.htm

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
0 Kudos
TimP
Honored Contributor III
783 Views
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.
0 Kudos
Reply