40 #ifndef STARNEIG_DISTR_MATRIX_H 41 #define STARNEIG_DISTR_MATRIX_H 49 #ifndef STARNEIG_ENABLE_MPI 50 #error "This should be included only when STARNEIG_ENABLE_MPI is defined." 68 struct starneig_distr;
108 int rows,
int cols, starneig_distr_order_t order);
155 int (*func)(
int row,
int col,
void *arg),
void *arg,
size_t arg_size);
184 struct starneig_distr_matrix;
250 starneig_distr_t distr);
296 int rows,
int cols, starneig_datatype_t type,
int owner,
double *A,
318 starneig_distr_matrix_t source, starneig_distr_matrix_t dest);
349 int sr,
int sc,
int dr,
int dc,
int rows,
int cols,
350 starneig_distr_matrix_t source, starneig_distr_matrix_t dest);
394 starneig_distr_matrix_t matrix);
405 starneig_distr_matrix_t matrix);
492 #endif // STARNEIG_DISTR_MATRIX_H int starneig_distr_matrix_get_col_blksz(starneig_distr_matrix_t matrix)
Returns the number of columns in a distribution block.
Double precision real numbers.
Definition: distr_matrix.h:195
void starneig_distr_matrix_copy_region(int sr, int sc, int dr, int dc, int rows, int cols, starneig_distr_matrix_t source, starneig_distr_matrix_t dest)
Copies region of a distributed matrix to a second distributed matrix.
starneig_distr_t starneig_distr_init()
Creates a default data distribution.
starneig_distr_matrix_t starneig_distr_matrix_create_local(int rows, int cols, starneig_datatype_t type, int owner, double *A, int ldA)
Creates a single-owner distributed matrix from a local matrix.
void starneig_distr_matrix_get_blocks(starneig_distr_matrix_t matrix, struct starneig_distr_block **blocks, int *num_blocks)
Returns the locally owned distributed blocks.
starneig_distr_t starneig_distr_init_mesh(int rows, int cols, starneig_distr_order_t order)
Creates a two-dimensional block cyclic data distribution.
void starneig_broadcast(int root, size_t size, void *buffer)
Broadcast a buffer.
void starneig_distr_matrix_destroy(starneig_distr_matrix_t matrix)
Destroys a distributed matrix.
void starneig_distr_destroy(starneig_distr_t distr)
Destroys a data distribution.
void * ptr
A pointer to the local array.
Definition: distr_matrix.h:207
starneig_datatype_t starneig_distr_matrix_get_datatype(starneig_distr_matrix_t matrix)
Returns the matrix element data type.
int glo_col
The leftmost global column that belong to the block.
Definition: distr_matrix.h:205
void starneig_distr_matrix_copy(starneig_distr_matrix_t source, starneig_distr_matrix_t dest)
Copies the contents of a distributed matrix to a second distributed matrix.
int row_blksz
The number of rows in the block.
Definition: distr_matrix.h:202
starneig_distr_t starneig_distr_init_func(int(*func)(int row, int col, void *arg), void *arg, size_t arg_size)
Creates a distribution using a data distribution function.
Default ordering.
Definition: distr_matrix.h:79
This file contains StarNEig library configuration.
starneig_distr_order_t
Process mapping order.
Definition: distr_matrix.h:78
int starneig_distr_matrix_get_cols(starneig_distr_matrix_t matrix)
Returns the number of (global) columns.
Row-major natural ordering.
Definition: distr_matrix.h:80
size_t starneig_distr_matrix_get_elemsize(starneig_distr_matrix_t matrix)
Returns the matrix element size.
int glo_row
The topmost global row that belong to the block.
Definition: distr_matrix.h:204
struct starneig_distr_matrix * starneig_distr_matrix_t
Distributed matrix.
Definition: distr_matrix.h:189
int ld
The leading dimension of the local array.
Definition: distr_matrix.h:206
Distributed block.
Definition: distr_matrix.h:201
starneig_distr_matrix_t starneig_distr_matrix_create(int rows, int cols, int row_blksz, int col_blksz, starneig_datatype_t type, starneig_distr_t distr)
Creates a distributed matrix with uninitialized matrix elements.
int col_blksz
The number of columns in the block.
Definition: distr_matrix.h:203
starneig_distr_t starneig_distr_matrix_get_distr(starneig_distr_matrix_t matrix)
Returns the distribution that is associated with a distributed matrix.
starneig_distr_t starneig_distr_duplicate(starneig_distr_t distr)
Duplicates a data distribution.
starneig_datatype_t
Distributed matrix element data type.
Definition: distr_matrix.h:194
struct starneig_distr * starneig_distr_t
Data distribution.
Definition: distr_matrix.h:73
Column-major natural ordering.
Definition: distr_matrix.h:81
int starneig_distr_matrix_get_row_blksz(starneig_distr_matrix_t matrix)
Returns the number of rows in a distribution block.
int starneig_distr_matrix_get_rows(starneig_distr_matrix_t matrix)
Returns the number of (global) rows.