#include <oski/common.h>
#include <oski/mangle.h>
#include <oski/matrix.h>
Go to the source code of this file.
Defines | |
| #define | INC_READHBPAT_H |
| readhbpat.h included. | |
Name mangling. | |
| #define | readhb_pattern MANGLE_(readhb_pattern) |
| #define | readhb_pattern_matrix MANGLE_(readhb_pattern_matrix) |
| #define | readhb_pattern_matrix_nnz MANGLE_(readhb_pattern_matrix_nnz) |
| #define | readhb_expand_symm MANGLE_(readhb_expand_symm) |
Functions | |
| int | readhb_pattern (const char *filename, oski_index_t *p_m, oski_index_t *p_n, oski_index_t *p_nnz, oski_index_t **p_ptr, oski_index_t **p_ind, char *mattype) |
| Read the raw pattern of a sparse matrix stored in Harwell-Boeing formatted file in compressed-sparse column format. | |
| int | readhb_expand_symm (oski_index_t n, oski_index_t base, int is_herm, const oski_index_t *Sptr, const oski_index_t *Sind, const oski_value_t *Sval, oski_index_t **p_Aptr, oski_index_t **p_Aind, oski_value_t **p_Aval) |
| Expand a raw CSR/CSC matrix to full storage. | |
| oski_matrix_t | readhb_pattern_matrix (const char *filename, oski_index_t *p_m, oski_index_t *p_n, char *p_mattype, int expand_symm) |
| Read the pattern of a sparse matrix from a Harwell-Boeing formatted file, and return it as a tunable matrix handle. | |
| oski_matrix_t | readhb_pattern_matrix_nnz (const char *filename, oski_index_t *p_m, oski_index_t *p_n, oski_index_t *p_nnz_stored, oski_index_t *p_nnz_true, char *p_mattype, int expand_symm) |
| Read the pattern of a sparse matrix from a Harwell-Boeing formatted file, and return it as a tunable matrix handle. | |
| #define INC_READHBPAT_H |
readhbpat.h included.
| int readhb_pattern | ( | const char * | filename, | |
| oski_index_t * | p_m, | |||
| oski_index_t * | p_n, | |||
| oski_index_t * | p_nnz, | |||
| oski_index_t ** | p_ptr, | |||
| oski_index_t ** | p_ind, | |||
| char * | mattype | |||
| ) |
Read the raw pattern of a sparse matrix stored in Harwell-Boeing formatted file in compressed-sparse column format.
| [in] | filename | Name of the Harwell-Boeing file. |
| [out] | p_m | Number of rows in the matrix. |
| [out] | p_n | Number of columns in the matrix. |
| [out] | p_nnz | Number of logical (NOT stored) non-zeros. |
| [out] | p_ptr | Stores the column pointers. |
| [out] | p_ind | Stores the row indices. |
| [out] | mattype | Pointer to a buffer of size 4, used to return the Harwell-Boeing matrix type (see Note below). |
Second character
Third character
References dDumpLine(), dParseIntFormat(), dReadVector(), ERR_BAD_ARG, ERR_FILE_READ, ERR_OUT_OF_MEMORY, OSKI_ERR, OSKI_ERR_FILE_READ, oski_Free, oski_HandleError, oski_Malloc, and oski_PrintDebugMessage().
| oski_matrix_t readhb_pattern_matrix_nnz | ( | const char * | matfile, | |
| oski_index_t * | p_m, | |||
| oski_index_t * | p_n, | |||
| oski_index_t * | p_nnz_stored, | |||
| oski_index_t * | p_nnz_true, | |||
| char * | p_mattype, | |||
| int | expand_symm | |||
| ) |
Read the pattern of a sparse matrix from a Harwell-Boeing formatted file, and return it as a tunable matrix handle.
Read the pattern of a sparse matrix from a Harwell-Boeing formatted file, and return it as a tunable matrix handle.
The non-zero values are replaced by random numbers in the interval (0,1].
| [in] | matfile | File to read. |
| [in,out] | p_m | Pointer to scalar integer in which to return the number of matrix rows. May set to NULL if this information is not desired. |
| [in,out] | p_n | Pointer to scalar integer in which to return the number of matrix columns. May set to NULL if this information is not desired. |
| [in,out] | p_nnz_stored | Pointer to scalar integer in which to return the number of stored non-zeros. |
| [in,out] | p_nnz_true | Pointer to scalar integer in which to return the number of true non-zeros. |
| [in,out] | p_mattype | String buffer of length >= 3 in which to store the matrix type. May set to NULL if this information is not desired. This routine does NOT NULL-terminate mattype on return. |
References COPY_INPUTMAT, ERR_OUT_OF_MEMORY, INVALID_MAT, is_csc_lower_tri(), is_csc_upper_tri(), MACRO_TO_STRING, MAT_GENERAL, MAT_HERM_FULL, MAT_HERM_LOWER, MAT_HERM_UPPER, MAT_SYMM_FULL, MAT_SYMM_LOWER, MAT_SYMM_UPPER, MAT_TRI_LOWER, MAT_TRI_UPPER, OSKI_ERR, oski_Free, oski_Malloc, oski_PrintDebugMessage(), reduce_offdiag_values(), and ResetDiagImag().
1.5.9