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

How to use library to create a power spectrum

Glowlink_Glowlink
418 Views
Hi,
I'm new to the Math Kernal Library.
Are there any examples that show how to to take a set to complex data and convert it to a power spectrum
thx
0 Kudos
3 Replies
ArturGuzik
Valued Contributor I
418 Views
Hi,

I might be wrong but in MKL itself you'll need to use FFT routines and obtain it yourself. However, as far as I can remember, in IPP library there is PowerSpectr function which takes complex vector and computes its power spectrum in single call.

A.
0 Kudos
Gennady_F_Intel
Moderator
418 Views
as usual Artur is right. :). Yes. Please see into IPP signal processing domain / Conversion Functions:
you can find such functions for double, float and short complex data types:
as an example
IppStatus ippsPowerSpectr_64fc(const Ipp64fc* pSrc, Ipp64f* pDst, int len);
where 64fc ( in IPP notation) == double complex ( MKL notation).
--Gennady
0 Kudos
Dmitry_B_Intel
Employee
418 Views

Hi,

Given the spectrum y=fft(x), power spectrum of x is ps=y*conj(y), the computation can be done with a simple loop readily vectorizable bycompiler, or with a call to MKL VML function, like this:
vcMulByConj(n,y,y,ps)

Thanks
Dima

0 Kudos
Reply