Skip to content
This repository was archived by the owner on Aug 18, 2024. It is now read-only.

fardream/rust-ndarray-t-dot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ndarray blas integration for A tranpose dot B

For matrix $A$, calculate

$$ A^TB $$

or

let a = Array2::<f64>::zeros((10000, 1000));
let b = Array2::<f64>::zeros((10000, 1000));
let _ = a.t().dot(&b);

This can be calculated with gemm, however, running the above code doesn't call blas - see src/bin/no-blas.rs.

However, below code does call blas routines, see src/bin/blas.rs.

let b = Array2::<f64>::zeros((10000, 1000));
let at = Array2::<f64>::zeros((1000, 10000));
let _ = at.dot(&b);

Code can be run by

cargo run --profile release --bin blas && cargo run --profile release --bin no-blas

This will generate two profiles in the local directoy, blas.pb and no-blas.pb, which can be view with pprof

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages