Open arscisca opened 9 months ago
On a side note, all the other comparison methods under SimdPartialOrd
will return a bool
regardless of whether the values are actually comparable or not. I imagine this is either SIMD requirement or a convenience choice, but at this point isn't the trait behaving more like a SimdOrd
which is implemented for PartialOrd
types like f32
and f64
for convenience?
When values are not comparable, these methods always return the second value.
An example of this is calling
simd_min
on a validf32
andf32::NAN
:This happens because the current implementation of
simd_min
is the following:and a
<=
(or any syntax-sugared comparison in general) between two instances of aPartialOrd
type wherea.partial_ord(&b)
returnsNone
is evaluated tofalse
.