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 }
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 
44 #include <functional>
45 
46 //#ifndef __CUDACC__
47 // mem management
48 #include "Teuchos_Array.hpp" // includes ArrayRCP
49 #include "Teuchos_RCP.hpp"
50 #include "Teuchos_Tuple.hpp" // includes ArrayView
51 // traits classes
52 #include "Teuchos_OrdinalTraits.hpp"
53 #include "Teuchos_ScalarTraits.hpp"
54 #include "Teuchos_TypeNameTraits.hpp"
55 #include "Teuchos_NullIteratorTraits.hpp"
56 #include "Teuchos_SerializationTraits.hpp"
57 // comm
58 #include "Teuchos_CommHelpers.hpp"
59 // misc
60 #include "Teuchos_ParameterList.hpp"
61 //#endif
62 
63 namespace Tpetra {
64 
71  typedef size_t global_size_t;
72 
80  enum LocalGlobal {
81  LocallyReplicated,
82  GloballyDistributed
83  };
84 
86  enum LookupStatus {
89  };
90 
91 
96  };
97 
98  enum EPrivateComputeViewConstructor {
99  COMPUTE_VIEW_CONSTRUCTOR
100  };
101 
102  enum EPrivateHostViewConstructor {
103  HOST_VIEW_CONSTRUCTOR
104  };
105 
122  template<class Arg1, class Arg2>
123  class project1st {
124  public:
125  typedef Arg1 first_argument_type;
126  typedef Arg2 second_argument_type;
127  typedef Arg1 result_type;
128  Arg1 operator () (const Arg1& x, const Arg2& ) const {
129  return x;
130  }
131  };
132 
148  template<class Arg1, class Arg2>
149  class project2nd {
150  public:
151  typedef Arg1 first_argument_type;
152  typedef Arg2 second_argument_type;
153  typedef Arg2 result_type;
154  Arg2 operator () (const Arg1& , const Arg2& y) const {
155  return y;
156  }
157  };
158 
159 } // end of Tpetra namespace
160 
161 
162 // We include this after the above Tpetra namespace declaration,
163 // so that we don't interfere with Doxygen's ability to find the
164 // Tpetra namespace declaration.
165 #include "Tpetra_CombineMode.hpp"
166 
167 
169 namespace TpetraExamples {
170 }
171 
172 namespace Tpetra {
174  namespace Ext {
175  }
176 
182  namespace MatrixMatrix {
183  }
184 
190  namespace TripleMatrixMultiply {
191  }
192 }
193 
194 namespace Tpetra {
197  Forward = 0,
198  Backward,
199  Symmetric
200  };
201 
202  // FE* enums
203  namespace FE {
204 
205  // Enum for activity
206  enum WhichActive
207  {
208  ACTIVE_OWNED,
209  ACTIVE_OWNED_PLUS_SHARED
210  };
211 
212  enum class FillState
213  {
214  open, // matrix is "open". Values can freely summed in to and replaced
215  modify, // matrix is open for modification. *local* values can be replaced
216  closed
217  };
218  }
219 }
220 
221 // For backwards compatibility
222 namespace KokkosClassic {
223  using ::Tpetra::ESweepDirection;
224 }
225 
226 
227 #include <Kokkos_Complex.hpp>
228 
229 // Specializations of Teuchos::SerializationTraits for
230 // Kokkos::complex<{float,double}>.
231 
232 namespace Teuchos {
233  template<typename Ordinal>
234  class SerializationTraits<Ordinal, ::Kokkos::complex<float> >
235  : public DirectSerializationTraits<Ordinal, ::Kokkos::complex<float> >
236  {};
237 
238  template<typename Ordinal>
239  class SerializationTraits<Ordinal, ::Kokkos::complex<double> >
240  : public DirectSerializationTraits<Ordinal, ::Kokkos::complex<double> >
241  {};
242 } // namespace Teuchos
243 
244 #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.