Implementation detail of Tpetra::Details::CooMatrix (which see below).
More...
#include <Tpetra_Details_CooMatrix.hpp>
|
| | CooMatrixImpl ()=default |
| | Default constructor.
|
| |
| void | sumIntoGlobalValue (const GO gblRowInd, const GO gblColInd, const SC &val) |
| | Insert one entry locally into the sparse matrix, if it does not exist there yet. If it does exist, sum the values.
|
| |
| void | sumIntoGlobalValues (const GO gblRowInds[], const GO gblColInds[], const SC vals[], const std::size_t numEnt) |
| | Insert multiple entries locally into the sparse matrix.
|
| |
| std::size_t | getLclNumEntries () const |
| | Number of entries in the sparse matrix on the calling process.
|
| |
| void | forAllEntries (std::function< void(const GO, const GO, const SC &)> f) const |
| | Execute the given function for all entries of the sparse matrix, sequentially (no thread parallelism). Do not modify entries.
|
| |
| void | mergeIntoRow (const GO tgtGblRow, const CooMatrixImpl< SC, GO > &src, const GO srcGblRow) |
| | Into global row tgtGblRow of *this, merge global row srcGblRow of src.
|
| |
| int | countPackRow (int &numPackets, const GO gblRow, const ::Teuchos::Comm< int > &comm, std::ostream *errStrm=NULL) const |
| | Count the number of packets (bytes, in this case) needed to pack the given row of the matrix.
|
| |
| void | packRow (packet_type outBuf[], const int outBufSize, int &outBufCurPos, const ::Teuchos::Comm< int > &comm, std::vector< GO > &gblRowInds, std::vector< GO > &gblColInds, std::vector< SC > &vals, const GO gblRow) const |
| | Pack the given row of the matrix.
|
| |
| GO | getMyGlobalRowIndices (std::vector< GO > &rowInds) const |
| | Get the global row indices on this process, sorted and made unique, and return the minimum global row index on this process.
|
| |
| template<class OffsetType , class LO > |
| void | buildLocallyIndexedCrs (std::vector< OffsetType > &rowOffsets, LO lclColInds[], SC vals[], std::function< LO(const GO)> gblToLcl) const |
| | Build a locally indexed version of CRS storage.
|
| |
template<
class SC,
class GO>
class Tpetra::Details::Impl::CooMatrixImpl< SC, GO >
Implementation detail of Tpetra::Details::CooMatrix (which see below).
Definition at line 63 of file Tpetra_Details_CooMatrix.hpp.
◆ packet_type
◆ CooMatrixImpl()
◆ sumIntoGlobalValue()
Insert one entry locally into the sparse matrix, if it does not exist there yet. If it does exist, sum the values.
- Parameters
-
| gblRowInd | [in] Global row index of the entry to insert. |
| gblColInd | [in] Global column index of the entry to insert. |
| val | [in] Value of the matrix entry to insert / sum. |
Definition at line 94 of file Tpetra_Details_CooMatrix.hpp.
◆ sumIntoGlobalValues()
Insert multiple entries locally into the sparse matrix.
This works like multiple calls to sumIntoGlobalValue.
- Parameters
-
| gblRowInd | [in] Global row indices of the entries to insert. |
| gblColInd | [in] Global column indices of the entries to insert. |
| val | [in] Values of the matrix entries to insert / sum. |
| numEnt | [in] Number of entries to insert. |
Definition at line 116 of file Tpetra_Details_CooMatrix.hpp.
◆ getLclNumEntries()
◆ forAllEntries()
Execute the given function for all entries of the sparse matrix, sequentially (no thread parallelism). Do not modify entries.
Definition at line 143 of file Tpetra_Details_CooMatrix.hpp.
◆ mergeIntoRow()
Into global row tgtGblRow of *this, merge global row srcGblRow of src.
For matrix entries with the same row and column indices, sum the values into the entry in tgtEntries.
Definition at line 156 of file Tpetra_Details_CooMatrix.hpp.
◆ countPackRow()
Count the number of packets (bytes, in this case) needed to pack the given row of the matrix.
- Parameters
-
| numPackets | [out] Number of packets (bytes, in this case) needed for the row. Must be an int for MPI's sake. |
| gblRow | [in] Global index of the row to pack. |
| comm | [in] Communicator for packing. |
- Returns
- Error code; MPI_SUCESSS (0) if no error.
Definition at line 215 of file Tpetra_Details_CooMatrix.hpp.
◆ packRow()
Pack the given row of the matrix.
- Parameters
-
| outBuf | [out] Output pack buffer. |
| outBufSize | [out] Total output buffer size in bytes. |
| outBufCurPos | [in/out] Current position from which to start writing to the output buffer. This corresponds to the 'position' in/out argument of MPI_Pack. |
| comm | [in] The communicator (MPI wants this). |
| gblRowInds | [in/out] Temporary space for row indices. |
| gblColInds | [in/out] Temporary space for column indices. |
| vals | [in/out] Temporary space for matrix values. |
| gblRow | [in] Global index of the row to pack. |
Definition at line 301 of file Tpetra_Details_CooMatrix.hpp.
◆ getMyGlobalRowIndices()
Get the global row indices on this process, sorted and made unique, and return the minimum global row index on this process.
- Parameters
-
| rowInds | [out] The global row indices on this process. |
- Returns
- Minimum global row index on this process.
Definition at line 363 of file Tpetra_Details_CooMatrix.hpp.
◆ buildLocallyIndexedCrs()
Build a locally indexed version of CRS storage.
Build a locally indexed version of compressed row sparse (CRS, also known as "compressed sparse row," CSR) storage.
- Parameters
-
| rowOffsets | [out] Row offsets. |
| lclColInds | [out] The matrix's local column indices; must have at least getLclNumEntries() entries. |
| vals | [out] The matrix's values; must have at least getLclNumEntries() entries. |
| gblToLcl | [in] Closure that can convert a global column index to a local column index. |
Definition at line 433 of file Tpetra_Details_CooMatrix.hpp.
The documentation for this class was generated from the following file: