|
tess 1.0.0
Performance-first tile and path simulation substrate
|
#include <tess/path/path_runtime.h>
Public Member Functions | |
| void | reserve_requests (std::size_t count) |
| void | reserve_path_nodes (std::size_t count) |
| void | reserve_search_nodes (std::size_t count) |
| void | reserve_unit_routes (std::size_t count) |
| void | reserve_unit_field_products (std::size_t count) |
| void | reserve_unit_field_product_dependencies (std::size_t count) |
| void | reserve_weighted_field_products (std::size_t count) |
| void | reserve_weighted_field_product_dependencies (std::size_t count) |
| void | reserve_portal_segments (std::size_t count) |
| void | clear_requests () noexcept |
| void | clear_caches () noexcept |
| auto | submit (PathRequest request) -> PathTicket |
| auto | requests () const noexcept -> std::span< const PathRequest > |
| auto | results () const noexcept -> std::span< const PathResult > |
| auto | try_result (PathTicket ticket) const noexcept -> std::optional< PathResult > |
| auto | result (PathTicket ticket) const noexcept -> PathResult |
| auto | route_cache () noexcept -> UnitRouteCache & |
| auto | route_cache () const noexcept -> const UnitRouteCache & |
| auto | portal_segment_cache () noexcept -> WeightedPortalSegmentCache & |
| auto | portal_segment_cache () const noexcept -> const WeightedPortalSegmentCache & |
| auto | stats () const noexcept -> PathRuntimeStats |
| template<typename World, typename ClassOrTag> | |
| auto | process_unit_cached (const World &world, PathRuntimeCachePolicy policy={}, const RegionGraphT< typename World::residency_type > *graph=nullptr) -> std::span< const PathResult > |
| template<typename World, typename ClassOrTag, typename Provider> | |
| auto | process_unit_cached (const World &world, PathRuntimeCachePolicy policy, const RegionGraphT< typename World::residency_type > *graph, const Provider &provider) -> std::span< const PathResult > |
| template<typename World, typename Class, std::uint32_t MaxCost> | |
| auto | process_weighted_batch (const World &world, PathRuntimeCachePolicy policy={}, const RegionGraphT< typename World::residency_type > *graph=nullptr) -> std::span< const PathResult > |
| template<typename World, typename Class, std::uint32_t MaxCost, typename Provider> | |
| auto | process_weighted_batch (const World &world, PathRuntimeCachePolicy policy, const RegionGraphT< typename World::residency_type > *graph, const Provider &provider) -> std::span< const PathResult > |
Owns a reusable batch of path requests, results, scratch, and caches.
Bind one runtime to one world. Cache fingerprints describe world content, not object identity, so sharing a runtime between worlds with matching content-version counters can serve stale routes. Results and their PathView data are borrowed from runtime-owned buffers and are invalidated by the next process call or clear_requests().
Submission and processing may allocate unless the matching reserve_*() methods have provisioned sufficient capacity. The runtime is not internally synchronized; confine it to one thread or externally synchronize every use. Its caches retain process-local class/provider identities; do not share a runtime across a dynamic-library boundary.
|
inlinenoexcept |
Clears all caches without removing submitted requests.
|
inlinenoexcept |
Clears requests and results and invalidates every outstanding ticket and result view. Cache contents are retained for reuse.
|
inlinenodiscardnoexcept |
Const overload of portal_segment_cache().
|
inlinenodiscardnoexcept |
Returns the runtime-owned weighted portal-segment cache.
|
inlinenodiscard |
Processes unit requests composed with a special transition provider.
|
inlinenodiscard |
Processes all submitted requests with cached unit-cost A*.
An optional graph enables a topology precheck. A graph built for another movement class degrades to no pruning rather than rejecting a valid path. The runtime binds its unit caches to ClassOrTag; changing class clears those caches. The returned span and every result path are borrowed and are invalidated by the next process or clear operation. Processing may allocate unless all relevant runtime and cache capacities were reserved.
|
inlinenodiscard |
Processes a weighted batch composed with a special provider.
|
inlinenodiscard |
Processes the batch with one movement class for weighted search and precheck. A mismatched graph disables pruning. Result lifetime and allocation behavior match process_unit_cached().
|
inlinenodiscardnoexcept |
Borrows submitted requests until the next submission or clear operation.
|
inline |
Reserves result and cache path-node storage.
|
inline |
Reserves weighted portal-segment cache entries.
|
inline |
Reserves request/result batch storage to reduce later allocations.
|
inline |
Reserves node-search scratch across unit and weighted searches.
|
inline |
Reserves dependency-key storage for unit field products.
Reserve World::chunk_count: dependency sets are bounded by, and failed products can equal, that count.
|
inline |
Reserves entries in the shared unit/weighted field-product cache.
|
inline |
Reserves unit-route cache entries.
|
inline |
Reserves dependency-key storage for weighted field products.
|
inline |
Reserves the same shared product cache as reserve_unit_field_products().
The two names describe the intended processing pass, not separate storage.
|
inlinenodiscardnoexcept |
Returns a published result by ticket.
The ticket must originate from this runtime. Detectable stale, out-of-range, and unpublished-result tickets terminate in every build; uncertain callers should use try_result(). The returned result's path view follows the runtime result lifetime documented on the class.
|
inlinenodiscardnoexcept |
Borrows the current result array until the next process or clear operation.
|
inlinenodiscardnoexcept |
Const overload of route_cache().
|
inlinenodiscardnoexcept |
Returns the runtime-owned unit-route cache for tuning or inspection.
|
inlinenodiscardnoexcept |
Returns a by-value snapshot of current runtime and cache counters.
|
inlinenodiscard |
Appends a request and returns its generation-stamped ticket.
This may allocate unless request storage was reserved.
|
inlinenodiscardnoexcept |
Checks for a published result by ticket.
The ticket must originate from this runtime; the ticket representation cannot distinguish another runtime with a matching index and generation. Returns no value for a stale generation, an out-of-range index, or while the latest processing pass has not completed. A successful result follows the runtime result lifetime documented on the class.