Celeritas  0.5.0-86+4a8eea4
Macros | Functions
MemRegistryIO.json.cc File Reference
#include "MemRegistryIO.json.hh"
#include "corecel/cont/Range.hh"
#include "corecel/math/QuantityIO.json.hh"

Macros

#define MRIO_MEM_OUT(MEMBER)
 

Functions

void celeritas::to_json (nlohmann::json &j, MemUsageEntry const &entry)
 Write one kernel's metadata to JSON. More...
 
void celeritas::to_json (nlohmann::json &j, MemRegistry const &mr)
 Write kernel metadata out to JSON.
 

Macro Definition Documentation

◆ MRIO_MEM_OUT

#define MRIO_MEM_OUT (   MEMBER)
Value:
do \
{ \
if (entry.MEMBER.value() > 0) \
{ \
j[#MEMBER] = value_as<MemQuantity>(entry.MEMBER); \
} \
} while (false)

Function Documentation

◆ to_json()

void celeritas::to_json ( nlohmann::json &  j,
MemUsageEntry const &  entry 
)

Write one kernel's metadata to JSON.

If the registry is dumped before a "scoped memory" saves the memory results, no entries will be written. Parent indices are only written for child nodes.