[petsc-dev] Removing VecGetArrayPrivate3

Jed Brown jed at 59A2.org
Wed Nov 24 15:51:11 CST 2010


I thought the purpose of this function was to avoid calling VecGetArray
multiple times on identical arguments.  In particular, consider a Vec
implementation that was not backed by a contiguous array.  Must these
implementations keep a reference count of how many times the same array was
checked out?  This violates the present API implied by VecGetArray_Seq:

if (vin->array_gotten) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ORDER,"Array has
already been gotten for this vector,you may\nhave forgotten a call to
VecRestoreArray()");

Do you want to relax this restriction on the API (placing extra burden on
the implementation), or revert the patch?

Jed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20101124/80ff55bc/attachment.html>


More information about the petsc-dev mailing list