pub struct WgpuRuntime<Compiler = AutoCompiler> { /* private fields */ }Expand description
Runtime that uses the wgpu crate with the wgsl compiler. This is used in the Wgpu backend.
For advanced configuration, use init_setup to pass in runtime options or to select a
specific graphics API.
Trait Implementations§
Source§impl<C> Clone for WgpuRuntime<C>
impl<C> Clone for WgpuRuntime<C>
Source§impl<Compiler: Debug> Debug for WgpuRuntime<Compiler>
impl<Compiler: Debug> Debug for WgpuRuntime<Compiler>
Source§impl<C: WgpuCompiler> Runtime for WgpuRuntime<C>
impl<C: WgpuCompiler> Runtime for WgpuRuntime<C>
Source§fn enumerate_all_devices() -> Vec<DeviceId>
fn enumerate_all_devices() -> Vec<DeviceId>
Each adapter once, on whichever graphics API WgpuBackend::Auto
settles on — which is what a client created lazily resolves these ids
against. The same adapter pinned to another API is a device a caller
names, not one more to count.
Source§type Server = WgpuServer<C>
type Server = WgpuServer<C>
The compute server used to run kernels and perform autotuning.
Source§type Device = WgpuDevice
type Device = WgpuDevice
The device used to retrieve the compute client.
Source§fn can_read_tensor(shape: &Shape, strides: &Strides) -> bool
fn can_read_tensor(shape: &Shape, strides: &Strides) -> bool
Whether a tensor with
shape and strides can be read as is. If the result is false, the
tensor should be made contiguous before reading.Source§fn target_properties() -> TargetProperties
fn target_properties() -> TargetProperties
Returns the properties of the target hardware architecture.
Source§fn enumerate_devices(type_id: u16) -> Vec<DeviceId>
fn enumerate_devices(type_id: u16) -> Vec<DeviceId>
Returns all devices available under the provided type id.
Source§fn is_available() -> bool
fn is_available() -> bool
Whether this machine has hardware worth choosing this runtime for. Read more
Source§fn enumerate_devices_like(device_id: DeviceId) -> Vec<DeviceId>
fn enumerate_devices_like(device_id: DeviceId) -> Vec<DeviceId>
The devices of
device_id’s own kind: its peers, and itself where the
machine has it. Read moreAuto Trait Implementations§
impl<Compiler> Freeze for WgpuRuntime<Compiler>where
PhantomData<Compiler>: Freeze,
impl<Compiler> RefUnwindSafe for WgpuRuntime<Compiler>where
PhantomData<Compiler>: RefUnwindSafe,
impl<Compiler> Send for WgpuRuntime<Compiler>where
PhantomData<Compiler>: Send,
impl<Compiler> Sync for WgpuRuntime<Compiler>where
PhantomData<Compiler>: Sync,
impl<Compiler> Unpin for WgpuRuntime<Compiler>where
PhantomData<Compiler>: Unpin,
impl<Compiler> UnsafeUnpin for WgpuRuntime<Compiler>where
PhantomData<Compiler>: UnsafeUnpin,
impl<Compiler> UnwindSafe for WgpuRuntime<Compiler>where
PhantomData<Compiler>: UnwindSafe,
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> CloneExpand for Twhere
T: Clone,
impl<T> CloneExpand for Twhere
T: Clone,
fn __expand_clone_method(&self, _: &Scope) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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