PineForge
unreleased
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
adapter_exposure_storage.hpp
Go to the documentation of this file.
1
#pragma once
2
3
namespace
pineforge::detail
{
4
5
// Exposure values/handles have already been erased by their existing owner.
6
// Empty containers still retain buckets/capacity while a cohort's origin
7
// history pins its resident row. Release that storage without retiring any
8
// origin, changing a cohort record, or touching the hash's logical inputs.
9
template
<
class
Container>
10
inline
void
release_empty_exposure_capacity
(Container& container) {
11
if
(container.empty()) {
12
Container empty;
13
container.swap(empty);
14
}
15
}
16
17
template
<
class
Container>
18
inline
void
clear_exposure_storage
(Container& container) {
19
Container empty;
20
container.swap(empty);
21
}
22
23
}
// namespace pineforge::detail
pineforge::detail
Definition
array.hpp:46
pineforge::detail::clear_exposure_storage
void clear_exposure_storage(Container &container)
Definition
adapter_exposure_storage.hpp:18
pineforge::detail::release_empty_exposure_capacity
void release_empty_exposure_capacity(Container &container)
Definition
adapter_exposure_storage.hpp:10
include
pineforge
detail
adapter_exposure_storage.hpp
PineForge unreleased — Apache-2.0 —
github.com/pineforge-4pass/pineforge-engine
—
pineforge.dev