Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

mkl vml function error

Ye_Myint
Beginner
344 Views
I am using mkl vml function vzmul to find the product of 2 complex vectors. but in all documentations and examples, the prototype is vzmul(const int n, MKL_Complex16 a[], MKL_Complex16 b[], MKL_Complex16 r[])

but in the mkl_vml_functions.h, the declaration is _vml_api(void,vzmul,(const MKL_INT *n, const MKL_Complex16 a[], const MKL_Complex16 b[], MKL_Complex16 r[]))

which applies n is const int*


Why is that so?
0 Kudos
2 Replies
Andrey_N_Intel
Employee
344 Views

Hello,

If you use the vector math function for element by element multiplication in C application you need to use the API

vzMul( n, a, b, y );

which is declared in the mkl_vml_functions.h as

_Vml_Api(void,vmzMul,(const MKL_INT n, const MKL_Complex16 a[], const MKL_Complex16 b[], MKL_Complex16 r[]))

If your application is developed in Fortran then you might want to call the VML routine in the following way

call vzmul( n, a, b, y )

Declaration of the routine is available in mkl_vml.f90 file.

Also, please have a look at the description of C and Fortran API of this function in Intel MKL Manual, Chapter 9 Vector Math Functions.
Please, let me know if this answers your question.

Thanks,
Andrey

0 Kudos
Ye_Myint
Beginner
344 Views
Yes, my error. all C functions use small,cap syntax. I should call vzMul().
0 Kudos
Reply