#cublas #cuda #nvidia #sys

sys cublas-sys

Safe CUDA cuBLAS wrapper for the Rust language

1 unstable release

Uses old Rust 2015

0.1.0 Jan 18, 2016

#5 in #cublas

Download history 18/week @ 2023-10-16 15/week @ 2023-10-23 20/week @ 2023-10-30 19/week @ 2023-11-06 23/week @ 2023-11-13 22/week @ 2023-11-20 23/week @ 2023-11-27 10/week @ 2023-12-04 19/week @ 2023-12-11 18/week @ 2023-12-18 23/week @ 2023-12-25 11/week @ 2024-01-01 21/week @ 2024-01-08 17/week @ 2024-01-15 13/week @ 2024-01-22 15/week @ 2024-01-29

70 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