#cu-blas #cuda #sys #nvidia

sys cublas-sys

Safe CUDA cuBLAS wrapper for the Rust language

1 unstable release

Uses old Rust 2015

0.1.0 Jan 18, 2016

#6 in #cu-blas

Download history 20/week @ 2024-02-19 20/week @ 2024-02-26 12/week @ 2024-03-04 10/week @ 2024-03-11 8/week @ 2024-03-18 16/week @ 2024-03-25 43/week @ 2024-04-01

79 downloads per month
Used in 4 crates (2 directly)

MIT/Apache

185KB
3K SLoC

The file src/generated.rs was created with bindgen using the command:

# /opt/cuda/include/cblas_v2.h    - the path of the cublas header
# -I /usr/lib/clang/3.7.0/include - makes sure clang headers are found; changes with clang version
### match statements are used so that only the neccessary parts are generated
# -match cublas                   - generates the bindings for cublas
# -l cublas                       - generates the link statement in the output file
# -o src/generated.rs             - output to src/generated.rs
bindgen /opt/cuda/include/cublas_v2.h -I /usr/lib/clang/3.7.0/include -match cublas -l cublas -o template/generated.gen.rs
# this helps us rexport the enum instead of aliasing them
sed -i '/pub type/d' template/generated.gen.rs
sed -i 's/Clone/PartialEq, Debug, Clone/g' template/generated.gen.rs
cat template/generated.header.rs template/generated.gen.rs > src/generated.rs

Dependencies

~46KB