ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ADS::Reservation Class Reference

a place reserved by the least of the iterations that want it More...

#include <ADS/parallel/SpeculativeFor.h>

Public member functions

void reserve (std::size_t i) noexcept
 keeps \( i \) if it is less than the iteration there (a priority write, by compare-and-swap)
bool check (std::size_t i) const noexcept
 whether \( i \) holds the place
bool reserved (void) const noexcept
 whether some iteration holds the place
void reset (void) noexcept
 frees the place
bool checkReset (std::size_t i) noexcept
 frees the place if \( i \) holds it; whether it did

Static public attributes

static constexpr std::size_t NONE = std::numeric_limits< std::size_t >::max()
 no iteration

Detailed description

a place reserved by the least of the iterations that want it

Member function documentation

◆ check()

bool ADS::Reservation::check ( std::size_t i) const
inlinenodiscardnoexcept

whether \( i \) holds the place

◆ checkReset()

bool ADS::Reservation::checkReset ( std::size_t i)
inlinenoexcept

frees the place if \( i \) holds it; whether it did

◆ reserve()

void ADS::Reservation::reserve ( std::size_t i)
inlinenoexcept

keeps \( i \) if it is less than the iteration there (a priority write, by compare-and-swap)

◆ reserved()

bool ADS::Reservation::reserved ( void ) const
inlinenodiscardnoexcept

whether some iteration holds the place

◆ reset()

void ADS::Reservation::reset ( void )
inlinenoexcept

frees the place

Member data documentation

◆ NONE

std::size_t ADS::Reservation::NONE = std::numeric_limits< std::size_t >::max()
staticconstexpr

no iteration


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