hasty/lib.rs
1//! # Hasty
2//!
3//! Hasty is a Rust wrapper for BLAS libraries, making use of highly
4//! optimised BLAS implementations found on the system. It finds these
5//! libraries via CMake, which is run as part of the build process.
6//!
7//! To specify a particular BLAS library, set the `HASTY_BLAS_PATH`
8//! environment variable to the absolute path to the library. If this
9//! variable is not set, CMake will search for a library on the system.
10//!
11//! ## BLAS Vendors
12//!
13//! Hasty supports multiple BLAS vendors, and will search your system
14//! for a BLAS library automatically. If you want to specify which
15//! library to use, you can set a feature flag in your `Cargo.toml`.
16//!
17//! - `generic`: Generic reference implementation
18//! - `acml`: AMD Core Math Library
19//! - `accelerate`: Apple Accelerate
20//! - `arm`: ARM Performance Libraries
21//! - `atlas`: ATLAS (Automatically Tuned Linear Algebra Software)
22//! - `blis`: BLIS/Flame Framework
23//! - `openblas`: OpenBLAS
24//! - `mkl`: Intel MKL
25//!
26//! For example:
27//!
28//! ```toml
29//! # Cargo.toml
30//!
31//! [dependencies]
32//! hasty = { "x.y", features = ["openblas"] } # Use OpenBLAS backend
33//! ```
34
35#![warn(missing_docs)]
36#![warn(clippy::pedantic, clippy::nursery)]
37#![doc(
38html_favicon_url = "https://raw.githubusercontent.com/Pencilcaseman/hasty/master/img/logo_dark_mode.png"
39)]
40#![doc(
41html_logo_url = "https://raw.githubusercontent.com/Pencilcaseman/hasty/master/img/logo_dark_mode.png"
42)]
43
44pub mod errors;
45pub mod hasty_impl;
46
47#[cfg(feature = "blas")]
48/// The BLAS wrappers inside Hasty
49pub mod blas;
50
51#[cfg(feature = "opencl")]
52/// The OpenCL wrappers inside Hasty
53pub mod opencl;