-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a clip_u31_to_q31 #68
Comments
Yes, naming's tricky, because it's not fully general like I said - it's specifically handling the values [0..0x80000000]. I think that's a common intermediate to end up with, so a commonly-needed clip, but I've got no idea what to call it either. Have to make sure people don't accidentally use it for a wider range in the future. |
How about Only issue is that's thinking of an instruction-set non-saturated "ABS" as opposed to "QABS", while "abs" normally means "QABS" throughout the library APIs. |
I was thinking about |
That didn't make any sense to me at first, but now I see all the "clip" functions are of course not taking what they say they're taking. So by extension Okay, that works as an API naming, but my proposed fast-and-easy implementation would just turn 1.5 ( I guess you could have a more general implementation to handle any value. But not sure how often you're encountering inputs in the range [0..2.0) and not [0..1.0] to merit a more general implementation though. (I haven't stopped to figure out if there is a fast general implementation. Maybe there is?) |
#66
clip_u31_to_q31
orclip_q32_to_q31
... naming to be defined ...The text was updated successfully, but these errors were encountered: