- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If I use the -ipp switch with the compiler (icpc), does it define something that I can use in an #ifdef statement?
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could set -# so as to see the list of pre-defined macros. If there's nothing there, you could check for the header redefinition of functions of interest to you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
icc -help says:
-ipp[=]
link some or all of the Intel Integrated Performance Primitives (Intel IPP) libraries and bring in the associated headers
common - link using the main libraries set. This is the default value when -ipp is specified
crypto - link using the main libraries set and the crypto library
Dale
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think we could consider a feature request, but I'm not sure I really see any value since you can use your own defined macro.
icc -ipp -D USING_IPP
and then in your code
#ifdef USING_IPP
// IPP code
#endif
icc
and then in your code
#ifdef USING_IPP
// IPP code
#endif
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you say a little more about the problem you're trying to solve? E.g., do you want to conditionally include ipp.h or a different .h file depending on whether the switch is used? Or conditionally call one function or another depending on the presence or absence of ipp? This will help us understand if there's a better solution or make a case for adding something in the compiler to help you.
Thanks!
Dale
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dale,
The reason is exactly as you say: "Conditionally call one function (or include a header file) or another depending on the presence or absence of ipp".
I am dealing with code that has to run on different architectures. On some of them, the IPP might not be available. So I have to have code that uses the IPP and code that can work around this (by using different libraries).
I agree that I can use a define that I create myself to select the code branches. I just wondered if there is already such a define which I could use.
So, I do not think that it is critical to me to have such a define. It would be nice though :-)
The reason is exactly as you say: "Conditionally call one function (or include a header file) or another depending on the presence or absence of ipp".
I am dealing with code that has to run on different architectures. On some of them, the IPP might not be available. So I have to have code that uses the IPP and code that can work around this (by using different libraries).
I agree that I can use a define that I create myself to select the code branches. I just wondered if there is already such a define which I could use.
So, I do not think that it is critical to me to have such a define. It would be nice though :-)

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