github.com/gopherd/gonum@v0.0.4/lapack/testlapack/dlauum.go (about)

     1  // Copyright ©2018 The Gonum Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package testlapack
     6  
     7  import (
     8  	"testing"
     9  
    10  	"github.com/gopherd/gonum/blas"
    11  )
    12  
    13  type Dlauumer interface {
    14  	Dlauum(uplo blas.Uplo, n int, a []float64, lda int)
    15  }
    16  
    17  func DlauumTest(t *testing.T, impl Dlauumer) {
    18  	for _, uplo := range []blas.Uplo{blas.Upper, blas.Lower} {
    19  		name := uploToString(uplo)
    20  		t.Run(name, func(t *testing.T) {
    21  			// Include small and large sizes to make sure that both
    22  			// unblocked and blocked paths are taken.
    23  			ns := []int{0, 1, 2, 3, 4, 5, 10, 25, 31, 32, 33, 63, 64, 65, 127, 128, 129}
    24  			dlauuTest(t, impl.Dlauum, uplo, ns)
    25  		})
    26  	}
    27  }