MADNESS 0.10.1
Public Attributes | List of all members
madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::PrefetchSlot Struct Reference

One batch requested ahead of the task that will read it. More...

Public Attributes

std::shared_ptr< Future< batch_bytesT > > fut
 
long key = 0
 
bool valid = false
 

Detailed Description

template<typename T, std::size_t NDIM>
template<typename T, std::size_t NDIM>
struct madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::PrefetchSlot

One batch requested ahead of the task that will read it.

A strict double buffer: next is requested while this task computes, and every task promotes it to current before computing, so at most two requests are ever in flight per rank. That bound is load-bearing, not a tuning choice: an earlier design that allowed several concurrent requests corrupted the transport on large replies, because the outstanding replies could outnumber what the receive path was prepared for.

Member Data Documentation

◆ fut

template<typename T , std::size_t NDIM>
template<typename T , std::size_t NDIM>
std::shared_ptr<Future<batch_bytesT> > madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::PrefetchSlot::fut

Held by pointer, not by value: a slot is retired by overwriting it, and Future's assignment operator requires an unset target. Overwriting a slot whose reply has already landed – which is every consumed slot – trips that assertion. Dropping the pointer releases the future instead of assigning over it.

Referenced by madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::sym_pipeline_advance().

◆ key

template<typename T , std::size_t NDIM>
template<typename T , std::size_t NDIM>
long madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::PrefetchSlot::key = 0

◆ valid

template<typename T , std::size_t NDIM>
template<typename T , std::size_t NDIM>
bool madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::PrefetchSlot::valid = false

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