Template Class CSRMatrix¶
Defined in File CSRMatrix.hpp
Class Documentation¶
-
template<class Precision, class index_type>
class CSRMatrix¶ Manage memory of Compressed Sparse Row (CSR) sparse matrix. CSR format represents a matrix M by three (one-dimensional) arrays, that respectively contain nonzero values, row offsets, and column indices.
- Template Parameters
Precision – Floating-point precision type.
index_type – Integer type.
Public Functions
-
inline CSRMatrix(std::size_t num_rows, std::size_t nnz)¶
-
inline CSRMatrix(std::size_t num_rows, std::size_t nnz, index_type *column_ptr, index_type *csrOffsets_ptr, std::complex<Precision> *value_ptr)¶
-
CSRMatrix() = default¶
-
inline auto getColumns() -> std::vector<index_type>&¶
Get the CSR format index vector of the matrix.
-
inline auto getCsrOffsets() -> std::vector<index_type>&¶
Get CSR format offset vector of the matrix.
api/classPennylane_1_1LightningGPU_1_1MPI_1_1CSRMatrix
Download Python script
Download Notebook
View on GitHub