Implemented codegen for reduction clauses with inscan modifiers in
worksharing constructs.
Emits the code for the directive with inscan reductions.
The code is the following:
size num_iters = <num_iters>; <type> buffer[num_iters]; for (i: 0..<num_iters>) { <input phase>; buffer[i] = red; } for (int k = 0; k != ceil(log2(num_iters)); ++k) for (size cnt = last_iter; cnt >= pow(2, k); --k) buffer[i] op= buffer[i-pow(2,k)]; for (0..<num_iters>) { red = InclusiveScan ? buffer[i] : buffer[i-1]; <scan phase>; }
Why would we continue after this error?