Skip to content

Commit

Permalink
blas/gonum: move panic strings into separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-ch committed Oct 29, 2018
1 parent 609b9d6 commit 400065b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 24 deletions.
30 changes: 30 additions & 0 deletions blas/gonum/errors.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Copyright ©2015 The Gonum Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package gonum

// Panic strings used during parameter checks.
// This list is duplicated in netlib/blas/netlib. Keep in sync.
const (
zeroIncX = "blas: zero x index increment"
zeroIncY = "blas: zero y index increment"

mLT0 = "blas: m < 0"
nLT0 = "blas: n < 0"
kLT0 = "blas: k < 0"
kLLT0 = "blas: kL < 0"
kULT0 = "blas: kU < 0"

badUplo = "blas: illegal triangle"
badTranspose = "blas: illegal transpose"
badDiag = "blas: illegal diagonal"
badSide = "blas: illegal side"

badLdA = "blas: bad leading dimension of A"
badLdB = "blas: bad leading dimension of B"
badLdC = "blas: bad leading dimension of C"

badX = "blas: bad length of x"
badY = "blas: bad length of y"
)
24 changes: 0 additions & 24 deletions blas/gonum/gonum.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,6 @@ import "math"

type Implementation struct{}

// The following are panic strings used during parameter checks.
const (
zeroIncX = "blas: zero x index increment"
zeroIncY = "blas: zero y index increment"

mLT0 = "blas: m < 0"
nLT0 = "blas: n < 0"
kLT0 = "blas: k < 0"
kLLT0 = "blas: kL < 0"
kULT0 = "blas: kU < 0"

badUplo = "blas: illegal triangle"
badTranspose = "blas: illegal transpose"
badDiag = "blas: illegal diagonal"
badSide = "blas: illegal side"

badLdA = "blas: bad leading dimension of A"
badLdB = "blas: bad leading dimension of B"
badLdC = "blas: bad leading dimension of C"

badX = "blas: bad length of x"
badY = "blas: bad length of y"
)

// [SD]gemm behavior constants. These are kept here to keep them out of the
// way during single precision code genration.
const (
Expand Down

0 comments on commit 400065b

Please sign in to comment.