33 #ifndef __H__UG_BRIDGE__SUFFIX_TAG__
34 #define __H__UG_BRIDGE__SUFFIX_TAG__
52 std::stringstream ss; ss <<
dim <<
"d";
60 return std::string(
"dim=").append(GetDimensionSuffix<dim>()).append(
";");
67 std::stringstream ss; ss <<
"dim=" <<
dim <<
"d;";
76 template <
typename TDomain>
80 template <
typename TDomain>
81 std::string
GetDomainTag() {
return GetDimensionTag<TDomain::dim>();}
88 template<
typename TAlgebraTypeType>
95 if(algType.type() == TAlgebraTypeType::CPU) ss <<
"CPU";
96 else if(algType.type() == TAlgebraTypeType::GPU) ss <<
"GPU";
97 else UG_THROW(
"Unknown algebra type.");
100 if(algType.blocksize() == TAlgebraTypeType::VariableBlockSize) ss <<
"Variable";
101 else ss << algType.blocksize();
107 template <
typename TAlgebra>
114 template<
typename TAlgebraTypeType>
118 std::stringstream ss; ss <<
"alg=";
121 if(algType.type() == TAlgebraTypeType::CPU) ss <<
"CPU";
122 else if(algType.type() == TAlgebraTypeType::GPU) ss <<
"GPU";
123 else UG_THROW(
"Unknown algebra type.");
126 if(algType.blocksize() == TAlgebraTypeType::VariableBlockSize) ss <<
"Variable;";
127 else ss << algType.blocksize() <<
";";
134 template <
typename TAlgebra>
145 template <
int dim,
typename TAlgebra>
148 std::string dimAlgSuffix = GetDimensionSuffix<dim>();
149 dimAlgSuffix.append(GetAlgebraSuffix<TAlgebra>());
154 template <
int dim,
typename TAlgebra>
157 std::string dimAlgTag = GetDimensionTag<dim>();
158 dimAlgTag.append(GetAlgebraTag<TAlgebra>());
162 template<
typename TAlgebraTypeType>
175 template <
typename TDomain,
typename TAlgebra>
179 template <
typename TDomain,
typename TAlgebra>
std::string GetDomainAlgebraSuffix()
returns the dim-suffix for a domain (e.g. "3dCPU1")
Definition: suffix_tag.h:176
std::string GetDomainAlgebraTag()
returns the dim-tag for a domain (e.g. "dim=3d;alg=CPU1;")
Definition: suffix_tag.h:180
std::string GetDimensionAlgebraSuffix()
returns the algebra-dim-suffix for a domain (e.g. "3dCPU1")
Definition: suffix_tag.h:146
std::string GetDimensionSuffix()
returns the dim-suffix for a domain (e.g. "3d")
Definition: suffix_tag.h:49
std::string GetAlgebraTag(const TAlgebraTypeType &algType)
returns the algebra-suffix (e.g. "alg=CPU3", "alg=CPUVariable")
Definition: suffix_tag.h:115
std::string GetDomainSuffix()
returns the dim-suffix for a domain (e.g. "3d")
Definition: suffix_tag.h:77
std::string GetAlgebraSuffix(const TAlgebraTypeType &algType)
returns the algebra-suffix (e.g. "CPU3", "CPUFlex")
Definition: suffix_tag.h:89
std::string GetDomainTag()
returns the dim-tag for a domain (e.g. "dim=3d")
Definition: suffix_tag.h:81
std::string GetDimensionTag()
returns the dim-tag for a domain (e.g. "dim=3d")
Definition: suffix_tag.h:58
std::string GetDimensionAlgebraTag()
returns the dim-tag for a domain (e.g. "dim=3d;alg=CPU1;")
Definition: suffix_tag.h:155
#define UG_THROW(msg)
Definition: error.h:57