lapacke

Crates.iolapacke
lib.rslapacke
version0.5.0
sourcesrc
created_at2017-11-14 16:26:19.403358
updated_at2021-04-18 12:45:56.55472
descriptionThe package provides wrappers for LAPACKE (C).
homepagehttps://github.com/blas-lapack-rs/lapacke
repositoryhttps://github.com/blas-lapack-rs/lapacke
max_upload_size
id39338
size1,153,034
Owners (github:buoyantio:owners)

documentation

https://docs.rs/lapacke

README

LAPACKE Package Documentation Build

The package provides wrappers for LAPACKE (C).

Architecture

Example

use lapacke::*;

let n = 3;
let mut a = vec![
    3.0, 1.0, 1.0,
    1.0, 3.0, 1.0,
    1.0, 1.0, 3.0,
];
let mut w = vec![0.0; n as usize];
let info;

unsafe {
    info = dsyev(Layout::ColumnMajor, b'V', b'U', n, &mut a, n, &mut w);
}

assert!(info == 0);
for (one, another) in w.iter().zip(&[2.0, 2.0, 5.0]) {
    assert!((one - another).abs() < 1e-14);
}

Development

The code is generated via a Python script based on the content the lapacke-sys submodule. To re-generate, run the following commands:

./bin/generate.py > src/lapacke-sys.rs
rustfmt src/lapacke-sys.rs

Contribution

Your contribution is highly appreciated. Do not hesitate to open an issue or a pull request. Note that any contribution submitted for inclusion in the project will be licensed according to the terms given in LICENSE.md.

Commit count: 37

cargo fmt