This is the mail archive of the gsl-discuss@sourceware.org mailing list for the GSL project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hello, some years ago I provided some patches for serveral pseudo-random number generators. In these patches I focussed on correctness and portability not on performance. For (multiple) linear congruential generators with prime moduls a seedup up to a factor 15 can be gained by switching from a implementation that uses 32-bit arithmetic to 64-bit arithmetic. The source files attached to this mail contain compile time switches, that check if the data type long long is available and choose a 64-bit implementation if appropriate. #if defined(LLONG_MAX) /* 64-bit implemtation */ #else /* 32-bit implemtation */ #endif The macro is only defined if the gcc switch --std=c99 is specified. Instead of checking for LLONG_MAX it would be better to check in the configure skript, if the data type long long is available and to define a HAVE_LONG_LONG macro in config.h. But unfortunately I do not know enough about autotools to integrate such a machnism. My patches contain also some minor (aesthetic) correktions for other generators and for the documenation of random number generators. In particular I updated the performance measurements at the end of the chapter about random number generators. I would be pleased if my patches will find the way into to official gsl source code. sincerely yours Heiko -- -- Wer lügt, hat die Wahrheit immerhin gedacht. -- (Oliver Hassencamp, dt. Schriftsteller, 1921-1987) -- Cluster Computing @ http://www.clustercomputing.de -- Heiko Bauke @ http://www.uni-magdeburg.de/bauke
Attachment:
random_patch.tgz
Description: GNU Unix tar archive
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |