| 1 | # Gonum BLAS |
| 2 | |
| 3 | [](https://pkg.go.dev/gonum.org/v1/gonum/blas) |
| 4 | [](https://godocs.io/gonum.org/v1/gonum/blas) |
| 5 | |
| 6 | A collection of packages to provide BLAS functionality for the [Go programming |
| 7 | language](http://golang.org) |
| 8 | |
| 9 | ## Installation |
| 10 | ```sh |
| 11 | go get gonum.org/v1/gonum/blas/... |
| 12 | ``` |
| 13 | |
| 14 | ## Packages |
| 15 | |
| 16 | ### blas |
| 17 | |
| 18 | Defines [BLAS API](http://www.netlib.org/blas/blast-forum/cinterface.pdf) split in several |
| 19 | interfaces. |
| 20 | |
| 21 | ### blas/gonum |
| 22 | |
| 23 | Go implementation of the BLAS API (incomplete, implements the `float32` and `float64` API). |
| 24 | |
| 25 | ### blas/blas64 and blas/blas32 |
| 26 | |
| 27 | Wrappers for an implementation of the double (i.e., `float64`) and single (`float32`) |
| 28 | precision real parts of the BLAS API. |
| 29 | |
| 30 | ```Go |
| 31 | package main |
| 32 | |
| 33 | import ( |
| 34 | "fmt" |
| 35 | |
| 36 | "gonum.org/v1/gonum/blas/blas64" |
| 37 | ) |
| 38 | |
| 39 | func main() { |
| 40 | v := blas64.Vector{Inc: 1, Data: []float64{1, 1, 1}} |
| 41 | v.N = len(v.Data) |
| 42 | fmt.Println("v has length:", blas64.Nrm2(v)) |
| 43 | } |
| 44 | ``` |
| 45 | |
| 46 | ### blas/cblas128 and blas/cblas64 |
| 47 | |
| 48 | Wrappers for an implementation of the double (i.e., `complex128`) and single (`complex64`) |
| 49 | precision complex parts of the blas API. |
| 50 | |
| 51 | Currently blas/cblas64 and blas/cblas128 require gonum.org/v1/netlib/blas. |