Expand description
Trait and types to implement an anytime Copper task.
An anytime task splits its work into a mandatory minimum (CuAnytimeTask::base)
plus optional bounded improvements (CuAnytimeTask::refine). The task reports
what each quantum achieved through AnytimeStatus; the runtime decides whether
to schedule another quantum from that status stream and its configured time budget
and quality target. The task never sees the policy, so implementations stay
reusable under any policy.
Enums§
- Anytime
Status - Returned by
CuAnytimeTask::baseandCuAnytimeTask::refine; drives the runtime’s refinement scheduling.
Traits§
- Anytime
Quality - Bound on
CuAnytimeTask::Quality: comparability for the policy checks, plus how a quality reads back for the status stamp. A custom quality type needs onlyimpl AnytimeQuality for MyQuality {}(unscored in stamps) or an override ofratio. - CuAnytime
Task - A task producing a valid result from the bare-minimum compute, then improving it in bounded quanta for as long as the runtime allows.
Functions§
- quality_
from_ f32 - Converts a normalized
f32(e.g. a RON policy knob) into aQuality. - quality_
to_ f32 - Reads a
Qualityback as a normalizedf32.