Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
multiversion 0.7.1 - Docs.rs
[go: Go Back, main page]

multiversion 0.7.1

Easy function multiversioning
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#[multiversion::multiversion(targets = "simd")]
fn foo() {
    const WIDTH: Option<usize> =
        multiversion::target::selected_target!().suggested_simd_width::<f32>();
    println!("{WIDTH:?}");

    #[allow(unused)]
    #[multiversion::inherit_target]
    unsafe fn inherited() {}
}

#[test]
fn helpers() {
    foo()
}