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