On July 23, 2014 4:27:43 PM CEST, Andi Kleen <a...@linux.intel.com> wrote: >> Btw, what will be the way to plug in an alternative hash function? >> That is, there doesn't seem to be a separation of interface >> and implementation in your patch (like with a template or a >base-class >> you inherit from). > >Just change the inchash.h include file. The point was to only >change a single place.
So there will be at most one hash implementation? Maybe use a namespace instead of a hash then? So other places can extend it? Why didn't you replace the tree.c uses BTW? Thanks, Richard. >Inheritance would need changing everything again for the new type >(unless we came up with hash factories that would likely defeat >virtualization and would be over engineering) > >-Andi