Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 #ifndef XPETRA_CONFIGDEFS_HPP
00047 #define XPETRA_CONFIGDEFS_HPP
00048
00049 #ifndef __cplusplus
00050 #define __cplusplus
00051 #endif // ifndef __cplusplus
00052
00053
00054
00055 #ifdef PACKAGE
00056 #undef PACKAGE
00057 #endif // ifdef PACKAGE
00058
00059 #ifdef PACKAGE_NAME
00060 #undef PACKAGE_NAME
00061 #endif // ifdef PACKAGE_NAME
00062
00063 #ifdef PACKAGE_BUGREPORT
00064 #undef PACKAGE_BUGREPORT
00065 #endif // ifdef PACKAGE_BUGREPORT
00066
00067 #ifdef PACKAGE_STRING
00068 #undef PACKAGE_STRING
00069 #endif // ifdef PACKAGE_STRING
00070
00071 #ifdef PACKAGE_TARNAME
00072 #undef PACKAGE_TARNAME
00073 #endif // ifdef PACKAGE_TARNAME
00074
00075 #ifdef PACKAGE_VERSION
00076 #undef PACKAGE_VERSION
00077 #endif // ifdef PACKAGE_VERSION
00078
00079 #ifdef VERSION
00080 #undef VERSION
00081 #endif // ifdef VERSION
00082
00083
00084
00085 #include <Xpetra_config.hpp>
00086 #include <Teuchos_ConfigDefs.hpp>
00087 #include <Kokkos_ConfigDefs.hpp>
00088
00090 namespace Xpetra {
00091
00092
00093
00095 typedef Teuchos_Ordinal Array_size_type;
00096 }
00097
00098
00099 #ifdef HAVE_XPETRA_THROW_EFFICIENCY_WARNINGS
00100 #define XPETRA_THROWS_EFFICIENCY_WARNINGS 1
00101 #else
00102 #define XPETRA_THROWS_EFFICIENCY_WARNINGS 0
00103 #endif
00104
00105 #ifdef HAVE_XPETRA_PRINT_EFFICIENCY_WARNINGS
00106 #define XPETRA_PRINTS_EFFICIENCY_WARNINGS 1
00107 #else
00108 #define XPETRA_PRINTS_EFFICIENCY_WARNINGS 0
00109 #endif
00110
00111 #ifdef HAVE_XPETRA_THROW_ABUSE_WARNINGS
00112 #define XPETRA_THROWS_ABUSE_WARNINGS 1
00113 #else
00114 #define XPETRA_THROWS_ABUSE_WARNINGS 0
00115 #endif
00116
00117 #ifdef HAVE_XPETRA_PRINT_ABUSE_WARNINGS
00118 #define XPETRA_PRINTS_ABUSE_WARNINGS 1
00119 #else
00120 #define XPETRA_PRINTS_ABUSE_WARNINGS 0
00121 #endif
00122
00123 #ifdef HAVE_XPETRA_PROFILING
00124 #include <string>
00125 #include <Teuchos_TimeMonitor.hpp>
00126 #define XPETRA_MONITOR(funcName) Teuchos::TimeMonitor(*Teuchos::TimeMonitor::getNewTimer(std::string("Xpetra: ") + funcName));
00127 #else
00128 #define XPETRA_MONITOR(funcName)
00129 #endif
00130
00131 #include <functional>
00132
00133
00134 #include <Teuchos_ArrayView.hpp>
00135 #include <Teuchos_ArrayRCP.hpp>
00136 #include <Teuchos_Array.hpp>
00137 #include <Teuchos_RCP.hpp>
00138
00139 #include <Teuchos_OrdinalTraits.hpp>
00140 #include <Teuchos_ScalarTraits.hpp>
00141 #include <Teuchos_TypeNameTraits.hpp>
00142 #include <Teuchos_NullIteratorTraits.hpp>
00143 #include <Teuchos_SerializationTraits.hpp>
00144
00145 #include <Teuchos_Comm.hpp>
00146 #include <Teuchos_CommHelpers.hpp>
00147
00148 #include <Teuchos_ParameterList.hpp>
00149
00151 namespace Xpetra {
00159 typedef size_t global_size_t;
00160
00162 enum LocalGlobal {
00163 LocallyReplicated,
00164 GloballyDistributed
00165 };
00166
00168 enum LookupStatus {
00169 AllIDsPresent,
00170 IDNotPresent
00171 };
00172
00174 enum ProfileType {
00175 StaticProfile,
00176 DynamicProfile
00177 };
00178
00180 enum OptimizeOption {
00181 DoOptimizeStorage,
00182 DoNotOptimizeStorage
00183 };
00184
00197
00198
00199
00200
00201
00202
00203 enum CombineMode {
00204 ADD,
00205 INSERT,
00206 ABSMAX
00207 };
00208
00209
00210 using Teuchos::ArrayRCP;
00211 using Teuchos::ArrayView;
00212 using Teuchos::Array;
00213 using Teuchos::OrdinalTraits;
00214 using Teuchos::ScalarTraits;
00215 using Teuchos::RCP;
00216 using Teuchos::Comm;
00217 using Teuchos::null;
00218
00219 using Teuchos::outArg;
00220 using Teuchos::tuple;
00221 using Teuchos::arcp;
00222 using Teuchos::rcp;
00223 using Teuchos::rcpFromRef;
00224 using Teuchos::av_reinterpret_cast;
00225 using Teuchos::arcp_reinterpret_cast;
00226
00227 using Teuchos::typeName;
00228
00229 using Teuchos::ParameterList;
00230 using Teuchos::parameterList;
00231 using Teuchos::sublist;
00232
00233
00234
00235 template <class Arg1, class Arg2>
00236 class firstArg : std::binary_function<Arg1,Arg2,Arg1> {
00237 public:
00238 typedef Arg1 first_argument_type;
00239 typedef Arg2 second_argument_type;
00240 typedef Arg1 result_type;
00241 inline Arg1 operator()(const Arg1 &arg1, const Arg2 &arg2) { return arg1;}
00242 };
00243
00244 template <class Arg1, class Arg2>
00245 class secondArg : std::binary_function<Arg1,Arg2,Arg2> {
00246 public:
00247 typedef Arg1 first_argument_type;
00248 typedef Arg2 second_argument_type;
00249 typedef Arg2 result_type;
00250 inline Arg2 operator()(const Arg1 &arg1, const Arg2 &arg2) { return arg2;}
00251 };
00252
00253 }
00254
00255
00257 namespace XpetraExamples {
00258 }
00259
00260 #define XPETRA_ERR_CHECK(arg) { int r = arg; if (r < 0) { std::cout << "r = " << r << std::endl; assert(r>=0); }; }; // TODO: throw exceptions
00261
00262 #endif // XPETRA_CONFIGDEFS_HPP