| ▲ | exDM69 a day ago | |
> Is the `@reduce()` function in the example a special... Yes, it is. In SIMD you can do a reduce for a commutative function in O(log N) steps. Sum, product, min, max, all, any, etc. Although in this case it might be better if you just take the mask (vector of booleans), convert it to a bitmask and check if it is (non-) zero. If the language provides it, you might also use .all() or .any() for a mask. | ||