Skip to content

Commit

Permalink
blas/testblas: Added 7x7 tests to dger.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunde21 committed Sep 16, 2017
1 parent ab7389d commit 09062d4
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions blas/testblas/dger.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,60 @@ func DgerTest(t *testing.T, blasser Dgerer) {
incY: 1,
trueAns: [][]float64{{math.NaN()}},
},
{
name: "M eq N large inc 1",
m: 7,
n: 7,
x: []float64{6.2, -5, 88.68, 43.4, -30.5, -40.2, 19.9},
y: []float64{1.5, 21.7, -28.7, -11.9, 18.1, 3.1, 21},
a: [][]float64{
{-20.5, 17.1, -8.4, -23.8, 3.9, 7.7, 6.25},
{2.9, -0.29, 25.6, -9.4, 36.5, 9.7, 2.3},
{4.1, -34.1, 10.3, 4.5, -42.05, 9.4, 4},
{19.2, 9.8, -32.7, 4.1, 4.4, -22.5, -7.8},
{3.6, -24.5, 21.7, 8.6, -13.82, 38.05, -2.29},
{39.4, -40.5, 7.9, -2.5, -7.7, 18.1, -25.5},
{-18.5, 43.2, 2.1, 30.1, 3.02, -31.1, -7.6},
},
incX: 1,
incY: 1,
trueAns: [][]float64{
{-11.2, 9.600000000000001, 124.62, 41.3, 1012.1499999999999, -1388.6799999999998, 382.6080000000002},
{2269.01, 1351.73, -27.43000000000012, -414.33, -746.01, 427.59999999999997, 2.3},
{4.1, -34.1, 10.3, 4.5, -42.05, 9.4, 4},
{19.2, 9.8, -32.7, 4.1, 4.4, -22.5, -7.8},
{3.6, -24.5, 21.7, 8.6, -13.82, 38.05, -2.29},
{39.4, -40.5, 7.9, -2.5, -7.7, 18.1, -25.5},
{-18.5, 43.2, 2.1, 30.1, 3.02, -31.1, -7.6},
},
},
{
name: "M eq N large inc not 1",
m: 7,
n: 7,
x: []float64{6.2, 100, 200, -5, 300, 400, 88.68, 100, 200, 43.4, 300, 400, -30.5, 100, 200, -40.2, 300, 400, 19.9},
y: []float64{1.5, 100, 200, 300, 21.7, 100, 200, 300, -28.7, 100, 200, 300, -11.9, 100, 200, 300, 18.1, 100, 200, 300, 3.1, 100, 200, 300, 21},
a: [][]float64{
{-20.5, 17.1, -8.4, -23.8, 3.9, 7.7, 6.25},
{2.9, -0.29, 25.6, -9.4, 36.5, 9.7, 2.3},
{4.1, -34.1, 10.3, 4.5, -42.05, 9.4, 4},
{19.2, 9.8, -32.7, 4.1, 4.4, -22.5, -7.8},
{3.6, -24.5, 21.7, 8.6, -13.82, 38.05, -2.29},
{39.4, -40.5, 7.9, -2.5, -7.7, 18.1, -25.5},
{-18.5, 43.2, 2.1, 30.1, 3.02, -31.1, -7.6},
},
incX: 2,
incY: 3,
trueAns: [][]float64{
{-11.2, 9.600000000000001, 124.62, 41.3, 1012.1499999999999, -1388.6799999999998, 382.6080000000002},
{2269.01, 1351.73, -27.43000000000012, -414.33, -746.01, 427.59999999999997, 2.3},
{4.1, -34.1, 10.3, 4.5, -42.05, 9.4, 4},
{19.2, 9.8, -32.7, 4.1, 4.4, -22.5, -7.8},
{3.6, -24.5, 21.7, 8.6, -13.82, 38.05, -2.29},
{39.4, -40.5, 7.9, -2.5, -7.7, 18.1, -25.5},
{-18.5, 43.2, 2.1, 30.1, 3.02, -31.1, -7.6},
},
},
} {
// TODO: Add tests where a is longer
// TODO: Add panic tests
Expand Down

0 comments on commit 09062d4

Please sign in to comment.