![]() |
Block-Structured AMR Software Framework
|
Owning CSR container backed by AMReX resizable vectors. More...
#include <AMReX_CSR.H>
Public Types | |
| using | index_type = I |
Public Member Functions | |
| Long | nrows () const |
| Number of logical rows represented by the CSR offset array. | |
| void | resize (Long num_rows, Long num_non_zeros) |
Resize the storage to accommodate num_rows and num_non_zeros entries. | |
| CsrView< T, I > | view () |
| Mutable view of the underlying buffers. | |
| CsrView< T const, I > | view () const |
| Const view of the underlying buffers. | |
| CsrView< T const, I > | const_view () const |
| Convenience alias for view() const. | |
| void | sort () |
| Sort each row by column index. Uses GPU acceleration when possible. | |
| void | sort_on_host () |
| Host-only fallback that sorts column indices row by row. | |
Public Attributes | |
| V< T > | mat |
| V< I > | col_index |
| V< I > | row_offset |
| Long | nnz = 0 |
Owning CSR container backed by AMReX resizable vectors.
| T | Value type stored in the matrix. |
| V | Vector-like container template (e.g., PODVector, Gpu::DeviceVector). |
| I | Index type of both the column indices and the row offsets. |
| using amrex::CSR< T, V, I >::index_type = I |
|
inline |
Convenience alias for view() const.
|
inline |
Number of logical rows represented by the CSR offset array.
|
inline |
Resize the storage to accommodate num_rows and num_non_zeros entries.
Existing data are discarded; value/column arrays are resized to the specified nonzero count and row offsets to num_rows+1.
| num_rows | Row count. |
| num_non_zeros | Number of nonzeros. |
| void amrex::CSR< T, V, I >::sort | ( | ) |
Sort each row by column index. Uses GPU acceleration when possible.
| void amrex::CSR< T, V, I >::sort_on_host | ( | ) |
Host-only fallback that sorts column indices row by row.
|
inline |
Mutable view of the underlying buffers.
|
inline |
Const view of the underlying buffers.
| V<I> amrex::CSR< T, V, I >::col_index |
| V<T> amrex::CSR< T, V, I >::mat |
| Long amrex::CSR< T, V, I >::nnz = 0 |
| V<I> amrex::CSR< T, V, I >::row_offset |