[petsc-dev] Make PetscHash publicly accessible

Lawrence Mitchell lawrence.mitchell at imperial.ac.uk
Fri Apr 22 09:26:41 CDT 2016


> On 22 Apr 2016, at 15:04, Jed Brown <jed at jedbrown.org> wrote:
> 
> Matthew Knepley <knepley at gmail.com> writes:
> 
>> On Fri, Apr 22, 2016 at 4:32 AM, Lawrence Mitchell <
>> lawrence.mitchell at imperial.ac.uk> wrote:
>> 
>>> Hi all,
>>> 
>>> I would like to use the PetscHash functionality in my code.  At the moment
>>> this is not possible, since the header file hash.h is not public (it's in
>>> src/sys/utils/hash.h).  Would there be any objections to moving it to (say)
>>> include/petschash.h so that PETSc applications can use it as well as PETSc
>>> itself.
>>> 
>> 
>> No, go ahead and do it.
> 
> If you do, then you need to namespace everything so it doesn't conflict
> with khash.h from:

Sure.

>  https://github.com/attractivechaos/klib
>  (or https://github.com/clibs/hash)

> Now personally, if I was writing code that was not intended for eventual
> inclusion in PETSc, I would just use upstream khash.h directly.  (PETSc
> should probably upgrade to the latest upstream khash.h.)

That is certainly an option, I was potentially being lazy (oh petsc already has a hash implementation, I'll just use that).  If I'm the only person coding outside of petsc who's ever going to use this, it may not be worth it.

Lawrence


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20160422/9967b118/attachment.sig>


More information about the petsc-dev mailing list