ldsc 0.1.1

LD Score Regression — fast Rust reimplementation of Bulik-Sullivan et al. LDSC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Forces the BLAS provider crate to be linked when BLAS features are enabled.
#[cfg(any(feature = "blas-openblas-static", feature = "blas-openblas-system"))]
#[allow(unused_imports)]
use blas_src as _;

#[cfg(any(feature = "blas-openblas-static", feature = "blas-openblas-system"))]
unsafe extern "C" {
    fn openblas_set_num_threads(num_threads: ::std::os::raw::c_int);
}

pub fn set_openblas_threads(num_threads: usize) {
    #[cfg(any(feature = "blas-openblas-static", feature = "blas-openblas-system"))]
    unsafe {
        openblas_set_num_threads(num_threads as i32);
    }
}