[petsc-dev] PETSc blame digest (next) 2019-06-20
Hapla Vaclav
vaclav.hapla at erdw.ethz.ch
Fri Jun 21 04:21:40 CDT 2019
OK, after grepping I can see that probably only Matt is using that _Internal suffix ;-)
I will rename it to PetscViewerHDF5Load_Private.
Vaclav
On 20 Jun 2019, at 22:09, Václav Hapla via petsc-dev <petsc-dev at mcs.anl.gov<mailto:petsc-dev at mcs.anl.gov>> wrote:
Yes, I think that's the reason we moved it to private :-)
Sometimes I see _Internal. I thought _Private is preferred for static functions visible only within a single object file?
Vaclav
20. června 2019 21:50:29 SELČ, "Smith, Barry F." <bsmith at mcs.anl.gov<mailto:bsmith at mcs.anl.gov>> napsal:
It HAS A hid_t argument! Making it public means making HDF5 includes public, means all PETSc applications have the HDF5 includes open in them. Likely it should just get _Private
Barry
On Jun 20, 2019, at 9:01 AM, Hapla Vaclav via petsc-dev <petsc-dev at mcs.anl.gov<mailto:petsc-dev at mcs.anl.gov>> wrote:
On 20 Jun 2019, at 15:56, Vaclav Hapla <vaclav.hapla at erdw.ethz.ch<mailto:vaclav.hapla at erdw.ethz.ch>> wrote:
/home/sandbox/petsc/petsc.next-3/src/mat/impls/dense/seq/densehdf5.c:62: undefined reference to `PetscViewerHDF5Load'
Does it mean I need to change visibility of PetscViewerHDF5Load in isimpl.h to PETSC_EXTERN?
Are you OK with that?
Yes, and when doing that, it needs a Developer level man page.
OK, thanks.
So as a rule of thumb, every PETSC_EXTERN function should be documented, although in private headers?
Then src/vec/is/utils/hdf5io.c should have
#include <petsc/private/isimpl.h> /*I "petsc/private/isimpl.h" I*/
?
Looks a bit weird, doesn't it?
I think there are countless cases petsc-wide which break this.
dev manual page 15 bullet 15:
"private functions may need to be marked PETSC_EXTERN"
There is an example of MatHeaderReplace. It hasn't a manpage.
Well, I'm not against making it public (it originally was) and write a manpage, but then it should be also moved to the public header file.
Sorry for sending a few previous emails only to Jed.
Vaclav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20190621/e39cf717/attachment.html>
More information about the petsc-dev
mailing list