Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Where is FFTSpec_R_64f defined?

cernek
Beginner
528 Views

As I mentioned in a previous posting, I am migrating some C++ code, which uses IPP functions, to MS/VB .Net 2005. The only remaining compiler complaints have to do with a reference to the 'type'IppsFFTSpec_R_64f -- it can't find a declaration. Looking at the original C++ code I find, in ipps.h, the following:

typedef

struct FFTSpec_R_64f IppsFFTSpec_R_64f;

The C compiler has no problems with this. However, I cannot find a definition for FFTSpec_R_64f. What am I missing?

Any guidance greatly appreciated.

Ed

0 Kudos
2 Replies
Albert_Stepanov
New Contributor I
528 Views

Hi, Ed!

You don't need to care of type of the hidden structures. Use type IntPtr for using it. Here the simple example:

Imports

System

Imports

System.IO

Imports

System.Runtime.InteropServices

Imports

ipp

Module Module1

Sub Main()

Dim st As ipp.IppStatus

Dim pFFTSpec() As IntPtr = {0}

Dim ppFFTSpec As IntPtr = Marshal.UnsafeAddrOfPinnedArrayElement(pFFTSpec, 0)

Dim X(7), Y(9) As Double

For n As Integer = 0 To 7

X(n) = Math.Cos(2 * Math.PI * n * 16 / 64)

Next

Dim pX As IntPtr = Marshal.UnsafeAddrOfPinnedArrayElement(X, 0)

Dim pY As IntPtr = Marshal.UnsafeAddrOfPinnedArrayElement(Y, 0)

st = ipp.sp.ippsFFTInitAlloc_R_64f(ppFFTSpec, 3, 8, 0)

st = ipp.sp.ippsFFTFwd_RToCCS_64f(pX, pY, pFFTSpec(0), 0)

st = ipp.sp.ippsFFTFree_R_64f(pFFTSpec(0))

st = ipp.sp.ippsMagnitude_64fc(pY, pX, 4)

For i As Integer = 0 To 3

Console.Write(

"{0:F} ", X(i))

Next

Console.WriteLine()

End Sub

End

Module

Regards,

Albert

0 Kudos
cernek
Beginner
528 Views

The compiler is happy now. Thanks to all for the help. There are still other issues to be worked, but they don't involve the IPP.

0 Kudos
Reply