GHOST  1.1.2
General, Hybrid, and Optimized Sparse Toolkit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Classes | Functions
Data types

Basic data types and structures. More...

Classes

struct  ghost_densemat
 A dense vector/matrix. More...
 
struct  ghost_sparsemat
 A sparse matrix. More...
 

Functions

ghost_error ghost_sparsemat_create (ghost_sparsemat **mat, ghost_context *ctx, ghost_sparsemat_traits *traits, int nTraits)
 Create a sparse matrix. More...
 

Detailed Description

Basic data types and structures.

Function Documentation

ghost_error ghost_sparsemat_create ( ghost_sparsemat **  mat,
ghost_context ctx,
ghost_sparsemat_traits traits,
int  nTraits 
)

Create a sparse matrix.

Parameters
[out]matWhere to store the matrix
[in]ctxAn existing context or GHOST_CONTEXT_INITIALIZER.
[in]traitsThe matrix traits. They can be specified for the full matrix, the local and the remote part.
[in]nTraitsThe number of traits.
Returns
GHOST_SUCCESS on success or an error indicator.
Note
No memory will be allocated in this function. Before any operation with the densemat is done, an initialization function (see Sparse matrix initialization) has to be called with the sparsemat. As such, ghost_sparsemat_create does not check the matrix datatype stored in traits (GHOST_DT_NONE by default); this is done by the matrix initialization functions to allow for the datatype to be determined from an input file.

Here is the call graph for this function: