monitor for distributed envorinment. (#4829)
* Collect statistics from other ranks in monitor. * Workaround old GCC bug.
This commit is contained in:
@@ -162,6 +162,10 @@ class JsonNumber : public Value {
|
||||
JsonNumber(FloatT value) : Value(ValueKind::Number) { // NOLINT
|
||||
number_ = value;
|
||||
}
|
||||
template <typename FloatT,
|
||||
typename std::enable_if<std::is_same<FloatT, double>::value>::type* = nullptr>
|
||||
JsonNumber(FloatT value) : Value{ValueKind::Number}, // NOLINT
|
||||
number_{static_cast<Float>(value)} {}
|
||||
|
||||
void Save(JsonWriter* writer) override;
|
||||
|
||||
@@ -193,6 +197,10 @@ class JsonInteger : public Value {
|
||||
template <typename IntT,
|
||||
typename std::enable_if<std::is_same<IntT, Int>::value>::type* = nullptr>
|
||||
JsonInteger(IntT value) : Value(ValueKind::Integer), integer_{value} {} // NOLINT
|
||||
template <typename IntT,
|
||||
typename std::enable_if<std::is_same<IntT, size_t>::value>::type* = nullptr>
|
||||
JsonInteger(IntT value) : Value(ValueKind::Integer), // NOLINT
|
||||
integer_{static_cast<Int>(value)} {}
|
||||
|
||||
Json& operator[](std::string const & key) override;
|
||||
Json& operator[](int ind) override;
|
||||
|
||||
Reference in New Issue
Block a user