15#ifndef ML_MEMORY_PROFILE_H
16#define ML_MEMORY_PROFILE_H
60 return _shortDescription;
73 void removeCurrentlyUsedMemoryTracker()
75 _currentlyUsedMemoryTracker =
nullptr;
81 std::string _description;
82 std::string _shortDescription;
virtual ~MLCurrentlyUsedMemoryTracker()
MLCurrentlyUsedMemoryTracker()
virtual size_t getCurrentlyUsedMemory() const =0
const std::string & description() const
MLProfilingMemoryType getMemory() const
Returns the used memory since instantiation/last reset.
void addMemory(MLProfilingMemoryType memory)
Adds allocated memory.
void setDescription(const std::string &description_)
void reset()
Resets the profile.
MLProfilingMemoryType getCurrentlyUsedMemory() const
Returns the currently used memory in bytes.
MLMemoryProfile(MLCurrentlyUsedMemoryTracker *tracker, const std::string &shortDescription)
const std::string & shortDescription() const
size_t MLProfilingMemoryType
#define MLPROFILINGMANAGER_EXPORT
Target mlrange_cast(Source arg)
Generic version of checked ML casts.