Fleet  0.0.9
Inference in the LOT
Public Types | Public Member Functions | Public Attributes | List of all members
RuntimeCounter Class Reference

#include <RuntimeCounter.h>

Public Types

using T = unsigned long
 

Public Member Functions

 RuntimeCounter ()
 
void increment (Instruction &i, T count=1)
 Add count number of items to this instruction's count. More...
 
void increment (RuntimeCounter &rc)
 Add the results of another runtime counter. More...
 
size_t get (Instruction &i)
 Retrieve the rule count for a given instruction. More...
 
std::string string () const
 Display a runtime counter – NOTE This may not display all zeros if instructions have not been run. More...
 

Public Attributes

std::vector< Tbuiltin_count
 
std::vector< Tprimitive_count
 
T total
 

Detailed Description

Author
Steven Piantadosi
Date
04/09/20

Member Typedef Documentation

◆ T

using RuntimeCounter::T = unsigned long

Constructor & Destructor Documentation

◆ RuntimeCounter()

RuntimeCounter::RuntimeCounter ( )
inline

Member Function Documentation

◆ get()

size_t RuntimeCounter::get ( Instruction i)
inline

Retrieve the rule count for a given instruction.

Parameters
i
Returns

◆ increment() [1/2]

void RuntimeCounter::increment ( Instruction i,
T  count = 1 
)
inline

Add count number of items to this instruction's count.

Parameters
i

◆ increment() [2/2]

void RuntimeCounter::increment ( RuntimeCounter rc)
inline

Add the results of another runtime counter.

Parameters
rc

◆ string()

std::string RuntimeCounter::string ( ) const
inline

Display a runtime counter – NOTE This may not display all zeros if instructions have not been run.

Returns

Member Data Documentation

◆ builtin_count

std::vector<T> RuntimeCounter::builtin_count

◆ primitive_count

std::vector<T> RuntimeCounter::primitive_count

◆ total

T RuntimeCounter::total

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