I am trying to use your wrapper for the sample code below (simply multiplying two small matrices) but I always get this error message when building './gonum_tst02.go:56: not enough arguments in call to blas.Float64.Dgemm'. I am using cblas from atlas with the compilation of cblas.go like so, '#cgo linux LDFLAGS: -L/usr/lib64/atlas-sse3 -lcblas'. 'go install ./...' runs without problems.
I am pulling my hair out. All definitions of Dgemm I can find anywhere in your package have exactly thirteen parameters, like my call to Dgemm. Any idea whats wrong.
package main
import (
"fmt"
)
type DgemmCase struct {
m, n, k int
alpha, beta float64
a [][]float64
b [][]float64
c [][]float64
aflat []float64
bflat []float64
cflat []float64
}
func main() {
var Agc DgemmCase = DgemmCase{
m: 4,
n: 3,
k: 2,
alpha: 1,
beta: 1,
aflat: []float64{1, 2, 4, 5, 7, 8, 10, 11},
bflat: []float64{1, 5, 6, 5, -8, 8},
cflat: []float64{0, 0, 0,0, 0, 0,0, 0, 0},
}
lda := len(Agc.a[0])
ldb := len(Agc.b[0])
ldc := len(Agc.c[0])
//Dgemm(tA, tB Transpose, m, n, k int, alpha float64, a []float64, lda int, b []float64, ldb int, beta float64, c []float64, ldc int)
blas.Float64.Dgemm(blas.NoTrans, blas.NoTrans, Agc.m, Agc.n, Agc.k, 1.0, Agc.aflat, lda, Agc.bflat, ldb, 1.0, Agc.cflat, ldc)
fmt.Print(cFlat)
}