13.07.2015 Views

Intel(R) - Computational and Systems Biology at MIT

Intel(R) - Computational and Systems Biology at MIT

Intel(R) - Computational and Systems Biology at MIT

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3 <strong>Intel</strong>® M<strong>at</strong>h Kernel Library User’s GuideConceptILP64 interface is provided for the following two reasons:• To support huge d<strong>at</strong>a arrays, th<strong>at</strong> is, arrays with more than 2 billion elements• To enable compiling your Fortran code with the -i8 compiler option.The <strong>Intel</strong>® Fortran Compiler supports the -i8 option for changing behavior of the INTEGERtype. By default the st<strong>and</strong>ard INTEGER type is 4-byte. The -i8 option makes the compilertre<strong>at</strong> INTEGER constants, variables, function <strong>and</strong> subroutine parameters as 8-byte.The ILP64 binary interface uses 8-byte integers for function parameters th<strong>at</strong> define arraysizes, indices, strides, etc. At the language level, th<strong>at</strong> is, in the *.f90 <strong>and</strong> *.fi filesloc<strong>at</strong>ed in the <strong>Intel</strong> MKL include directory, such parameters are declared as INTEGER.To bind your Fortran code with the ILP64 interface, you must compile your code with the-i8 compiler option. And vice-versa, if your code is compiled with -i8, you can bind it onlywith the ILP64 interface, as the LP64 binary interface requires the INTEGER type to be4-byte.Note th<strong>at</strong> some <strong>Intel</strong> MKL functions <strong>and</strong> subroutines have scalar or array parameters oftype INTEGER*4 or INTEGER(KIND=4), which are always 4-byte, regardless of whether thecode is compiled with the -i8 option.For the languages of C <strong>and</strong> C++, <strong>Intel</strong> MKL provides the MKL_INT type as a counterpart ofthe INTEGER type for Fortran. MKL_INT is a macro defined as the st<strong>and</strong>ard C/C++ type intby default. However, if the MKL_ILP64 macro is defined for the code compil<strong>at</strong>ion, MKL_INTis defined as a 64-bit integer type. To define the MKL_ILP64 macro, you may call thecompiler with the -DMKL_ILP64 comm<strong>and</strong>-line option.<strong>Intel</strong> MKL also defines the type MKL_LONG for maintaining ILP64 interface in the specificcase of FFT interface for C/C++. The MKL_LONG macro is defined as the st<strong>and</strong>ard C/C++type long by default; <strong>and</strong> if the MKL_ILP64 macro is defined for the code compil<strong>at</strong>ion,MKL_LONG is defined as a 64-bit integer type.NOTE. The type int is 32-bit for the <strong>Intel</strong>® C++ compiler, as well as formost of modern C/C++ compilers. The type long is 32- or 64-bit for the<strong>Intel</strong>® C++ <strong>and</strong> comp<strong>at</strong>ible compilers, depending on the particular OS.In the <strong>Intel</strong> MKL interface for the C or C++ languages, th<strong>at</strong> is, in the *.h header filesloc<strong>at</strong>ed in the <strong>Intel</strong> MKL include directory, such function parameters as array sizes, indices,strides, etc. are declared as MKL_INT.The FFT interface for C/C++ is the specific case. The header file mkl_dfti.h uses theMKL_LONG type for both explicit <strong>and</strong> implicit parameters of the interface functions.Specifically, type of the explicit parameter dimension of the function3-6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!