pub fn has(feature: Feature) -> boolExpand description
Whether this machine supports feature: the same answer as std’s
is_x86_feature_detected! and is_aarch64_feature_detected!, which the
compiler’s #[target_feature] dispatch trusts.
use sys_lib::cpu::{self, Feature};
if cpu::has(Feature::Avx2) {
// pick the AVX2 kernel
}