Struct PreparedOperator
pub struct PreparedOperator {
pub name: String,
pub descriptor: OperatorDescriptor,
pub representation_digest: u64,
pub residency_generation: u64,
pub primary_payload: Vec<u8>,
}Expand description
An operator prepared for execution within a residency generation.
Fields§
§name: String§descriptor: OperatorDescriptor§representation_digest: u64§residency_generation: u64§primary_payload: Vec<u8>Implementations§
§impl PreparedOperator
impl PreparedOperator
pub fn prepare(
package: &OperatorPackage,
operator_name: &str,
residency_generation: u64,
) -> Result<PreparedOperator, PreparedOperatorError>
pub fn prepare( package: &OperatorPackage, operator_name: &str, residency_generation: u64, ) -> Result<PreparedOperator, PreparedOperatorError>
Prepare an operator from an existing validated companion package.
pub fn execute(
&self,
input: &[f32],
output: &mut [f32],
workspace_numeric: &mut [f32],
current_generation: u64,
) -> Result<(), PreparedOperatorError>
pub fn execute( &self, input: &[f32], output: &mut [f32], workspace_numeric: &mut [f32], current_generation: u64, ) -> Result<(), PreparedOperatorError>
Execute the prepared operator against caller-supplied input, output, and workspace buffers.
Fails closed immediately if current_generation does not match self.residency_generation.
Trait Implementations§
§impl Clone for PreparedOperator
impl Clone for PreparedOperator
§fn clone(&self) -> PreparedOperator
fn clone(&self) -> PreparedOperator
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PreparedOperator
impl RefUnwindSafe for PreparedOperator
impl Send for PreparedOperator
impl Sync for PreparedOperator
impl Unpin for PreparedOperator
impl UnsafeUnpin for PreparedOperator
impl UnwindSafe for PreparedOperator
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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