Altera_Forum
Honored Contributor
11 years agoAbout Loop Unrolling
Hi everyone,
I am wondering if setting a unroll factor that is not multiple of loop count is OK in Altera OpenCL? For example:# pragma unroll 10 for( int i = 0; i < n; i++){ ... } Here n is either a number not divisible by 10 (ex: 128) or not known at compilation time (ex: a variable passed in from host). I know this can be done on CPU or GPU but I am wondering if this will generate incorrect result or cause performance issues on FPGA. Thanks!