- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just ran into this behaviour when trying to compile an unrolled loop over a shift register.
The code needs an incredible amount of time to get past the compilation step (Altera Offline Compiler on Windows). -->The compilation step right before the logic - estimation output. Issuing Code:# pragma unroll
for(int i = 0; i < NUM_DISPARITIES; ++i)
{
ushort sum = 0;
# pragma unroll
for(int wx = 0; wx < BM_WINDOW; ++wx)
{
sum += abs((left) - (right));
}
//shift register
# pragma unroll
for (int s = (BM_WINDOW * IMAGE_WIDTH - 1); s > 0; --s)
{
linSums = linSums;
}
linSums = sum;
}
'left' and 'right' are also shift registers, the problem was the same with using 'linSums' as a 1-Dimensional shift register. With NUM_DISPARITIES = 2 the Code needs little more than expected. At NUM_DISPARITIES = 16 the compilation step needed over 20 mins. Maybe this isnt a bug, but bad code or misunderstand use of shift registers ^^ However I would appreciate any help! Regards Steffen
Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page