Community
cancel
Showing results for 
Search instead for 
Did you mean: 
JohnNichols
Valued Contributor I
103 Views

Cross Power Spectral Density

Has anyone seen a code for the Cross Power Spectral Density Function -- it exists in MATLAB, but I would rather not use MATLAB for obvious reasons.

John

0 Kudos
10 Replies
Zhen_Z_Intel
Employee
103 Views

Hi John,

I am afraid there's no direct function call for Cross Power Spectral Density, however its actually the Fourier transform of cross-correlation. Intel IPP provides both cross-correlation & FFT function, you could use "CrossCorrNorm" + FFTFwd.

Best regards,
Fiona

JohnNichols
Valued Contributor I
103 Views

Thank you --- that is simple. 

JohnNichols
Valued Contributor I
103 Views

So as I read the literature I cannot call IPP from Fortran 

I have to use C++

John

Zhen_Z_Intel
Employee
103 Views

Hi Nichols,

MKL also provides interface for convolution/correlation, although we do not provide a direct call for cross-correlation, however you probably could derive formula to use convolution. You could refer vslConvExec and MKL FFT functions. Thanks.

Best regards,
Fiona

JohnNichols
Valued Contributor I
103 Views

Dear Fiona:

Thanks.  That is not hard. Capture.PNG

 

Thanks. 

 

JohnNichols
Valued Contributor I
103 Views

Dear Fiona:

So I installed the IPP from 2017.  I thought it was included in the Parallel Studio but it is not that I could see.

I ran the ippvars and set the VC++ directories in a VS 2017 C++ shell program. The sample is attached.

When I in it -- I get the following compile errors  - I am a bit lost at this stage. This is the standard sample program on your IPP website

thanks

John

Capture.PNG

Gennady_F_Intel
Moderator
103 Views

you need to link with ipps.lib ippcore.lib and libiomp5md.lib. Please have a look at the IPP User's Guide to see the details of "Linking Your Application with Intel® Integrated Performance Primitive" or "How to "Automatically Linking Your Microsoft* Visual Studio* Project with Intel IPP"

JohnNichols
Valued Contributor I
103 Views

https://software.intel.com/en-us/node/503902

Is one example of the IPP sample code, but you have another on your website does not point to the linker options it repoints to the vcc++ directory requirments -- it had me fooled for several hours

I cannot find it again - tha above one is correct -- but the other is not

 

JohnNichols
Valued Contributor I
103 Views

I have it all almost compiling, but INTEL documentation uses a function print_32f that is not documented.  I realize it is easy to fix, but you have it all through the pdf files,, a sample would save 20 minutes of heartache.

Ta

john

JohnNichols
Valued Contributor I
103 Views

IppStatus printf_32f(char* name, Ipp32f a[16], int b)
{
 printf("    %s \n",name);
 int i;
 for (i = 0; i < 16; i++) {
  printf("%lf\n", a);
 }
  printf("\n");
 return 0;
}

 

Reply