15#ifndef ML_MEMORY_PROFILE_H
16#define ML_MEMORY_PROFILE_H
58 const std::string&
description()
const {
return _description; }
62 void removeCurrentlyUsedMemoryTracker() { _currentlyUsedMemoryTracker =
nullptr; }
67 std::string _description;
68 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.