![]() |
GHOST
1.1.2
General, Hybrid, and Optimized Sparse Toolkit
|
Functions to initialize sparse matrices. More...
Functions | |
| ghost_error | ghost_sparsemat_init_rowfunc (ghost_sparsemat *mat, ghost_sparsemat_src_rowfunc *src, ghost_mpi_comm mpicomm, double weight) |
| Initializes a sparsemat from a row-based callback function. More... | |
| ghost_error | ghost_sparsemat_init_bin (ghost_sparsemat *mat, char *path, ghost_mpi_comm mpicomm, double weight) |
| Initializes a sparsemat from a binary CRS file. More... | |
| ghost_error | ghost_sparsemat_init_mm (ghost_sparsemat *mat, char *path, ghost_mpi_comm mpicomm, double weight) |
| Initializes a sparsemat from a Matrix Market file. More... | |
| ghost_error | ghost_sparsemat_init_crs (ghost_sparsemat *mat, ghost_gidx offs, ghost_lidx n, ghost_gidx *col, void *val, ghost_lidx *rpt, ghost_mpi_comm mpicomm, double weight) |
| Initializes a sparsemat from local CRS data. More... | |
Functions to initialize sparse matrices.
| ghost_error ghost_sparsemat_init_bin | ( | ghost_sparsemat * | mat, |
| char * | path, | ||
| ghost_mpi_comm | mpicomm, | ||
| double | weight | ||
| ) |
Initializes a sparsemat from a binary CRS file.
| mat | The matrix. |
| path | The source file. |
| mpicomm | The MPI communicator in which to create this sparsemat. |
| weight | The weight of each rank in the given MPI communicator. |
Allows the matrix' datatype to be GHOST_DT_NONE. In this case the datatype for the matrix is read from file. Otherwise the matrix datatype has to be valid and compatible.

| ghost_error ghost_sparsemat_init_crs | ( | ghost_sparsemat * | mat, |
| ghost_gidx | offs, | ||
| ghost_lidx | n, | ||
| ghost_gidx * | col, | ||
| void * | val, | ||
| ghost_lidx * | rpt, | ||
| ghost_mpi_comm | mpicomm, | ||
| double | weight | ||
| ) |
Initializes a sparsemat from local CRS data.
| mat | The matrix. |
| offs | The global index of this rank's first row. |
| n | The local number of rows. |
| col | The (global) column indices. |
| val | The values. |
| rpt | The row pointers. |
| mpicomm | The MPI communicator in which to create this sparsemat. |
| weight | The weight of each rank in the given MPI communicator. |
Requires the matrix to have a valid and compatible datatype.

| ghost_error ghost_sparsemat_init_mm | ( | ghost_sparsemat * | mat, |
| char * | path, | ||
| ghost_mpi_comm | mpicomm, | ||
| double | weight | ||
| ) |
Initializes a sparsemat from a Matrix Market file.
| mat | The matrix. |
| path | The source file. |
| mpicomm | The MPI communicator in which to create this sparsemat. |
| weight | The weight of each rank in the given MPI communicator. |
Allows the matrix' datatype to be GHOST_DT_NONE or one of the incomplete datatypes GHOST_DT_FLOAT and GHOST_DT_DOUBLE. If the matrix' datatype on entry is GHOST_DT_FLOAT or GHOST_DT_DOUBLE, the file will be interpreted either in single or double precision, respectively. In this case, the datatype will be completed with GHOST_DT_REAL or GHOST_DT_COMPLEX as specified in the input file. If the matrix' datatype on entry is GHOST_DT_NONE, GHOST_DT_DOUBLE is assumed. Otherwise the matrix datatype has to be valid and compatible.

| ghost_error ghost_sparsemat_init_rowfunc | ( | ghost_sparsemat * | mat, |
| ghost_sparsemat_src_rowfunc * | src, | ||
| ghost_mpi_comm | mpicomm, | ||
| double | weight | ||
| ) |
Initializes a sparsemat from a row-based callback function.
| mat | The matrix. |
| src | The source. |
| mpicomm | The MPI communicator in which to create this sparsemat. |
| weight | The weight of each rank in the given MPI communicator. |
Requires the matrix to have a valid and compatible datatype.

1.8.6