bsr.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  bsr_matrix
 Mixed-precision bsr matrix. More...
 

Typedefs

typedef struct bsr_matrix bsr_matrix
 Mixed-precision bsr matrix. More...
 

Functions

bsr_matrixbsr_alloc ()
 Create empty bsr matrix. More...
 
void bsr_free (bsr_matrix *A)
 Delete bsr matrix. More...
 
void bsr_init (bsr_matrix *A, int nrows, int nnz, int b)
 Initialize bsr matrix. More...
 
void bsr_vmspumv3 (bsr_matrix *A, const double *x, double *y, double alpha)
 Sparse matrix-vector multiplication in mixed precision. More...
 
void bsr_vmspmv3 (bsr_matrix *A, const double *x, double *y)
 Sparse matrix-vector multiplication in mixed precision. More...
 
void bsr_vdspmv3 (bsr_matrix *A, const double *x, double *y)
 Sparse matrix-vector multiplication in double precision. More...
 
void bsr_downcast (bsr_matrix *M)
 Make single-precision copy of double-precision values. More...
 
void bsr_info (bsr_matrix *A)
 Display matrix statistics. More...
 
void bsr_sparsity (const bsr_matrix *A, const char *name)
 Display spasity pattern of first few rows. More...
 
void bsr_nonzeros (bsr_matrix *A, const char *name)
 Display nonzero blocks of first few rows. More...
 

Typedef Documentation

◆ bsr_matrix

typedef struct bsr_matrix bsr_matrix

Mixed-precision bsr matrix.

Function Documentation

◆ bsr_alloc()

◆ bsr_downcast()

void bsr_downcast ( bsr_matrix M)

Make single-precision copy of double-precision values.

Parameters
MPointer to bsr matrix

Referenced by Dune::MixedSolver< X, M >::apply(), and Opm::MixedMatrixWrapper< Vector >::update().

◆ bsr_free()

◆ bsr_info()

void bsr_info ( bsr_matrix A)

Display matrix statistics.

Parameters
APointer to bsr matrix

◆ bsr_init()

void bsr_init ( bsr_matrix A,
int  nrows,
int  nnz,
int  b 
)

Initialize bsr matrix.

Parameters
APointer to bsr matrix.
nrowsNumber of rows. @apram nnz Number of nonzero blocks.
bBlock size.

Referenced by Opm::MixedMatrixWrapper< Vector >::MixedMatrixWrapper(), Opm::MixedPreconditioner< M, X, Y >::MixedPreconditioner(), and Dune::MixedSolver< X, M >::MixedSolver().

◆ bsr_nonzeros()

void bsr_nonzeros ( bsr_matrix A,
const char *  name 
)

Display nonzero blocks of first few rows.

Parameters
APointer to bsr matrix
nameString with desired name of bsr_matrix

◆ bsr_sparsity()

void bsr_sparsity ( const bsr_matrix A,
const char *  name 
)

Display spasity pattern of first few rows.

Parameters
APointer to bsr matrix
nameString with desired name of bsr_matrix

◆ bsr_vdspmv3()

void bsr_vdspmv3 ( bsr_matrix A,
const double *  x,
double *  y 
)

Sparse matrix-vector multiplication in double precision.

Note
Function is specialized for 3x3 block-sparse matrices.
The dense 3x3 blocks are assumed to be column-major
Function uses AVX2 intrinsics.
Parameters
APointer to bsr matrix.
xPointer to input vector.
yPointer to output vector.

◆ bsr_vmspmv3()

void bsr_vmspmv3 ( bsr_matrix A,
const double *  x,
double *  y 
)

Sparse matrix-vector multiplication in mixed precision.

Note
Function is specialized for 3x3 block-sparse matrices.
The dense 3x3 blocks are assumed to be column-major
Function uses AVX2 intrinsics.
Parameters
APointer to bsr matrix.
xPointer to input vector.
yPointer to output vector.

Referenced by Opm::MixedMatrixWrapper< Vector >::mv().

◆ bsr_vmspumv3()

void bsr_vmspumv3 ( bsr_matrix A,
const double *  x,
double *  y,
double  alpha 
)

Sparse matrix-vector multiplication in mixed precision.

Note
Function is specialized for 3x3 block-sparse matrices.
Function uses AVX2 intrinsics.
Parameters
APointer to bsr matrix.
xPointer to input vector.
yPointer to output vector.

Referenced by Opm::MixedMatrixWrapper< Vector >::umv(), and Opm::MixedMatrixWrapper< Vector >::usmv().