10 #include <tbb/concurrent_vector.h>
16 #define MAXUPDATES 0xffffffff
48 for (
unsigned int i = 0;
i <
data_.size();
i++)
57 for (
unsigned int i = 0;
i <
size;
i++) {
72 if (dynamic_cast<IntJ *>(monitorable))
74 else if (dynamic_cast<DoubleJ *>(monitorable))
76 else if (dynamic_cast<StringJ *>(monitorable))
93 std::vector<AtomicMonUInt *> *monvec,
94 bool NAifZeroUpdates) {
105 for (
unsigned int i = 0;
i <
size;
i++) {
130 monVal = (
static_cast<std::vector<AtomicMonUInt *> *
>(
tracked_))->at(
i)->load(std::memory_order_relaxed);
133 monVal = *((
static_cast<std::vector<AtomicMonUInt *> *
>(
tracked_))->at(
i));
136 monVal = (
static_cast<std::vector<unsigned int> *
>(
tracked_))->at(
i);
157 *(static_cast<IntJ *>(itr->second.get())) = monVal;
190 static_cast<IntJ *>(itr->second.get())->
update((static_cast<IntJ *>(
tracked_))->value());
192 static_cast<DoubleJ *>(itr->second.get())->
update((static_cast<DoubleJ *>(
tracked_))->value());
194 static_cast<StringJ *>(itr->second.get())->concatenate((static_cast<StringJ *>(
tracked_))->value());
206 monVal = (
static_cast<std::vector<AtomicMonUInt *> *
>(
tracked_))->at(streamID)->load(std::memory_order_relaxed);
209 monVal = *((
static_cast<std::vector<AtomicMonUInt *> *
>(
tracked_))->at(streamID));
212 monVal = (
static_cast<std::vector<unsigned int> *
>(
tracked_))->at(streamID);
235 *(static_cast<IntJ *>(itr->second.get())) = monVal;
244 std::stringstream
ss;
259 ss << (
unsigned int)*((
static_cast<std::vector<AtomicMonUInt *> *
>(
tracked_))->at(
unsigned(sid)));
261 ss << (
static_cast<std::vector<unsigned int> *
>(
tracked_))->at(
unsigned(sid));
265 return (static_cast<JsonMonitorable *>(
tracked_))->toString();
276 newJ->
add(static_cast<IntJ *>(itr->second.get())->
value());
297 root[
DATA].append(itr->second.get()->toString());
310 std::stringstream
ss;
316 std::stringstream
ss;
317 unsigned int updates = 0;
318 unsigned int sum = 0;
323 sum += static_cast<IntJ *>(itr->second.get())->
value();
330 sum += static_cast<IntJ *>(itr->second.get())->
value();
352 unsigned int updates = 0;
359 auto &hvec = monObj->
value();
360 for (
unsigned int j = 0;
j < hvec.size();
j++) {
361 unsigned int thisbin = (
unsigned int)hvec[
j];
373 auto &hvec = monObj->
value();
374 for (
unsigned int j = 0;
j < hvec.size();
j++) {
375 unsigned int thisbin = (
unsigned int)hvec[
j];
382 std::stringstream
ss;