Skip to main content

sub

Function sub 

Source
pub fn sub<T>(backend: ComputeBackend, a: &Field<T>, b: &Field<T>) -> Field<T>
where T: Copy + Send + Sync + Sub<Output = T>,
Expand description

Element-wise difference c[i] = a[i] - b[i], returning a new field.

Units: as for add — both operands are the same physical quantity. Bit-identical to the serial std::ops::Sub impl on Field.

§Panics

Panics if a.len() != b.len().