pub struct GenericFunctionManager { /* private fields */ }Expand description
Generic function manager
Implementations§
Source§impl GenericFunctionManager
impl GenericFunctionManager
Sourcepub fn new(config: GenericFunctionConfig) -> Self
pub fn new(config: GenericFunctionConfig) -> Self
Create a new generic function manager
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create a new generic function manager with default configuration
Sourcepub fn register_template(
&mut self,
template: GenericFunctionTemplate,
) -> JitResult<()>
pub fn register_template( &mut self, template: GenericFunctionTemplate, ) -> JitResult<()>
Register a generic function template
Sourcepub fn instantiate(
&mut self,
template_name: &str,
type_args: &[TypeKind],
shape_args: &[Vec<usize>],
const_args: &[ConstantValue],
) -> JitResult<InstantiatedFunction>
pub fn instantiate( &mut self, template_name: &str, type_args: &[TypeKind], shape_args: &[Vec<usize>], const_args: &[ConstantValue], ) -> JitResult<InstantiatedFunction>
Instantiate a generic function with concrete types
Sourcepub fn stats(&self) -> &GenericFunctionStats
pub fn stats(&self) -> &GenericFunctionStats
Get statistics about generic function usage
Sourcepub fn list_templates(&self) -> Vec<&str>
pub fn list_templates(&self) -> Vec<&str>
List all registered templates
Sourcepub fn get_template(&self, name: &str) -> Option<&GenericFunctionTemplate>
pub fn get_template(&self, name: &str) -> Option<&GenericFunctionTemplate>
Get template by name
Sourcepub fn clear_instances(&mut self)
pub fn clear_instances(&mut self)
Clear all instantiations (for memory management)
Sourcepub fn instantiation_count(&self, template_name: &str) -> usize
pub fn instantiation_count(&self, template_name: &str) -> usize
Get the number of instantiations for a template
Trait Implementations§
Source§impl Clone for GenericFunctionManager
impl Clone for GenericFunctionManager
Source§fn clone(&self) -> GenericFunctionManager
fn clone(&self) -> GenericFunctionManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GenericFunctionManager
impl RefUnwindSafe for GenericFunctionManager
impl Send for GenericFunctionManager
impl Sync for GenericFunctionManager
impl Unpin for GenericFunctionManager
impl UnsafeUnpin for GenericFunctionManager
impl UnwindSafe for GenericFunctionManager
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§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