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

Add method for overriding dispatcher #2

Open
calebzulawski opened this issue Sep 7, 2019 · 2 comments
Open

Add method for overriding dispatcher #2

calebzulawski opened this issue Sep 7, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@calebzulawski
Copy link
Owner

A good option would be to use environment variables (this should be an optional feature). The environment variables could limit which architectures are available (for example, disabling AVX to allow testing of SSE or fallback versions).

@calebzulawski
Copy link
Owner Author

A few options/thoughts:

  • Runtime control over the dispatcher. Just a function that limits/enables specific instruction sets?
  • Compile time control over the dispatcher. Disables target_clones to build with the current feature set, and turns multiversion into a bunch of #[cfg(target_feature = foo)] that selects the first one that works with the current configuration.

It could be useful to have a macro for testing that selects specific implementations, and maybe creates copies of tests for each implementation.

@calebzulawski
Copy link
Owner Author

Half of this task is complete with the addition of the std option--when disabled, runtime CPU feature detection is replaced with compile-time conditional compilation.

@calebzulawski calebzulawski added the enhancement New feature or request label Aug 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant