[gmx-developers] use of f[] in do_shakefirst

D. Ensign densign at stanford.edu
Sun May 14 21:44:45 CEST 2006

Quoting David van der Spoel <spoel at xray.bmc.uu.se>:

> D. Ensign wrote:
> > Greetings,
> >
> > I was wondering, what's the reason for using f[] for what looks like a temporary
> storage
> > spot in do_shakefirst()? Would I lose performance if I had a special rvec in
> > do_shakefirst() for this purpose, instead of using f[]? The reason I ask is, with my
> > modifications f[] is now a special type, not rvec, and not necessarily the same
> precision
> > as rvec.
> >
> > Dan
> >
> This is probably  a remnant from the first days of Gromacs, when memory
> was expensive and when the free() call was unreliable (yes, this was
> before Ansi C). I think there is one variable called buf that is used as
> temp storage as well.

Ah, fun, it's like digging up fossils. :) The confluence of computational biology and
paleontology ... I wonder, do I get a hat and a gun? (I've always thought, the biggest
problem about computational science is, no one will make movies about how dashing,
chivalric, and incredibly handsome we are.)

So in other words, if I make a new rvec inside do_shakefirst() to use as temporary
storage, it should be okay as far as the computation, right? Will I likely lose out in


More information about the gromacs.org_gmx-developers mailing list