Types and functions related to GHOST maps.
More...
#include "config.h"
#include "types.h"
#include "sparsemat_src.h"
Go to the source code of this file.
|
ghost_error | ghost_map_create_distribution (ghost_map *map, ghost_sparsemat_src_rowfunc *matsrc, double weight, ghost_map_dist_type distType, ghost_lidx *el_per_rank) |
| Initialize a map's distribution. More...
|
|
ghost_error | ghost_map_create (ghost_map **map, ghost_gidx gdim, ghost_mpi_comm comm, ghost_maptype type, ghost_map_flags flags) |
| Create a map. More...
|
|
ghost_map * | ghost_map_create_light (ghost_lidx dim, ghost_mpi_comm mpicomm) |
| Create a light map with only a dimension and an MPI communicator. More...
|
|
void | ghost_map_destroy (ghost_map *map) |
| Destroy a map and free all its resources if no more references to it exist. More...
|
|
int | ghost_rank_of_row (ghost_map *map, ghost_gidx row) |
| Get the rank of a given global row in a given map. More...
|
|
Types and functions related to GHOST maps.
- Author
- Moritz Kreutzer morit.nosp@m.z.kr.nosp@m.eutze.nosp@m.r@fa.nosp@m.u.de
Possible distribution criteria of maps.
Enumerator |
---|
GHOST_MAP_DIST_NNZ |
Distribute by number of non zero entries.
|
GHOST_MAP_DIST_NROWS |
Distribute by number of rows.
|
Possible flags to maps.
Enumerator |
---|
GHOST_MAP_DEFAULT |
|
GHOST_PERM_NO_DISTINCTION |
Does not make a distinction between local and remote entries if set; this might lead to higher communication time.
|
Possible types of maps.
Enumerator |
---|
GHOST_MAP_NONE |
No type associated yet.
|
GHOST_MAP_ROW |
A row map.
|
GHOST_MAP_COL |
A column map.
|
Possible sources of a sparse matrix.
Enumerator |
---|
GHOST_SPARSEMAT_SRC_FILE |
The matrix comes from a binary CRS file.
|
GHOST_SPARSEMAT_SRC_MM |
The matrix comes from a Matrix Market file.
|
GHOST_SPARSEMAT_SRC_FUNC |
The matrix is generated by a function.
|
GHOST_SPARSEMAT_SRC_NONE |
Empty source.
|
Create a map.
- Parameters
-
map | The map. |
gdim | The global dimensions of the map. |
comm | The map's MPI communicator. |
type | The type of the map. |
flags | Optional flags. |
- Returns
- GHOST_SUCCESS on success or an error indicator.
Initialize a map's distribution.
- Parameters
-
map | The map. |
matsrc | The sparse matrix construction function or NULL. |
weight | The weight of this rank. |
distType | The distribution scheme. |
el_per_rank | An array of length $nranks which prescribed the distribution or NULL. |
In case matsrc is NULL, the only possible distType is GHOST_MAP_DIST_NROWS.
- Returns
- GHOST_SUCCESS on success or an error indicator.
Create a light map with only a dimension and an MPI communicator.
This map is usually used for non-distributed dense matrices. The map does not have to be free'd by the user but will be free'd in ghost_densemat_destroy().
- Parameters
-
dim | The dimension. |
mpicomm | The MPI communicator. |
- Returns
- The map.
Destroy a map and free all its resources if no more references to it exist.
- Parameters
-
This decreases the ghost_map::ref_count and, in case it is zero afterwards, free's the map's resources.
Get the rank of a given global row in a given map.
- Parameters
-
map | The map. |
row | The global row. |
- Returns
- The rank inside the map's MPI communicator which owns the given row.