add a way to print bool vars
This commit is contained in:
parent
15c8f3abc6
commit
f3be68a552
@ -37,6 +37,17 @@ unsigned Statistics::primaryNetCount_;
|
||||
|
||||
namespace Util {
|
||||
|
||||
|
||||
template <> std::string
|
||||
toString (const bool& b)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << std::boolalpha << b;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
toLog (Params& v)
|
||||
{
|
||||
|
@ -36,6 +36,8 @@ template <typename K, typename V> bool contains (
|
||||
|
||||
template <typename T> std::string toString (const T&);
|
||||
|
||||
template <> std::string toString (const bool&);
|
||||
|
||||
void toLog (Params&);
|
||||
|
||||
void fromLog (Params&);
|
||||
@ -312,6 +314,7 @@ void pow (Params&, double);
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct NetInfo
|
||||
{
|
||||
NetInfo (unsigned size, bool loopy, unsigned nIters, double time)
|
||||
|
Reference in New Issue
Block a user