VectorOps

Trait VectorOps 

Source
pub trait VectorOps {
    type Element;

    // Required methods
    fn elwise_scalar_mul(
        &self,
        out: &mut [Self::Element],
        a: &[Self::Element],
        b: &Self::Element,
    );
    fn elwise_mul(
        &self,
        out: &mut [Self::Element],
        a: &[Self::Element],
        b: &[Self::Element],
    );
    fn elwise_add_mut(&self, a: &mut [Self::Element], b: &[Self::Element]);
    fn elwise_sub_mut(&self, a: &mut [Self::Element], b: &[Self::Element]);
    fn elwise_mul_mut(&self, a: &mut [Self::Element], b: &[Self::Element]);
    fn elwise_scalar_mul_mut(&self, a: &mut [Self::Element], b: &Self::Element);
    fn elwise_neg_mut(&self, a: &mut [Self::Element]);
    fn elwise_fma_mut(
        &self,
        a: &mut [Self::Element],
        b: &[Self::Element],
        c: &[Self::Element],
    );
    fn elwise_fma_scalar_mut(
        &self,
        a: &mut [Self::Element],
        b: &[Self::Element],
        c: &Self::Element,
    );
}

Required Associated Types§

Required Methods§

Source

fn elwise_scalar_mul( &self, out: &mut [Self::Element], a: &[Self::Element], b: &Self::Element, )

Sets out as out[i] = a[i] * b

Source

fn elwise_mul( &self, out: &mut [Self::Element], a: &[Self::Element], b: &[Self::Element], )

Source

fn elwise_add_mut(&self, a: &mut [Self::Element], b: &[Self::Element])

Source

fn elwise_sub_mut(&self, a: &mut [Self::Element], b: &[Self::Element])

Source

fn elwise_mul_mut(&self, a: &mut [Self::Element], b: &[Self::Element])

Source

fn elwise_scalar_mul_mut(&self, a: &mut [Self::Element], b: &Self::Element)

Source

fn elwise_neg_mut(&self, a: &mut [Self::Element])

Source

fn elwise_fma_mut( &self, a: &mut [Self::Element], b: &[Self::Element], c: &[Self::Element], )

inplace mutates a: a = a + b*c

Source

fn elwise_fma_scalar_mut( &self, a: &mut [Self::Element], b: &[Self::Element], c: &Self::Element, )

Implementors§