40 [[nodiscard]] std::int64_t
current() const noexcept;
49 [[nodiscard]] std::int64_t
total() const noexcept;
59 [[nodiscard]] std::int64_t
peak() const noexcept;
66 [[nodiscard]] std::int64_t
max() const noexcept;
132 std::int64_t num_current_allocs_{0};
133 std::int64_t num_total_allocs_{0};
134 std::int64_t current_{0};
135 std::int64_t total_{0};
136 std::int64_t peak_{0};
137 std::int64_t max_{0};
141 std::is_trivially_copyable_v<ScopedMemoryRecord>,
142 "ScopedMemoryRecord must be trivially copyable"
RAPIDS Multi-Processor interfaces.
Memory statistics for a specific scope.
std::int64_t current() const noexcept
Returns the current memory usage in bytes.
ScopedMemoryRecord & add_subscope(ScopedMemoryRecord const &subscope)
Merge the memory statistics of a subscope into this record.
std::int64_t max() const noexcept
Returns the size of the largest single allocation (in bytes).
ScopedMemoryRecord & add_scope(ScopedMemoryRecord const &scope)
Merge the memory statistics of another scope into this one.
std::int64_t peak() const noexcept
Returns the peak memory usage (in bytes).
std::int64_t num_total_allocs() const noexcept
Returns the total number of allocations performed.
void record_allocation(std::int64_t nbytes)
Records a memory allocation event.
std::int64_t num_current_allocs() const noexcept
Returns the number of currently active (non-deallocated) allocations.
std::int64_t total() const noexcept
Returns the total number of bytes allocated.
void record_deallocation(std::int64_t nbytes)
Records a memory deallocation event.