cblas64

package
v1.3.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package cblas64 provides a simple interface to the complex64 BLAS API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Asum

func Asum(n int, x Vector) float32

Asum computes the sum of the absolute values of the elements of x.

\sum_i |x[i]|

Asum will panic if the vector increment is negative.

func Axpy

func Axpy(n int, alpha complex64, x, y Vector)

Axpy adds alpha times x to y

y[i] += alpha * x[i] for all i

func Copy

func Copy(n int, x, y Vector)

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

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

func Dotc

func Dotc(n int, x, y Vector) complex64

Dotu computes the dot product of the two vectors with complex conjugation

x^H * y

func Dotu

func Dotu(n int, x, y Vector) complex64

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

x^T * y

func Dscal

func Dscal(n int, alpha float32, x Vector)

Dscal scales x by alpha.

x[i] *= alpha

Dscal will panic if the vector increment is negative

func Gbmv

func Gbmv(tA blas.Transpose, alpha complex64, a Band, x Vector, beta complex64, y Vector)

Gbmv computes

y = alpha * A * x + beta * y if tA == blas.NoTrans
y = alpha * A^T * x + beta * y if tA = blas.Trans
y = alpha * A^H * x + beta * y if tA = blas.ConjTrans

where a is an m×n band matrix kL subdiagonals and kU super-diagonals, and m and n refer to the size of the full dense matrix it represents. x and y are vectors, and alpha and beta are scalars.

func Gemm

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

Gemm computes

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

tA and tB specify whether A or B are transposed or conjugated. A, B, and C are m×n dense matrices.

func Gemv

func Gemv(tA blas.Transpose, alpha complex64, a General, x Vector, beta complex64, y Vector)

Gemv computes

y = alpha * a * x + beta * y if tA = blas.NoTrans
y = alpha * A^T * x + beta * y if tA = blas.Trans
y = alpha * A^H * x + beta * y if tA = blas.ConjTrans

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

func Gerc

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

Gerc performs the rank-one operation

A += alpha * x * y^H

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

func Geru

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

Geru performs the rank-one operation

A += alpha * x * y^T

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

func Hbmv

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

Hbmv performs

y = alpha * A * x + beta * y

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

func Hemm

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

Hemm performs

B = alpha * A * B if tA == blas.NoTrans and side == blas.Left
B = alpha * A^H * B if tA == blas.ConjTrans and side == blas.Left
B = alpha * B * A if tA == blas.NoTrans and side == blas.Right
B = alpha * B * A^H if tA == blas.ConjTrans and side == blas.Right

where A is an n×n Hermitia matrix, and B is an m×n matrix.

func Hemv

func Hemv(alpha complex64, a Hermitian, x Vector, beta complex64, 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

func Her(alpha float32, x Vector, a Hermitian)

Ger performs the rank-one operation

A += alpha * x * y^H

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

func Her2

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

Her2 performs the symmetric rank-two update

A += alpha * x * y^H + alpha * y * x^H

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

func Her2k

func Her2k(t blas.Transpose, alpha complex64, a, b General, beta float32, c Hermitian)

Her2k performs the symmetric rank 2k operation

C = alpha * A * B^H + alpha * B * A^H + beta * C

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

func Herk

func Herk(t blas.Transpose, alpha float32, a General, beta float32, c Hermitian)

Herk performs the symmetric rank-k operation

C = alpha * A * A^H + beta*C

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

func Hpmv

func Hpmv(alpha complex64, a HermitianPacked, x Vector, beta complex64, 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 float32, x Vector, a HermitianPacked)

Hpr computes the rank-one operation

a += alpha * x * x^H

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 complex64, x, y Vector, a HermitianPacked)

Hpr2 performs the symmetric rank-2 update

a += alpha * x * y^H + alpha * y * x^H

where a is an n×n symmetric matirx in packed format and x and y are vectors.

func Iamax

func Iamax(n int, x Vector) int

Iamax returns the index of the largest element of x. 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.Complex64

Implementation returns the current BLAS complex64 implementation.

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

func Nrm2

func Nrm2(n int, x Vector) float32

Nrm2 computes the Euclidean norm of a vector,

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

Nrm2 will panic if the vector increment is negative.

func Scal

func Scal(n int, alpha complex64, x Vector)

Scal scales x by alpha.

x[i] *= alpha

Scal will panic if the vector increment is negative

func Swap

func Swap(n int, x, y Vector)

Swap exchanges the elements of two vectors.

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

func Symm

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

Symm performs one of

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

where A is an n×n symmetric matrix, B and C are m×n matrices, and alpha is a scalar.

func Syr2k

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

Syr2k performs the symmetric rank 2k operation

C = alpha * A * B^T + alpha * B * A^T + beta * C

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

func Syrk

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

Syrk performs the symmetric rank-k operation

C = alpha * A * A^T + beta*C

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

func Tbmv

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

Tbmv computes

x = A * x if tA == blas.NoTrans
x = A^T * x if tA == blas.Trans
x = A^H * x if tA == blas.ConjTrans

where A is an n×n triangular banded matrix with k diagonals, and x is a vector.

func Tbsv

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

Tbsv solves

A * x = b if tA == blas.NoTrans
A^T * x = b if tA == blas.Trans
A^H * x = b if tA == blas.ConjTrans

where A is an n×n triangular banded matrix with k diagonals 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 Tpmv

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

Tpmv computes

x = A * x if tA == blas.NoTrans
x = A^T * x if tA == blas.Trans
x = A^H * x if tA == blas.ConjTrans

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

func Tpsv

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

Tpsv solves

A * x = b if tA == blas.NoTrans
A^T * x = b if tA == blas.Trans
A^H * x = b if tA == 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 complex64, a Triangular, b General)

Trmm performs

B = alpha * A * B if tA == blas.NoTrans and side == blas.Left
B = alpha * A^T * B if tA == blas.Trans and side == blas.Left
B = alpha * A^H * B if tA == blas.ConjTrans and side == blas.Left
B = alpha * B * A if tA == blas.NoTrans and side == blas.Right
B = alpha * B * A^T if tA == blas.Trans and side == blas.Right
B = alpha * B * A^H if tA == blas.ConjTrans and side == blas.Right

where A is an n×n triangular matrix, and B is an m×n matrix.

func Trmv

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

Trmv computes

x = A * x if tA == blas.NoTrans
x = A^T * x if tA == blas.Trans
x = A^H * x if tA == blas.ConjTrans

A is an n×n Triangular matrix and x is a vector.

func Trsm

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

Trsm solves

A * X = alpha * B if tA == blas.NoTrans and side == blas.Left
A^T * X = alpha * B if tA == blas.Trans and side == blas.Left
A^H * X = alpha * B if tA == blas.ConjTrans and side == blas.Left
X * A = alpha * B if tA == blas.NoTrans and side == blas.Right
X * A^T = alpha * B if tA == blas.Trans and side == blas.Right
X * A^H = alpha * B if tA ==  blas.ConjTrans and side == blas.Right

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

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

No check is made that A is invertible.

func Trsv

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

Trsv solves

A * x = b if tA == blas.NoTrans
A^T * x = b if tA == blas.Trans
A^H * x = b if tA == blas.ConjTrans

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.Complex64)

Use sets the BLAS complex64 implementation to be used by subsequent BLAS calls. The default implementation is cgo.Implementation.

Types

type Band

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

Band represents a band matrix using the band storage scheme.

type General

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

General represents a matrix using the conventional storage scheme.

type Hermitian

type Hermitian Symmetric

Hermitian represents an Hermitian matrix using the conventional storage scheme.

type HermitianBand

type HermitianBand SymmetricBand

HermitianBand represents an Hermitian matrix using the band storage scheme.

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   []complex64
	Uplo   blas.Uplo
}

Symmetric represents a symmetric matrix using the conventional storage scheme.

type SymmetricBand

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

SymmetricBand represents a symmetric matrix using the band storage scheme.

type SymmetricPacked

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

SymmetricPacked represents a symmetric matrix using the packed storage scheme.

type Triangular

type Triangular struct {
	N      int
	Stride int
	Data   []complex64
	Uplo   blas.Uplo
	Diag   blas.Diag
}

Triangular represents a triangular matrix using the conventional storage scheme.

type TriangularBand

type TriangularBand struct {
	N, K   int
	Stride int
	Data   []complex64
	Uplo   blas.Uplo
	Diag   blas.Diag
}

TriangularBand represents a triangular matrix using the band storage scheme.

type TriangularPacked

type TriangularPacked struct {
	N    int
	Data []complex64
	Uplo blas.Uplo
	Diag blas.Diag
}

TriangularPacked represents a triangular matrix using the packed storage scheme.

type Vector

type Vector struct {
	Inc  int
	Data []complex64
}

Vector represents a vector with an associated element increment.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL