Selective nvidia #pragma optionNV(unroll all)
问题 I'm playing around with nvidia's unroll loops directive, but haven't seen a way to turn it on selectively. Lets say I have this... void testUnroll() { #pragma optionNV(unroll all) for (...) ... } void testNoUnroll() { for (...) ... } Here, I'm assuming both loops end up being unrolled. To stop this I think the solution will involve resetting the directive after the block I want affected, for example: #pragma optionNV(unroll all) for (...) ... #pragma optionNV(unroll default) //?? However I