Wildmeshing Toolkit
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
wmtk::OpList< Tuple > Class Template Reference

A pass's candidate operations, compact and consumed as they are queued. More...

#include <ExecutionScheduler.hpp>

Public Member Functions

void emplace_back (const Op &op, const Tuple &t)
 
size_t size () const
 
bool empty () const
 
void clear ()
 
template<class F >
void consume (F &&f)
 Hand every entry to f(name, tuple), front to back, releasing them as it goes.
 
void append (OpList &&other)
 Move other's entries to the end of this list, releasing them from other as it goes.
 

Private Member Functions

uint32_t intern (const Op &op)
 

Private Attributes

std::vector< Op > m_names
 
std::deque< std::pair< uint32_t, Tuple > > m_items
 

Detailed Description

template<class Tuple>
class wmtk::OpList< Tuple >

A pass's candidate operations, compact and consumed as they are queued.

A pass lists every candidate before it runs – two per edge for a collapse, three for the combined edge swap – and on the first pass after construction that list is the size of the whole mesh. As std::vector<std::pair<Op, Tuple>> each entry carried a std::string (72 bytes an entry on a tet mesh), and the list sat next to the priority queue built from it until the queue was complete.

Here an entry is the Tuple and a 32-bit index into the handful of operation names the list has seen, and the entries live in a deque that ExecutePass pops as it seeds its queues, so the list shrinks while the queue grows instead of the two coexisting. The interface the passes use to build it – emplace_back(name, tuple) – is unchanged.


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