tools.h

headers for some tools used in sopalin.

Summary
tools.hheaders for some tools used in sopalin.
dim_dgeamComputes b = alph * a + b.
GetMpiTypeConstruct a MPI type to store complex values.
FreeMpiTypeFree the MPI type to store complex values.
mysumComputes the sum of in and inout vectors and stores it in inout.
GetMpiSumCreates a new MPI sum operation.
FreeMpiSumFree the MPI sum operation.

dim_dgeam

void dim_dgeam(char *transa,
char *transb,
INT m,
INT n,
FLOAT alpha,
FLOAT *a,
INT lda,
FLOAT *b,
INT ldb)

Computes b = alph * a + b.

  • if transa and transb equals ‘N’.
b := alpha * a + b
  • if transa = ‘T’ and transb =’N’.
b := alpha * trans(a) + b
  • if transa = ‘N’ and transb =’T’.
trans(b) := alpha * a + trans(b)
  • if transa = ‘T’ and transb =’T’.
trans(b) := alpha * trans(a) + trans(b)

Parameters

transaindicates if a needs to be transposed.
transbindicates if b needs to be transposed.
mnumber of row in a and b.
nnumber of colonnes in a and b.
alphascalar.
aMatrix a.
ldaStride between 2 columns of a.
bMatrix b.
ldbStride between 2 columns of b.

GetMpiType

MPI_Datatype GetMpiType(void)

Construct a MPI type to store complex values.

Parameters

none

Return

the constructed MPI type for complex floating values.

FreeMpiType

void FreeMpiType(void)

Free the MPI type to store complex values.

Parameters

none

mysum

void mysum(void *in,
void *inout,
int *len,
MPI_Datatype *dptr)

Computes the sum of in and inout vectors and stores it in inout.

Parameters

inFirst vector.
inoutSecond vector wich will store the sum.
lenSize of each vector.
dptrMPI datatype

GetMpiSum

MPI_Op GetMpiSum(void)

Creates a new MPI sum operation.

Parameters

none

Return: the new operation created.

FreeMpiSum

void FreeMpiSum(void)

Free the MPI sum operation.

Parameters

none

void dim_dgeam(char *transa,
char *transb,
INT m,
INT n,
FLOAT alpha,
FLOAT *a,
INT lda,
FLOAT *b,
INT ldb)
Computes b = alph * a + b.
MPI_Datatype GetMpiType(void)
Construct a MPI type to store complex values.
void FreeMpiType(void)
Free the MPI type to store complex values.
void mysum(void *in,
void *inout,
int *len,
MPI_Datatype *dptr)
Computes the sum of in and inout vectors and stores it in inout.
MPI_Op GetMpiSum(void)
Creates a new MPI sum operation.
void FreeMpiSum(void)
Free the MPI sum operation.
Close