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 77 of file ArenaAllocatorBase.cxx.

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

◆ 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 116 of file ArenaAllocatorBase.cxx.

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

◆ 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 90 of file ArenaAllocatorBase.cxx.

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

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:36
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