- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
SystemImports
System.IOImports
System.Runtime.InteropServicesImports
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 7X(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 3Console.Write(
"{0:F} ", X(i)) NextConsole.WriteLine()
End SubEnd
ModuleRegards,
Albert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page