Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

questions about "#pragma loop count min(256)"

zhang_h_
Beginner
506 Views

Hi all,

when I use the inter C++ compiler to run analysis on my project, There are a lot of similar messages.

I want to known If I added this sentence before the loop, but sometimes the iterations of the loop is smaller then 256, 

then just performance affected, or the result will go wrong?

In addition ,is there anyway to obtain the iterations first, then deciding whether to add this statement?

Thanks!

 

0 Kudos
1 Solution
TimP
Honored Contributor III
506 Views

#pragma loop count avg(256)

should be safe. In principle, if you set a min value, the code could fail if that value isn't met.

You might collect data on loop counts by prof-gen and prof-use

View solution in original post

0 Kudos
1 Reply
TimP
Honored Contributor III
507 Views

#pragma loop count avg(256)

should be safe. In principle, if you set a min value, the code could fail if that value isn't met.

You might collect data on loop counts by prof-gen and prof-use

0 Kudos
Reply