-
Notifications
You must be signed in to change notification settings - Fork 16
cgo: replace genBlas.pl #186
Conversation
Many thanks to @cznic for all his help getting me through difficulties in understanding C parsing. Thank you. |
6dfbb77
to
b7ed661
Compare
I am not entirely sure why this passes. Should we really be allowing this? /cc @jonlawlor |
Looks like a couple things happening - the git version used isn't supporting directory exclusion, which is why it complains about the magic !, which is masking the generate issue, I think. #187 is the followup. |
@@ -5,6 +5,7 @@ set -ex | |||
go get golang.org/x/tools/cmd/cover | |||
go get github.com/mattn/goveralls | |||
go get github.com/gonum/floats | |||
go get github.com/cznic/cc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
github.com/gonum/internal/binding
is not installed from here since we get it for free with blas
and floats
via asm
. Does anyone want me to be explicit here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer explicit but it's up to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
ping for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -5,6 +5,7 @@ set -ex | |||
go get golang.org/x/tools/cmd/cover | |||
go get github.com/mattn/goveralls | |||
go get github.com/gonum/floats | |||
go get github.com/cznic/cc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer explicit but it's up to you.
generate_blas.go
replacesgenBlas.pl
and exercises the code in gonum/internal#36 (requires that PR to pass here because of the dependency ongonum/internal/binding
).The code itself is not pretty and much cleaner code could come from greater use of templates, but it is not perl and so others can now hopefully contribute more to the code here. The generation of
cgo/lapacke
will come soon (and is easier).The minor diff in
cgo/blas.go
is due to a subtle difference in the ordering of parameter checking - I think it makes more sense where it is now too.Finally, there is an option to add docs to the cgo methods. This will not add docs for
cblas_[cz]*
bindings because we do not have them innative
, but because of the way thego/parser
package works, we can add non-built doc-only files tonative
;go/parser
ignores build tags, so will get docs from those files. Those files can then become thenative
implementations when that journey is embarked upon. If we want partial docs here, another PR will follow this one to add the docs that do exist.@gonum/developers Please take a look.