kokkos-execution 0.0.1
Loading...
Searching...
No Matches
Tests::Utils::Functors::Counter Struct Reference

Count construction, move/copy construction, move/copy assignment and destruction atomically on host. More...

#include <counter.hpp>

Public Member Functions

 Counter () noexcept
 ~Counter () noexcept
 Counter (const Counter &) noexcept
Counteroperator= (const Counter &) noexcept
 Counter (Counter &&) noexcept
Counteroperator= (Counter &&) noexcept
template<typename... Args>
void operator() (Args &&...) const noexcept

Static Public Member Functions

static void reset ()

Public Attributes

unsigned int id {0}

Static Public Attributes

static std::atomic< unsigned int > default_constructions {0}
static std::atomic< unsigned int > destructions {0}
static std::atomic< unsigned int > copy_constructions {0}
static std::atomic< unsigned int > copy_assignments {0}
static std::atomic< unsigned int > move_constructions {0}
static std::atomic< unsigned int > move_assignments {0}
static std::atomic< unsigned int > next_id {0}

Detailed Description

Count construction, move/copy construction, move/copy assignment and destruction atomically on host.

Definition at line 9 of file counter.hpp.

Constructor & Destructor Documentation

◆ Counter() [1/3]

Tests::Utils::Functors::Counter::Counter ( )
inlinenoexcept

Definition at line 21 of file counter.hpp.

References default_constructions, and next_id.

◆ ~Counter()

Tests::Utils::Functors::Counter::~Counter ( )
inlinenoexcept

Definition at line 26 of file counter.hpp.

References destructions.

◆ Counter() [2/3]

Tests::Utils::Functors::Counter::Counter ( const Counter & )
inlinenoexcept

Definition at line 30 of file counter.hpp.

References copy_constructions, Counter(), and next_id.

◆ Counter() [3/3]

Tests::Utils::Functors::Counter::Counter ( Counter && )
inlinenoexcept

Definition at line 40 of file counter.hpp.

References Counter(), move_constructions, and next_id.

Member Function Documentation

◆ operator()()

template<typename... Args>
void Tests::Utils::Functors::Counter::operator() ( Args && ...) const
inlinenoexcept

Definition at line 51 of file counter.hpp.

◆ operator=() [1/2]

Counter & Tests::Utils::Functors::Counter::operator= ( const Counter & )
inlinenoexcept

Definition at line 35 of file counter.hpp.

References copy_assignments, and Counter().

◆ operator=() [2/2]

Counter & Tests::Utils::Functors::Counter::operator= ( Counter && )
inlinenoexcept

Definition at line 45 of file counter.hpp.

References Counter(), and move_assignments.

◆ reset()

void Tests::Utils::Functors::Counter::reset ( )
inlinestatic

Member Data Documentation

◆ copy_assignments

std::atomic<unsigned int> Tests::Utils::Functors::Counter::copy_assignments {0}
inlinestatic

Definition at line 13 of file counter.hpp.

◆ copy_constructions

std::atomic<unsigned int> Tests::Utils::Functors::Counter::copy_constructions {0}
inlinestatic

Definition at line 12 of file counter.hpp.

◆ default_constructions

std::atomic<unsigned int> Tests::Utils::Functors::Counter::default_constructions {0}
inlinestatic

Definition at line 10 of file counter.hpp.

◆ destructions

std::atomic<unsigned int> Tests::Utils::Functors::Counter::destructions {0}
inlinestatic

Definition at line 11 of file counter.hpp.

◆ id

unsigned int Tests::Utils::Functors::Counter::id {0}

Definition at line 19 of file counter.hpp.

◆ move_assignments

std::atomic<unsigned int> Tests::Utils::Functors::Counter::move_assignments {0}
inlinestatic

Definition at line 15 of file counter.hpp.

◆ move_constructions

std::atomic<unsigned int> Tests::Utils::Functors::Counter::move_constructions {0}
inlinestatic

Definition at line 14 of file counter.hpp.

◆ next_id

std::atomic<unsigned int> Tests::Utils::Functors::Counter::next_id {0}
inlinestatic

Definition at line 17 of file counter.hpp.


The documentation for this struct was generated from the following file:
  • /__w/kokkos-execution/kokkos-execution/tests/utils/functors/counter.hpp