1个不稳定版本
使用旧的Rust 2015
0.1.0 | 2016年1月18日 |
---|
#5 in #cu-blas
185KB
3K SLoC
文件 src/generated.rs
是使用 bindgen 和以下命令创建的:
# /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
依赖项
~47KB