<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Apr 22, 2016 at 9:04 AM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> writes:<br>
<br>
> On Fri, Apr 22, 2016 at 4:32 AM, Lawrence Mitchell <<br>
> <a href="mailto:lawrence.mitchell@imperial.ac.uk">lawrence.mitchell@imperial.ac.uk</a>> wrote:<br>
><br>
>> Hi all,<br>
>><br>
>> I would like to use the PetscHash functionality in my code. At the moment<br>
>> this is not possible, since the header file hash.h is not public (it's in<br>
>> src/sys/utils/hash.h). Would there be any objections to moving it to (say)<br>
>> include/petschash.h so that PETSc applications can use it as well as PETSc<br>
>> itself.<br>
>><br>
><br>
> No, go ahead and do it.<br>
<br>
</span>If you do, then you need to namespace everything so it doesn't conflict<br>
with khash.h from:<br>
<br>
<a href="https://github.com/attractivechaos/klib" rel="noreferrer" target="_blank">https://github.com/attractivechaos/klib</a><br>
(or <a href="https://github.com/clibs/hash" rel="noreferrer" target="_blank">https://github.com/clibs/hash</a>)<br>
<br>
Now personally, if I was writing code that was not intended for eventual<br>
inclusion in PETSc, I would just use upstream khash.h directly. (PETSc<br>
should probably upgrade to the latest upstream khash.h.)<br>
<br>
The PetscHash* wrappers don't add value in my opinion, just consistency<br>
with PETSc style via lots of lines of code that add PetscErrorCode<br>
returns that cannot be anything but 0 because the underlying operations<br>
cannot fail.<br>
</blockquote></div><br>Sweeping generalization not actually true. The wrappers do setup the particular</div><div class="gmail_extra">keys we want inside PETSc, and do bundle some multiple operation calls.</div><div class="gmail_extra"><br></div><div class="gmail_extra"> Matt<br clear="all"><div><br></div>-- <br><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>