pub enum Version {
Scalar,
Array128,
Array256,
Array4096,
AVX2,
AVX2x2,
AVX2x4,
AVX2x8,
}
Expand description
Versions generated by multiversion!
on this platform.
Variants§
Scalar
Array128
Array256
Array4096
AVX2
Requires std::arch::is_x86_feature_detected!("avx2")
.
AVX2x2
Requires std::arch::is_x86_feature_detected!("avx2")
.
AVX2x4
Requires std::arch::is_x86_feature_detected!("avx2")
.
AVX2x8
Requires std::arch::is_x86_feature_detected!("avx2")
.
Implementations§
Source§impl Version
impl Version
Sourcepub fn get_override() -> Option<Version>
pub fn get_override() -> Option<Version>
Get the global version override, if any.
This function will return Some
containing the version provided to
Version::set_override
if it was previously called, or None
otherwise.
All dynamic dispatch implementations should respect this value.
Sourcepub fn set_override(version: Version)
pub fn set_override(version: Version)
Set the global version override.
§Panics
This function will panic if any of the following conditions are met:
-
The provided version is not supported.
-
This function is called more than once.
-
This function is called after calling
Version::get_override
(or any multiversioned dynamic dispatch function that respects the global override).