## package cblas128

`import "gonum.org/v1/gonum/blas/cblas128"`

Package cblas128 provides a simple interface to the complex128 BLAS API.

### Index ¶

- func Asum(x Vector) float64
- func Axpy(alpha complex128, x, y Vector)
- func Copy(x, y Vector)
- func Dotc(x, y Vector) complex128
- func Dotu(x, y Vector) complex128
- func Dscal(alpha float64, x Vector)
- func Gbmv(t blas.Transpose, alpha complex128, a Band, x Vector, beta complex128, y Vector)
- func Gemm(tA, tB blas.Transpose, alpha complex128, a, b General, beta complex128, c General)
- func Gemv(t blas.Transpose, alpha complex128, a General, x Vector, beta complex128, y Vector)
- func Gerc(alpha complex128, x, y Vector, a General)
- func Geru(alpha complex128, x, y Vector, a General)
- func Hbmv(alpha complex128, a HermitianBand, x Vector, beta complex128, y Vector)
- func Hemm(s blas.Side, alpha complex128, a Hermitian, b General, beta complex128, c General)
- func Hemv(alpha complex128, a Hermitian, x Vector, beta complex128, y Vector)
- func Her(alpha float64, x Vector, a Hermitian)
- func Her2(alpha complex128, x, y Vector, a Hermitian)
- func Her2k(t blas.Transpose, alpha complex128, a, b General, beta float64, c Hermitian)
- func Herk(t blas.Transpose, alpha float64, a General, beta float64, c Hermitian)
- func Hpmv(alpha complex128, a HermitianPacked, x Vector, beta complex128, y Vector)
- func Hpr(alpha float64, x Vector, a HermitianPacked)
- func Hpr2(alpha complex128, x, y Vector, a HermitianPacked)
- func Iamax(x Vector) int
- func Implementation() blas.Complex128
- func Nrm2(x Vector) float64
- func Scal(alpha complex128, x Vector)
- func Swap(x, y Vector)
- func Symm(s blas.Side, alpha complex128, a Symmetric, b General, beta complex128, c General)
- func Syr2k(t blas.Transpose, alpha complex128, a, b General, beta complex128, c Symmetric)
- func Syrk(t blas.Transpose, alpha complex128, a General, beta complex128, c Symmetric)
- func Tbmv(t blas.Transpose, a TriangularBand, x Vector)
- func Tbsv(t blas.Transpose, a TriangularBand, x Vector)
- func Tpmv(t blas.Transpose, a TriangularPacked, x Vector)
- func Tpsv(t blas.Transpose, a TriangularPacked, x Vector)
- func Trmm(s blas.Side, tA blas.Transpose, alpha complex128, a Triangular, b General)
- func Trmv(t blas.Transpose, a Triangular, x Vector)
- func Trsm(s blas.Side, tA blas.Transpose, alpha complex128, a Triangular, b General)
- func Trsv(t blas.Transpose, a Triangular, x Vector)
- func Use(b blas.Complex128)
- type Band
- type BandCols
- type General
- type GeneralCols
- type Hermitian
- type HermitianBand
- type HermitianBandCols
- type HermitianCols
- type HermitianPacked
- type Symmetric
- type SymmetricBand
- type SymmetricBandCols
- type SymmetricCols
- type SymmetricPacked
- type Triangular
- type TriangularBand
- type TriangularBandCols
- type TriangularCols
- type TriangularPacked
- type Vector

### Functions ¶

#### func Asum ¶

Asum computes the sum of magnitudes of the real and imaginary parts of elements of the vector x:

\sum_i (|Re x[i]| + |Im x[i]|).

Asum will panic if the vector increment is negative.

#### func Axpy ¶

func Axpy(alpha complex128, x, y Vector)

Axpy computes

y = alpha * x + y,

where x and y are vectors, and alpha is a scalar. Axpy will panic if the lengths of x and y do not match.

#### func Copy ¶

func Copy(x, y Vector)

Copy copies the elements of x into the elements of y:

y[i] = x[i] for all i.

Copy will panic if the lengths of x and y do not match.

#### func Dotc ¶

func Dotc(x, y Vector) complex128

Dotc computes the dot product of the two vectors with complex conjugation:

xᴴ * y.

Dotc will panic if the lengths of x and y do not match.

#### func Dotu ¶

func Dotu(x, y Vector) complex128

Dotu computes the dot product of the two vectors without complex conjugation:

xᵀ * y.

Dotu will panic if the lengths of x and y do not match.

#### func Dscal ¶

Dscal computes

x = alpha * x,

where x is a vector, and alpha is a real scalar.

Dscal will panic if the vector increment is negative.

#### func Gbmv ¶

func Gbmv(t blas.Transpose, alpha complex128, a Band, x Vector, beta complex128, y Vector)

Gbmv computes

y = alpha * A * x + beta * y if t == blas.NoTrans, y = alpha * Aᵀ * x + beta * y if t == blas.Trans, y = alpha * Aᴴ * x + beta * y if t == blas.ConjTrans,

where A is an m×n band matrix, x and y are vectors, and alpha and beta are scalars.

#### func Gemm ¶

func Gemm(tA, tB blas.Transpose, alpha complex128, a, b General, beta complex128, c General)

Gemm computes

C = alpha * A * B + beta * C,

where A, B, and C are dense matrices, and alpha and beta are scalars. tA and tB specify whether A or B are transposed or conjugated.

#### func Gemv ¶

func Gemv(t blas.Transpose, alpha complex128, a General, x Vector, beta complex128, y Vector)

Gemv computes

y = alpha * A * x + beta * y if t == blas.NoTrans, y = alpha * Aᵀ * x + beta * y if t == blas.Trans, y = alpha * Aᴴ * x + beta * y if t == blas.ConjTrans,

where A is an m×n dense matrix, x and y are vectors, and alpha and beta are scalars.

#### func Gerc ¶

func Gerc(alpha complex128, x, y Vector, a General)

Gerc performs a rank-1 update

A += alpha * x * yᴴ,

where A is an m×n dense matrix, x and y are vectors, and alpha is a scalar.

#### func Geru ¶

func Geru(alpha complex128, x, y Vector, a General)

Geru performs a rank-1 update

A += alpha * x * yᵀ,

where A is an m×n dense matrix, x and y are vectors, and alpha is a scalar.

#### func Hbmv ¶

func Hbmv(alpha complex128, a HermitianBand, x Vector, beta complex128, y Vector)

Hbmv performs

y = alpha * A * x + beta * y,

where A is an n×n Hermitian band matrix, x and y are vectors, and alpha and beta are scalars.

#### func Hemm ¶

func Hemm(s blas.Side, alpha complex128, a Hermitian, b General, beta complex128, c General)

Hemm performs

C = alpha * A * B + beta * C if s == blas.Left, C = alpha * B * A + beta * C if s == blas.Right,

where A is an n×n or m×m Hermitian matrix, B and C are m×n matrices, and alpha and beta are scalars.

#### func Hemv ¶

func Hemv(alpha complex128, a Hermitian, x Vector, beta complex128, y Vector)

Hemv computes

y = alpha * A * x + beta * y,

where A is an n×n Hermitian matrix, x and y are vectors, and alpha and beta are scalars.

#### func Her ¶

Her performs a rank-1 update

A += alpha * x * yᵀ,

where A is an m×n Hermitian matrix, x and y are vectors, and alpha is a scalar.

#### func Her2 ¶

func Her2(alpha complex128, x, y Vector, a Hermitian)

Her2 performs a rank-2 update

A += alpha * x * yᴴ + conj(alpha) * y * xᴴ,

where A is an n×n Hermitian matrix, x and y are vectors, and alpha is a scalar.

#### func Her2k ¶

Her2k performs the Hermitian rank-2k update

C = alpha * A * Bᴴ + conj(alpha) * B * Aᴴ + beta * C if t == blas.NoTrans, C = alpha * Aᴴ * B + conj(alpha) * Bᴴ * A + beta * C if t == blas.ConjTrans,

where C is an n×n Hermitian matrix, A and B are n×k matrices if t == NoTrans and k×n matrices otherwise, and alpha and beta are scalars.

#### func Herk ¶

Herk performs the Hermitian rank-k update

C = alpha * A * Aᴴ + beta*C if t == blas.NoTrans, C = alpha * Aᴴ * A + beta*C if t == blas.ConjTrans,

where C is an n×n Hermitian matrix, A is an n×k matrix if t == blas.NoTrans and a k×n matrix otherwise, and alpha and beta are scalars.

#### func Hpmv ¶

func Hpmv(alpha complex128, a HermitianPacked, x Vector, beta complex128, y Vector)

Hpmv performs

y = alpha * A * x + beta * y,

where A is an n×n Hermitian matrix in packed format, x and y are vectors, and alpha and beta are scalars.

#### func Hpr ¶

func Hpr(alpha float64, x Vector, a HermitianPacked)

Hpr performs a rank-1 update

A += alpha * x * xᴴ,

where A is an n×n Hermitian matrix in packed format, x is a vector, and alpha is a scalar.

#### func Hpr2 ¶

func Hpr2(alpha complex128, x, y Vector, a HermitianPacked)

Hpr2 performs a rank-2 update

A += alpha * x * yᴴ + conj(alpha) * y * xᴴ,

where A is an n×n Hermitian matrix in packed format, x and y are vectors, and alpha is a scalar.

#### func Iamax ¶

Iamax returns the index of an element of x with the largest sum of magnitudes of the real and imaginary parts (|Re x[i]|+|Im x[i]|). If there are multiple such indices, the earliest is returned.

Iamax returns -1 if n == 0.

Iamax will panic if the vector increment is negative.

#### func Implementation ¶

func Implementation() blas.Complex128

Implementation returns the current BLAS complex128 implementation.

Implementation allows direct calls to the current the BLAS complex128 implementation giving finer control of parameters.

#### func Nrm2 ¶

Nrm2 computes the Euclidean norm of the vector x:

sqrt(\sum_i x[i] * x[i]).

Nrm2 will panic if the vector increment is negative.

#### func Scal ¶

func Scal(alpha complex128, x Vector)

Scal computes

x = alpha * x,

where x is a vector, and alpha is a scalar.

Scal will panic if the vector increment is negative.

#### func Swap ¶

func Swap(x, y Vector)

Swap exchanges the elements of two vectors:

x[i], y[i] = y[i], x[i] for all i.

Swap will panic if the lengths of x and y do not match.

#### func Symm ¶

func Symm(s blas.Side, alpha complex128, a Symmetric, b General, beta complex128, c General)

Symm performs

C = alpha * A * B + beta * C if s == blas.Left, C = alpha * B * A + beta * C if s == blas.Right,

where A is an n×n or m×m symmetric matrix, B and C are m×n matrices, and alpha and beta are scalars.

#### func Syr2k ¶

func Syr2k(t blas.Transpose, alpha complex128, a, b General, beta complex128, c Symmetric)

Syr2k performs a symmetric rank-2k update

C = alpha * A * Bᵀ + alpha * B * Aᵀ + beta * C if t == blas.NoTrans, C = alpha * Aᵀ * B + alpha * Bᵀ * A + beta * C if t == blas.Trans,

where C is an n×n symmetric matrix, A and B are n×k matrices if t == blas.NoTrans and k×n otherwise, and alpha and beta are scalars.

#### func Syrk ¶

func Syrk(t blas.Transpose, alpha complex128, a General, beta complex128, c Symmetric)

Syrk performs a symmetric rank-k update

C = alpha * A * Aᵀ + beta * C if t == blas.NoTrans, C = alpha * Aᵀ * A + beta * C if t == blas.Trans,

where C is an n×n symmetric matrix, A is an n×k matrix if t == blas.NoTrans and a k×n matrix otherwise, and alpha and beta are scalars.

#### func Tbmv ¶

func Tbmv(t blas.Transpose, a TriangularBand, x Vector)

Tbmv computes

x = A * x if t == blas.NoTrans, x = Aᵀ * x if t == blas.Trans, x = Aᴴ * x if t == blas.ConjTrans,

where A is an n×n triangular band matrix, and x is a vector.

#### func Tbsv ¶

func Tbsv(t blas.Transpose, a TriangularBand, x Vector)

Tbsv solves

A * x = b if t == blas.NoTrans, Aᵀ * x = b if t == blas.Trans, Aᴴ * x = b if t == blas.ConjTrans,

where A is an n×n triangular band matrix, and x is a vector.

At entry to the function, x contains the values of b, and the result is stored in-place into x.

No test for singularity or near-singularity is included in this routine. Such tests must be performed before calling this routine.

#### func Tpmv ¶

func Tpmv(t blas.Transpose, a TriangularPacked, x Vector)

Tpmv computes

x = A * x if t == blas.NoTrans, x = Aᵀ * x if t == blas.Trans, x = Aᴴ * x if t == blas.ConjTrans,

where A is an n×n triangular matrix in packed format, and x is a vector.

#### func Tpsv ¶

func Tpsv(t blas.Transpose, a TriangularPacked, x Vector)

Tpsv solves

A * x = b if t == blas.NoTrans, Aᵀ * x = b if t == blas.Trans, Aᴴ * x = b if t == blas.ConjTrans,

where A is an n×n triangular matrix in packed format and x is a vector.

At entry to the function, x contains the values of b, and the result is stored in-place into x.

No test for singularity or near-singularity is included in this routine. Such tests must be performed before calling this routine.

#### func Trmm ¶

func Trmm(s blas.Side, tA blas.Transpose, alpha complex128, a Triangular, b General)

Trmm performs

B = alpha * A * B if tA == blas.NoTrans and s == blas.Left, B = alpha * Aᵀ * B if tA == blas.Trans and s == blas.Left, B = alpha * Aᴴ * B if tA == blas.ConjTrans and s == blas.Left, B = alpha * B * A if tA == blas.NoTrans and s == blas.Right, B = alpha * B * Aᵀ if tA == blas.Trans and s == blas.Right, B = alpha * B * Aᴴ if tA == blas.ConjTrans and s == blas.Right,

where A is an n×n or m×m triangular matrix, B is an m×n matrix, and alpha is a scalar.

#### func Trmv ¶

func Trmv(t blas.Transpose, a Triangular, x Vector)

Trmv computes

x = A * x if t == blas.NoTrans, x = Aᵀ * x if t == blas.Trans, x = Aᴴ * x if t == blas.ConjTrans,

where A is an n×n triangular matrix, and x is a vector.

#### func Trsm ¶

func Trsm(s blas.Side, tA blas.Transpose, alpha complex128, a Triangular, b General)

Trsm solves

A * X = alpha * B if tA == blas.NoTrans and s == blas.Left, Aᵀ * X = alpha * B if tA == blas.Trans and s == blas.Left, Aᴴ * X = alpha * B if tA == blas.ConjTrans and s == blas.Left, X * A = alpha * B if tA == blas.NoTrans and s == blas.Right, X * Aᵀ = alpha * B if tA == blas.Trans and s == blas.Right, X * Aᴴ = alpha * B if tA == blas.ConjTrans and s == blas.Right,

where A is an n×n or m×m triangular matrix, X and B are m×n matrices, and alpha is a scalar.

At entry to the function, b contains the values of B, and the result is stored in-place into b.

No check is made that A is invertible.

#### func Trsv ¶

func Trsv(t blas.Transpose, a Triangular, x Vector)

Trsv solves

A * x = b if t == blas.NoTrans, Aᵀ * x = b if t == blas.Trans, Aᴴ * x = b if t == blas.ConjTrans,

where A is an n×n triangular matrix and x is a vector.

At entry to the function, x contains the values of b, and the result is stored in-place into x.

No test for singularity or near-singularity is included in this routine. Such tests must be performed before calling this routine.

#### func Use ¶

func Use(b blas.Complex128)

Use sets the BLAS complex128 implementation to be used by subsequent BLAS calls. The default implementation is gonum.org/v1/gonum/blas/gonum.Implementation.

### Types ¶

#### type Band ¶

type Band struct { Rows, Cols int KL, KU int Stride int Data []complex128 }

Band represents a band matrix using the band storage scheme.

#### func (Band) From ¶

From fills the receiver with elements from a. The receiver must have the same dimensions and bandwidth as a and have adequate backing data storage.

#### type BandCols ¶

type BandCols Band

BandCols represents a matrix using the band column-major storage scheme.

#### func (BandCols) From ¶

From fills the receiver with elements from a. The receiver must have the same dimensions and bandwidth as a and have adequate backing data storage.

#### type General ¶

type General struct { Rows, Cols int Stride int Data []complex128 }

General represents a matrix using the conventional storage scheme.

#### func (General) From ¶

func (t General) From(a GeneralCols)

From fills the receiver with elements from a. The receiver must have the same dimensions as a and have adequate backing data storage.

#### type GeneralCols ¶

type GeneralCols General

GeneralCols represents a matrix using the conventional column-major storage scheme.

#### func (GeneralCols) From ¶

func (t GeneralCols) From(a General)

From fills the receiver with elements from a. The receiver must have the same dimensions as a and have adequate backing data storage.

#### type Hermitian ¶

type Hermitian Symmetric

Hermitian represents an Hermitian matrix using the conventional storage scheme.

#### func (Hermitian) From ¶

func (t Hermitian) From(a HermitianCols)

From fills the receiver with elements from a. The receiver must have the same dimensions and uplo as a and have adequate backing data storage.

#### type HermitianBand ¶

type HermitianBand SymmetricBand

HermitianBand represents an Hermitian matrix using the band storage scheme.

#### func (HermitianBand) From ¶

func (t HermitianBand) From(a HermitianBandCols)

From fills the receiver with elements from a. The receiver must have the same dimensions, bandwidth and uplo as a and have adequate backing data storage.

#### type HermitianBandCols ¶

type HermitianBandCols HermitianBand

HermitianBandCols represents an Hermitian matrix using the band column-major storage scheme.

#### func (HermitianBandCols) From ¶

func (t HermitianBandCols) From(a HermitianBand)

From fills the receiver with elements from a. The receiver must have the same dimensions, bandwidth and uplo as a and have adequate backing data storage.

#### type HermitianCols ¶

type HermitianCols Hermitian

HermitianCols represents a matrix using the conventional column-major storage scheme.

#### func (HermitianCols) From ¶

func (t HermitianCols) From(a Hermitian)

From fills the receiver with elements from a. The receiver must have the same dimensions and uplo as a and have adequate backing data storage.

#### type HermitianPacked ¶

type HermitianPacked SymmetricPacked

HermitianPacked represents an Hermitian matrix using the packed storage scheme.

#### type Symmetric ¶

type Symmetric struct { N int Stride int Data []complex128 Uplo blas.Uplo }

Symmetric represents a symmetric matrix using the conventional storage scheme.

#### func (Symmetric) From ¶

func (t Symmetric) From(a SymmetricCols)

From fills the receiver with elements from a. The receiver must have the same dimensions and uplo as a and have adequate backing data storage.

#### type SymmetricBand ¶

type SymmetricBand struct { N, K int Stride int Data []complex128 Uplo blas.Uplo }

SymmetricBand represents a symmetric matrix using the band storage scheme.

#### func (SymmetricBand) From ¶

func (t SymmetricBand) From(a SymmetricBandCols)

From fills the receiver with elements from a. The receiver must have the same dimensions, bandwidth and uplo as a and have adequate backing data storage.

#### type SymmetricBandCols ¶

type SymmetricBandCols SymmetricBand

SymmetricBandCols represents a symmetric matrix using the band column-major storage scheme.

#### func (SymmetricBandCols) From ¶

func (t SymmetricBandCols) From(a SymmetricBand)

#### type SymmetricCols ¶

type SymmetricCols Symmetric

SymmetricCols represents a matrix using the conventional column-major storage scheme.

#### func (SymmetricCols) From ¶

func (t SymmetricCols) From(a Symmetric)

#### type SymmetricPacked ¶

type SymmetricPacked struct { N int Data []complex128 Uplo blas.Uplo }

SymmetricPacked represents a symmetric matrix using the packed storage scheme.

#### type Triangular ¶

Triangular represents a triangular matrix using the conventional storage scheme.

#### func (Triangular) From ¶

func (t Triangular) From(a TriangularCols)

From fills the receiver with elements from a. The receiver must have the same dimensions, uplo and diag as a and have adequate backing data storage.

#### type TriangularBand ¶

TriangularBand represents a triangular matrix using the band storage scheme.

#### func (TriangularBand) From ¶

func (t TriangularBand) From(a TriangularBandCols)

#### type TriangularBandCols ¶

type TriangularBandCols TriangularBand

TriangularBandCols represents a triangular matrix using the band column-major storage scheme.

#### func (TriangularBandCols) From ¶

func (t TriangularBandCols) From(a TriangularBand)

#### type TriangularCols ¶

type TriangularCols Triangular

TriangularCols represents a matrix using the conventional column-major storage scheme.

#### func (TriangularCols) From ¶

func (t TriangularCols) From(a Triangular)

From fills the receiver with elements from a. The receiver must have the same dimensions, uplo and diag as a and have adequate backing data storage.

#### type TriangularPacked ¶

TriangularPacked represents a triangular matrix using the packed storage scheme.

#### type Vector ¶

type Vector struct { N int Inc int Data []complex128 }

Vector represents a vector with an associated element increment.

### Source Files ¶

cblas128.go conv.go conv_hermitian.go conv_symmetric.go doc.go

- Version
- v0.15.1 (latest)
- Published
- Aug 16, 2024
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 2 days ago –

Tools for package owners.