accumulate-n
matrix operation