Skip to content

Commit f2d6d8a

Browse files
committed
fix reduction bug
1 parent abfaf67 commit f2d6d8a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/nbl/builtin/hlsl/subgroup2/arithmetic_portability_impl.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ struct reduction
8888
scalar_t retval = value[0];
8989
//[unroll(ItemsPerInvocation-1)]
9090
for (uint32_t i = 1; i < ItemsPerInvocation; i++)
91-
retval += binop(retval, value[i]);
91+
retval = binop(retval, value[i]);
9292
return op(retval);
9393
}
9494
};

0 commit comments

Comments
 (0)