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.

8 <strong>Intel</strong>® M<strong>at</strong>h Kernel Library User’s GuideExample 8-1 Aligning addresses <strong>at</strong> 16-byte boundaries// ******* C language *******...#include ...void *darray;int workspace...// Alloc<strong>at</strong>e workspace aligned on 16-bit boundarydarray = MKL_malloc( sizeof(double)*workspace, 16 );...// call the program using MKLmkl_app( darray );...// Free workspaceMKL_free( darray )! ******* Fortran language *******...double precision darraypointer (p_wrk,darray(1))integer workspace...! Alloc<strong>at</strong>e workspace aligned on 16-bit boundaryp_wrk = mkl_malloc( 8*workspace, 16 )...! call the program using MKLcall mkl_app( darray )...! Free workspacecall mkl_free(p_wrk)8-2

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

Saved successfully!

Ooh no, something went wrong!