11 unstable releases

0.5.0 Feb 8, 2025
0.4.0 Jun 23, 2021
0.3.0 Feb 13, 2021
0.2.0 May 26, 2018
0.0.1 Nov 14, 2017

#2728 in Math

Download history 6016/week @ 2025-09-27 4002/week @ 2025-10-04 3699/week @ 2025-10-11 3477/week @ 2025-10-18 3281/week @ 2025-10-25 4346/week @ 2025-11-01 3966/week @ 2025-11-08 3855/week @ 2025-11-15 3674/week @ 2025-11-22 5911/week @ 2025-11-29 4355/week @ 2025-12-06 3602/week @ 2025-12-13 2552/week @ 2025-12-20 1993/week @ 2025-12-27 5034/week @ 2026-01-03 4444/week @ 2026-01-10

14,570 downloads per month
Used in 19 crates (14 directly)

Apache-2.0 OR MIT

69KB
3.5K SLoC

CBLAS Package Documentation Build

The package provides wrappers for CBLAS (C).

Architecture

Example

use cblas::*;

let (m, n, k) = (2, 4, 3);
let a = vec![
    1.0, 4.0,
    2.0, 5.0,
    3.0, 6.0,
];
let b = vec![
    1.0, 5.0,  9.0,
    2.0, 6.0, 10.0,
    3.0, 7.0, 11.0,
    4.0, 8.0, 12.0,
];
let mut c = vec![
    2.0, 7.0,
    6.0, 2.0,
    0.0, 7.0,
    4.0, 2.0,
];

unsafe {
    dgemm(Layout::ColumnMajor, Transpose::None, Transpose::None,
          m, n, k, 1.0, &a, m, &b, k, 1.0, &mut c, m);
}

assert!(
    c == vec![
        40.0,  90.0,
        50.0, 100.0,
        50.0, 120.0,
        60.0, 130.0,
    ]
);

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.

Dependencies

~230–340KB