10#ifndef __Tpetra_DirectoryImpl_decl_hpp
11#define __Tpetra_DirectoryImpl_decl_hpp
31#ifndef HAVE_TPETRA_DIRECTORY_SPARSE_MAP_FIX
32#define HAVE_TPETRA_DIRECTORY_SPARSE_MAP_FIX 1
35#include "Tpetra_Details_FixedHashTable_decl.hpp"
37#ifndef DOXYGEN_SHOULD_SKIP_THIS
40template <
class OrdinalType>
54template <
class LocalOrdinal,
class GlobalOrdinal,
class NodeType>
60 typedef ::Tpetra::Map<LocalOrdinal, GlobalOrdinal, NodeType>
map_type;
107 const Teuchos::ArrayView<const GlobalOrdinal> &
globalIDs,
108 const Teuchos::ArrayView<int> &
nodeIDs,
109 const Teuchos::ArrayView<LocalOrdinal> &
localIDs,
118 virtual bool isOneToOne(
const Teuchos::Comm<int> &comm)
const = 0;
124 const Teuchos::ArrayView<const GlobalOrdinal> &
globalIDs,
125 const Teuchos::ArrayView<int> &
nodeIDs,
126 const Teuchos::ArrayView<LocalOrdinal> &
localIDs,
132template <
class LocalOrdinal,
class GlobalOrdinal,
class NodeType>
146 bool isOneToOne(
const Teuchos::Comm<int> &comm)
const override;
158 const Teuchos::ArrayView<const GlobalOrdinal> &
globalIDs,
159 const Teuchos::ArrayView<int> &
nodeIDs,
160 const Teuchos::ArrayView<LocalOrdinal> &
localIDs,
165 const int numProcs_ = 0;
176template <
class LocalOrdinal,
class GlobalOrdinal,
class NodeType>
180 template <
class LO,
class GO,
class N>
206 const Teuchos::ArrayView<const GlobalOrdinal> &
globalIDs,
207 const Teuchos::ArrayView<int> &
nodeIDs,
208 const Teuchos::ArrayView<LocalOrdinal> &
localIDs,
214template <
class LocalOrdinal,
class GlobalOrdinal,
class NodeType>
217 template <
class LO,
class GO,
class N>
243 const Teuchos::ArrayView<const GlobalOrdinal> &
globalIDs,
244 const Teuchos::ArrayView<int> &
nodeIDs,
245 const Teuchos::ArrayView<LocalOrdinal> &
localIDs,
274 Teuchos::ArrayRCP<GlobalOrdinal> allMinGIDs_;
279template <
class LocalOrdinal,
class GlobalOrdinal,
class NodeType>
282 template <
class LO,
class GO,
class N>
296 bool isOneToOne(
const Teuchos::Comm<int> &comm)
const override;
308 const Teuchos::ArrayView<const GlobalOrdinal> &
globalIDs,
309 const Teuchos::ArrayView<int> &
nodeIDs,
310 const Teuchos::ArrayView<LocalOrdinal> &
localIDs,
321 initialize(
const map_type &
map,
322 Teuchos::Ptr<const tie_break_type>
tie_break);
336 bool isLocallyOneToOne()
const {
337 return locallyOneToOne_;
357 Teuchos::RCP<const map_type> directoryMap_;
367 Teuchos::ArrayRCP<int> PIDs_;
374 Teuchos::ArrayRCP<LocalOrdinal> LIDs_;
394 Kokkos::HostSpace::device_type>
396 Teuchos::RCP<lidToPidTable_type> lidToPidTable_;
412 Kokkos::HostSpace::device_type>
414 Teuchos::RCP<lidToLidTable_type> lidToLidTable_;
423 mutable enum EOneToOneResult {
424 ONE_TO_ONE_NOT_CALLED_YET,
432 bool locallyOneToOne_;
Forward declaration of Tpetra::Map.
Interface for breaking ties in ownership.
Struct that holds views of the contents of a CrsMatrix.
Computes the local ID and process ID corresponding to given global IDs.
LookupStatus getEntries(const map_type &map, const Teuchos::ArrayView< const GlobalOrdinal > &globalIDs, const Teuchos::ArrayView< int > &nodeIDs, const Teuchos::ArrayView< LocalOrdinal > &localIDs, const bool computeLIDs) const
virtual bool isOneToOne(const Teuchos::Comm< int > &comm) const =0
Whether the Directory's input Map is (globally) one to one.
virtual LookupStatus getEntriesImpl(const map_type &map, const Teuchos::ArrayView< const GlobalOrdinal > &globalIDs, const Teuchos::ArrayView< int > &nodeIDs, const Teuchos::ArrayView< LocalOrdinal > &localIDs, const bool computeLIDs) const =0
Actually do the work of getEntries(), with no input validation.
Directory()=default
Constructor.
Implementation of Directory for a distributed contiguous Map.
bool isOneToOne(const Teuchos::Comm< int > &) const override
Whether the Directory's input Map is (globally) one to one.
LookupStatus getEntriesImpl(const map_type &map, const Teuchos::ArrayView< const GlobalOrdinal > &globalIDs, const Teuchos::ArrayView< int > &nodeIDs, const Teuchos::ArrayView< LocalOrdinal > &localIDs, const bool computeLIDs) const override
Find process IDs and (optionally) local IDs for the given global IDs.
std::string description() const override
A one-line human-readable description of this object.
Implementation of Directory for a distributed noncontiguous Map.
std::string description() const override
A one-line human-readable description of this object.
bool isOneToOne(const Teuchos::Comm< int > &comm) const override
Whether the Directory's input Map is (globally) one to one.
LookupStatus getEntriesImpl(const map_type &map, const Teuchos::ArrayView< const GlobalOrdinal > &globalIDs, const Teuchos::ArrayView< int > &nodeIDs, const Teuchos::ArrayView< LocalOrdinal > &localIDs, const bool computeLIDs) const override
Find process IDs and (optionally) local IDs for the given global IDs.
Implementation of Directory for a locally replicated Map.
LookupStatus getEntriesImpl(const map_type &map, const Teuchos::ArrayView< const GlobalOrdinal > &globalIDs, const Teuchos::ArrayView< int > &nodeIDs, const Teuchos::ArrayView< LocalOrdinal > &localIDs, const bool computeLIDs) const override
Find process IDs and (optionally) local IDs for the given global IDs.
bool isOneToOne(const Teuchos::Comm< int > &comm) const override
Whether the Directory's input Map is (globally) one to one.
std::string description() const override
A one-line human-readable description of this object.
ReplicatedDirectory()=default
Constructor (that takes no arguments).
Interface for breaking ties in ownership.
A parallel distribution of indices over processes.
Implementation details of Tpetra.
Namespace Tpetra contains the class and methods constituting the Tpetra library.
LookupStatus
Return status of Map remote index lookup (getRemoteIndexList()).