pub struct Runtime { /* private fields */ }
Implementations§
Source§impl Runtime
impl Runtime
pub fn new(arch: TiArch) -> Result<Self>
pub fn with_device_index(arch: TiArch, device_index: u32) -> Result<Self>
pub fn arch(&self) -> TiArch
pub fn runtime(&self) -> TiRuntime
pub fn allocate_memory(&self) -> MemoryBuilder<'_>
pub fn allocate_ndarray<T>(&self) -> NdArrayBuilder<'_, T>
pub fn allocate_image(&self) -> ImageBuilder<'_>
pub fn allocate_texture<T>(&self) -> TextureBuilder<'_>
pub fn load_aot_module(&self, module_dir: &str) -> Result<AotModule>
pub fn create_aot_module(&self, tcm: &[u8]) -> Result<AotModule>
pub fn wait(&self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Runtime
impl RefUnwindSafe for Runtime
impl !Send for Runtime
impl !Sync for Runtime
impl Unpin for Runtime
impl UnwindSafe for Runtime
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