sopalin_compute_linux.h

Blas interface definition for LINUX/GNU operating systems.

Sensible to those defines : FORCE_DOUBLE - Determine if coefficients are doubles or not.  FORCE_COMPLEX - Determine if coefficients are complex or not.  INT - Defined in common_pastix.h to determine integer type.  CBLAS - Determine if we want to use cblas or not.  DEBUG_NAN - If we want to check for NaN values in BLAS operartions, must be used with DBG_SOPALIN_NAN set to 1.  BLAS_USE_COPY - To use memcpy instead of BLAS copy function.  BLAS_USE_SCAL - To use “by hand” scal macro instead of BLAS one.

Authors

Ramet Pierrera.nosp@m.met@labr.nosp@m.i.fr
Xavier Lacostelac.nosp@m.oste@labr.nosp@m.i.fr
Summary
sopalin_compute_linux.hBlas interface definition for LINUX/GNU operating systems.
Macros
BLAS_INTinteger to use in blas calls.
BLAS macrosDefines to set the correct blas depending on the coefficients type and the set of cblas usage or not.
dim_dgeam
Macros and Variables
SOPALIN_GEAMComputes $ b = x \times a + b $.
iter
iter2
SOPALIN_COPYCopy x vector to y vector.
varin
SOPALIN_LACPYEquivalent of lacpy form LAPACK with uplo = ‘General’
SOPALIN_SCALMultiply a vector by a scalar.
i
varin
TRSM
Macros
SOPALIN_TRSMSolves $ A \times X = x \times B $ or $ X \times A = x \times B $ depending on s value.
Variables
varim
TRSV
Macros and Variables
SOPALIN_TRSVSolves a system of linear equation with a triangular matrix.
varin
SOPALIN_GEMMComputes $ c = x \times a \times b + y \times c $.
varim
GEMV
Variables
varim
AXPY
Variables
varin
varin
SYR
Variables
varin
SYRK
Variables
varin
varim

Macros

BLAS_INT

integer to use in blas calls.

BLAS macros

Defines to set the correct blas depending on the coefficients type and the set of cblas usage or not.

dim_dgeam

void dim_dgeam(char *transa,
char *transb,
INT m,
INT n,
FLOAT alpha,
FLOAT *a,
INT lda,
FLOAT *b,
INT ldb)
Summary
Macros and Variables
SOPALIN_GEAMComputes $ b = x \times a + b $.
iter
iter2
SOPALIN_COPYCopy x vector to y vector.
varin
SOPALIN_LACPYEquivalent of lacpy form LAPACK with uplo = ‘General’
SOPALIN_SCALMultiply a vector by a scalar.
i
varin

Macros and Variables

SOPALIN_GEAM

Computes $ b = x \times a + b $.

Parameters

iindicates if a needs to be transposed.
jindicates if b needs to be transposed.
mnumber of row in a and b.
nnumber of colonnes in a and b.
xscalar.
aMatrix a.
uStride between 2 columns of a.
bMatrix b.
vStride between 2 columns of b.

iter

INT iter

iter2

INT iter2

SOPALIN_COPY

Copy x vector to y vector.

Care: if BLAS_USE_COPY is defined, only works with u and v equal to 1.

Parameters

nSize of the vectors.
xSource vector
ux vector stride between to cefficients.
yDestination vector.
vy vector stride between to cefficients.

varin

BLAS_INT varin

SOPALIN_LACPY

Equivalent of lacpy form LAPACK with uplo = ‘General’

Care: if BLAS_USE_COPY is defined, only works with lda and ldb equal to 1.

Parameters

mNumber of rows to copy
nNumber of columns to copy
Alda-by-n Matrix A
ldaLeading dimension of A (lda >= m)
BDestination ldb-by-n matrix B
ldbLeading dimension of B (ldb >= m)

SOPALIN_SCAL

Multiply a vector by a scalar.

Care: if BLAS_USE_SCAL is defined, only works with u equal to 1.

Parameters

nSize of the vector
aScalar to multiply the vector by.
xVector.
ustride between to element of the vector.

i

INT i

varin

BLAS_INT varin

TRSM

extern void TRSM (char *s,
char *p,
char *t,
char *d,
BLAS_INT *m,
BLAS_INT * ,
FLOAT *x,
FLOAT *a,
BLAS_INT *u,
FLOAT *b,
BLAS_INT *v)
Summary
Macros
SOPALIN_TRSMSolves $ A \times X = x \times B $ or $ X \times A = x \times B $ depending on s value.
Variables
varim

Macros

SOPALIN_TRSM

Solves $ A \times X = x \times B $ or $ X \times A = x \times B $ depending on s value.  A is a triangular matrix.

Parameters

sPosition of a ‘L’ or ‘l’ for left, ‘R’ or ‘r’ for right.
pIndicate if the matrice is upper (‘U’) or lower (‘L’) triangular matrix.
tIndicate if user wants to transpose a.
dIndicate if diagonal is united (‘U’) or not (‘N’).
mNumber of lines in b.
nNumber of columns in b.
xCoefficient to multiply right-hand-side by.
aa matrix (MxM or NxN depending on s).
uStride for a
bb MxN matrix.
vStride for b.

Variables

varim

BLAS_INT varim

TRSV

extern void TRSV(char *,
char *,
char *,
BLAS_INT *,
FLOAT *,
BLAS_INT *,
FLOAT *,
BLAS_INT *)
Summary
Macros and Variables
SOPALIN_TRSVSolves a system of linear equation with a triangular matrix.
varin
SOPALIN_GEMMComputes $ c = x \times a \times b + y \times c $.
varim

Macros and Variables

SOPALIN_TRSV

Solves a system of linear equation with a triangular matrix.

Parameters

pIndicate if the matrix is upper (‘U’) or lower (‘L’) triangular.
tIndicate if user wants to transpose (‘T’) the matrix or not (‘N’).
dIndicate if the matrix has a united diagonal (‘U’) ot not (‘N’).
nSize of the matrix and vector.
aTriangular matrix NxN.
uStride for a.
bRight-hand-side member.
vStride for b.

varin

BLAS_INT varin

SOPALIN_GEMM

Computes $ c = x \times a \times b + y \times c $.

Parameters

iindicate if user wants to transpose a.
jindicate if user wants to transpose b.
mNumber of lines in c and a.
nNumber of columns in c and b.
kNumber of lines in b and columns in a.
xcoefficient for $ a \times b$
a$m \times k$ Matrix.
uStride for a.
b$k \times n$ Matrix.
vStride for b.
yCoefficient for c
c$m \times n$ matrix.
wStride for c

varim

BLAS_INT varim

GEMV

extern void GEMV(char *,
BLAS_INT *,
BLAS_INT *,
 FLOAT*,
 FLOAT*,
 BLAS_INT*,
 FLOAT*,
 BLAS_INT*,
 FLOAT*,
 FLOAT*,
 BLAS_INT*)

Variables

varim

BLAS_INT varim

AXPY

extern void AXPY(BLAS_INT * ,
FLOAT *a,
FLOAT *x,
BLAS_INT *ix,
FLOAT *y,
BLAS_INT *iy)

Variables

varin

BLAS_INT varin

varin

BLAS_INT varin

SYR

extern void SYR(char *i,
BLAS_INT * ,
FLOAT *x,
FLOAT *a,
BLAS_INT *u,
FLOAT *b,
BLAS_INT *v)

Variables

varin

BLAS_INT varin

SYRK

extern void SYRK (char *i,
char *t,
BLAS_INT *n,
BLAS_INT *k,
FLOAT *x,
FLOAT *a,
BLAS_INT *u,
FLOAT *y,
FLOAT *b,
BLAS_INT *v)

Variables

varin

BLAS_INT varin

varim

BLAS_INT varim
void dim_dgeam(char *transa,
char *transb,
INT m,
INT n,
FLOAT alpha,
FLOAT *a,
INT lda,
FLOAT *b,
INT ldb)
INT iter
INT iter2
BLAS_INT varin
INT i
extern void TRSM (char *s,
char *p,
char *t,
char *d,
BLAS_INT *m,
BLAS_INT * ,
FLOAT *x,
FLOAT *a,
BLAS_INT *u,
FLOAT *b,
BLAS_INT *v)
BLAS_INT varim
extern void TRSV(char *,
char *,
char *,
BLAS_INT *,
FLOAT *,
BLAS_INT *,
FLOAT *,
BLAS_INT *)
extern void GEMV(char *,
BLAS_INT *,
BLAS_INT *,
 FLOAT*,
 FLOAT*,
 BLAS_INT*,
 FLOAT*,
 BLAS_INT*,
 FLOAT*,
 FLOAT*,
 BLAS_INT*)
extern void AXPY(BLAS_INT * ,
FLOAT *a,
FLOAT *x,
BLAS_INT *ix,
FLOAT *y,
BLAS_INT *iy)
extern void SYR(char *i,
BLAS_INT * ,
FLOAT *x,
FLOAT *a,
BLAS_INT *u,
FLOAT *b,
BLAS_INT *v)
extern void SYRK (char *i,
char *t,
BLAS_INT *n,
BLAS_INT *k,
FLOAT *x,
FLOAT *a,
BLAS_INT *u,
FLOAT *y,
FLOAT *b,
BLAS_INT *v)
Close