Open torokati44 opened 1 year ago
These should be pretty easy to add! I'd be happy to merge a PR if you did one.
As you say, they don't need to be specific intrinsics (though that would help), just making them from smaller parts that already exist should work.
Unfortunately I don't think I have the capacity for a proper PR about this, sorry. :/ I'll leave the issue open in case someone picks it up later.
They came up in an algorithm I'm considering for SIMDification (https://github.com/ruffle-rs/h263-rs/pull/49), and perhaps they would came in handy for others as well - they are in
f32
at least, after all... I have zero clue though, whether there are intrinsics for these in any platforms... (At leastclamp
can be done withmin
andmax
of course. EDIT: Come to think of it,signum
is also just(x > 0) - (x < 0)
.)