Re: [petsc-dev] VecAXPY() in loops in TS
18 Feb
2011
18 Feb
'11
5:24 p.m.
Even adjusting the array passed in will be worth it. Should MAXPY have an optional constant scale factor, does it come up enough? Barry On Feb 18, 2011, at 5:03 PM, Jed Brown wrote:
On Fri, Feb 18, 2011 at 19:48, Barry Smith <[email protected]> wrote: Can some of the VecAXPY() calls in loops in TS be replaced with single VecMAXPY() calls? For example
for (j=0; j<r; j++) { ierr = VecAXPY(gl->Z,-shift*u[i*r+j],X[j]);CHKERRQ(ierr); }
They can, but we would have to create a temporary array to hold the coefficients and run the loop to fill the coefficients into that array. I recall intending to do that when I first wrote this, but clearly it never happened.
5653
Age (days ago)
5653
Last active (days ago)
0 comments
1 participants
participants (1)
-
Barry Smith