Restructuring matmul result output