poulpy-hal 0.5.0

A crate providing layouts and a trait-based hardware acceleration layer with open extension points, matching the API and types of spqlios-arithmetic.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[inline(always)]
pub fn znx_negate_ref(res: &mut [i64], src: &[i64]) {
    #[cfg(debug_assertions)]
    {
        assert_eq!(res.len(), src.len())
    }

    for i in 0..res.len() {
        res[i] = -src[i]
    }
}

#[inline(always)]
pub fn znx_negate_inplace_ref(res: &mut [i64]) {
    for value in res {
        *value = -*value
    }
}