Struct cubecl_runtime::channel::MpscComputeChannel
source · pub struct MpscComputeChannel<Server>where
Server: ComputeServer,{ /* private fields */ }
Expand description
Create a channel using a [multi-producer, single-consumer channel to communicate with the compute server spawn on its own thread.
Implementations§
source§impl<Server> MpscComputeChannel<Server>where
Server: ComputeServer + 'static,
impl<Server> MpscComputeChannel<Server>where
Server: ComputeServer + 'static,
Trait Implementations§
source§impl<Server: ComputeServer> Clone for MpscComputeChannel<Server>
impl<Server: ComputeServer> Clone for MpscComputeChannel<Server>
source§impl<Server> ComputeChannel<Server> for MpscComputeChannel<Server>where
Server: ComputeServer + 'static,
impl<Server> ComputeChannel<Server> for MpscComputeChannel<Server>where
Server: ComputeServer + 'static,
source§fn read(&self, binding: Binding<Server>) -> Reader
fn read(&self, binding: Binding<Server>) -> Reader
Given a binding, returns owned resource as bytes
source§fn get_resource(
&self,
binding: Binding<Server>,
) -> <Server::Storage as ComputeStorage>::Resource
fn get_resource( &self, binding: Binding<Server>, ) -> <Server::Storage as ComputeStorage>::Resource
Given a resource handle, return the storage resource.
source§fn create(&self, data: &[u8]) -> Handle<Server>
fn create(&self, data: &[u8]) -> Handle<Server>
Given a resource as bytes, stores it and returns the resource handle
source§fn empty(&self, size: usize) -> Handle<Server>
fn empty(&self, size: usize) -> Handle<Server>
Reserves
size
bytes in the storage, and returns a handle over themsource§unsafe fn execute(
&self,
kernel: Server::Kernel,
count: Server::DispatchOptions,
bindings: Vec<Binding<Server>>,
kind: ExecutionMode,
)
unsafe fn execute( &self, kernel: Server::Kernel, count: Server::DispatchOptions, bindings: Vec<Binding<Server>>, kind: ExecutionMode, )
Auto Trait Implementations§
impl<Server> Freeze for MpscComputeChannel<Server>
impl<Server> !RefUnwindSafe for MpscComputeChannel<Server>
impl<Server> Send for MpscComputeChannel<Server>
impl<Server> Sync for MpscComputeChannel<Server>
impl<Server> Unpin for MpscComputeChannel<Server>
impl<Server> !UnwindSafe for MpscComputeChannel<Server>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)