ConcurrentClosed

Declared in astar/structures/ads/ConcurrentClosed.h; the same class on the site of Doxygen.

template<Domain D, class Lock>
class ConcurrentClosed

the closed list shared by the workers, a lock-free set of the nodes

The interface is the one described in ConcurrentClosed.h.

Public Types

using State = state_t<D>

the state type

using Cost = cost_t<D>

the cost type

using NodeT = Node<State, Cost>

the node type

Public Functions

inline explicit ConcurrentClosed(const D &domain)

constructor, taking the Domain (which must outlive the table)

inline Lock &lock(const NodeT *n)

the lock of the node n, chosen by its address

inline void prefetch(std::uint64_t hash) const

the tags and the word that the lookup of the hash reads first, fetched with no wait

inline NodeT *update(
const State &t,
std::uint64_t hash,
Cost g,
Cost h,
NodeT *parent,
std::uint8_t op,
Local &local,
std::uint64_t &duplicates
)

records the path to t of cost g through parent and op [see ConcurrentClosed.h]

struct Local

the nodes that a worker allocates, and its spare node

Public Functions

inline std::size_t stored(void) const

the number of the nodes in the table

Public Members

NodePool<NodeT> pool

the nodes

NodeT *spare = nullptr

not in the table

struct Successor

a state generated, with its g, its h and its hash

Public Members

State state

the state

Cost g

its g

Cost h

its h

std::uint64_t hash

its hash

std::uint8_t op = no_op

the operator of t