Skip to content
This repository has been archived by the owner on Dec 9, 2018. It is now read-only.

Commit

Permalink
Merge pull request #71 from fhs/golint
Browse files Browse the repository at this point in the history
fix some golint warnings & import order
  • Loading branch information
btracey committed Jan 2, 2015
2 parents 73043cd + 42171ba commit 12b83e8
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 29 deletions.
12 changes: 6 additions & 6 deletions blas.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,21 +117,21 @@ const (
Diagonal // Diagonal elements of H are units.
)

// Type SrotmParams contains Givens transformation parameters returned
// SrotmParams contains Givens transformation parameters returned
// by the Float32 Srotm method.
type SrotmParams struct {
Flag
H [4]float32 // Column-major 2 by 2 matrix.
}

// Type DrotmParams contains Givens transformation parameters returned
// DrotmParams contains Givens transformation parameters returned
// by the Float64 Drotm method.
type DrotmParams struct {
Flag
H [4]float64 // Column-major 2 by 2 matrix.
}

// Type Transpose is used to specify the transposition operation for a
// Transpose is used to specify the transposition operation for a
// routine.
type Transpose int

Expand All @@ -141,7 +141,7 @@ const (
ConjTrans
)

// Type Uplo is used to specify whether the matrix is an upper or lower
// Uplo is used to specify whether the matrix is an upper or lower
// triangular matrix.
type Uplo int

Expand All @@ -151,7 +151,7 @@ const (
Lower
)

// Type Diag is used to specify whether the matrix is a unit or non-unit
// Diag is used to specify whether the matrix is a unit or non-unit
// triangular matrix.
type Diag int

Expand All @@ -160,7 +160,7 @@ const (
Unit
)

// Type side is used to specify from which side a multiplication operation
// Side is used to specify from which side a multiplication operation
// is performed.
type Side int

Expand Down
3 changes: 2 additions & 1 deletion cblas/level1double_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package cblas

import (
"github.com/gonum/blas/testblas"
"testing"

"github.com/gonum/blas/testblas"
)

var blasser = Blas{}
Expand Down
2 changes: 1 addition & 1 deletion goblas/level1double.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ func (Blas) Daxpy(n int, alpha float64, x []float64, incX int, y []float64, incY
}
}

// DrotG gives plane rotation
// Drotg gives plane rotation
//
// _ _ _ _ _ _
// | c s | | a | | r |
Expand Down
3 changes: 2 additions & 1 deletion goblas/level1double_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package goblas

import (
"github.com/gonum/blas/testblas"
"testing"

"github.com/gonum/blas/testblas"
)

var blasser = Blas{}
Expand Down
6 changes: 3 additions & 3 deletions goblas/level2double.go
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ func (Blas) Dtbmv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n, k int, a []fl
// x := A*x, or x := A**T*x,
// where x is an n element vector and A is an n by n unit, or non-unit,
// upper or lower triangular matrix represented in packed storage format.
func (bl Blas) Dtpmv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n int, a []float64, x []float64, incX int) {
func (Blas) Dtpmv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n int, a []float64, x []float64, incX int) {
// Verify inputs
if ul != blas.Lower && ul != blas.Upper {
panic(badUplo)
Expand Down Expand Up @@ -1928,7 +1928,7 @@ func (Blas) Dtpsv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n int, a []float
}
}

// Dsymv performs the matrix-vector operation
// Dspmv performs the matrix-vector operation
// y := alpha*A*x + beta*y,
// where alpha and beta are scalars, x and y are n element vectors and
// A is an n by n symmetric matrix in packed format.
Expand Down Expand Up @@ -2143,7 +2143,7 @@ func (Blas) Dspr(ul blas.Uplo, n int, alpha float64, x []float64, incX int, a []
}
}

// Dsyr2 performs the symmetric rank-2 update
// Dspr2 performs the symmetric rank-2 update
// a += alpha * x * y^T + alpha * y * x^T
// where a is in packed format.
func (Blas) Dspr2(ul blas.Uplo, n int, alpha float64, x []float64, incX int, y []float64, incY int, a []float64) {
Expand Down
17 changes: 6 additions & 11 deletions testblas/benchautogen/autogen_bench_level1double.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ import (

var gopath string

var copyrightnotice []byte = []byte(`// Copyright 2014 The Gonum Authors. All rights reserved.
var copyrightnotice = []byte(`// Copyright 2014 The Gonum Authors. All rights reserved.
// Use of this code is governed by a BSD-style
// license that can be found in the LICENSE file`)

var autogen []byte = []byte(`// This file is autogenerated by github.com/gonum/blas/testblas/benchautogen/autogen_bench_level1double.go`)
var autogen = []byte(`// This file is autogenerated by github.com/gonum/blas/testblas/benchautogen/autogen_bench_level1double.go`)

var imports []byte = []byte(`import(
var imports = []byte(`import(
"math/rand"
"testing"
"github.com/gonum/blas"
)`)

var randomSliceFunction []byte = []byte(`func randomSlice(l, idx int) ([]float64) {
var randomSliceFunction = []byte(`func randomSlice(l, idx int) ([]float64) {
if idx < 0{
idx = -idx
}
Expand All @@ -44,12 +44,7 @@ const (
negInc2 = -4
)

var level1Sizes []struct {
lower string
upper string
camel string
size int
} = []struct {
var level1Sizes = []struct {
lower string
upper string
camel string
Expand Down Expand Up @@ -90,7 +85,7 @@ type level1functionStruct struct {
extraName string // if have a couple different cases for the same function
}

var level1Functions []level1functionStruct = []level1functionStruct{
var level1Functions = []level1functionStruct{
{
camel: "Ddot",
sig: "n int, x []float64, incX int, y []float64, incY int",
Expand Down
2 changes: 1 addition & 1 deletion testblas/dgemm.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type DgemmCase struct {
ans [][]float64
}

var DgemmCases []DgemmCase = []DgemmCase{
var DgemmCases = []DgemmCase{

{
m: 4,
Expand Down
2 changes: 1 addition & 1 deletion testblas/dgemv.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type DgemvSubcase struct {
ans []float64
}

var DgemvCases []DgemvCase = []DgemvCase{
var DgemvCases = []DgemvCase{
{
Name: "M_gt_N_Inc1_NoTrans",
tA: blas.NoTrans,
Expand Down
8 changes: 4 additions & 4 deletions testblas/level1double.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type DScalCase struct {
Name string
}

var DoubleOneVectorCases []DoubleOneVectorCase = []DoubleOneVectorCase{
var DoubleOneVectorCases = []DoubleOneVectorCase{
{
Name: "AllPositive",
X: []float64{6, 5, 4, 2, 6},
Expand Down Expand Up @@ -400,7 +400,7 @@ type DTwoVecAnswer struct {
Y []float64
}

var DoubleTwoVectorCases []DoubleTwoVectorCase = []DoubleTwoVectorCase{
var DoubleTwoVectorCases = []DoubleTwoVectorCase{
{
Name: "UnitaryInc",
X: []float64{10, 15, -6, 3, 14, 7},
Expand Down Expand Up @@ -1216,7 +1216,7 @@ type DrotgTestStruct struct {
C, S, R, Z float64
}

var DrotgTests []DrotgTestStruct = []DrotgTestStruct{
var DrotgTests = []DrotgTestStruct{
{
Name: "ZeroAB",
C: 1,
Expand Down Expand Up @@ -1352,7 +1352,7 @@ type DrotmgTestStruct struct {
Rd1, Rd2, Rx1 float64
}

var DrotmgTests []DrotmgTestStruct = []DrotmgTestStruct{
var DrotmgTests = []DrotmgTestStruct{
{
Name: "NegD1",
P: &blas.DrotmParams{
Expand Down

0 comments on commit 12b83e8

Please sign in to comment.