Struct basic_dsp_vector::combined_ops::PreparedOperation2
[−]
[src]
pub struct PreparedOperation2<T, NI1, DI1, NI2, DI2, NO1, DO1, NO2, DO2> where
T: RealNumber,
NI1: NumberSpace,
DI1: Domain,
NI2: NumberSpace,
DI2: Domain,
NO1: NumberSpace,
DO1: Domain,
NO2: NumberSpace,
DO2: Domain, { /* fields omitted */ }
An operation on two data vectors which has been prepared in advance.
The type arguments can be read like a function definition: (TI1, TI2) -> (TO1, TO2)
Methods
impl<T, NI1, DI1, NI2, DI2, NO1, DO1, NO2, DO2> PreparedOperation2<T, NI1, DI1, NI2, DI2, NO1, DO1, NO2, DO2> where
T: RealNumber,
NI1: NumberSpace,
DI1: Domain,
NI2: NumberSpace,
DI2: Domain,
NO1: NumberSpace,
DO1: Domain,
NO2: NumberSpace,
DO2: Domain,
[src]
T: RealNumber,
NI1: NumberSpace,
DI1: Domain,
NI2: NumberSpace,
DI2: Domain,
NO1: NumberSpace,
DO1: Domain,
NO2: NumberSpace,
DO2: Domain,
An operation which can be prepared in advance and operates on one input and produces one output
fn add_ops<F, NT1, DT1, NT2, DT2>(
self,
operation: F
) -> PreparedOperation2<T, NI1, DI1, NI2, DI2, NT1, DT1, NT2, DT2> where
F: Fn(Identifier<T, NO1, DO1>, Identifier<T, NO2, DO2>) -> (Identifier<T, NT1, DT1>, Identifier<T, NT2, DT2>),
DT1: Domain,
NT1: NumberSpace,
DT2: Domain,
NT2: NumberSpace,
[src]
self,
operation: F
) -> PreparedOperation2<T, NI1, DI1, NI2, DI2, NT1, DT1, NT2, DT2> where
F: Fn(Identifier<T, NO1, DO1>, Identifier<T, NO2, DO2>) -> (Identifier<T, NT1, DT1>, Identifier<T, NT2, DT2>),
DT1: Domain,
NT1: NumberSpace,
DT2: Domain,
NT2: NumberSpace,
Adds new operations which will be executed with the next call to exec
As a background: The function operation
will be executed immediately.
It only operated on Identifier
types and these serve as
placeholder for vectors. Every operation done to an Identifier
is recorded and will be executed on vectors if exec
is called.
fn add_enum_op(&mut self, op: Operation<T>)
[src]
Allows to directly push an Operation
enum to a PreparedOperation1
.
This mainly exists as interop between Rust and other languages.
Trait Implementations
impl<T, S, NI1, DI1, NI2, DI2, NO1, DO1, NO2, DO2> PreparedOperation2Exec<S, T, DspVec<S, T, NI1, DI1>, DspVec<S, T, NI2, DI2>, DspVec<S, T, NO1, DO1>, DspVec<S, T, NO2, DO2>> for PreparedOperation2<T, NI1, DI1, NI2, DI2, NO1, DO1, NO2, DO2> where
T: RealNumber,
S: ToSliceMut<T>,
DspVec<S, T, NO1, DO1>: RededicateForceOps<DspVec<S, T, NI1, DI1>>,
DspVec<S, T, NO2, DO2>: RededicateForceOps<DspVec<S, T, NI2, DI2>>,
NI1: NumberSpace,
DI1: Domain,
NI2: NumberSpace,
DI2: Domain,
NO1: NumberSpace,
DO1: Domain,
NO2: NumberSpace,
DO2: Domain,
[src]
T: RealNumber,
S: ToSliceMut<T>,
DspVec<S, T, NO1, DO1>: RededicateForceOps<DspVec<S, T, NI1, DI1>>,
DspVec<S, T, NO2, DO2>: RededicateForceOps<DspVec<S, T, NI2, DI2>>,
NI1: NumberSpace,
DI1: Domain,
NI2: NumberSpace,
DI2: Domain,
NO1: NumberSpace,
DO1: Domain,
NO2: NumberSpace,
DO2: Domain,
fn exec<B>(
&self,
buffer: &mut B,
a: DspVec<S, T, NI1, DI1>,
b: DspVec<S, T, NI2, DI2>
) -> Result<(DspVec<S, T, NO1, DO1>, DspVec<S, T, NO2, DO2>), (ErrorReason, DspVec<S, T, NO1, DO1>, DspVec<S, T, NO2, DO2>)> where
B: for<'a> Buffer<'a, S, T>,
[src]
&self,
buffer: &mut B,
a: DspVec<S, T, NI1, DI1>,
b: DspVec<S, T, NI2, DI2>
) -> Result<(DspVec<S, T, NO1, DO1>, DspVec<S, T, NO2, DO2>), (ErrorReason, DspVec<S, T, NO1, DO1>, DspVec<S, T, NO2, DO2>)> where
B: for<'a> Buffer<'a, S, T>,
Executes all recorded operations on the input vectors.
impl<T: Clone, NI1: Clone, DI1: Clone, NI2: Clone, DI2: Clone, NO1: Clone, DO1: Clone, NO2: Clone, DO2: Clone> Clone for PreparedOperation2<T, NI1, DI1, NI2, DI2, NO1, DO1, NO2, DO2> where
T: RealNumber,
NI1: NumberSpace,
DI1: Domain,
NI2: NumberSpace,
DI2: Domain,
NO1: NumberSpace,
DO1: Domain,
NO2: NumberSpace,
DO2: Domain,
[src]
T: RealNumber,
NI1: NumberSpace,
DI1: Domain,
NI2: NumberSpace,
DI2: Domain,
NO1: NumberSpace,
DO1: Domain,
NO2: NumberSpace,
DO2: Domain,
fn clone(&self) -> PreparedOperation2<T, NI1, DI1, NI2, DI2, NO1, DO1, NO2, DO2>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more