Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29298 Discussions

How to prevent optimisation of a specific loop?

zugvogel
Beginner
455 Views
Hello,
Can anyone tell me how to prevent a loop from being optimised?

EDIT: My mistake: a typing error in the code.
But I'm still interested to know: is there a directive that can be placed before the loop to prevent it from being optimised?
0 Kudos
2 Replies
Tim_Gallagher
New Contributor II
455 Views
Quoting - zugvogel
Hello,
Can anyone tell me how to prevent a loop from being optimised?

EDIT: My mistake: a typing error in the code.
But I'm still interested to know: is there a directive that can be placed before the loop to prevent it from being optimised?

You can put the NOUNROLL, NOVECTOR, NOSWP, NOPREFETCH, NOPARALLEL depending on what you're trying to prevent.

http://www.intel.com/software/products/compilers/docs/fmac/doc_files/source/extfile/lref_for/source_files/pgjcdor.htm

Tim
0 Kudos
zugvogel
Beginner
455 Views
That was exactly what I was looking for - thanks!
0 Kudos
Reply