ComPPare 1.0.0
Loading...
Searching...
No Matches
comppare::plugin::nvbenchplugin::state Class Reference

State class to manage the benchmark state. More...

#include <nvbench.hpp>

Public Member Functions

 state (const state &)=delete
 
stateoperator= (const state &)=delete
 
 state (state &&)=delete
 
stateoperator= (state &&)=delete
 

Static Public Member Functions

static stateinstance ()
 
static void set_state (nvbench::state *st)
 
static nvbench::state * get_state ()
 

Private Member Functions

 state ()=default
 

Private Attributes

nvbench::state * st_ = nullptr
 

Detailed Description

State class to manage the benchmark state.

This class is a singleton to ensure a single instance throughout the program. It provides methods to set and get the benchmark state nvbench::state *. The state is used to interact with the NVBench library.

Note
nvbench uses reference to state. However, move and copy constructor of nvbench::state are deleted. Therefore, we store a pointer to nvbench::state instead.

Constructor & Destructor Documentation

◆ state() [1/3]

comppare::plugin::nvbenchplugin::state::state ( const state )
delete

◆ state() [2/3]

comppare::plugin::nvbenchplugin::state::state ( state &&  )
delete

◆ state() [3/3]

comppare::plugin::nvbenchplugin::state::state ( )
privatedefault

Member Function Documentation

◆ get_state()

static nvbench::state * comppare::plugin::nvbenchplugin::state::get_state ( )
inlinestatic

◆ instance()

static state & comppare::plugin::nvbenchplugin::state::instance ( )
inlinestatic

◆ operator=() [1/2]

state & comppare::plugin::nvbenchplugin::state::operator= ( const state )
delete

◆ operator=() [2/2]

state & comppare::plugin::nvbenchplugin::state::operator= ( state &&  )
delete

◆ set_state()

static void comppare::plugin::nvbenchplugin::state::set_state ( nvbench::state *  st)
inlinestatic

Member Data Documentation

◆ st_

nvbench::state* comppare::plugin::nvbenchplugin::state::st_ = nullptr
private

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