pub struct WgpuSetupOptions { /* private fields */ }Available on crate feature
wgpu only.Expand description
Runtime options for registering an existing wgpu setup.
Created by WgpuOptions::setup. Registration is synchronous even in
a browser, since the application has already acquired the device and queue.
Implementations§
Source§impl WgpuSetupOptions
impl WgpuSetupOptions
Sourcepub fn memory_config(self, config: MemoryConfiguration) -> WgpuSetupOptions
pub fn memory_config(self, config: MemoryConfiguration) -> WgpuSetupOptions
Set the runtime’s memory allocation policy.
Sourcepub fn tasks_max(self, tasks: usize) -> WgpuSetupOptions
pub fn tasks_max(self, tasks: usize) -> WgpuSetupOptions
Set a nonzero task count, overriding CUBECL_WGPU_MAX_TASKS.
Sourcepub fn init(self) -> Result<Device, WgpuInitError>
pub fn init(self) -> Result<Device, WgpuInitError>
Register the setup and return its initialized Burn device.
Each call creates a new runtime identity; repeated handles are not detected. Failed initialization does not change an existing registration.
§Errors
Returns an error for conflicting selection options, invalid runtime options, incompatible capabilities, or a failure to register the runtime.
Auto Trait Implementations§
impl !RefUnwindSafe for WgpuSetupOptions
impl !UnwindSafe for WgpuSetupOptions
impl Freeze for WgpuSetupOptions
impl Send for WgpuSetupOptions
impl Sync for WgpuSetupOptions
impl Unpin for WgpuSetupOptions
impl UnsafeUnpin for WgpuSetupOptions
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
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