[petsc-dev] VecRestoreArrayRead and const

Matthew Knepley knepley at gmail.com
Mon Jun 14 07:23:20 CDT 2010


Is this a new function? Or do you mean just VecGetArray?

   Matt

On Mon, Jun 14, 2010 at 5:56 AM, Jed Brown <jed at 59a2.org> wrote:

> It seems to me that every correct use of this function should mark the
> array const, so perhaps it would make sense to have
>
>  PetscErrorCode VecGetArrayRead(Vec,const PetscScalar**);
>  PetscErrorCode VecRestoreArrayRead(Vec,const PetscScalar**);
>
> rather than always casting away const at the call site.
>
> Jed
>



-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20100614/a464a580/attachment.html>


More information about the petsc-dev mailing list