Struct BatchContextEntry

Struct Documentation

struct BatchContextEntry

One entry of a CacheManager::BatchContext: the enclosing realized batch loop’s axis, DAG-scope nest position, and element range.

A free (non-template) type — like DagScopeLevel / ModeToLevel (dag_scope.hpp), which it embeds — since none of its fields depend on the owning CacheManager's TreeNode / force_hash_collisions template parameters.

axis is what the forest-descent resolution path (evaluate_impl's Enter-stage slice_to_use) resolves against: it looks a fetched node’s mode up by this exact Index (via index_position(nd, axis)). level is the DAG-scope nest position a level-based resolution path consults instead. range is the loop’s current element block. exact_axis distinguishes the two producers: the ordered executor (which co-evaluates a whole type-bucketed block under one canonical block.axis) leaves it nullopt, while the forest evaluator (which pushes each member’s own physical axis) fills it with that same axis — redundant with axis in practice, but keeping the two fields separate lets a level-based resolution tell the two strategies apart without re-deriving which one produced this entry.

Public Members

Index axis
DagScopeLevel level = {}
std::pair<std::size_t, std::size_t> range = {}
std::optional<Index> exact_axis = {}