Forum Discussion
MGRAV
New Contributor
5 years agoHi,
Did you try with "#pragma unroll 2" ?
I am working on something similar and I would say that something like that should almost work
const int ITEM_LENGTH = 1000; const int GROUP_SIZE = 10; uint16_t a[2][GROUP_SIZE][ITEM_LENGTH]; #pragma unroll 2 [[intel::ivdep]] for (int block = 0; block < 2; block++) [[intel::ivdep]] for (int j = 0; j < GROUP_SIZE; j++) for (int i = 0; i < ITEM_LENGTH; i++) if ( i == 0 ) a[block][j][i] = j; else a[block][j][i] = a[block][j][i-1] + i;
good luck
Mickleman
Occasional Contributor
5 years agoMany thanks for replying MGRAV.
I have tried with the unroll pragma but as far as I can see it does not execute in parallel because of the memory dependency on the array - even though this is not a real dependency because each iteration accesses a distinct separate part of the array. I have only been able to confirm this by looking at the Graph Viewer as none of the FPGA runtime nodes is working at the moment.