Dear Array Building Blocks builders,
after a year since last time I looked into ArBB I decided to give it a new try.
I still think that the ArBB is an interesting one, and that it provides expressing algorithm in a clear way while at the same time being (very) fast at run-time.
My new attempt is a fail.
I got the code to compile and run with ARBB_EMULATE=1 but when I switch to ARBB_EMULATE=0 I receive an
Internal error: CTE_COMPILER_ERROR COMP_ERROR: Dynamic Compiler Internal Error
Question 1: in general, is it there a way to know directly which part creates the trouble ?
After doing some "comment out and test", I ended up identifying to the trouble-some piece of code:
dense difference = arbb::abs(left_column - right_column);
f32 sum_result = 0;
_for(usize i=0, i < column_length, ++i)
sum_result += difference[i]; // <<< this line is the problem
I initially had planned to do
f32 sum_result = arbb::sum(difference);
however doing so I receive an "reduction operation cannot be used within a map". Indeed this is the critical small part computation (column length ~ 100), done inside a larger call (~10 000 of instances doing the small columns sum of absolute difference) which I decided to map.
Question 2: how should I code my reduction ?
For now I would like to get the code running, after that indeed I would like to explore some different versions of my algorithm to see which one is the most performant, but right now even the "vanilla" approach is failing.
(ArBB comments mention that internal_error should be reported...).