![]() |
(git:e68414f)
|
#include "dbm_distribution.h"#include "dbm_hyperparams.h"#include "dbm_internal.h"#include <assert.h>#include <math.h>#include <omp.h>#include <stdbool.h>#include <stddef.h>#include <stdlib.h>#include <string.h>Go to the source code of this file.
Functions | |
| static void | dbm_dist_1d_new (dbm_dist_1d_t *dist, const int length, const int coords[length], const cp_mpi_comm_t comm, const int nshards) |
| Private routine for creating a new one dimensional distribution. | |
| static void | dbm_dist_1d_free (dbm_dist_1d_t *dist) |
| Private routine for releasing a one dimensional distribution. | |
| static int | find_best_nrow_shards (const int nshards, const int nrows, const int ncols) |
| Private routine for finding the optimal number of shard rows. | |
| void | dbm_distribution_new (dbm_distribution_t **dist_out, const int fortran_comm, const int nrows, const int ncols, const int row_dist[nrows], const int col_dist[ncols]) |
| Creates a new two dimensional distribution. | |
| void | dbm_distribution_hold (dbm_distribution_t *dist) |
| Increases the reference counter of the given distribution. | |
| void | dbm_distribution_release (dbm_distribution_t *dist) |
| Decreases the reference counter of the given distribution. | |
| void | dbm_distribution_row_dist (const dbm_distribution_t *dist, int *nrows, const int **row_dist) |
| Returns the rows of the given distribution. | |
| void | dbm_distribution_col_dist (const dbm_distribution_t *dist, int *ncols, const int **col_dist) |
| Returns the columns of the given distribution. | |
| int | dbm_distribution_stored_coords (const dbm_distribution_t *dist, const int row, const int col) |
| Returns the MPI rank on which the given block should be stored. | |
|
static |
Private routine for creating a new one dimensional distribution.
Definition at line 23 of file dbm_distribution.c.
|
static |
Private routine for releasing a one dimensional distribution.
Definition at line 67 of file dbm_distribution.c.
|
static |
Private routine for finding the optimal number of shard rows.
Definition at line 77 of file dbm_distribution.c.
| void dbm_distribution_new | ( | dbm_distribution_t ** | dist_out, |
| const int | fortran_comm, | ||
| const int | nrows, | ||
| const int | ncols, | ||
| const int | row_dist[nrows], | ||
| const int | col_dist[ncols] | ||
| ) |
Creates a new two dimensional distribution.
Definition at line 102 of file dbm_distribution.c.
| void dbm_distribution_hold | ( | dbm_distribution_t * | dist | ) |
Increases the reference counter of the given distribution.
Definition at line 135 of file dbm_distribution.c.
| void dbm_distribution_release | ( | dbm_distribution_t * | dist | ) |
Decreases the reference counter of the given distribution.
Definition at line 144 of file dbm_distribution.c.
| void dbm_distribution_row_dist | ( | const dbm_distribution_t * | dist, |
| int * | nrows, | ||
| const int ** | row_dist | ||
| ) |
Returns the rows of the given distribution.
Definition at line 158 of file dbm_distribution.c.
| void dbm_distribution_col_dist | ( | const dbm_distribution_t * | dist, |
| int * | ncols, | ||
| const int ** | col_dist | ||
| ) |
Returns the columns of the given distribution.
Definition at line 169 of file dbm_distribution.c.
| int dbm_distribution_stored_coords | ( | const dbm_distribution_t * | dist, |
| const int | row, | ||
| const int | col | ||
| ) |
Returns the MPI rank on which the given block should be stored.
Definition at line 180 of file dbm_distribution.c.