Skip to content

Commit 8dc7ef8

Browse files
authored
Merge pull request #11 from termoshtt/regenerate-bindgen
Regenerate binding based on LAPACK 3.9.0
2 parents ee3dcf7 + c575fab commit 8dc7ef8

File tree

6 files changed

+20694
-16080
lines changed

6 files changed

+20694
-16080
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "lapack"]
2+
path = lapack
3+
url = https://github.com/Reference-LAPACK/lapack

bindgen.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
set -eux
3+
4+
# - LAPACK routines in lapack.h has `.*_` naming because `LAPACK_GLOBAL` macro adds last '_'
5+
# This script filters using this last '_'.
6+
#
7+
# - `char` in C header will convert into `::std::os::raw::c_char`, but we want to keep no_std.
8+
# This is replaced by sed (FIXME is it possible using bindgen?).
9+
bindgen \
10+
--whitelist-function="^.*_$" \
11+
--use-core \
12+
wrapper.h \
13+
| sed -e "s/::std::os::raw:://g" \
14+
> src/lapack.rs
15+
# Re-format due to sed
16+
rustfmt src/lapack.rs

lapack

Submodule lapack added at 6acc99d

0 commit comments

Comments
 (0)