pub struct Config {
pub opt: u32,
pub ty: CompilerType,
}Fields§
§opt: u32§ty: CompilerTypeImplementations§
Source§impl Config
impl Config
pub fn new(ty: CompilerType, opt: u32) -> Result<Config>
pub fn from_name(ty: &str, opt: u32) -> Result<Config>
pub fn cross_compiled(&self) -> bool
pub fn is_amd64(&self) -> bool
pub fn is_arm64(&self) -> bool
pub fn is_riscv64(&self) -> bool
pub fn has_avx(&self) -> bool
pub fn is_sse(&self) -> bool
pub fn is_bytecode(&self) -> bool
pub fn is_debug(&self) -> bool
pub fn may_fast(&self) -> bool
pub fn cse(&self) -> bool
pub fn use_simd(&self) -> bool
pub fn simd_branch(&self) -> bool
pub fn use_threads(&self) -> bool
pub fn fastmath(&self) -> bool
pub fn opt_level(&self) -> u8
pub fn compiler_type(&self) -> CompilerType
pub fn native_compiler_type(&self) -> CompilerType
pub fn count_scratch(&self) -> u8
pub fn symbolica(&self) -> bool
pub fn is_complex(&self) -> bool
Sourcepub fn set_opt_level(&mut self, opt_level: u8)
pub fn set_opt_level(&mut self, opt_level: u8)
Sets of optimization level. The valid values are 0, 1, 2, which roughly correspond to gcc O0, O1, and O2 levels.
Sourcepub fn set_fastmath(&mut self, enabled: bool)
pub fn set_fastmath(&mut self, enabled: bool)
Enables fastmath mode. The main effect is to generate fused-multiply-addition instructions if possible.
Sourcepub fn set_simd_branch(&mut self, enabled: bool)
pub fn set_simd_branch(&mut self, enabled: bool)
Enables forced SIMD branching mode.
Sourcepub fn set_complex(&mut self, enabled: bool)
pub fn set_complex(&mut self, enabled: bool)
Enables Complex Numbers.
Sourcepub fn set_threads(&mut self, enabled: bool)
pub fn set_threads(&mut self, enabled: bool)
Enables Multi-threading.
Sourcepub fn set_symbolica(&mut self, enabled: bool)
pub fn set_symbolica(&mut self, enabled: bool)
Enables Symbolica Mode.
Trait Implementations§
impl Copy for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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