Loading...
Searching...
No Matches
|
| | Resources (uint64_t reserve_mb, int cpu_percent, fs::path pause={}, bool desktop=false) |
| | Establish mapping limits for onboard or desktop execution.
|
| bool | desktop () const |
| | Check which execution policy was selected.
|
| void | tile_checkpoint () |
| | Check whether tile processing may continue.
|
| void | parallel_tiles (size_t count, std::function< void(size_t)> task) |
| | Run a desktop batch under the coordinator's resource policy.
|
| size_t | photo_batch_capacity (uint64_t photo_budget_mib=128) const |
| | Estimate how many photos can be prepared in one desktop batch.
|
| bool | available () |
| void | checkpoint () |
| Json | report () |
Apply idle-priority scheduling and cooperative memory/CPU/pause checks.
Definition at line 275 of file pangea.cpp.
◆ Resources()
| pangea_detail::Resources::Resources |
( |
uint64_t | reserve_mb, |
|
|
int | cpu_percent, |
|
|
fs::path | pause = {}, |
|
|
bool | desktop = false ) |
|
inline |
Establish mapping limits for onboard or desktop execution.
- Parameters
-
| reserve_mb | Required available memory reserve in MiB. |
| cpu_percent | Onboard CPU budget as a percentage of one core. |
| pause | Optional path whose existence pauses work. |
| desktop | Whether to provision desktop workers. |
Keep the onboard policy conservative; desktop concurrency is capped by both available memory and CPU affinity.
Definition at line 300 of file pangea.cpp.
◆ available()
| bool pangea_detail::Resources::available |
( |
| ) |
|
|
inline |
Report whether system headroom currently meets the configured reserve and duty budget.
Definition at line 391 of file pangea.cpp.
◆ checkpoint()
| void pangea_detail::Resources::checkpoint |
( |
| ) |
|
|
inline |
Bound CPU duty by sleeping and stop work when memory, CPU or pause gates close.
- Exceptions
-
| std::runtime_error | on cancellation or unavailable required system telemetry. Sleep to enforce CPU duty and wait while system headroom or operator pause is closed. |
| std::runtime_error | on process cancellation or unavailable telemetry. |
Definition at line 441 of file pangea.cpp.
◆ desktop()
| bool pangea_detail::Resources::desktop |
( |
| ) |
const |
|
inline |
Check which execution policy was selected.
- Returns
- True for desktop execution.
Definition at line 357 of file pangea.cpp.
◆ parallel_tiles()
| void pangea_detail::Resources::parallel_tiles |
( |
size_t | count, |
|
|
std::function< void(size_t)> | task ) |
|
inline |
Run a desktop batch under the coordinator's resource policy.
- Parameters
-
| count | Number of indexed jobs. |
| task | Thread-safe job callback. |
Check headroom before dispatch and continue sampling while waiting.
Definition at line 369 of file pangea.cpp.
◆ photo_batch_capacity()
| size_t pangea_detail::Resources::photo_batch_capacity |
( |
uint64_t | photo_budget_mib = 128 | ) |
const |
|
inline |
Estimate how many photos can be prepared in one desktop batch.
- Parameters
-
| photo_budget_mib | Nonzero estimated peak memory per photo in MiB. |
- Returns
- Batch size from one photo through the worker count.
Preserve reserve and worker overhead before dividing the remaining headroom. The minimum allows serial preparation, not a memory guarantee.
- Precondition
- Desktop worker pool is initialized.
Definition at line 380 of file pangea.cpp.
◆ report()
| Json pangea_detail::Resources::report |
( |
| ) |
|
|
inline |
Summarize active limits and measured process peak in the run report.
Definition at line 466 of file pangea.cpp.
◆ tile_checkpoint()
| void pangea_detail::Resources::tile_checkpoint |
( |
| ) |
|
|
inline |
Check whether tile processing may continue.
In desktop mode the coordinator samples resources; workers only observe batch cancellation. Serial execution runs the full checkpoint.
Definition at line 361 of file pangea.cpp.
◆ address_limit
| uint64_t pangea_detail::Resources::address_limit = memory_limit |
|
private |
◆ desktop_mode
| bool pangea_detail::Resources::desktop_mode = false |
|
private |
◆ duty
| double pangea_detail::Resources::duty |
|
private |
Maximum fraction of one CPU core used over each checkpoint interval.
Definition at line 285 of file pangea.cpp.
◆ idle_fraction
| double pangea_detail::Resources::idle_fraction = 0 |
|
private |
◆ last_cpu
| double pangea_detail::Resources::last_cpu = seconds(CLOCK_PROCESS_CPUTIME_ID) |
|
private |
◆ last_wall
| double pangea_detail::Resources::last_wall = seconds(CLOCK_MONOTONIC) |
|
private |
◆ pause_file
| fs::path pangea_detail::Resources::pause_file |
|
private |
Operator-controlled file whose existence suspends processing.
Definition at line 287 of file pangea.cpp.
◆ pool
| std::unique_ptr<DesktopPool> pangea_detail::Resources::pool |
|
private |
◆ previous_idle
| uint64_t pangea_detail::Resources::previous_idle = 0 |
|
private |
◆ previous_total
| uint64_t pangea_detail::Resources::previous_total = 0 |
|
private |
◆ reserve
| uint64_t pangea_detail::Resources::reserve |
|
private |
RAM left for Linux, camera buffers and concurrent services.
Definition at line 283 of file pangea.cpp.
◆ sampled_at
| double pangea_detail::Resources::sampled_at = 0 |
|
private |
◆ started_cpu
| const double pangea_detail::Resources::started_cpu = last_cpu |
|
private |
◆ started_wall
| const double pangea_detail::Resources::started_wall = last_wall |
|
private |
The documentation for this class was generated from the following file: