Skip to content

Commit

Permalink
PR fix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunde21 committed Jun 9, 2018
1 parent 70c96ef commit 3162d64
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion internal/asm/f64/ge_amd64.go
Expand Up @@ -12,7 +12,7 @@ package f64
func Ger(m, n uintptr, alpha float64, x []float64, incX uintptr, y []float64, incY uintptr, a []float64, lda uintptr)

// GemvN computes
// y = alpha * a * x + beta * y
// y = alpha * A * x + beta * y
// where A is an m×n dense matrix, x and y are vectors, and alpha and beta are scalars.
func GemvN(m, n uintptr, alpha float64, a []float64, lda uintptr, x []float64, incX uintptr, beta float64, y []float64, incY uintptr)

Expand Down
2 changes: 1 addition & 1 deletion internal/asm/f64/ge_noasm.go
Expand Up @@ -35,7 +35,7 @@ func Ger(m, n uintptr, alpha float64, x []float64, incX uintptr, y []float64, in
}

// GemvN computes
// y = alpha * a * x + beta * y
// y = alpha * A * x + beta * y
// where A is an m×n dense matrix, x and y are vectors, and alpha and beta are scalars.
func GemvN(m, n uintptr, alpha float64, a []float64, lda uintptr, x []float64, incX uintptr, beta float64, y []float64, incY uintptr) {
var kx, ky, i uintptr
Expand Down
16 changes: 5 additions & 11 deletions internal/asm/f64/gemv_test.go
Expand Up @@ -10,21 +10,17 @@ import (
)

type DgemvCase struct {
m int
n int
A []float64
x []float64
y []float64
xCopy []float64
yCopy []float64
m int
n int
A []float64
x []float64
y []float64

NoTrans []DgemvSubcase
Trans []DgemvSubcase
}

type DgemvSubcase struct {
mulXNeg1 bool
mulYNeg1 bool
alpha float64
beta float64
want []float64
Expand Down Expand Up @@ -511,13 +507,11 @@ func TestGemv(t *testing.T) {
t.Run(fmt.Sprintf("(%vx%v)", test.m, test.n), func(tt *testing.T) {
for i, cas := range test.NoTrans {
tt.Run(fmt.Sprintf("NoTrans case %v", i), func(st *testing.T) {
// Test that it passes with row-major
dgemvcomp(st, test, false, cas, i)
})
}
for i, cas := range test.Trans {
tt.Run(fmt.Sprintf("Trans case %v", i), func(st *testing.T) {
// Test that it passes with row-major
dgemvcomp(st, test, true, cas, i)
})
}
Expand Down

0 comments on commit 3162d64

Please sign in to comment.