PFFT: improve factorization algorithm for 2d to 3d decomposition