<div class="gmail_quote">On Tue, Nov 23, 2010 at 04:57, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I think if we removed ALL the increase state from the outer methods (like VecScale) we could remove the VecGetArrayPrivate() and always use VecGetArray() or write ones and VecGetArrayRead() for read ones inside the private methods.</blockquote>
</div><br><div>Why is it better for VecScale_Seq to call a private VecScaleUpdateCachedNorms instead of letting the outer method handle it?  Seems like either unnecessarily duplicated code, or an extra function, with less obvious semantics when you approach the code from the public interface.  Having the inner method handle the caching logic is only clearer when you start in the depths of the implementation and work back towards the user.</div>
<div><br></div><div>Jed</div>