ScaMaC  0.8.2
A Scalable Matrix Collection
Functions
scamac_matop.h File Reference

Sparse matrix creation and manipulation. More...

#include "scamac_vector.h"
#include "scamac_generator.h"
#include "scamac_sparsemat.h"
#include <complex.h>

Go to the source code of this file.

Functions

ScamacErrorCode scamac_matop_from_generator (const ScamacGenerator *gen, ScamacMatop **sm)
 Create matop. More...
 
ScamacErrorCode scamac_matop_from_matrix (const ScamacMatrix *mat, ScamacMatop **sm)
 Obtain matop from ScaMaC sparse matrix.
 
ScamacErrorCode scamac_matop_free (ScamacMatop *sm)
 Free allocated matop.
 
ScamacErrorCode scamac_matop_mvm (const ScamacMatop *sm, const ScamacVector *x, ScamacVector *y, double alpha, double beta, double gamma)
 Sparse matrix-vector multiplication: y = alpha SM x + beta y + gamma x. More...
 
ScamacErrorCode scamac_matop_mvm_cplx (const ScamacMatop *sm, const ScamacVector *x, ScamacVector *y, double complex alpha, double complex beta, double complex gamma)
 Complex sparse matrix-vector multiplication: y = alpha SM x + beta y + gamma x. More...
 

Detailed Description

Sparse matrix creation and manipulation.

Author
Andreas Alvermann (University of Greifswald)
Date
October 2017 — today

Function Documentation

◆ scamac_matop_from_generator()

ScamacErrorCode scamac_matop_from_generator ( const ScamacGenerator gen,
ScamacMatop **  sm 
)

Create matop.

Obtain matop from ScaMaC generator

◆ scamac_matop_mvm()

ScamacErrorCode scamac_matop_mvm ( const ScamacMatop *  sm,
const ScamacVector *  x,
ScamacVector *  y,
double  alpha,
double  beta,
double  gamma 
)

Sparse matrix-vector multiplication: y = alpha SM x + beta y + gamma x.

Note
There is little information in declaring *x "const" - it should simply be understood as a reminder that this vector view is not changed

◆ scamac_matop_mvm_cplx()

ScamacErrorCode scamac_matop_mvm_cplx ( const ScamacMatop *  sm,
const ScamacVector *  x,
ScamacVector *  y,
double complex  alpha,
double complex  beta,
double complex  gamma 
)

Complex sparse matrix-vector multiplication: y = alpha SM x + beta y + gamma x.

Note
Requires complex vectors x,y, but accepts real and complex matrix sm