conj(xᐪ) × x
import mir.ndslice.allocation: slice; auto x = slice!double(4); x[] = [0, 1, 2, 3]; assert(sqnrm2(x) == 1.0 + 4 + 9);
import mir.ndslice.allocation: slice; auto x = slice!cdouble(2); x[] = [0 + 1i, 2 + 3i]; assert(sqnrm2(x) == 1.0 + 4 + 9);
Forms the square of the euclidean norm. Uses unrolled loops for stride equal to one.