RMM  23.12
RAPIDS Memory Manager
Public Member Functions | Public Attributes | List of all members
rmm::mr::statistics_resource_adaptor< Upstream >::counter Struct Reference

Utility struct for counting the current, peak, and total value of a number. More...

#include <statistics_resource_adaptor.hpp>

Public Member Functions

counteroperator+= (int64_t val)
 Add val to the current value and update the peak value if necessary. More...
 
counteroperator-= (int64_t val)
 Subtract val from the current value and update the peak value if necessary. More...
 

Public Attributes

int64_t value {0}
 Current value.
 
int64_t peak {0}
 Max value of value
 
int64_t total {0}
 Sum of all added values.
 

Detailed Description

template<typename Upstream>
struct rmm::mr::statistics_resource_adaptor< Upstream >::counter

Utility struct for counting the current, peak, and total value of a number.

Member Function Documentation

◆ operator+=()

template<typename Upstream >
counter& rmm::mr::statistics_resource_adaptor< Upstream >::counter::operator+= ( int64_t  val)
inline

Add val to the current value and update the peak value if necessary.

Parameters
valValue to add
Returns
Reference to this object

◆ operator-=()

template<typename Upstream >
counter& rmm::mr::statistics_resource_adaptor< Upstream >::counter::operator-= ( int64_t  val)
inline

Subtract val from the current value and update the peak value if necessary.

Parameters
valValue to subtract
Returns
Reference to this object

The documentation for this struct was generated from the following file: