- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to static link to only a specific cpu support routine via the ipp_xx.h header file placed before ipp.h. The question I have is do I still need to call ippInit or ippInitCpu (or would those end up linking everything when I just want one processor)? If I want to check a processor support, I'd imagine I must then need to use a different function?
TIA!!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi DF
Right, you don't need to call ippInit() or ippInitCpu() when you just want creat a exe which for one processor.The ippInit and ippInitCPU() is for dispatch thecpu-specific optimized code automatically for all supported cpus.
Here is the steps for creating singel-processor exe.
Intel Integrated Performance Primitives
Creating Single-Processor Executables
Introduction
The Intel Integrated Performance Primitives(Intel IPP) Merged Static Libraries are provided for those applications that require the small footprint advantages of static linking. The merged static libraries ipp*_t.lib or ipp*_l.lib each contain a version of each function for each processor (for Generic IA-32, Streaming SIMD Extensions 3 (SSE3), Intel Core2 Duo and Intel Core i7 processors). In the unusual case in which an application or driver needs to be tied to a particular processor, it is also possible to repurpose these and link to one processor-version of Intel IPP only.
Static linking to Intel IPP Functions for One Processor
- Add the files ipp*_t.lib or ipp*_l.lib to your project and its source tree.
- Include exactly one of the following files, located in this directory: ipp_mx.h, ipp_u8.h or ipp_y8.h. See the table below for header choices. This inclusion must be
before the other Intel IPP header files. - Add the file ippcore_t.lib or ippcore_l.lib to your project and its source tree.
- Include Intel IPP header file(s) as normal, after the above conversion header.
- Call Intel IPP functions normally from your application.
Now the correct processor-specific version of each function you specify will be called from the static libraries. It is important to insure that both processor and operating system supports the full capabilities of the target processor.
Not sure if i understandyou correctly about "If I want to check a processor support, I'd imagine I must then need to use a different function?".
When you create asingel-processor exe, that assume that you have known your targeted processor type. Which means, you should check the processor support before create the exe. thereare many ways to checkt the processor supports. for example, by ippiDemo.exe=> help menu or external cpu detect tools like cpuz (www.cpuid.com). etc.
Best Regards,
Ying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ying - It would really be helpful to have an example of linking IPP statically (with and without dispatching.) The above explanation does not explain the difference between ipp*_t.lib and ipp*_l.lib. I have followed these instructions and am still unable to link statically with 7.1.1.119 version of the IPP libraries.
Bob Davies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ying - I have found another page describing static linking and it is at odds with what you have provided. Why didn't you provide a link? Is your info out of date?
Single Processor Static Linkage
- Include ipp.h , after the header ipp_w7.h (In case of Pentium® 4).
- Add the file ippsmerged.lib to your project and its source tree.
- Include ipp_w7.h for Intel Pentium 4 processor, this inclusion must be before the other Intel IPP header files.
- Add the file ippcorel.lib to your project and its source tree.
- Call Intel IPP functions normally from your application.
The problem I am having is that there is no ippsmerged.lib in the 7.1.1.119 distribution. Your directions at least get further but after including the "ipp_u8.h" file in my code, I cannot locate the "n8_ippsMulC_32f_l" function. And where can I identify the different include files with the different architectures? There is no "table below for header choices" as you indicate. Any help would be appreciated.
Bob Davies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK. I got this to work by making sure that the ipp_u8.h file was ahead of the ipp.h include. I was statically linking the library using Visual Studio 2012 (Windows 7) and didn't need to change the list of libraries included so I didn't need to know about ipp*.t.lib or ipp*.l.lib. Not sure what that difference is. It might be useful to find out when I build a Linux version.
Bob Davies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK. I got this to work by making sure that the ipp_u8.h file was ahead of the ipp.h include. I was statically linking the library using Visual Studio 2012 (Windows 7) and didn't need to change the list of libraries included so I didn't need to know about ipp*.t.lib or ipp*.l.lib. Not sure what that difference is. It might be useful to find out when I build a Linux version.
Bob Davies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bob, *t.lib are multi-threaded static libraries and *l.lib are single-threaded libraries. "merged" suffix is related to previous IPP versions (6.1 and older) - since that we've changed libraries naming. As you link to the code that is specific for some particular CPU - any calls to Init or InitCPU are useless as your application is linked with 1 single code version that can't be changed/dispatched. It is your responsibility now to check if CPU supports instruction set that is used by directly linked specific library.
regards, Igor
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page