Xpetra Version of the Day
Loading...
Searching...
No Matches
Xpetra_StridedMapFactory_decl.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Xpetra: A linear algebra interface package
4//
5// Copyright 2012 NTESS and the Xpetra contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef XPETRA_STRIDEDMAPFACTORY_DECL_HPP
11#define XPETRA_STRIDEDMAPFACTORY_DECL_HPP
12
13#include <Tpetra_KokkosCompat_DefaultNode.hpp>
14
15#include "Xpetra_ConfigDefs.hpp"
16
18
19namespace Xpetra {
20
29template <class LocalOrdinal,
30 class GlobalOrdinal,
31 class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
33#undef XPETRA_STRIDEDMAPFACTORY_SHORT
35
36 private:
39
40 public:
44 global_size_t numGlobalElements,
45 GlobalOrdinal indexBase,
46 std::vector<size_t>& stridingInfo,
47 const Teuchos::RCP<const Teuchos::Comm<int>>& comm,
48 LocalOrdinal stridedBlockId = -1,
49 GlobalOrdinal offset = 0,
51
53 static RCP<StridedMap>
55 global_size_t numGlobalElements,
56 size_t numLocalElements,
57 GlobalOrdinal indexBase,
58 std::vector<size_t>& stridingInfo,
59 const Teuchos::RCP<const Teuchos::Comm<int>>& comm,
60 LocalOrdinal stridedBlockId = -1,
61 GlobalOrdinal offset = 0);
62
64 static RCP<StridedMap>
65 Build(const RCP<const Map>& map, std::vector<size_t>& stridingInfo, LocalOrdinal stridedBlockId = -1, GlobalOrdinal offset = 0);
66
68 static RCP<StridedMap>
69 Build(const RCP<const StridedMap>& map, LocalOrdinal stridedBlockId);
70
72 static RCP<StridedMap>
73 Build(const StridedMap& map);
74
80 static RCP<StridedMap>
82 global_size_t numGlobalElements,
84 GlobalOrdinal indexBase,
85 std::vector<size_t>& stridingInfo,
86 const Teuchos::RCP<const Teuchos::Comm<int>>& comm,
87 LocalOrdinal stridedBlockId = -1, // FIXME (mfh 03 Sep 2014) This breaks if LocalOrdinal is unsigned
88 GlobalOrdinal /* offset */ = 0);
89
90}; // class StridedMapFactory
91
92} // namespace Xpetra
93
94#define XPETRA_STRIDEDMAPFACTORY_SHORT
95#endif // XPETRA_STRIDEDMAPFACTORY_DECL_HPP
96
97// TODO: removed unused methods
This factory creates a Xpetra::StridedMap .
StridedMapFactory()=delete
Private constructor. This is a static class.
static RCP< Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node > > Build(UnderlyingLib lib, global_size_t numGlobalElements, GlobalOrdinal indexBase, std::vector< size_t > &stridingInfo, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, LocalOrdinal stridedBlockId=-1, GlobalOrdinal offset=0, LocalGlobal lg=Xpetra::GloballyDistributed)
Map constructor with Xpetra-defined contiguous uniform distribution.
Class that stores a strided map.
size_t global_size_t
Global size_t object.