Will the CUDA compiler automatically unroll a loop specified like this?
for(int i=0; i<9; i++)
{
//body
}
Will the CUDA compiler automatically unroll a loop specified like this?
for(int i=0; i<9; i++)
{
//body
}
Yes if loop body is smaller than some threshold.
You can use #pragma unroll for more control over loop unrolling. Check Programming Guide for more details.