GHOST  1.1.2
General, Hybrid, and Optimized Sparse Toolkit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
spmv.h File Reference

Types, constants and macros for SpMV. More...

#include "sparsemat.h"
#include "densemat.h"
Include dependency graph for spmv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GHOST_SPMV_DOT   (GHOST_SPMV_DOT_YY | GHOST_SPMV_DOT_XY | GHOST_SPMV_DOT_XX)
 
#define GHOST_SPMV_AUG_FLAGS
 All flags which case an SpMV augmentation. More...
 
#define GHOST_SPMV_PARSE_TRAITS(traits, _alpha, _beta, _gamma, _dot, _z, _delta, _eta, dt_in, dt_out)
 Parse the SPMV arguments. More...
 
#define GHOST_SPMV_MODES_FULL   (GHOST_SPMV_MODE_NOMPI | GHOST_SPMV_MODE_VECTOR | GHOST_SPMV_MODE_PIPELINED)
 SpMV solver which do combined computation. More...
 
#define GHOST_SPMV_MODES_SPLIT   (GHOST_SPMV_MODE_OVERLAP | GHOST_SPMV_MODE_TASK)
 SpMV solvers which do split computation. More...
 
#define GHOST_SPMV_MODES_ALL   (GHOST_SPMV_MODES_FULL | GHOST_SPMV_MODES_SPLIT)
 All SpMV solver modes. More...
 
#define GHOST_SPMV_MODES_MPI   (GHOST_SPMV_MODE_VECTOR | GHOST_SPMV_MODES_SPLIT | GHOST_SPMV_MODE_PIPELINED)
 

Enumerations

enum  ghost_spmv_flags {
  GHOST_SPMV_DEFAULT = 0, GHOST_SPMV_AXPY = 1 << 0, GHOST_SPMV_MODE_NOCOMM = 1 << 1, GHOST_SPMV_BARRIER = 1 << 2,
  GHOST_SPMV_MODE_OVERLAP = 1 << 3, GHOST_SPMV_MODE_TASK = 1 << 4, GHOST_SPMV_SHIFT = 1 << 5, GHOST_SPMV_SCALE = 1 << 6,
  GHOST_SPMV_AXPBY = 1 << 7, GHOST_SPMV_DOT_YY = 1 << 8, GHOST_SPMV_DOT_XY = 1 << 9, GHOST_SPMV_DOT_XX = 1 << 10,
  GHOST_SPMV_NOT_REDUCE = 1 << 11, GHOST_SPMV_LOCAL = 1 << 12, GHOST_SPMV_REMOTE = 1 << 13, GHOST_SPMV_VSHIFT = 1 << 14,
  GHOST_SPMV_CHAIN_AXPBY = 1 << 15, GHOST_SPMV_MODE_PIPELINED = 1 << 16
}
 Flags to be passed to sparse matrix-vector multiplication. More...
 

Functions

bool ghost_spmvflags_isset (const ghost_spmv_flags a, const ghost_spmv_flags b)
 
ghost_spmv_flags ghost_spmvflags_enable (ghost_spmv_flags a, ghost_spmv_flags b)
 
ghost_spmv_flags ghost_spmvflags_disable (ghost_spmv_flags a, ghost_spmv_flags b)
 

Detailed Description

Types, constants and macros for SpMV.

Author
Moritz Kreutzer morit.nosp@m.z.kr.nosp@m.eutze.nosp@m.r@fa.nosp@m.u.de

Macro Definition Documentation

#define GHOST_SPMV_AUG_FLAGS
Value:
Definition: spmv.h:22
#define GHOST_SPMV_DOT
Definition: spmv.h:37
Definition: spmv.h:24
Definition: spmv.h:17
Definition: spmv.h:32
Definition: spmv.h:31
Definition: spmv.h:23

All flags which case an SpMV augmentation.

#define GHOST_SPMV_DOT   (GHOST_SPMV_DOT_YY | GHOST_SPMV_DOT_XY | GHOST_SPMV_DOT_XX)
#define GHOST_SPMV_MODES_ALL   (GHOST_SPMV_MODES_FULL | GHOST_SPMV_MODES_SPLIT)

All SpMV solver modes.

#define GHOST_SPMV_MODES_FULL   (GHOST_SPMV_MODE_NOMPI | GHOST_SPMV_MODE_VECTOR | GHOST_SPMV_MODE_PIPELINED)

SpMV solver which do combined computation.

#define GHOST_SPMV_MODES_MPI   (GHOST_SPMV_MODE_VECTOR | GHOST_SPMV_MODES_SPLIT | GHOST_SPMV_MODE_PIPELINED)
#define GHOST_SPMV_MODES_SPLIT   (GHOST_SPMV_MODE_OVERLAP | GHOST_SPMV_MODE_TASK)

SpMV solvers which do split computation.

#define GHOST_SPMV_PARSE_TRAITS (   traits,
  _alpha,
  _beta,
  _gamma,
  _dot,
  _z,
  _delta,
  _eta,
  dt_in,
  dt_out 
)

Parse the SPMV arguments.

This macro parses the varargs given to an SpMV call and initializes given variables for the SpMV parameters alpha, beta, gamma, and dot. Also, it checks whether the current SpMV works on the local or remote matrix in case of split computation. Depending on that, the flags are manipulated, e.g., to not compute dot products for the local matrix.

Parameters
flagsThe defined flags.
argpThe argument pointer.
alphaWhere to store alpha.
betaWhere to store beta.
gammaWhere to store gamma.
dotWhere to store the dot array.
zWhere to store the z densemat.
deltaWhere to store deltea.
etaWhere to store eta.
dt_inThe data type in which the args are present.
dt_outThe data of which alpha, beta, gamma, and dot.
Returns

Enumeration Type Documentation

Flags to be passed to sparse matrix-vector multiplication.

Enumerator
GHOST_SPMV_DEFAULT 
GHOST_SPMV_AXPY 
GHOST_SPMV_MODE_NOCOMM 
GHOST_SPMV_BARRIER 
GHOST_SPMV_MODE_OVERLAP 
GHOST_SPMV_MODE_TASK 
GHOST_SPMV_SHIFT 
GHOST_SPMV_SCALE 
GHOST_SPMV_AXPBY 
GHOST_SPMV_DOT_YY 
GHOST_SPMV_DOT_XY 
GHOST_SPMV_DOT_XX 
GHOST_SPMV_NOT_REDUCE 
GHOST_SPMV_LOCAL 
GHOST_SPMV_REMOTE 
GHOST_SPMV_VSHIFT 
GHOST_SPMV_CHAIN_AXPBY 
GHOST_SPMV_MODE_PIPELINED 

Function Documentation

ghost_spmv_flags ghost_spmvflags_disable ( ghost_spmv_flags  a,
ghost_spmv_flags  b 
)
inline
ghost_spmv_flags ghost_spmvflags_enable ( ghost_spmv_flags  a,
ghost_spmv_flags  b 
)
inline
bool ghost_spmvflags_isset ( const ghost_spmv_flags  a,
const ghost_spmv_flags  b 
)
inline