46 #ifndef MUELU_FACTORYMANAGER_DECL_HPP 47 #define MUELU_FACTORYMANAGER_DECL_HPP 79 #ifdef HAVE_MUELU_KOKKOS_REFACTOR 115 #undef MUELU_FACTORYMANAGER_SHORT 126 #if !defined(HAVE_MUELU_KOKKOS_REFACTOR) 129 # ifdef HAVE_MUELU_SERIAL 130 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosSerialWrapperNode).name())
133 # ifdef HAVE_MUELU_OPENMP 134 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosOpenMPWrapperNode).name())
137 # ifdef HAVE_MUELU_CUDA 138 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosCudaWrapperNode).name())
141 # ifdef HAVE_MUELU_HIP 142 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosHIPWrapperNode).name())
149 FactoryManager(
const std::map<std::string, RCP<const FactoryBase> >& factoryTable) {
152 #if !defined(HAVE_MUELU_KOKKOS_REFACTOR) 155 # ifdef HAVE_MUELU_SERIAL 156 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosSerialWrapperNode).name())
159 # ifdef HAVE_MUELU_OPENMP 160 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosOpenMPWrapperNode).name())
163 # ifdef HAVE_MUELU_CUDA 164 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosCudaWrapperNode).name())
167 # ifdef HAVE_MUELU_HIP 168 if (
typeid(
Node).name() ==
typeid(Kokkos::Compat::KokkosHIPWrapperNode).name())
189 void SetFactory(
const std::string & varName,
const RCP<const FactoryBase>& factory);
196 const RCP<const FactoryBase>
GetFactory(
const std::string& varName)
const;
207 bool hasFactory(
const std::string& varName)
const;
211 const RCP<const FactoryBase>
GetDefaultFactory(
const std::string& varName)
const;
223 #ifdef HAVE_MUELU_DEBUG 224 void ResetDebugData()
const;
239 const RCP<const FactoryBase>
SetAndReturnDefaultFactory(
const std::string& varName,
const RCP<const FactoryBase>& factory)
const;
267 #define MUELU_FACTORYMANAGER_SHORT 268 #endif // MUELU_FACTORYMANAGER_DECL_HPP
This class specifies the default factory that should generate some data on a Level if the data does n...
MueLu::DefaultLocalOrdinal LocalOrdinal
KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
bool GetKokkosRefactor() const
bool hasFactory(const std::string &varName) const
Check.
virtual ~FactoryManager()
Destructor.
FactoryManager()
Constructor.
void SetIgnoreUserData(bool bIgnoreUserData=false)
set IgnoreUserData flag
void SetKokkosRefactor(const bool useKokkos)
Namespace for MueLu classes and methods.
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
const RCP< const FactoryBase > SetAndReturnDefaultFactory(const std::string &varName, const RCP< const FactoryBase > &factory) const
Class that provides default factories within Needs class.
void SetFactory(const std::string &varName, const RCP< const FactoryBase > &factory)
Set Factory.
const RCP< FactoryBase > GetFactoryNonConst(const std::string &varName)
Get factory associated with a particular data name (NONCONST version)
const RCP< const FactoryBase > GetFactory(const std::string &varName) const
Get factory associated with a particular data name.
std::map< std::string, RCP< const FactoryBase > > factoryTable_
User-defined factories.
std::map< std::string, RCP< const FactoryBase > > defaultFactoryTable_
Table that holds default factories.
FactoryManager(const std::map< std::string, RCP< const FactoryBase > > &factoryTable)
Constructor used by HierarchyFactory (temporary, will be removed)
const RCP< const FactoryBase > GetDefaultFactory(const std::string &varName) const
bool useKokkos_
Whether or not to use kokkos factories.