pub struct WasmRuntime { /* private fields */ }
Expand description
CPU-based runtime backend for WASM environments
Implementations§
Source§impl WasmRuntime
impl WasmRuntime
Trait Implementations§
Source§impl BackendTrait for WasmRuntime
impl BackendTrait for WasmRuntime
Source§fn capabilities(&self) -> &BackendCapabilities
fn capabilities(&self) -> &BackendCapabilities
Get backend capabilities
Source§fn initialize<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initialize the backend
Source§fn compile_kernel<'life0, 'life1, 'async_trait>(
&'life0 self,
_source: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn compile_kernel<'life0, 'life1, 'async_trait>(
&'life0 self,
_source: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Compile a kernel
Source§fn launch_kernel<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_kernel: &'life1 [u8],
_grid: (u32, u32, u32),
_block: (u32, u32, u32),
_args: &'life2 [*const u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn launch_kernel<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_kernel: &'life1 [u8],
_grid: (u32, u32, u32),
_block: (u32, u32, u32),
_args: &'life2 [*const u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Launch a kernel
Source§fn copy_memory(
&self,
dst: *mut u8,
src: *const u8,
size: usize,
_kind: MemcpyKind,
) -> Result<()>
fn copy_memory( &self, dst: *mut u8, src: *const u8, size: usize, _kind: MemcpyKind, ) -> Result<()>
Copy memory
Source§fn synchronize(&self) -> Result<()>
fn synchronize(&self) -> Result<()>
Synchronize device
Auto Trait Implementations§
impl Freeze for WasmRuntime
impl RefUnwindSafe for WasmRuntime
impl Send for WasmRuntime
impl Sync for WasmRuntime
impl Unpin for WasmRuntime
impl UnwindSafe for WasmRuntime
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