Skip to main content

Operation

Enum Operation 

Source
pub enum Operation {
Show 14 variants EnsureZero { list_id: Vec<usize>, }, EnsureZeroOne { id: usize, }, MultiplyAlpha { id: usize, }, MultiplyScalar { scalar: u8, id: usize, }, AddOneToVector { src_id: usize, target_id: usize, }, AddTwoToVector { s0: usize, s1: usize, target_id: usize, }, AddThreeToVector { s0: usize, s1: usize, s2: usize, target_id: usize, }, AddToVector { list_id: Vec<usize>, target_id: usize, }, BroadcastAdd { src_id: usize, target_ids: Vec<usize>, }, MulAdd { src_id: usize, scalar: u8, target_id: usize, }, MoveTo { src_id: usize, target_id: usize, }, CopyTo { src_id: usize, target_id: usize, }, Remove { id: usize, }, InfoCodedVector { coded_id: usize, data_id: usize, },
}
Expand description

Data vector operations that can be recorded for delayed execution.

Each variant represents a single atomic operation on data vectors identified by their unique IDs. The DataManager records these operations and optionally forwards them to a DataOperator for immediate execution.

Variants§

§

EnsureZero

Zero out the vectors with the given IDs.

Fields

§list_id: Vec<usize>

IDs of vectors to zero.

§

EnsureZeroOne

Fields

§id: usize

ID of the vector to zero.

§

MultiplyAlpha

Multiply a vector element-wise by the primitive element alpha in GF(256).

Fields

§id: usize

ID of the vector to multiply.

§

MultiplyScalar

Multiply a vector element-wise by a GF(256) scalar.

Fields

§scalar: u8

GF(256) scalar multiplier.

§id: usize

ID of the vector to multiply.

§

AddOneToVector

XOR one source vector into a target (GF(2) hot path; no Vec allocation).

Fields

§src_id: usize

ID of the source vector.

§target_id: usize

ID of the destination vector.

§

AddTwoToVector

XOR two source vectors into a target (GF(2) hot path; no Vec allocation).

Fields

§s0: usize

IDs of source vectors.

§target_id: usize

ID of the destination vector.

§

AddThreeToVector

XOR three source vectors into a target (GF(2) hot path; no Vec allocation).

Fields

§s0: usize

IDs of source vectors.

§target_id: usize

ID of the destination vector.

§

AddToVector

XOR (add in GF(2)/GF(256)) multiple source vectors into a target vector.

Fields

§list_id: Vec<usize>

IDs of source vectors to XOR into the target.

§target_id: usize

ID of the destination vector.

§

BroadcastAdd

XOR a single source vector into each of several target vectors.

Fields

§src_id: usize

ID of the source vector.

§target_ids: Vec<usize>

IDs of destination vectors.

§

MulAdd

Multiply source vector by a scalar and XOR the result into the target: target += scalar * src.

Fields

§src_id: usize

ID of the source vector.

§scalar: u8

GF(256) scalar multiplier.

§target_id: usize

ID of the destination vector.

§

MoveTo

Move a vector from src_id to target_id, invalidating the source.

Fields

§src_id: usize

ID of the source vector.

§target_id: usize

ID of the destination vector.

§

CopyTo

Copy a vector from src_id to target_id, keeping the source intact.

Fields

§src_id: usize

ID of the source vector.

§target_id: usize

ID of the destination vector.

§

Remove

Remove (deallocate) a vector.

Fields

§id: usize

ID of the vector to remove.

§

InfoCodedVector

Informational marker associating a coded vector ID with its data vector ID.

Fields

§coded_id: usize

External coded vector identifier.

§data_id: usize

Internal data vector identifier.

Trait Implementations§

Source§

impl Clone for Operation

Source§

fn clone(&self) -> Operation

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Operation

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.