this cycle should be unrolled using 
```
#pragma unroll
```
because ```CN``` is compile time constant