[petsc-dev] MatISGetLocalMat: need to MatDestroy the returned local matrice ?
Jed Brown
jed at jedbrown.org
Fri May 19 18:58:59 CDT 2017
Barry Smith <bsmith at mcs.anl.gov> writes:
> Jed,
>
> Should this utilize the Get/Restore paradigm?
>
> If not should the name be different to prevent confusion? Currently we have
>
> XXXCreate --> user needs to call a destroy
>
> XXXXGetYYY --> user needs to call a restore (but not always?)
>
> Could we introduce say
>
> XXXAccessYYY --> user does not call destroy or restore ?
Even VecGetArrayRead requires matching Restore. Light access is less
safe and gives the library less opportunity for strictness to catch
bugs.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170519/e13068f4/attachment.sig>
More information about the petsc-dev
mailing list