expliclitly avoid going through memory + optimized bounds check in inner_fold
reindent avx sum + fix includes