pub trait SIMDSumTree: SIMDVector {
// Required method
fn sum_tree(self) -> <Self as SIMDVector>::Scalar;
}Expand description
Perform a pairwise reducing sum of all lanes in the vector and return the result as a scalar.
For example, the summing pattern for a vector of 8 elements is as follows:
let v0 = [x0, x1, x2, x3, x4, x5, x6, x7];
let v1 = [v0[0] + v0[4], v0[1] + v0[5], v0[2] + v0[6], v0[3] + v0[7]];
let v2 = [v1[0] + v1[2], v1[1] + v1[3]];
v2[0] + v2[1]Required Methods§
fn sum_tree(self) -> <Self as SIMDVector>::Scalar
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.