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

SIMD (universal intrinsics) support? #265

Open
fzyzcjy opened this issue Sep 27, 2021 · 7 comments
Open

SIMD (universal intrinsics) support? #265

fzyzcjy opened this issue Sep 27, 2021 · 7 comments

Comments

@fzyzcjy
Copy link
Contributor

fzyzcjy commented Sep 27, 2021

Hi thanks for this lib! I wonder how we can have support for SIMD, i.e. universal intrinsics? Because this can boost the speed by, say, 4x!

@twistedfall
Copy link
Owner

Hi, are you referring to the particular (missing) APIs that are present in the C++ OpenCV? If so, can you please name them? Because otherwise I believe SIMD support depends on how the OpenCV itself is built.

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Sep 27, 2021

@twistedfall
Copy link
Owner

I see, I’ll see if those can be exported

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Sep 30, 2021

Well after 3 days poking around the source code of this lib, I feel it may not be very possible. If I understand correctly, this binding will add try-catch on every call from rust to C++. However, intrinsics are very low-level and will be called with very high frequency indeed. So exporting it will make it not useful anymore...

@twistedfall
Copy link
Owner

You can mark functions as infallible, then the try/catch will be skipped. But I understand the performance implications, I’ll keep that in mind.

@fzyzcjy fzyzcjy closed this as completed Oct 9, 2021
@twistedfall
Copy link
Owner

This is actionable, so let's leave this open

@twistedfall twistedfall reopened this Oct 9, 2021
@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Oct 9, 2021

Ok

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

2 participants