42 #ifndef TPETRA_DISTOBJECT_DECL_HPP 43 #define TPETRA_DISTOBJECT_DECL_HPP 45 #include "Tpetra_ConfigDefs.hpp" 46 #include "Tpetra_Map.hpp" 47 #include "Tpetra_Import.hpp" 48 #include "Tpetra_Export.hpp" 55 #ifdef HAVE_TPETRA_TRANSFER_TIMERS 56 # undef HAVE_TPETRA_TRANSFER_TIMERS 57 #endif // HAVE_TPETRA_TRANSFER_TIMERS 168 template <
class Packet,
169 class LocalOrdinal = int,
170 class GlobalOrdinal = LocalOrdinal,
171 class Node = Kokkos::DefaultNode::DefaultNodeType>
327 void print (std::ostream &os)
const;
400 template<
class PT,
class LO,
class GO,
class NT>
405 template<
class PT,
class LO,
class GO,
class NT>
541 size_t& constantNumPackets,
569 size_t constantNumPackets,
645 #ifdef HAVE_TPETRA_TRANSFER_TIMERS 651 #endif // HAVE_TPETRA_TRANSFER_TIMERS 737 template<
class DistObjectType>
740 const Teuchos::RCP<
const Map<
typename DistObjectType::local_ordinal_type,
741 typename DistObjectType::global_ordinal_type,
742 typename DistObjectType::node_type> >& newMap);
780 template<
class DistObjectType>
Communication plan for data redistribution from a uniquely-owned to a (possibly) multiply-owned distr...
virtual void createViewsNonConst(Kokkos::ReadWriteOption rwo)
Hook for creating a nonconst view.
Namespace Tpetra contains the class and methods constituting the Tpetra library.
virtual void packAndPrepare(const SrcDistObject &source, const Teuchos::ArrayView< const LocalOrdinal > &exportLIDs, Teuchos::Array< Packet > &exports, const Teuchos::ArrayView< size_t > &numPacketsPerLID, size_t &constantNumPackets, Distributor &distor)=0
Perform any packing or preparation required for communication.
virtual void createViews() const
Hook for creating a const view.
void print(std::ostream &os) const
Print this object to the given output stream.
Abstract base class for sources of an Import or Export.
bool isDistributed() const
Whether this is a globally distributed object.
virtual void releaseViews() const
Hook for releasing views.
virtual void removeEmptyProcessesInPlace(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &newMap)
Remove processes which contain no elements in this object's Map.
GlobalOrdinal global_ordinal_type
The type of global indices.
DistObject(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
Constructor.
virtual ~DistObject()
Destructor (virtual for memory safety of derived classes).
Communication plan for data redistribution from a (possibly) multiply-owned to a uniquely-owned distr...
Sets up and executes a communication plan for a Tpetra DistObject.
CombineMode
Tpetra::Combine Mode enumerable type.
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & getMap() const
The Map describing the parallel distribution of this object.
virtual void copyAndPermute(const SrcDistObject &source, size_t numSameIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteToLIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteFromLIDs)=0
Perform copies and permutations that are local to this process.
Abstract base class for objects that can be the source of an Import or Export operation.
static const EVerbosityLevel verbLevel_default
Packet packet_type
The type of each datum being sent or received in an Import or Export.
virtual std::string description() const
One-line descriptiion of this object.
virtual size_t constantNumberOfPackets() const
Whether the implementation's instance promises always to have a constant number of packets per LID...
Node node_type
The Kokkos Node type.
LocalOrdinal local_ordinal_type
The type of local indices.
Describes a parallel distribution of objects over processes.
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print a descriptiion of this object to the given output stream.
void doImport(const SrcDistObject &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Import data into this object using an Import object ("forward mode").
virtual void unpackAndCombine(const Teuchos::ArrayView< const LocalOrdinal > &importLIDs, const Teuchos::ArrayView< const Packet > &imports, const Teuchos::ArrayView< size_t > &numPacketsPerLID, size_t constantNumPackets, Distributor &distor, CombineMode CM)=0
Perform any unpacking and combining after communication.
Base class for distributed Tpetra objects that support data redistribution.
void doExport(const SrcDistObject &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Export data into this object using an Export object ("forward mode").
virtual void doTransfer(const SrcDistObject &src, CombineMode CM, size_t numSameIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteToLIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteFromLIDs, const Teuchos::ArrayView< const LocalOrdinal > &remoteLIDs, const Teuchos::ArrayView< const LocalOrdinal > &exportLIDs, Distributor &distor, ReverseOption revOp)
Redistribute data across memory images.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > map_
The Map over which this object is distributed.
virtual bool checkSizes(const SrcDistObject &source)=0
Compare the source and target (this) objects for compatibility.