/home/runner/work/HiCR/HiCR/include/hicr/core/memorySpace.hpp Source File
HiCR
|
memorySpace.hpp
Go to the documentation of this file.
79 HICR_THROW_LOGIC("Increasing memory space usage beyond its capacity (current_usage + increase > capacity | %lu + %lu > %lu)\n", _usage, delta, _size);
91 if (delta > _usage) HICR_THROW_LOGIC("Decreasing memory space usage below zero (probably a bug in HiCR) (current_usage - decrease < 0 | %lu - %lu < 0)\n", _usage, delta);
139 if (input.contains(key) == false) HICR_THROW_LOGIC("The serialized object contains no '%s' key", key.c_str());
140 if (input[key].is_number_unsigned() == false) HICR_THROW_LOGIC("The '%s' entry is not a number", key.c_str());
145 if (input.contains(key) == false) HICR_THROW_LOGIC("The serialized object contains no '%s' key", key.c_str());
146 if (input[key].is_number_unsigned() == false) HICR_THROW_LOGIC("The '%s' entry is not a number", key.c_str());
Definition memorySpace.hpp:44
__INLINE__ nlohmann::json serialize() const
Definition memorySpace.hpp:106
__INLINE__ void deserialize(const nlohmann::json &input)
Definition memorySpace.hpp:132
virtual ~MemorySpace()=default
MemorySpace()=default
__INLINE__ void increaseUsage(const size_t delta)
Definition memorySpace.hpp:76
virtual void serializeImpl(nlohmann::json &output) const =0
virtual void deserializeImpl(const nlohmann::json &input)=0
__INLINE__ void decreaseUsage(const size_t delta)
Definition memorySpace.hpp:89
virtual std::string getType() const =0
virtual __INLINE__ const size_t getSize() const
Definition memorySpace.hpp:59
Provides a failure model and corresponding exception classes.
Generated by