StarNEig User's Guide  v0.1.6
A task-based library for solving dense nonsymmetric eigenvalue problems
blacs_matrix.h
Go to the documentation of this file.
1 
40 #ifndef STARNEIG_BLACS_MATRIX_H
41 #define STARNEIG_BLACS_MATRIX_H
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
47 #include <starneig/configuration.h>
48 
49 #ifndef STARNEIG_ENABLE_MPI
50 #error "This header should be included only when STARNEIG_ENABLE_MPI is defined."
51 #endif
52 
53 #ifndef STARNEIG_ENABLE_BLACS
54 #error "This header should be included only when STARNEIG_ENABLE_BLACS is defined."
55 #endif
56 
57 #include <starneig/distr_matrix.h>
58 
66 
71 
76 
89  starneig_distr_t distr);
90 
100  starneig_blacs_context_t context);
101 
111 
127 
131 
136 
140 typedef struct starneig_blacs_descr {
142  int type;
146  int m;
148  int n;
150  int sm;
152  int sn;
154  int rsrc;
156  int csrc;
158  int lld;
160 
191  int rows, int cols, int row_blksz, int col_blksz, starneig_datatype_t type,
192  starneig_blacs_context_t context,
193  starneig_blacs_descr_t *descr, void **local);
194 
204  int rows, int cols, int row_blksz, int col_blksz, starneig_datatype_t type,
205  starneig_blacs_context_t context,
206  starneig_blacs_descr_t *descr, void **local);
207 
217 void starneig_blacs_destroy_matrix(starneig_blacs_descr_t *descr, void **local);
218 
226 void starneig_destroy_blacs_matrix(starneig_blacs_descr_t *descr, void **local);
227 
265  starneig_blacs_descr_t *descr, void **local);
266 
306  starneig_blacs_descr_t *descr, void *local);
307 
317 
333 
337 
341 
342 #ifdef __cplusplus
343 }
344 #endif
345 
346 #endif // STARNEIG_BLACS_MATRIX_H
distr_matrix.h
This file contains data types and functions for distributed matrices.
starneig_distr_is_blacs_compatible
int starneig_distr_is_blacs_compatible(starneig_distr_t distr)
Checks whether a data distribution is BLACS compatible.
starneig_blacs_descr::m
int m
The number of (global) rows in the matrix.
Definition: blacs_matrix.h:146
starneig_blacs_descr_t
struct starneig_blacs_descr starneig_blacs_descr_t
BLACS descriptor.
starneig_distr_matrix_is_blacs_compatible
int starneig_distr_matrix_is_blacs_compatible(starneig_distr_matrix_t matrix)
Checks whether a distributed matrix is BLACS compatible.
starneig_blacs_context_to_distr
starneig_distr_t starneig_blacs_context_to_distr(starneig_blacs_context_t context)
Convers a BLACS context to a data distribution.
starneig_blacs_descr::sm
int sm
The number of rows in a distribution block.
Definition: blacs_matrix.h:150
starneig_blacs_descr::n
int n
The number of (global) columns in the matrix.
Definition: blacs_matrix.h:148
starneig_blacs_descr::rsrc
int rsrc
The process grid row over which the first row is distributed.
Definition: blacs_matrix.h:154
starneig_blacs_descr::lld
int lld
The leading dimension of the local array.
Definition: blacs_matrix.h:158
starneig_blacs_descr::type
int type
The descriptor type.
Definition: blacs_matrix.h:142
starneig_distr_is_compatible_with
int starneig_distr_is_compatible_with(starneig_distr_t distr, starneig_blacs_context_t context)
Checks whether a data distribution is compatible with a given BLACS context.
starneig_blacs_descr
BLACS descriptor.
Definition: blacs_matrix.h:140
starneig_distr_to_blacs_context
starneig_blacs_context_t starneig_distr_to_blacs_context(starneig_distr_t distr)
Convers a data distribution to a BLACS context.
starneig_blacs_create_matrix
void starneig_blacs_create_matrix(int rows, int cols, int row_blksz, int col_blksz, starneig_datatype_t type, starneig_blacs_context_t context, starneig_blacs_descr_t *descr, void **local)
Creates a BLACS matrix with uninitialized matrix elements.
starneig_destroy_blacs_matrix
void starneig_destroy_blacs_matrix(starneig_blacs_descr_t *descr, void **local)
Destroyes a BLACS matrix. Deprecated.
starneig_distr_matrix_is_compatible_with
int starneig_distr_matrix_is_compatible_with(starneig_distr_matrix_t matrix, starneig_blacs_context_t context)
Checks whether a distributed matrix is compatible with a given BLACS context.
starneig_blacs_descr::sn
int sn
The number of columns in a distribution block.
Definition: blacs_matrix.h:152
starneig_blacs_descr_to_distr_matrix
starneig_distr_matrix_t starneig_blacs_descr_to_distr_matrix(starneig_datatype_t type, starneig_distr_t distr, starneig_blacs_descr_t *descr, void *local)
Convers a BLACS descriptor and a matching local array to a distributed matrix.
starneig_blacs_destroy_matrix
void starneig_blacs_destroy_matrix(starneig_blacs_descr_t *descr, void **local)
Destroyes a BLACS matrix.
starneig_distr_matrix_to_blacs_descr
void starneig_distr_matrix_to_blacs_descr(starneig_distr_matrix_t matrix, starneig_blacs_context_t context, starneig_blacs_descr_t *descr, void **local)
Convers a distributed matrix to a BLACS descriptor and a matching local array.
starneig_blacs_context_t
int starneig_blacs_context_t
BLACS context.
Definition: blacs_matrix.h:75
starneig_distr_matrix_t
struct starneig_distr_matrix * starneig_distr_matrix_t
Distributed matrix.
Definition: distr_matrix.h:189
starneig_create_blacs_matrix
void starneig_create_blacs_matrix(int rows, int cols, int row_blksz, int col_blksz, starneig_datatype_t type, starneig_blacs_context_t context, starneig_blacs_descr_t *descr, void **local)
Creates a BLACS matrix with uninitialized matrix elements. Deprecated.
starneig_blacs_descr::csrc
int csrc
The process grid column over which the first column is distributed.
Definition: blacs_matrix.h:156
starneig_blacs_descr::context
starneig_blacs_context_t context
The related BLACS context.
Definition: blacs_matrix.h:144
configuration.h
This file contains StarNEig library configuration.
starneig_datatype_t
starneig_datatype_t
Distributed matrix element data type.
Definition: distr_matrix.h:194
starneig_distr_t
struct starneig_distr * starneig_distr_t
Data distribution.
Definition: distr_matrix.h:73