#[non_exhaustive]pub struct ComputeEnvironment { /* private fields */ }Expand description
Implementations§
Source§impl ComputeEnvironment
impl ComputeEnvironment
Sourcepub fn with_cores(self, cores: usize) -> Self
pub fn with_cores(self, cores: usize) -> Self
CPU cores available, clamped to ≥ 1. std callers typically pass
std::thread::available_parallelism().
Sourcepub fn with_available_ram_bytes(self, bytes: u64) -> Self
pub fn with_available_ram_bytes(self, bytes: u64) -> Self
Physical RAM available, for memory-ceiling decisions.
Sourcepub fn with_simd_tier(self, tier: SimdTier) -> Self
pub fn with_simd_tier(self, tier: SimdTier) -> Self
SIMD instruction tier the codec will dispatch to.
Sourcepub fn available_ram_bytes(&self) -> Option<u64>
pub fn available_ram_bytes(&self) -> Option<u64>
Available RAM in bytes, if known.
Trait Implementations§
Source§impl Clone for ComputeEnvironment
impl Clone for ComputeEnvironment
Source§fn clone(&self) -> ComputeEnvironment
fn clone(&self) -> ComputeEnvironment
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 moreimpl Copy for ComputeEnvironment
Source§impl Debug for ComputeEnvironment
impl Debug for ComputeEnvironment
Source§impl Default for ComputeEnvironment
impl Default for ComputeEnvironment
impl Eq for ComputeEnvironment
Source§impl PartialEq for ComputeEnvironment
impl PartialEq for ComputeEnvironment
impl StructuralPartialEq for ComputeEnvironment
Auto Trait Implementations§
impl Freeze for ComputeEnvironment
impl RefUnwindSafe for ComputeEnvironment
impl Send for ComputeEnvironment
impl Sync for ComputeEnvironment
impl Unpin for ComputeEnvironment
impl UnsafeUnpin for ComputeEnvironment
impl UnwindSafe for ComputeEnvironment
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