Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

complex auto correlation using MKL

Lingzi_P_
Beginner
157 Views

I am trying to use MKL for autocorrelation of complex vectors XX:

        complex(kind=4),allocatable,dimension(:) :: XX, CXX

        COMPLEX(kind=4),allocatable,dimension(:) :: CRXX

         .......

        !     Do the 1 dimensional complex autocorrelation.
        status = vslccorrnewtask1d(task, VSL_CORR_MODE_FFT, NZONE, NZONE, NZONE)
        status = vslccorrexec1d(task, XX, 1, XX, 1, CRXX, 1)

 

I have a very naive implementation of auto correlation with complex numbers which I used to verify the result of MKL's implementation. And it suggest that the result is incorrect. The only way I can make it work is to pass conjugate of XX instead of XX as the second input vector. This doesn't make too much sense to me and also the result seems to be scaled by 2.

 

Appreciate if some one can point out what I have done wrong in the above code and how can I get correct result?

Regards,

0 Kudos
1 Reply
Gennady_F_Intel
Moderator
157 Views

we would recommend you have a look at the vslcCorrExec1D  example - vslccorrexec1d.f ( mklroot\examples\vslf\source directory) which shows how properly call this function

Reply