GHOST  1.1.2
General, Hybrid, and Optimized Sparse Toolkit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
sparsemat.cpp File Reference
#include "ghost/config.h"
#include <map>
#include <math.h>
#include <cstdlib>
#include <vector>
#include <numeric>
#include <algorithm>
#include <sstream>
#include <iomanip>
#include <complex>
#include "ghost/types.h"
#include "ghost/util.h"
#include "ghost/locality.h"
#include "ghost/sparsemat.h"
Include dependency graph for sparsemat.cpp:

Functions

ghost_error ghost_sparsemat_registerrow (ghost_sparsemat *mat, ghost_gidx row, ghost_gidx *cols, ghost_lidx rowlen, ghost_lidx stride)
 Store matrix information like bandwidth and nonzero distribution for a given matrix row. More...
 
ghost_error ghost_sparsemat_registerrow_finalize (ghost_sparsemat *mat)
 Finalize the storing of matrix information like bandwidth and nonzero distribution. More...
 
template<typename m_t >
static ghost_error ghost_sparsemat_string_tmpl (ghost_sparsemat *mat, char **str, int dense)
 
ghost_error ghost_sparsemat_string (char **str, ghost_sparsemat *mat, int dense)
 Creates a string of the sparsemat's contents. More...
 

Variables

static map< ghost_sparsemat
*, map< ghost_lidx, ghost_gidx > > 
rowlengths
 
static vector< ghost_gidxlowerPerc90Dists
 
static vector< ghost_gidxupperPerc90Dists
 

Function Documentation

ghost_error ghost_sparsemat_registerrow ( ghost_sparsemat mat,
ghost_gidx  row,
ghost_gidx col,
ghost_lidx  rowlen,
ghost_lidx  stride 
)

Store matrix information like bandwidth and nonzero distribution for a given matrix row.

This function should be called at matrix creation for each row.

Parameters
[out]matThe matrix.
[in]rowThe row index.
[in]colThe column indices of the row.
[in]rowlenThe length of the row.
[in]strideThe stride for the parameter col.
Returns
GHOST_SUCCESS on success or an error indicator.
ghost_error ghost_sparsemat_registerrow_finalize ( ghost_sparsemat mat)

Finalize the storing of matrix information like bandwidth and nonzero distribution.

This function should be after matrix creation. It finalizes the processing of information obtained in ghost_sparsemat_registerrow.

Parameters
[out]matThe matrix.
Returns
GHOST_SUCCESS on success or an error indicator.

Here is the call graph for this function:

template<typename m_t >
static ghost_error ghost_sparsemat_string_tmpl ( ghost_sparsemat mat,
char **  str,
int  dense 
)
static

Here is the call graph for this function:

Variable Documentation

vector<ghost_gidx> lowerPerc90Dists
static
map<ghost_sparsemat *,map<ghost_lidx, ghost_gidx> > rowlengths
static
vector<ghost_gidx> upperPerc90Dists
static