I play with the nvidia unroll loops directive, but have not seen a way to selectively enable it.
Let's say that I have this ...
void testUnroll()
{
#pragma optionNV(unroll all)
for (...)
...
}
void testNoUnroll()
{
for (...)
...
}
Here, I assume that both loops end in a roll out. To stop this, I think the solution will include resetting the directive after the block I want to affect, for example:
#pragma optionNV(unroll all)
for (...)
...
#pragma optionNV(unroll default)
However, I do not know the reset keyword of reversal behavior for initial / standard setup. How can I do that? If anyone could point out some white papers for nvidia compiler directives that would be even better.
, -, #pragma optionNV(unroll *), (, ).