Tpetra parallel linear algebra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
16 namespace 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 
21 typedef Teuchos_Ordinal Array_size_type;
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 
62 namespace Tpetra {
63 
70 typedef size_t global_size_t;
71 
80  LocallyReplicated,
81  GloballyDistributed
82 };
83 
88 };
89 
94 };
95 
96 enum EPrivateComputeViewConstructor {
97  COMPUTE_VIEW_CONSTRUCTOR
98 };
99 
100 enum EPrivateHostViewConstructor {
101  HOST_VIEW_CONSTRUCTOR
102 };
103 
120 template <class Arg1, class Arg2>
121 class project1st {
122  public:
123  typedef Arg1 first_argument_type;
124  typedef Arg2 second_argument_type;
125  typedef Arg1 result_type;
126  Arg1 operator()(const Arg1& x, const Arg2&) const {
127  return x;
128  }
129 };
130 
146 template <class Arg1, class Arg2>
147 class project2nd {
148  public:
149  typedef Arg1 first_argument_type;
150  typedef Arg2 second_argument_type;
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 
165 namespace TpetraExamples {
166 }
167 
168 namespace Tpetra {
170 namespace Ext {
171 }
172 
178 namespace MatrixMatrix {
179 }
180 
186 namespace TripleMatrixMultiply {
187 }
188 } // namespace Tpetra
189 
190 namespace Tpetra {
193  Forward = 0,
194  Backward,
195  Symmetric
196 };
197 
198 // FE* enums
199 namespace FE {
200 
201 // Enum for activity
202 enum WhichActive {
203  ACTIVE_OWNED,
204  ACTIVE_OWNED_PLUS_SHARED
205 };
206 
207 enum 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
216 namespace KokkosClassic {
217 using ::Tpetra::ESweepDirection;
218 }
219 
220 #include <Kokkos_Complex.hpp>
221 
222 // Specializations of Teuchos::SerializationTraits for
223 // Kokkos::complex<{float,double}>.
224 
225 namespace Teuchos {
226 template <typename Ordinal>
227 class SerializationTraits<Ordinal, ::Kokkos::complex<float> >
228  : public DirectSerializationTraits<Ordinal, ::Kokkos::complex<float> > {};
229 
230 template <typename Ordinal>
231 class SerializationTraits<Ordinal, ::Kokkos::complex<double> >
232  : public DirectSerializationTraits<Ordinal, ::Kokkos::complex<double> > {};
233 } // namespace Teuchos
234 
235 #endif // TPETRA_CONFIGDEFS_HPP
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.
Declaration of Tpetra::CombineMode enum, and a function for setting a Tpetra::CombineMode parameter i...
ESweepDirection
Sweep direction for Gauss-Seidel or Successive Over-Relaxation (SOR).
Binary function that returns its second argument.
LocalGlobal
Enum for local versus global allocation of Map entries.
Binary function that returns its first argument.