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

Calling of VML Mathematical Functions [in-place operation]

Marcus_W_1
Beginner
644 Views

HI,

I have a question concerning the use of Vector Mathematical Functions. The documentation does not contain a hint whether one can apply the same argument twice [in-place operation] without any side effects. For example for two vectors a, b the operation a = a + b should be computed via

vdadd( n, a, b, a ); [in-place operation]

instead of creating a working array y first and copy the result to array a again:

[plain]y = new double;

vdadd( n, a, b, y );

copy(source: y, destination: a);[/plain]

I have tested it and it works for vdadd. My question is is not restricted to vdadd, more general to all other Mathematical functions as for example vdsqr, vzconj, vdpow etc. I can test each function before I will use it but this is rather time consuming and can change from release to release of the MKL Library.

Thanks in advance,

Markus

0 Kudos
3 Replies
Chao_Y_Intel
Moderator
644 Views

Hi Markus, 

It is true that all of the VML can work with the in-plance operation. Check the document here: 

http://software.intel.com/sites/products/documentation/doclib/mkl_sa/11/mklman/GUID-CF5F14C8-F9B1-4846-87F5-FB1CC0AD5972.htm

Thanks,

Chao

0 Kudos
Marcus_W_1
Beginner
644 Views

Hi Chao,

thank you very much, I was blind...

Markus

0 Kudos
Royi
Novice
644 Views

I think the updated place to look for it is:

Intel MKL Developer Reference - Vector Mathematical Functions

At least the In Place support holds for Intel MKL 2018 Update 2.

0 Kudos
Reply