Struct SolverArgs
pub struct SolverArgs {
pub config: SamplerConfig,
pub budget: u64,
}Expand description
Everything the atune-solver command line can say.
Fields§
§config: SamplerConfigThe sampler every session runs, with its opted-in and opted-out settings.
budget: u64The declared trial budget, read only by --sampler auto.
Implementations§
§impl SolverArgs
impl SolverArgs
pub fn parse<I: IntoIterator<Item = String>>(args: I) -> Result<Self, String>
pub fn parse<I: IntoIterator<Item = String>>(args: I) -> Result<Self, String>
Parses the flags (without the program name), defaulting to TPE, no
opt-ins or opt-outs and DEFAULT_BUDGET_TRIALS.
Hand-rolled rather than clap: a handful of flags do not justify a
dependency on the benchmark path, and the error strings are the whole
user interface. Opt-ins and opt-outs are checked against the sampler
after every flag is read, so flag order does not matter; a setting
given to both is refused.
§Errors
A message naming the bad flag or value, or USAGE for --help.
Trait Implementations§
§impl Clone for SolverArgs
impl Clone for SolverArgs
§fn clone(&self) -> SolverArgs
fn clone(&self) -> SolverArgs
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for SolverArgs
impl Debug for SolverArgs
impl Eq for SolverArgs
§impl PartialEq for SolverArgs
impl PartialEq for SolverArgs
impl StructuralPartialEq for SolverArgs
Auto Trait Implementations§
impl Freeze for SolverArgs
impl RefUnwindSafe for SolverArgs
impl Send for SolverArgs
impl Sync for SolverArgs
impl Unpin for SolverArgs
impl UnsafeUnpin for SolverArgs
impl UnwindSafe for SolverArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T, U> Imply<T> for U
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more