CHROMA
lib
io
enum_io
enum_cfgtype_io.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
/*! \file
3
* \brief CfgType enum
4
*/
5
6
#include "
enum_cfgtype_io.h
"
7
#include <string>
8
9
10
namespace
Chroma
{
11
12
namespace
CfgTypeEnv {
13
14
bool
registerAll
(
void
)
15
{
16
bool
success;
17
success =
theCfgTypeMap::Instance
().registerPair(
std::string
(
"MILC"
),
CFG_TYPE_MILC
);
18
success &=
theCfgTypeMap::Instance
().registerPair(
std::string
(
"NERSC"
),
CFG_TYPE_NERSC
);
19
success &=
theCfgTypeMap::Instance
().registerPair(
std::string
(
"SCIDAC"
),
CFG_TYPE_SCIDAC
);
20
success &=
theCfgTypeMap::Instance
().registerPair(
std::string
(
"SZIN"
),
CFG_TYPE_SZIN
);
21
success &=
theCfgTypeMap::Instance
().registerPair(
std::string
(
"SZINQIO"
),
CFG_TYPE_SZINQIO
);
22
23
success &=
theCfgTypeMap::Instance
().registerPair(
std::string
(
"KYU"
),
CFG_TYPE_KYU
);
24
success &=
theCfgTypeMap::Instance
().registerPair(
std::string
(
"WUP"
),
CFG_TYPE_WUPP
);
25
success &=
theCfgTypeMap::Instance
().registerPair(
std::string
(
"DISORDERED"
),
CFG_TYPE_DISORDERED
);
26
success &=
theCfgTypeMap::Instance
().registerPair(
std::string
(
"UNIT"
),
CFG_TYPE_UNIT
);
27
success &=
theCfgTypeMap::Instance
().registerPair(
std::string
(
"CPPACS"
),
CFG_TYPE_CPPACS
);
28
success &=
theCfgTypeMap::Instance
().registerPair(
std::string
(
"CERN"
),
CFG_TYPE_CERN
);
29
success &=
theCfgTypeMap::Instance
().registerPair(
std::string
(
"WEAK_FIELD"
),
CFG_TYPE_WEAK_FIELD
);
30
success &=
theCfgTypeMap::Instance
().registerPair(
std::string
(
"CLASSICAL_SF"
),
CFG_TYPE_CLASSICAL_SF
);
31
32
return
success;
33
}
34
35
bool
registered
=
registerAll
();
36
const
std::string
typeIDString
=
"CfgType"
;
37
}
38
39
using namespace
CfgTypeEnv;
40
41
void
read
(XMLReader& xml_in,
const
std::string
& path,
CfgType
&
t
) {
42
theCfgTypeMap::Instance
().read(
typeIDString
, xml_in,path,
t
);
43
}
44
45
void
write
(XMLWriter& xml_out,
const
std::string
& path,
const
CfgType
&
t
) {
46
theCfgTypeMap::Instance
().write(
typeIDString
, xml_out, path,
t
);
47
}
48
}
Chroma::SingletonHolder::Instance
static T & Instance()
Definition:
singleton.h:432
enum_cfgtype_io.h
CfgType enum.
Chroma::read
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams ¶m)
Read parameters.
Definition:
asqtad_fermact_params_s.cc:33
Chroma::write
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams ¶m)
Writer parameters.
Definition:
asqtad_fermact_params_s.cc:40
Chroma::CfgType
CfgType
Configuration type.
Definition:
enum_cfgtype_io.h:25
Chroma::CFG_TYPE_WEAK_FIELD
@ CFG_TYPE_WEAK_FIELD
Definition:
enum_cfgtype_io.h:36
Chroma::CFG_TYPE_MILC
@ CFG_TYPE_MILC
Definition:
enum_cfgtype_io.h:26
Chroma::CFG_TYPE_DISORDERED
@ CFG_TYPE_DISORDERED
Definition:
enum_cfgtype_io.h:32
Chroma::CFG_TYPE_SZINQIO
@ CFG_TYPE_SZINQIO
Definition:
enum_cfgtype_io.h:30
Chroma::CFG_TYPE_CLASSICAL_SF
@ CFG_TYPE_CLASSICAL_SF
Definition:
enum_cfgtype_io.h:37
Chroma::CFG_TYPE_NERSC
@ CFG_TYPE_NERSC
Definition:
enum_cfgtype_io.h:27
Chroma::CFG_TYPE_CPPACS
@ CFG_TYPE_CPPACS
Definition:
enum_cfgtype_io.h:34
Chroma::CFG_TYPE_WUPP
@ CFG_TYPE_WUPP
Definition:
enum_cfgtype_io.h:38
Chroma::CFG_TYPE_KYU
@ CFG_TYPE_KYU
Definition:
enum_cfgtype_io.h:31
Chroma::CFG_TYPE_UNIT
@ CFG_TYPE_UNIT
Definition:
enum_cfgtype_io.h:33
Chroma::CFG_TYPE_SCIDAC
@ CFG_TYPE_SCIDAC
Definition:
enum_cfgtype_io.h:28
Chroma::CFG_TYPE_SZIN
@ CFG_TYPE_SZIN
Definition:
enum_cfgtype_io.h:29
Chroma::CFG_TYPE_CERN
@ CFG_TYPE_CERN
Definition:
enum_cfgtype_io.h:35
t
int t
Definition:
meslate.cc:37
Chroma::CfgTypeEnv::typeIDString
const std::string typeIDString
Definition:
enum_cfgtype_io.cc:36
Chroma::CfgTypeEnv::registerAll
bool registerAll(void)
Definition:
enum_cfgtype_io.cc:14
Chroma::CfgTypeEnv::registered
bool registered
Definition:
enum_cfgtype_io.cc:35
Chroma
Asqtad Staggered-Dirac operator.
Definition:
klein_gord.cc:10
testing::internal::string
::std::string string
Definition:
gtest.h:1979
Generated by
1.9.1