Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Xi_Y_
Beginner
78 Views

Is it possible to use IPP by command-line parameter to compiler or in source code pragma?

Hi everyone!

We are using CMake to manage our project generation, and we generates VS projects in Windows platform. However, to use IPP library, we have to manually enable it in VS project configuration dialog, which is very inconvenient. So is it possible to declare IPP usage in source code pragma like this:

#ifdef __INTEL_COMPILER
#some_pragma_that_declare_use_ipp
#endif

If that is not possible, how to use IPP by command-line parameters to icl program? We can pass these parameters by force in CMake.

Thanks for a lot!

0 Kudos
4 Replies
Shaojuan_Z_Intel
Employee
78 Views

Hi Xi,

I am afraid you can't declare IPP usage in source code only without additional setup of build environment. You can use command line to set up IPP library with Intel compiler by adding /Qipp.

Shaojuan_Z_Intel
Employee
78 Views

Hi Xi,

Windows VS does provides pragma that can be added in the source code. To add IPP libraries, the code looks like this: #pragma comment(lib,"someipplib"). In Linux, gcc doesn't have pragma, users need to add IPP libraries in command line. 

Xi_Y_
Beginner
78 Views

Shaojuan Z. (Intel) wrote:

Hi Xi,

Windows VS does provides pragma that can be added in the source code. To add IPP libraries, the code looks like this: #pragma comment(lib,"someipplib"). In Linux, gcc doesn't have pragma, users need to add IPP libraries in command line. 

Hi Shaojuan:

I noticed there are many library files in IPP library directory. Even for only one “flavor" of library (such as single-threaded static), there are still eight library files. In my project, I found that only using ippcoremt.lib is sufficient, and using any other libraries will cause a link-time error of duplicate symbols. I want to know that, is there any documents for the content of these library files? I didn't found any in IPP documentation HTML.

Thanks for a lot!

Shaojuan_Z_Intel
Employee
78 Views

Hi Xi,

Here is an article https://software.intel.com/en-us/articles/intel-integrated-performance-primitives-intel-ipp-intel-ip... talks about linking different libraries for different linkage models. Hope this helps. Thanks!

Reply