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

warp_inner() and equalize_histogram_mut() should be two functions based on rayon feature #625

Open
ripytide opened this issue May 20, 2024 · 1 comment

Comments

@ripytide
Copy link
Member

ripytide commented May 20, 2024

Cargo features are meant to be additive not mutually exclusive, warp_inner() and all functions that call this function break this additive rule. This could cause unintended behavior as a user won't be able to know which version (parallel vs single-threaded) version was being called due to cargo feature unification. It also means they could never have both the parallel and non-parallel version running in the same application.

To resolve this I suggest duplicating the functions' names to create single-threaded and multi-threaded variants with _parallel() appended. To simplify documentation I suggest the _parallel() versions simply have doc links to the non-parallel versions since duplicating the documentation runs the risk of the two copies of documentation getting out of sync.

@ripytide ripytide changed the title warp_inner() should be two functions based on rayon feature warp_inner() and equalize_histogram_mut() should be two functions based on rayon feature May 21, 2024
@ripytide
Copy link
Member Author

This also applies to equalize_histogram_mut() as well.

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