#include #include "mkl_types.h" #include "mkl.h" extern "C" void zdotc(MKL_Complex16 *pres, const int *n, const MKL_Complex16 *x, const int *incx, const MKL_Complex16 *y, const int *incy); #define N 5 int main() { int n, inca = 1, incb = 1, i; MKL_Complex16 a[N], b[N], c; n = N; for( i = 0; i < n; i++ ){ a[i].real = (double)i; a[i].imag = (double)i * 2.0; b[i].real = (double)(n - i); b[i].imag = (double)i * 2.0; } zdotc(&c, &n, a, &inca, b, &incb ); printf( "The complex dot product is: ( %6.2f, %6.2f)\n", c.real, c.imag ); }