STARS-H
Software for Testing Accuracy, Reliability and Scalability of Hierarchical computations
|
Routines for STARSH_problem. More...
Data Structures | |
struct | starsh_problem |
Matrix/tensor in matrix/tensor-free form. More... | |
Typedefs | |
typedef struct starsh_problem | STARSH_problem |
Functions | |
int | starsh_problem_new (STARSH_problem **problem, int ndim, STARSH_int *shape, char symm, char dtype, void *row_data, void *col_data, STARSH_kernel *kernel, char *name) |
Init STARSH_problem object. More... | |
void | starsh_problem_free (STARSH_problem *problem) |
void | starsh_problem_info (STARSH_problem *problem) |
int | starsh_problem_get_block (STARSH_problem *problem, int nrows, int ncols, STARSH_int *irow, STARSH_int *icol, Array **A) |
Get submatrix on given rows and columns. More... | |
int | starsh_problem_from_array (STARSH_problem **problem, Array *A, char symm) |
Create STARSH_problem instance, based on dense array. More... | |
int | starsh_problem_to_array (STARSH_problem *problem, Array **A) |
Generate dense array by a given problem. More... | |
Routines for STARSH_problem.
typedef struct starsh_problem STARSH_problem |
Typedef for problem
void starsh_problem_free | ( | STARSH_problem * | problem | ) |
Free STARSH_problem object.
int starsh_problem_from_array | ( | STARSH_problem ** | problem, |
Array * | A, | ||
char | symm | ||
) |
Create STARSH_problem instance, based on dense array.
If Array A
is sorted in C order, then temporary Array object will be created as a copy of input A
, but in Fortran order. There will be no way to free that temporary Array object.
[out] | problem | Address of pointer to STARSH_problem object. |
[in] | A | Array. |
[in] | symm | 'S' if Array A is symmetric or 'N' otherwise. |
int starsh_problem_get_block | ( | STARSH_problem * | problem, |
int | nrows, | ||
int | ncols, | ||
STARSH_int * | irow, | ||
STARSH_int * | icol, | ||
Array ** | A | ||
) |
Get submatrix on given rows and columns.
Rows correspond to the first dimension and columns correspond to the last dimension.
[in] | problem | Pointer to STARSH_problem object. |
[in] | nrows | Number of rows. |
[in] | ncols | Number of columns. |
[in] | irow | Indexes of rows. |
[in] | icol | Indexes of columns. |
[out] | A | Address of pointer to Array object. |
void starsh_problem_info | ( | STARSH_problem * | problem | ) |
Print short info about STARSH_problem object.
int starsh_problem_new | ( | STARSH_problem ** | problem, |
int | ndim, | ||
STARSH_int * | shape, | ||
char | symm, | ||
char | dtype, | ||
void * | row_data, | ||
void * | col_data, | ||
STARSH_kernel * | kernel, | ||
char * | name | ||
) |
Init STARSH_problem object.
Unlike all other *_new() functions, this function creates copy of shape
to store internally. This is done to avoid clearing memory of static objects, defined like STARSH_int shape[2] = {10, 20}
. Number of dimensions must be 2 or greater. If ndim = 2
, then corresponding kernel is scalar. If ndim > 2
, then corresponding kernel returns (ndim-2)
-dimensional tensor.
[out] | problem | Address of pointer to STARSH_problem object. |
[in] | ndim | Dimensionality of corresponding array. Equal to 2 plus dimensionality of kernel. |
[in] | shape | Shape of corresponding array. Subarray shape[1:ndim-2] is equal to shape of kernel. |
[in] | symm | 'S' for summetric problem, 'N' for nonsymmetric. Symmetric problem requires symmetric kernel and equality of row_data and col_data . |
[in] | dtype | Data type of the problem. Equal to 's', 'd', 'c' or 'z' as in LAPACK routines. |
[in] | row_data | Pointer to some structure of physical data for rows. |
[in] | col_data | Pointer to some structure of physical data for columns. |
[in] | kernel | Pointer to a function of interaction. |
[in] | name | String, containing name of the problem. |
int starsh_problem_to_array | ( | STARSH_problem * | problem, |
Array ** | A | ||
) |
Generate dense array by a given problem.
Dense matrix will be created. This function makes it easier to check kernel.
[in] | problem | Pointer to STARSH_problem object. |
[out] | A | Address of pointer to Array object. |