Doing parallel reduction for a non-commutative operator is a bit more involved, compared to commutative version.
In the example we still use a addition over integers for the simplicity sake.
It could be replaced, for example, with matrix multiplication which really is non-commutative.
Note, when ...