new gaussian genration with inplace reduction