[GiNaC-list] [PATCH] fix bug/feature causing non-deterministic output

Valery Yundin yuvalery at gmail.com
Sun May 25 18:48:28 CEST 2014


Hi,

Updated patch, rev 3.
Overloaded gethashseed() in a few classes which I missed before. Also
modified gethashseed() to use "fast" hash for derived classes which do
not overload it and made it independent of mangling scheme for
non-template classes. Removed some debugging output.

IMO "fast" hash can be removed entirely and if classes do not overload
gethashseed() it will be taken care of by typeid. But since it is
relevant only for custom user-defined classes, I don't care much.
I kept it because GiNaC developers seem to have sentimental attachment
to it.

Best,
Valery

PS patch chunks have only 1 context line, because this list has post
limit of 40kB
With best regards, Mr. Valery Yundin.


On 25 May 2014 18:44, Valery Yundin <yuvalery at gmail.com> wrote:
> Hi,
>
> Updated patch, rev 3.
> Overloaded gethashseed() in a few classes which I missed before. Also
> modified gethashseed() to use "fast" hash for derived classes which do
> not overload it and made it independent of mangling scheme for
> non-template classes. Removed some debugging output.
>
> IMO "fast" hash can be removed entirely and if classes do not overload
> gethashseed() it will be taken care of by typeid. But since it is
> relevant only for custom user-defined classes, I don't care much. I
> kept it since GiNaC developers seem to have sentimental attachment to
> it.
>
> Best,
> Valery
-------------- next part --------------
A non-text attachment was scrubbed...
Name: master-Make-hash-values-deterministic-rev3.patch
Type: text/x-patch
Size: 26233 bytes
Desc: not available
URL: <http://www.cebix.net/pipermail/ginac-list/attachments/20140525/9aa7579d/attachment-0001.patch>


More information about the GiNaC-list mailing list