We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12d037f commit 727f9a6Copy full SHA for 727f9a6
include/nbl/builtin/hlsl/subgroup2/arithmetic_portability_impl.hlsl
@@ -84,8 +84,8 @@ struct exclusive_scan
84
scalar_t exclusive = op(retval[ItemsPerInvocation-1]);
85
86
[unroll]
87
- for (uint32_t i = 1; i < ItemsPerInvocation; i++)
88
- retval[ItemsPerInvocation-i] = binop(exclusive,retval[ItemsPerInvocation-i-1]);
+ for (uint32_t i = ItemsPerInvocation-1; i > 0; i--)
+ retval[i] = binop(exclusive,retval[i-1]);
89
retval[0] = exclusive;
90
return retval;
91
}
0 commit comments