lapack-inject

Crates.iolapack-inject
lib.rslapack-inject
version0.1.0
created_at2026-01-22 23:59:10.525913+00
updated_at2026-01-22 23:59:10.525913+00
descriptionLAPACK compatible interface backed by runtime-registered Fortran LAPACK function pointers
homepage
repositoryhttps://github.com/shinaoka/lapack-inject
max_upload_size
id2062995
size949,083
Hiroshi Shinaoka (shinaoka)

documentation

README

lapack-inject

LAPACK compatible interface backed by runtime-registered Fortran LAPACK function pointers.

Overview

This crate allows you to use LAPACK functions while the actual computation is performed by Fortran LAPACK functions provided at runtime. This is useful for integrating with Python (scipy) or Julia (libblastrampoline) where Fortran LAPACK pointers are available.

Usage

use lapack_inject::register_dgesv;

// Register Fortran dgesv pointer (e.g., from scipy or Julia)
unsafe {
    register_dgesv(dgesv_ptr);
}

// Now lapack_inject exports dgesv_ symbol that can be used by other crates

lapack-src/lapack-sys Compatibility

This crate exports all Fortran-style LAPACK symbols defined in lapack-sys (e.g., dgesv_, dgetrf_, etc.). These symbols are compatible with the lapack-src crate. Register function pointers at runtime, and this crate will provide the symbols that other crates expect from lapack-src.

Supported Functions

All 1315 LAPACK functions from lapack-sys are supported, including:

  • Linear solvers (GESV, GBSV, POSV, SYSV, etc.)
  • Factorizations (GETRF, POTRF, GEQRF, etc.)
  • SVD (GESVD, GESDD, etc.)
  • Eigenvalue problems (GEEV, SYEV, HEEV, GEES, etc.)
  • And many more...

Features

  • ilp64: Use 64-bit integers for LAPACK indices (ILP64 ABI)

License

Licensed under either of:

at your option.

Commit count: 8

cargo fmt