From 838074b7f73986cbdaeeae0008ffb0539f8b55dd Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Thu, 31 Mar 2011 10:51:03 +0000 Subject: [PATCH] create temporary variable on the stack instead of on the heap, for a minuscule speedup [[Imported from SVN: r7039]] --- dune/gfe/svd.hh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dune/gfe/svd.hh b/dune/gfe/svd.hh index 8374d1ca..a824b39a 100644 --- a/dune/gfe/svd.hh +++ b/dune/gfe/svd.hh @@ -45,7 +45,7 @@ void svdcmp(Dune::FieldMatrix<T,m,n>& a_, Dune::FieldVector<T,n>& w, Dune::Field int flag,i,its,j,jj,k,l,nm; T anorm,c,f,g,h,s,scale,x,y,z,*rv1; - T* rv1_c = new T[n]; + T rv1_c[n]; // 1 too large to accomodate fortran numbering rv1 = rv1_c-1; //Householder reduction to bidiagonal form. @@ -255,7 +255,6 @@ void svdcmp(Dune::FieldMatrix<T,m,n>& a_, Dune::FieldVector<T,n>& w, Dune::Field w[k-1]=x; } } - delete[](rv1_c); for (int i=0; i<m; i++) for (int j=0; j<n; j++) -- GitLab