|
ergo
|
Compressed sparse row (CSR) matrix functionality. More...
#include <cmath>#include <cstdlib>#include <cstdio>#include <cassert>#include <stdexcept>#include "csr_matrix.h"#include "output.h"#include "memorymanag.h"#include "mat_gblas.h"Classes | |
| struct | csr_index_pair_struct |
Functions | |
| static int | csr_compare_index_pairs_for_qsort (const void *p1, const void *p2) |
| int | ergo_CSR_create (csr_matrix_struct *csr, int symmetryFlag, int n, long nnz, const std::vector< int > &rowind, const std::vector< int > &colind) |
| int | ergo_CSR_destroy (csr_matrix_struct *csr) |
| int | ergo_CSR_copy (csr_matrix_struct *csrDest, const csr_matrix_struct *csrSource) |
| int | ergo_CSR_add_equal_structure (csr_matrix_struct *csrDest, const csr_matrix_struct *csrSource) |
| static long | ergo_csr_find_index (const csr_matrix_struct *csr, int row, int col) |
| int | ergo_CSR_add_to_element (csr_matrix_struct *csr, int row, int col, ergo_real value) |
| ergo_real | ergo_CSR_get_element (const csr_matrix_struct *csr, int row, int col) |
| ergo_real | ergo_CSR_get_max_abs_element (const csr_matrix_struct *csr) |
| long | ergo_CSR_get_nvalues (const csr_matrix_struct *csr) |
| int | ergo_CSR_get_values (const csr_matrix_struct *csr, std::vector< int > &rowind, std::vector< int > &colind, std::vector< ergo_real > &values, long nvalues) |
| int | ergo_CSR_get_nvalues_singlerow (const csr_matrix_struct *csr, int row) |
| int | ergo_CSR_get_values_singlerow (const csr_matrix_struct *csr, int row, std::vector< int > &colind, std::vector< ergo_real > &values, int nvalues) |
Compressed sparse row (CSR) matrix functionality.
|
static |
References csr_index_pair_struct::col, and csr_index_pair_struct::row.
Referenced by ergo_CSR_create().
| int ergo_CSR_add_equal_structure | ( | csr_matrix_struct * | csrDest, |
| const csr_matrix_struct * | csrSource ) |
| int ergo_CSR_add_to_element | ( | csr_matrix_struct * | csr, |
| int | row, | ||
| int | col, | ||
| ergo_real | value ) |
References csr_matrix_struct::elementList, ergo_csr_find_index(), and csr_matrix_struct::symmetryFlag.
Referenced by compute_K_by_boxes_dense(), do_interaction_recursive_2(), get_CSR_from_normalMatrix(), get_CSR_from_symmMatrix(), get_K_contribs_from_2_interacting_boxes(), getDmatLimitMatrixCSRList(), and main().
| int ergo_CSR_copy | ( | csr_matrix_struct * | csrDest, |
| const csr_matrix_struct * | csrSource ) |
| int ergo_CSR_create | ( | csr_matrix_struct * | csr, |
| int | symmetryFlag, | ||
| int | n, | ||
| long | nnz, | ||
| const std::vector< int > & | rowind, | ||
| const std::vector< int > & | colind ) |
References csr_index_pair_struct::col, csr_matrix_struct::columnIndexList, csr_compare_index_pairs_for_qsort(), do_output(), csr_matrix_struct::elementList, csr_matrix_row_struct::firstElementIndex, LOG_AREA_LOWLEVEL, LOG_CAT_ERROR, csr_matrix_struct::n, csr_matrix_struct::nnz, csr_matrix_row_struct::noOfElementsInRow, csr_index_pair_struct::row, csr_matrix_struct::rowList, and csr_matrix_struct::symmetryFlag.
Referenced by compute_K_by_boxes_dense(), compute_V_sparse_hierarchical(), create_CSR_for_K(), get_CSR_from_normalMatrix(), get_CSR_from_symmMatrix(), getDmatLimitMatrixCSRList(), and main().
| int ergo_CSR_destroy | ( | csr_matrix_struct * | csr | ) |
|
static |
| ergo_real ergo_CSR_get_element | ( | const csr_matrix_struct * | csr, |
| int | row, | ||
| int | col ) |
| ergo_real ergo_CSR_get_max_abs_element | ( | const csr_matrix_struct * | csr | ) |
References csr_matrix_struct::elementList, csr_matrix_struct::nnz, and template_blas_fabs().
Referenced by compute_K_by_boxes(), and create_CSR_for_K().
| long ergo_CSR_get_nvalues | ( | const csr_matrix_struct * | csr | ) |
References csr_matrix_struct::nnz.
Referenced by compute_K_by_boxes_sparse_nosymm(), and convert_symm_CSR_to_HML_and_destroy_CSR().
| int ergo_CSR_get_nvalues_singlerow | ( | const csr_matrix_struct * | csr, |
| int | row ) |
References csr_matrix_row_struct::noOfElementsInRow, and csr_matrix_struct::rowList.
Referenced by getDmatLimitMatrixCSRList(), and identify_needed_elements_part().
| int ergo_CSR_get_values | ( | const csr_matrix_struct * | csr, |
| std::vector< int > & | rowind, | ||
| std::vector< int > & | colind, | ||
| std::vector< ergo_real > & | values, | ||
| long | nvalues ) |
References csr_matrix_struct::columnIndexList, csr_matrix_struct::elementList, csr_matrix_row_struct::firstElementIndex, csr_matrix_struct::n, csr_matrix_struct::nnz, csr_matrix_row_struct::noOfElementsInRow, and csr_matrix_struct::rowList.
Referenced by compute_K_by_boxes_sparse_nosymm(), and convert_symm_CSR_to_HML_and_destroy_CSR().
| int ergo_CSR_get_values_singlerow | ( | const csr_matrix_struct * | csr, |
| int | row, | ||
| std::vector< int > & | colind, | ||
| std::vector< ergo_real > & | values, | ||
| int | nvalues ) |
References csr_matrix_struct::columnIndexList, csr_matrix_struct::elementList, csr_matrix_row_struct::firstElementIndex, csr_matrix_row_struct::noOfElementsInRow, and csr_matrix_struct::rowList.
Referenced by compute_K_by_boxes_dense(), getDmatLimitMatrixCSRList(), and identify_needed_elements_part().