|
Amesos2 - Direct Sparse Solver Interfaces Version of the Day
|
Amesos2 adapter for the Tpetra::MultiVector class. More...
#include <Amesos2_KokkosMultiVecAdapter_decl.hpp>


Public Member Functions | |
| bool | isLocallyIndexed () const |
| Checks whether this multivector is local to the calling node. | |
| bool | isGloballyIndexed () const |
| Teuchos::RCP< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > | getMap () const |
| Teuchos::RCP< const Teuchos::Comm< int > > | getComm () const |
| Returns the Teuchos::Comm object associated with this multi-vector. | |
| size_t | getLocalLength () const |
| Get the length of vectors local to the calling node. | |
| size_t | getLocalNumVectors () const |
| Get the number of vectors on this node. | |
| global_size_t | getGlobalLength () const |
| Get the length of vectors in the global space. | |
| global_size_t | getGlobalNumVectors () const |
| Get the number of global vectors. | |
| size_t | getStride () const |
| Return the stride between vectors on this node. | |
| bool | isConstantStride () const |
Return true if this MV has constant stride between vectors on this node. | |
| Scalar * | getMVPointer_impl () const |
| Return pointer to vector when number of vectors == 1 and single MPI process. | |
| Teuchos::RCP< multivec_t > | clone () const |
| void | get1dCopy (const Teuchos::ArrayView< scalar_t > &av, size_t lda, Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > distribution_map, EDistribution distribution) const |
| Copies the multivector's data into the user-provided vector. | |
| template<typename KV> | |
| bool | get1dCopy_kokkos_view (bool bInitialize, KV &kokkos_view, size_t lda, Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > distribution_map, EDistribution distribution) const |
| Teuchos::ArrayRCP< scalar_t > | get1dViewNonConst (bool local=false) |
| Extracts a 1 dimensional view of this MultiVector's data. | |
| void | put1dData (const Teuchos::ArrayView< const scalar_t > &new_data, size_t lda, Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > distribution_map, EDistribution) const |
| Export data into the global MultiVector space. | |
| template<typename KV> | |
| void | put1dData_kokkos_view (KV &kokkos_new_data, size_t lda, Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > distribution_map, EDistribution) const |
| template<typename KV, typename host_ordinal_type_array> | |
| int | gather (KV &kokkos_new_view, host_ordinal_type_array &perm_g2l, host_ordinal_type_array &recvCountRows, host_ordinal_type_array &recvDisplRows, EDistribution distribution) const |
| template<typename KV, typename host_ordinal_type_array> | |
| int | scatter (KV &kokkos_old_view, host_ordinal_type_array &perm_g2l, host_ordinal_type_array &recvCountRows, host_ordinal_type_array &recvDisplRows, EDistribution distribution) const |
| std::string | description () const |
| Get a short description of this adapter class. | |
| void | describe (Teuchos::FancyOStream &os, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const |
| Print a description of this adapter to the given output stream. | |
Static Public Attributes | |
| static const char * | name |
Protected Member Functions | |
| MultiVecAdapter (const MultiVecAdapter< multivec_t > &adapter) | |
| Copy constructor. | |
| MultiVecAdapter (const Teuchos::RCP< multivec_t > &m) | |
| Initialize an adapter from a multi-vector RCP. | |
Private Attributes | |
| Teuchos::RCP< multivec_t > | mv_ |
| The multivector which this adapter wraps. | |
| Teuchos::RCP< export_type > | exporter_ |
| Used for data redistribution from the user's input MultiVector to the solver's input MultiVector. | |
| Teuchos::RCP< import_type > | importer_ |
| Used for data redistribution from the solver's output MultiVector to the user's output MultiVector. | |
Friends | |
| Teuchos::RCP< MultiVecAdapter< multivec_t > > | createMultiVecAdapter (Teuchos::RCP< multivec_t >) |
| Teuchos::RCP< const MultiVecAdapter< multivec_t > > | createConstMultiVecAdapter (Teuchos::RCP< const multivec_t >) |
Related Symbols | |
(Note that these are not member symbols.) | |
| Teuchos::RCP< MultiVecAdapter< Kokkos::View< Scalar **, Kokkos::LayoutLeft, ExecutionSpace > > > | createMultiVecAdapter (Teuchos::RCP< Kokkos::View< Scalar **, Kokkos::LayoutLeft, ExecutionSpace > > mv) |
| Factory creation method for MultiVecAdapters. | |
Amesos2 adapter for the Tpetra::MultiVector class.
|
protected |
Initialize an adapter from a multi-vector RCP.
| m | An RCP pointing to the multi-vector which is to be wrapped. |
References MultiVecAdapter(), and mv_.
| void Amesos2::MultiVecAdapter< Kokkos::View< Scalar **, Kokkos::LayoutLeft, ExecutionSpace > >::get1dCopy | ( | const Teuchos::ArrayView< scalar_t > & | av, |
| size_t | lda, | ||
| Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > | distribution_map, | ||
| EDistribution | distribution ) const |
Copies the multivector's data into the user-provided vector.
Each vector of the multivector is placed lda apart in the given ArrayView. Giving a distribution map is useful in the case where the data needs to end up on different processors than it currently resides. For example, the SuperLU_DIST interface may receive a B multivector that is distributed across 13 processors, but only 12 of those 13 processors are in SuperLU_DIST's processor grid. The rows of the multivector need to then be distributed amongst the 12 that are in the grid.
| [in/out] | A user-supplied storage for multi-vector data | |
| [in] | lda | user-supplied spacing for consecutive vectors in A |
| [in] | distribution_map | is a Tpetra::Map that describes the desired distribution of the multivector's data accross the calling processors. The map describes where the 'rows' of the multivector will end up. |
| [in] | distribution |
| std::runtime_error | Thrown if the space available in A is not large enough given lda , the value of global_copy , and the number of vectors in this. |
References get1dCopy(), and MultiVecAdapter().
Referenced by get1dCopy().
| Teuchos::ArrayRCP< Scalar > Amesos2::MultiVecAdapter< Kokkos::View< Scalar **, Kokkos::LayoutLeft, ExecutionSpace > >::get1dViewNonConst | ( | bool | local = false | ) |
Extracts a 1 dimensional view of this MultiVector's data.
Guarantees that the view returned will reside in contiguous storage.
get1dCopy function, from a data-hiding perspective. Use if you know what you are doing.| local | if true , each node will get a view of the vectors it is in possession of. The default, false , will give each calling node a view of the global multivector. |
References get1dViewNonConst().
Referenced by get1dViewNonConst().
| void Amesos2::MultiVecAdapter< Kokkos::View< Scalar **, Kokkos::LayoutLeft, ExecutionSpace > >::put1dData | ( | const Teuchos::ArrayView< const scalar_t > & | new_data, |
| size_t | lda, | ||
| Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > | distribution_map, | ||
| EDistribution | ) const |
Export data into the global MultiVector space.
| new_data | The data to be exported into this. | |
| source_map | describes how the input array data is distributed accross processors. This data will be redistributed to match the map of the adapted multivector. | |
| [in] | distribution |
References MultiVecAdapter(), and put1dData().
Referenced by put1dData().
|
Factory creation method for MultiVecAdapters.
Developers should favor this method for creating Amesos2 MultiVector adapters over using the constructors.
|
mutableprivate |
Used for data redistribution from the user's input MultiVector to the solver's input MultiVector.
This is an Export, because the user's input data need not necessarily be one-to-one, but the solver's input data must (presumably) always be one-to-one.
|
mutableprivate |
Used for data redistribution from the solver's output MultiVector to the user's output MultiVector.
This is an Import, because the user's output data need not necessarily be one-to-one, but the solver's output data must (presumably) always be one-to-one.