n-dimensional tensor BLAS: SASUM, DASUM, SCASUM, DZASUM
sum of the |Re(.)| + |Im(.)|'s
SASUM, DASUM
import mir.ndslice.allocation: slice; auto x = slice!double(4); x[] = [0, -1, -2, 3]; assert(asum(x) == 1 + 2 + 3);
SCASUM, DZASUM
import mir.ndslice.allocation: slice; auto x = slice!cdouble(2); x[] = [0 - 1i, -2 + 3i]; assert(asum(x) == 1 + 2 + 3);
Takes the sum of the |Re(.)| + |Im(.)|'s of a vector and returns a single precision result.