Skip to content
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

saturation arithmetic? #2775

Open
Cazadorro opened this issue Feb 28, 2024 · 0 comments
Open

saturation arithmetic? #2775

Cazadorro opened this issue Feb 28, 2024 · 0 comments

Comments

@Cazadorro
Copy link

I'm trying to use vectorized saturation arithmetic (ie, if the result of an operation would be larger than the bounds of the type, clamp it to min and max). Opencv offers this out of the box, so I figured I'd see it here, but I can't find it. I can use x functions but I'm afraid of not getting proper SIMD and TBB backend support by doing that.

The operation I'm using this for is extremely memory bound, so I can't afford for this to transform into a simple for loop and not saturate memory throughput. Is there a way to get saturation arithmetic to work with out ruining backend optimizations?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant