pub struct CustomOpDescription {
pub id: String,
pub inputs: Vec<TensorDescription>,
pub outputs: Vec<TensorDescription>,
}Available on crate feature
repr only.Expand description
Custom operation in fusion stream, declaring it’s inputs and outputs.
Fields§
§id: StringUnique identifier of the operation.
inputs: Vec<TensorDescription>Input tensors used in this the custom operation.
outputs: Vec<TensorDescription>Output tensors used in this the custom operation.
Implementations§
Source§impl CustomOpDescription
impl CustomOpDescription
Sourcepub fn new(
id: &'static str,
inputs: &[TensorDescription],
outputs: &[TensorDescription],
) -> Self
pub fn new( id: &'static str, inputs: &[TensorDescription], outputs: &[TensorDescription], ) -> Self
Create a new custom operation description.
Sourcepub fn consume<const N_IN: usize, const N_OUT: usize>(
self,
) -> ([TensorDescription; N_IN], [TensorDescription; N_OUT])
pub fn consume<const N_IN: usize, const N_OUT: usize>( self, ) -> ([TensorDescription; N_IN], [TensorDescription; N_OUT])
Consume the description, and get the in and output tensors.
Trait Implementations§
Source§impl Clone for CustomOpDescription
impl Clone for CustomOpDescription
Source§fn clone(&self) -> CustomOpDescription
fn clone(&self) -> CustomOpDescription
Returns a copy 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 moreSource§impl Debug for CustomOpDescription
impl Debug for CustomOpDescription
Source§impl<'de> Deserialize<'de> for CustomOpDescription
impl<'de> Deserialize<'de> for CustomOpDescription
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for CustomOpDescription
impl Hash for CustomOpDescription
Source§impl PartialEq for CustomOpDescription
impl PartialEq for CustomOpDescription
Source§impl Serialize for CustomOpDescription
impl Serialize for CustomOpDescription
impl StructuralPartialEq for CustomOpDescription
Auto Trait Implementations§
impl Freeze for CustomOpDescription
impl RefUnwindSafe for CustomOpDescription
impl Send for CustomOpDescription
impl Sync for CustomOpDescription
impl Unpin for CustomOpDescription
impl UnwindSafe for CustomOpDescription
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