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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Language-specific Usage Options 7The implement<strong>at</strong>ion below uses CBLAS:Example 7-3 Using CBLAS interface instead of calling BLAS directly from C#include "mkl.h"typedef struct{ double re; double im; } complex16;extern "C" void cblas_zdotc_sub ( const int , const complex16 *,const int , const complex16 *, const int, const complex16*);#define N 5void main(){int n, inca = 1, incb = 1, i;complex16 a[N], b[N], c;n = N;for( i = 0; i < n; i++ ){a[i].re = (double)i; a[i].im = (double)i * 2.0;b[i].re = (double)(n - i); b[i].im = (double)i * 2.0;}cblas_zdotc_sub(n, a, inca, b, incb,&c );printf( "The complex dot product is: ( %6.2f, %6.2f)\n", c.re, c.im );}Invoking <strong>Intel</strong>® MKL Functions from Java Applic<strong>at</strong>ionsThis section describes examples th<strong>at</strong> are provided with the <strong>Intel</strong> MKL package <strong>and</strong> illustr<strong>at</strong>ecalling the library functions from Java.7-9

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

Saved successfully!

Ooh no, something went wrong!