ATLAS Offline Software
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
SG::ArenaAllocatorBase::Stats Struct Reference

Statistics for an allocator. More...

#include <ArenaAllocatorBase.h>

Collaboration diagram for SG::ArenaAllocatorBase::Stats:

Classes

struct  Stat
 A single statistic. More...
 

Public Member Functions

 Stats ()=default
 
void clear ()
 Reset to zero. More...
 
Statsoperator+= (const Stats &other)
 Accumulate. More...
 

Static Public Member Functions

static void header (std::ostream &os)
 Print report header. More...
 

Public Attributes

Stat blocks
 Counts of blocks. More...
 
Stat elts
 Counts of elements. More...
 
Stat bytes
 Counts of bytes. More...
 

Detailed Description

Statistics for an allocator.

See above for more details.

Definition at line 188 of file ArenaAllocatorBase.h.

Constructor & Destructor Documentation

◆ Stats()

SG::ArenaAllocatorBase::Stats::Stats ( )
default

Member Function Documentation

◆ clear()

void SG::ArenaAllocatorBase::Stats::clear ( )

Reset to zero.

Zero a complete statistics block.

Definition at line 78 of file ArenaAllocatorBase.cxx.

79 {
80  elts.clear();
81  bytes.clear();
82  blocks.clear();
83 }

◆ header()

void SG::ArenaAllocatorBase::Stats::header ( std::ostream &  os)
static

Print report header.

Write a header for the statistics report.

Parameters
osThe stream to which to write.

Definition at line 117 of file ArenaAllocatorBase.cxx.

118 {
119  os << "Elts InUse/Free/Total"
120  << " Bytes InUse/Free/Total Blocks InUse/Free/Total";
121 }

◆ operator+=()

ArenaAllocatorBase::Stats & SG::ArenaAllocatorBase::Stats::operator+= ( const Stats other)

Accumulate.

Accumulate a complete statistics block.

Parameters
otherThe statistics block to accumulate into this one.

Definition at line 91 of file ArenaAllocatorBase.cxx.

92 {
93  elts += other.elts;
94  bytes += other.bytes;
95  blocks += other.blocks;
96  return *this;
97 }

Member Data Documentation

◆ blocks

Stat SG::ArenaAllocatorBase::Stats::blocks

Counts of blocks.

Definition at line 217 of file ArenaAllocatorBase.h.

◆ bytes

Stat SG::ArenaAllocatorBase::Stats::bytes

Counts of bytes.

Definition at line 221 of file ArenaAllocatorBase.h.

◆ elts

Stat SG::ArenaAllocatorBase::Stats::elts

Counts of elements.

Definition at line 219 of file ArenaAllocatorBase.h.


The documentation for this struct was generated from the following files:
SG::ArenaAllocatorBase::Stats::blocks
Stat blocks
Counts of blocks.
Definition: ArenaAllocatorBase.h:217
SG::ArenaAllocatorBase::Stats::Stat::clear
void clear()
Reset to zero.
Definition: ArenaAllocatorBase.cxx:37
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
SG::ArenaAllocatorBase::Stats::bytes
Stat bytes
Counts of bytes.
Definition: ArenaAllocatorBase.h:221
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
SG::ArenaAllocatorBase::Stats::elts
Stat elts
Counts of elements.
Definition: ArenaAllocatorBase.h:219