Sasha's matmul for 1dssa