Struct MobileDeploymentGenerator

Source
pub struct MobileDeploymentGenerator<F: Float + Debug + ScalarOperand> { /* private fields */ }
Expand description

Mobile deployment generator

Implementations§

Source§

impl<F: Float + Debug + 'static + FromPrimitive + ScalarOperand + Send + Sync> MobileDeploymentGenerator<F>

Source

pub fn new( model: Sequential<F>, platform: MobilePlatform, optimization: MobileOptimizationConfig, metadata: PackageMetadata, output_dir: PathBuf, ) -> Self

Create a new mobile deployment generator

Source

pub fn platform(&self) -> &MobilePlatform

Get the target platform

Source

pub fn generate(&self) -> Result<MobileDeploymentResult>

Generate mobile deployment packages

Source

pub fn generate_platform_packages( &self, model: &Sequential<F>, ) -> Result<Vec<PlatformPackage>>

Generate platform-specific packages for the model

Source

pub fn generate_ios_package( &self, model: &Sequential<F>, ) -> Result<PlatformPackage>

Generate iOS package for the model

Source

pub fn generate_android_package( &self, model: &Sequential<F>, ) -> Result<PlatformPackage>

Generate Android package for the model

Source

pub fn generate_ios_framework(&self, path: &Path) -> Result<()>

Generate iOS framework for deployment

Source

pub fn generate_swift_wrapper(&self, path: &Path) -> Result<()>

Generate Swift wrapper for the model

Source

pub fn generate_objc_wrapper( &self, header_path: &Path, impl_path: &Path, ) -> Result<()>

Generate Objective-C wrapper for the model

Source

pub fn generate_android_aar(&self, path: &Path) -> Result<()>

Generate Android AAR package

Source

pub fn generate_java_wrapper(&self, path: &Path) -> Result<()>

Generate Java wrapper for the model

Source

pub fn generate_kotlin_wrapper(&self, path: &Path) -> Result<()>

Generate Kotlin wrapper for the model

Source

pub fn generate_jni_wrapper( &self, header_path: &Path, impl_path: &Path, ) -> Result<()>

Generate JNI wrapper for native integration

Source

pub fn benchmark_performance( &self, _model: &Sequential<F>, ) -> Result<PerformanceMetrics>

Benchmark model performance on mobile platform

Source

pub fn generate_integration_guides(&self) -> Result<Vec<PathBuf>>

Generate integration guides for mobile deployment

Source

pub fn generate_ios_integration_guide(&self) -> Result<PathBuf>

Generate iOS-specific integration guide

Source

pub fn generate_android_integration_guide(&self) -> Result<PathBuf>

Generate Android-specific integration guide

Source

pub fn generate_optimization_guide(&self) -> Result<PathBuf>

Generate optimization guide for mobile deployment

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V