GHOST  1.1.2
General, Hybrid, and Optimized Sparse Toolkit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
Dense matrix initialization

Functions to initialize dense matrices/vectors. More...

Functions

ghost_error ghost_densemat_init_rand (ghost_densemat *x)
 Initializes a densemat from random values. More...
 
ghost_error ghost_densemat_init_val (ghost_densemat *x, void *v)
 Initializes a densemat from a scalar value. More...
 
ghost_error ghost_densemat_init_func (ghost_densemat *x, ghost_densemat_srcfunc func, void *arg)
 Initializes a densemat from a given callback function. More...
 
ghost_error ghost_densemat_init_densemat (ghost_densemat *x, ghost_densemat *y, ghost_lidx roffs, ghost_lidx coffs)
 Initializes a densemat from another densemat at a given column and row offset. More...
 
ghost_error ghost_densemat_init_file (ghost_densemat *x, char *path, ghost_mpi_comm mpicomm)
 Initializes a densemat from a file. More...
 
ghost_error ghost_densemat_init_real (ghost_densemat *vec, ghost_densemat *re, ghost_densemat *im)
 Initializes a complex densemat from two real ones (one holding the real, the other one the imaginary part). More...
 
ghost_error ghost_densemat_init_complex (ghost_densemat *re, ghost_densemat *im, ghost_densemat *src)
 Initializes two real densemats from a complex one. More...
 

Detailed Description

Functions to initialize dense matrices/vectors.

Function Documentation

ghost_error ghost_densemat_init_complex ( ghost_densemat re,
ghost_densemat im,
ghost_densemat src 
)

Initializes two real densemats from a complex one.

Parameters
reThe resulting real densemat holding the real part of the source.
imThe resulting real densemat holding the imaginary part of the source.
srcThe complex source densemat.
Returns
GHOST_SUCCESS on success or an error indicator.
ghost_error ghost_densemat_init_densemat ( ghost_densemat x,
ghost_densemat y,
ghost_lidx  roffs,
ghost_lidx  coffs 
)

Initializes a densemat from another densemat at a given column and row offset.

Parameters
xThe densemat.
yThe source.
roffsThe first row to clone.
coffsThe first column to clone.
Returns
GHOST_SUCCESS on success or an error indicator.
ghost_error ghost_densemat_init_file ( ghost_densemat x,
char *  path,
ghost_mpi_comm  mpicomm 
)

Initializes a densemat from a file.

Parameters
xThe densemat.
pathPath to the file.
mpicommIf equal to MPI_COMM_SELF, each process will read from a separate file. Else, a combined file will be read with MPI I/O.
Returns
GHOST_SUCCESS on success or an error indicator.
ghost_error ghost_densemat_init_func ( ghost_densemat x,
ghost_densemat_srcfunc  func,
void *  arg 
)

Initializes a densemat from a given callback function.

Parameters
xThe densemat.
funcThe callback function pointer.
argThe argument which should be forwarded to the callback.
Returns
GHOST_SUCCESS on success or an error indicator.
ghost_error ghost_densemat_init_rand ( ghost_densemat x)

Initializes a densemat from random values.

Parameters
xThe densemat.
Returns
GHOST_SUCCESS on success or an error indicator.

Here is the call graph for this function:

ghost_error ghost_densemat_init_real ( ghost_densemat vec,
ghost_densemat re,
ghost_densemat im 
)

Initializes a complex densemat from two real ones (one holding the real, the other one the imaginary part).

Parameters
vecThe densemat.
reThe real source densemat.
imThe imaginary source densemat.
Returns
GHOST_SUCCESS on success or an error indicator.
ghost_error ghost_densemat_init_val ( ghost_densemat x,
void *  v 
)

Initializes a densemat from a scalar value.

Parameters
xThe densemat.
Returns
GHOST_SUCCESS on success or an error indicator.

Here is the call graph for this function: