Documentation
¶
Index ¶
- Constants
- Variables
- func GetBoolOpt(name string, defval bool, opts ...Option) (val bool)
- func GetComplexOpt(name string, defval complex128, opts ...Option) (val complex128)
- func GetFloatOpt(name string, defval float64, opts ...Option) (val float64)
- func GetIntOpt(name string, defval int, opts ...Option) (val int)
- func GetParam(name string, params ...Option) (val int)
- func GetStringOpt(name string, defval string, opts ...Option) (val string)
- func ParamString(p int) string
- func PrintIndexes(p *IndexOpts)
- func PrintParameters(p *Parameters)
- type BOpt
- type COpt
- type FOpt
- type IOpt
- type IndexOpts
- type Opt
- type Option
- type Parameters
- type SOpt
Constants ¶
const ( // BLAS/LAPACK parameters. Chosen values match corresponding // parameters in CBLAS implementation. RowMajor = 101 // Atlas row-major ColumnMajor = 102 // Atlas column major PNoTrans = 111 // 'N' PTrans = 112 // 'T' PConjTrans = 113 // 'C' PUpper = 121 // 'U' PLower = 122 // 'L' PNonUnit = 131 // 'N' PUnit = 132 // 'U' PDiag = 133 // 'D' PLeft = 141 // 'L' PRight = 142 // 'R' // These for LAPACK only PJobNo = 151 // 'N' PJobValue = 152 // 'V' PJobAll = 153 // 'A' PJobS = 154 // 'S' PJobO = 155 // 'O' PRangeAll = 161 // 'A' PRangeValue = 162 // 'V' PRangeInt = 163 // 'I' )
BLAS/LAPACK matrix parameter constants.
Variables ¶
var ( // trans: No Transpose 'N' OptNoTrans = &IOpt{"trans", PNoTrans} OptNoTransA = &IOpt{"transA", PNoTrans} OptNoTransB = &IOpt{"transB", PNoTrans} // trans: Transpose 'T' OptTrans = &IOpt{"trans", PTrans} OptTransA = &IOpt{"transA", PTrans} OptTransB = &IOpt{"transB", PTrans} // trans: Conjugate Transpose 'C' OptConjTrans = &IOpt{"trans", PConjTrans} OptConjTransA = &IOpt{"transA", PConjTrans} OptConjTransB = &IOpt{"transB", PConjTrans} // uplo: Upper Triangular 'U' OptUpper = &IOpt{"uplo", PUpper} // uplo: Lower Triangular 'L' OptLower = &IOpt{"uplo", PLower} // side parameter 'L', 'R' OptLeft = &IOpt{"side", PLeft} OptRight = &IOpt{"side", PRight} // diag parameter 'U' OptUnit = &IOpt{"diag", PUnit} // diag parameter 'N' OptNonUnit = &IOpt{"diag", PNonUnit} OptDiag = &IOpt{"diag", PDiag} // Lapack jobz 'N' OptJobZNo = &IOpt{"jobz", PJobNo} // Lapack jobz 'V' OptJobZValue = &IOpt{"jobz", PJobValue} // Lapack jobu 'N' OptJobuNo = &IOpt{"jobu", PJobNo} // Lapack jobu 'A' OptJobuAll = &IOpt{"jobu", PJobAll} // Lapack jobu 'S' OptJobuS = &IOpt{"jobu", PJobS} // Lapack jobu 'O' OptJobuO = &IOpt{"jobu", PJobO} // Lapack jobvt 'N', OptJobvtNo = &IOpt{"jobvt", PJobNo} // Lapack jobvt 'A', OptJobvtAll = &IOpt{"jobvt", PJobAll} // Lapack jobvt 'S', OptJobvtS = &IOpt{"jobvt", PJobS} // Lapack jobvt 'O', OptJobvtO = &IOpt{"jobvt", PJobO} // Lapack range 'A' OptRangeAll = &IOpt{"range", PRangeAll} // Lapack range 'V' OptRangeValue = &IOpt{"range", PRangeValue} // Lapack range 'I' OptRangeInt = &IOpt{"range", PRangeInt} )
Matrix parameter option variables.
Functions ¶
func GetBoolOpt ¶
Get boolean option value. If option not present returns defval.
func GetComplexOpt ¶
func GetComplexOpt(name string, defval complex128, opts ...Option) (val complex128)
Get string option value. If option not present returns defval.
func GetFloatOpt ¶
Get float option value. If option not present returns defval.
func GetStringOpt ¶
Get string option value. If option not present returns defval.
func ParamString ¶
Map parameter value to name string that can be used when calling Fortran library functions.
func PrintIndexes ¶
func PrintIndexes(p *IndexOpts)
Types ¶
type IndexOpts ¶
type IndexOpts struct { // these for BLAS and LAPACK N, Nx, Ny int M, Ma, Mb int LDa, LDb, LDc int IncX, IncY int OffsetX, OffsetY, OffsetA, OffsetB, OffsetC int K int Ku int Kl int // these used in LAPACK Nrhs int OffsetD, OffsetDL, OffsetDU int LDw, LDz int OffsetW, OffsetZ int LDu, LDvt int OffsetS, OffsetU, OffsetVt int }
LinalgIndex structure holds fields for various BLAS/LAPACK indexing variables.
func GetIndexOpts ¶
Parse option list and return index structure with relevant fields set and other fields with default values.
type Option ¶
type Option interface { // Name of option. Name() string // Integer value of option. Int() int // Float value of option or NaN. Float() float64 // Float value of option or NaN. Complex() complex128 // Bool value of option. Bool() bool // Option value as string. String() string }
Interface for named options.
type Parameters ¶
type Parameters struct {
Trans, TransA, TransB int
Uplo int
Diag int
Side int
Jobz int
Jobu int
Jobvt int
Range int
}
Structure for BLAS/LAPACK function parameters.
func GetParameters ¶
func GetParameters(params ...Option) (p *Parameters, err error)
Parse options and return parameter structure with option fields set to given or sensible defaults.
Directories
¶
Path | Synopsis |
---|---|
Interface to the double-precision real and complex BLAS library.
|
Interface to the double-precision real and complex BLAS library. |
Interface to the double-precision real and complex LAPACK library.
|
Interface to the double-precision real and complex LAPACK library. |