pub struct GpuConfigBuilder { /* private fields */ }Expand description
Builder for GPU configuration
Implementations§
Source§impl GpuConfigBuilder
impl GpuConfigBuilder
Sourcepub fn backend(self, backend: GpuBackend) -> Self
pub fn backend(self, backend: GpuBackend) -> Self
Sets the GPU backend
Sourcepub fn mixed_precision(self, enable: bool) -> Self
pub fn mixed_precision(self, enable: bool) -> Self
Enables mixed precision
Sourcepub fn tensor_cores(self, enable: bool) -> Self
pub fn tensor_cores(self, enable: bool) -> Self
Enables tensor cores
Sourcepub fn memory_growth(self, enable: bool) -> Self
pub fn memory_growth(self, enable: bool) -> Self
Enables memory growth
Sourcepub fn memory_fraction(self, fraction: f32) -> Self
pub fn memory_fraction(self, fraction: f32) -> Self
Sets memory fraction
Trait Implementations§
Source§impl Debug for GpuConfigBuilder
impl Debug for GpuConfigBuilder
Source§impl Default for GpuConfigBuilder
impl Default for GpuConfigBuilder
Source§fn default() -> GpuConfigBuilder
fn default() -> GpuConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GpuConfigBuilder
impl RefUnwindSafe for GpuConfigBuilder
impl Send for GpuConfigBuilder
impl Sync for GpuConfigBuilder
impl Unpin for GpuConfigBuilder
impl UnsafeUnpin for GpuConfigBuilder
impl UnwindSafe for GpuConfigBuilder
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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