Don:

Simd comparison generally doesn't return a bool, it returns a bool array,
one per element.

Does (arr[] < 10) mean "is every element in arr less than 10" OR "is any element of arr less than 10" OR "create a bool array which is true for each element which is less than 10" ?

All make sense. That's the problem.

Right, it's a design problem.
I think the right thing to do is to take a look at what's an efficient operation to do in hardware (and then look at what's the most commonly useful operation for users). I think the right design here is to return a bool[N]. So in this case monarch_dodra has to add some more code to test all/any.

Bye,
bearophile

Reply via email to