diff options
author | Daniel Lemire <lemire@gmail.com> | 2020-10-09 14:09:36 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2020-10-09 14:09:36 +0100 |
commit | 98c37d3bacbb2f8bbbe56ed53a9547d3be01b66b (patch) | |
tree | 072d00b35158c00d6488a97790c217d4bb27b563 /gcc | |
parent | 6ce2cb116af6e0965ff0dd69e7fd1925cf5dc68c (diff) | |
download | gcc-98c37d3bacbb2f8bbbe56ed53a9547d3be01b66b.zip gcc-98c37d3bacbb2f8bbbe56ed53a9547d3be01b66b.tar.gz gcc-98c37d3bacbb2f8bbbe56ed53a9547d3be01b66b.tar.bz2 |
libstdc++: Optimize uniform_int_distribution using Lemire's algorithm
Co-authored-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:
* include/bits/uniform_int_dist.h (uniform_int_distribution::_S_nd):
New member function implementing Lemire's "nearly divisionless"
algorithm.
(uniform_int_distribution::operator()): Use _S_nd when the range
of the URBG is the full width of the result type.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions