Report a bug
If you spot a problem with this page, click here to create a Github issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

glas.ndslice

GLAS API

Authors:
Ilya Yaroshenko

Transposition

GLAS does not require transposition parameters. Use transposed to perform zero cost ndslice transposition.

Note: ndslice uses is row major representation.

enum ulong ConjA;
Specifies if the matrix asl stores conjugated elements.
enum ulong ConjB;
Specifies if the matrix bsl stores conjugated elements.
enum ulong Lower;
Specifies if the lower triangular part of the symmetric matrix A is to be referenced.
The lower triangular part of the matrix asl must contain the lower triangular part of the symmetric / hermitian matrix A and the strictly upper triangular part of asl is not referenced.

Note: Lower is default flag.

enum ulong Upper;
Specifies if the upper triangular part of the symmetric matrix A is to be referenced.
The upper triangular part of the matrix asl must contain the upper triangular part of the symmetric / hermitian matrix A and the strictly lower triangular part of asl is not referenced.
enum ulong Left;
Specifies if the symmetric/hermitian matrix A appears on the left in the operation.

Note: Left is default flag.

enum ulong Right;
Specifies if the symmetric/hermitian matrix A appears on the left in the operation.
nothrow @nogc @system void glas_sgemm(float alpha, Slice!(2, const(float)*) asl, Slice!(2, const(float)*) bsl, float beta, Slice!(2, float*) csl, ulong settings = 0);

nothrow @nogc @system void glas_dgemm(double alpha, Slice!(2, const(double)*) asl, Slice!(2, const(double)*) bsl, double beta, Slice!(2, double*) csl, ulong settings = 0);

nothrow @nogc @system void glas_cgemm(cfloat alpha, Slice!(2, const(cfloat)*) asl, Slice!(2, const(cfloat)*) bsl, cfloat beta, Slice!(2, cfloat*) csl, ulong settings = 0);

nothrow @nogc @system void glas_zgemm(cdouble alpha, Slice!(2, const(cdouble)*) asl, Slice!(2, const(cdouble)*) bsl, cdouble beta, Slice!(2, cdouble*) csl, ulong settings = 0);
Performs general matrix-matrix multiplication.

Pseudo code: C := alpha A × B + beta C.

Parameters:
float alpha scalar
Slice!(2, const(float)*) asl m ⨉ k matrix
Slice!(2, const(float)*) bsl k ⨉ n matrix
float beta scalar. When beta is supplied as zero then the matrix csl need not be set on input.
Slice!(2, float*) csl m ⨉ n matrix with one stride equal to ±1.
ulong settings Operation settings. Allowed flags are ConjA and ConjB.

Unified alias: gemm

BLAS: SGEMM, DGEMM, CGEMM, ZGEMM

nothrow @nogc @system void glas_ssymm(float alpha, Slice!(2, const(float)*) asl, Slice!(2, const(float)*) bsl, float beta, Slice!(2, float*) csl, ulong settings = 0);

nothrow @nogc @system void glas_dsymm(double alpha, Slice!(2, const(double)*) asl, Slice!(2, const(double)*) bsl, double beta, Slice!(2, double*) csl, ulong settings = 0);

nothrow @nogc @system void glas_csymm(cfloat alpha, Slice!(2, const(cfloat)*) asl, Slice!(2, const(cfloat)*) bsl, cfloat beta, Slice!(2, cfloat*) csl, ulong settings = 0);

nothrow @nogc @system void glas_zsymm(cdouble alpha, Slice!(2, const(cdouble)*) asl, Slice!(2, const(cdouble)*) bsl, cdouble beta, Slice!(2, cdouble*) csl, ulong settings = 0);
Performs symmetric or hermitian matrix-matrix multiplication.

Pseudo code: C := alpha A × B + beta C or C := alpha B × A + beta C, where alpha and beta are scalars, A is a symmetric or hermitian matrix and B and C are m × n matrices.

Parameters:
float alpha scalar
Slice!(2, const(float)*) asl k ⨉ k matrix, where k is n when Right flag is set and is m otherwise.
Slice!(2, const(float)*) bsl m ⨉ n matrix
float beta scalar. When beta is supplied as zero then the matrix csl need not be set on input.
Slice!(2, float*) csl m ⨉ n matrix with one stride equals to ±1.
ulong settings Operation settings. Allowed flags are Left, Right, Lower, Upper, ConjA, ConjB. ConjA flag specifies if the matrix A is hermitian.

Unified alias: symm

BLAS: SSYMM, DSYMM, CSYMM, ZSYMM, SHEMM, DHEMM, CHEMM, ZHEMM

nothrow @nogc @system void glas_sscal(float a, Slice!(1, float*) xsl);

nothrow @nogc @system void glas_dscal(double a, Slice!(1, double*) xsl);

nothrow @nogc @system void glas_csscal(float a, Slice!(1, cfloat*) xsl);

nothrow @nogc @system void glas_cscal(cfloat a, Slice!(1, cfloat*) xsl);

nothrow @nogc @system void glas_csIscal(ifloat a, Slice!(1, cfloat*) xsl);

nothrow @nogc @system void glas_zdscal(double a, Slice!(1, cdouble*) xsl);

nothrow @nogc @system void glas_zscal(cdouble a, Slice!(1, cdouble*) xsl);

nothrow @nogc @system void glas_zdIscal(idouble a, Slice!(1, cdouble*) xsl);

nothrow @nogc @system void _glas_sscal(float a, size_t n, size_t incx, float* x);

nothrow @nogc @system void _glas_dscal(double a, size_t n, size_t incx, double* x);

nothrow @nogc @system void _glas_csscal(float a, size_t n, size_t incx, cfloat* x);

nothrow @nogc @system void _glas_cscal(cfloat a, size_t n, size_t incx, cfloat* x);

nothrow @nogc @system void _glas_csIscal(ifloat a, size_t n, size_t incx, cfloat* x);

nothrow @nogc @system void _glas_zdscal(double a, size_t n, size_t incx, cdouble* x);

nothrow @nogc @system void _glas_zscal(cdouble a, size_t n, size_t incx, cdouble* x);

nothrow @nogc @system void _glas_zdIscal(idouble a, size_t n, size_t incx, cdouble* x);
scal scales a vector by a constant.

Pseudo code: x := a x.

Unified alias: scal

BLAS: SSCSCAL, DSCSCAL, CSCSCAL, ZSCSCAL, CSCAL, ZSCAL