Tpetra parallel linear algebra Version of the Day
Loading...
Searching...
No Matches
Tpetra_ConfigDefs.hpp
1// @HEADER
2// *****************************************************************************
3// Tpetra: Templated Linear Algebra Services Package
4//
5// Copyright 2008 NTESS and the Tpetra contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef TPETRA_CONFIGDEFS_HPP
11#define TPETRA_CONFIGDEFS_HPP
12
13#include "Tpetra_Details_DefaultTypes.hpp"
14#include "Teuchos_ConfigDefs.hpp"
15
16namespace Tpetra {
17// Used in all Tpetra code that explicitly must a type (like a loop index)
18// that is used with the Teuchos::Array[View,RCP] classes.
19
22} // namespace Tpetra
23
24// these make some of the macros in Tpetra_Util.hpp much easier to describe
25#ifdef HAVE_TPETRA_PRINT_EFFICIENCY_WARNINGS
26#define TPETRA_PRINTS_EFFICIENCY_WARNINGS 1
27#else
28#define TPETRA_PRINTS_EFFICIENCY_WARNINGS 0
29#endif
30
31#ifdef HAVE_TPETRA_THROW_ABUSE_WARNINGS
32#define TPETRA_THROWS_ABUSE_WARNINGS 1
33#else
34#define TPETRA_THROWS_ABUSE_WARNINGS 0
35#endif
36
37#ifdef HAVE_TPETRA_PRINT_ABUSE_WARNINGS
38#define TPETRA_PRINTS_ABUSE_WARNINGS 1
39#else
40#define TPETRA_PRINTS_ABUSE_WARNINGS 0
41#endif
42
43#include <functional>
44
45//#ifndef __CUDACC__
46// mem management
47#include "Teuchos_Array.hpp" // includes ArrayRCP
48#include "Teuchos_RCP.hpp"
49#include "Teuchos_Tuple.hpp" // includes ArrayView
50// traits classes
51#include "Teuchos_OrdinalTraits.hpp"
52#include "Teuchos_ScalarTraits.hpp"
53#include "Teuchos_TypeNameTraits.hpp"
54#include "Teuchos_NullIteratorTraits.hpp"
55#include "Teuchos_SerializationTraits.hpp"
56// comm
57#include "Teuchos_CommHelpers.hpp"
58// misc
59#include "Teuchos_ParameterList.hpp"
60//#endif
61
62namespace Tpetra {
63
70typedef size_t global_size_t;
71
80 LocallyReplicated,
81 GloballyDistributed
82};
83
89
95
96enum EPrivateComputeViewConstructor {
97 COMPUTE_VIEW_CONSTRUCTOR
98};
99
100enum EPrivateHostViewConstructor {
101 HOST_VIEW_CONSTRUCTOR
102};
103
120template <class Arg1, class Arg2>
122 public:
125 typedef Arg1 result_type;
126 Arg1 operator()(const Arg1& x, const Arg2&) const {
127 return x;
128 }
129};
130
146template <class Arg1, class Arg2>
148 public:
151 typedef Arg2 result_type;
152 Arg2 operator()(const Arg1&, const Arg2& y) const {
153 return y;
154 }
155};
156
157} // namespace Tpetra
158
159// We include this after the above Tpetra namespace declaration,
160// so that we don't interfere with Doxygen's ability to find the
161// Tpetra namespace declaration.
162#include "Tpetra_CombineMode.hpp"
163
165namespace TpetraExamples {
166}
167
168namespace Tpetra {
170namespace Ext {
171}
172
178namespace MatrixMatrix {
179}
180
186namespace TripleMatrixMultiply {
187}
188} // namespace Tpetra
189
190namespace Tpetra {
193 Forward = 0,
194 Backward,
195 Symmetric
196};
197
198// FE* enums
199namespace FE {
200
201// Enum for activity
202enum WhichActive {
203 ACTIVE_OWNED,
204 ACTIVE_OWNED_PLUS_SHARED
205};
206
207enum class FillState {
208 open, // matrix is "open". Values can freely summed in to and replaced
209 modify, // matrix is open for modification. *local* values can be replaced
210 closed
211};
212} // namespace FE
213} // namespace Tpetra
214
215// For backwards compatibility
216namespace KokkosClassic {
217using ::Tpetra::ESweepDirection;
218}
219
220#include <Kokkos_Complex.hpp>
221
222// Specializations of Teuchos::SerializationTraits for
223// Kokkos::complex<{float,double}>.
224
225namespace Teuchos {
226template <typename Ordinal>
227class SerializationTraits<Ordinal, ::Kokkos::complex<float> >
228 : public DirectSerializationTraits<Ordinal, ::Kokkos::complex<float> > {};
229
230template <typename Ordinal>
231class SerializationTraits<Ordinal, ::Kokkos::complex<double> >
232 : public DirectSerializationTraits<Ordinal, ::Kokkos::complex<double> > {};
233} // namespace Teuchos
234
235#endif // TPETRA_CONFIGDEFS_HPP
Declaration of Tpetra::CombineMode enum, and a function for setting a Tpetra::CombineMode parameter i...
Struct that holds views of the contents of a CrsMatrix.
Binary function that returns its first argument.
Binary function that returns its second argument.
Namespace for Tpetra example classes and methods.
Namespace Tpetra contains the class and methods constituting the Tpetra library.
ESweepDirection
Sweep direction for Gauss-Seidel or Successive Over-Relaxation (SOR).
LookupStatus
Return status of Map remote index lookup (getRemoteIndexList()).
Teuchos_Ordinal Array_size_type
Size type for Teuchos Array objects.
size_t global_size_t
Global size_t object.
LocalGlobal
Enum for local versus global allocation of Map entries.