ArrowIndexCache struct
#include <gtopt/arrow_index_cache.hpp>
One sub-map per index arity used by the input readers. Mirrors the tuple that previously lived in InputContext, but shared across all cells.
Public functions
- auto intern(std::string_view s) -> std::string_view
Public variables
- std::unordered_set<std::string> interned_names
-
std::tuple<UidTraits::
array_table_vector_uid_idx_t<ScenarioUid, StageUid, BlockUid>, UidTraits:: array_table_vector_uid_idx_t<ScenarioUid, StageUid>, UidTraits:: array_table_vector_uid_idx_t<StageUid, BlockUid>, UidTraits:: array_table_vector_uid_idx_t<StageUid>> maps
Function documentation
std::string_view gtopt:: ArrowIndexCache:: intern(std::string_view s)
Return a stable, run-lived view of s, copying it into interned_names on first sight. Use the result for every cache-key construction.
Variable documentation
std::unordered_set<std::string> gtopt:: ArrowIndexCache:: interned_names
Run-lived backing storage for the map keys. The map key types (UidTraits::CFName / CFNameUid) hold std::string_view class/field names. When the cache was per-cell those views stayed valid for the cell's build; now that the cache is shared for the whole run, get_arrow_index MUST intern the incoming (cname, fname) here first so the persisted keys never dangle. std::unordered_set is node-based, so the address of a stored string — and hence a string_view into it — is stable across later inserts. Interning happens under SimulationLP::array_index_mutex() (held by make_array_index), so no extra synchronization is needed.