- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have afunctionthat benefits greatly from using a /QaxP directive. However, I would like to use this directive only for thisfunction (which is in a separate source file)and not have to requalify my entire application with the changed compiler switches. I was wondering if the run-time checking for processor architecture that is implied by the QaxP directive requires that I use this setting for all source files in my application, or whether I can use it only for selected source files. I should also mention that the application mixes Fortran and C/C++, if that matters.
Thanks for any responses that can shed light on this question.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes. You can use "-QaxP" for specific files only. You don't have to use it for the whole program.
But you cann't just use "-QaxP" for the function only. A work around is to move the function to a file, and compile this file with "-QaxP'.
If you're thinking about the pragma "#optimize ("", off")", it turns off all the optmizations passed by the command line. So all the functions after will be compiled with no optimizations. So it may hurt the performance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
With the 32-bit compilers, you would have to link with a vectorizing option, such as /QaxP, to be sure of getting all the required libraries. This would not affect the files previously compiled without such options.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are building an executable with some files built with /QaxP and some not, you shouldn't need to do anything special to link as long as you haven't also compiled with /Zl to suppress default library references.If you do get linking errors, just add svml_disp.lib to the list of libraries.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page