This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Add experimental::sample and experimental::shuffle from N4531
- From: Christophe Lyon <christophe dot lyon at linaro dot org>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org, gcc Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 29 Jun 2018 08:55:44 +0200
- Subject: Re: [PATCH] Add experimental::sample and experimental::shuffle from N4531
- References: <20180625162338.GA15218@redhat.com>
On Mon, 25 Jun 2018 at 18:23, Jonathan Wakely <jwakely@redhat.com> wrote:
>
> The additions to <experimental/random> were added in 2015 but the new
> algorithms in <experimental/algorithm> were not. This adds them.
>
> * include/experimental/algorithm (sample, shuffle): Add new overloads
> using per-thread random number engine.
> * testsuite/experimental/algorithm/sample.cc: Simpify and reduce
> dependencies by using __gnu_test::test_container.
> * testsuite/experimental/algorithm/sample-2.cc: New.
> * testsuite/experimental/algorithm/shuffle.cc: New.
>
> Tested x86_64-linux, committed to trunk.
>
> This would be safe to backport, but nobody has noticed the algos are
> missing or complained, so it doesn't seem very important to backport.
>
>
Hi,
On bare-metal targets (aarch64 and arm + newlib), I've noticed that
the two new tests fail:
PASS: experimental/algorithm/shuffle.cc (test for excess errors)
spawn /aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/utils/bin/qemu-wrapper.sh
./shuffle.exe
terminate called after throwing an instance of 'std::runtime_error'
what(): random_device::random_device(const std::string&)
*** EXIT code 4242
FAIL: experimental/algorithm/shuffle.cc execution test
PASS: experimental/algorithm/sample-2.cc (test for excess errors)
spawn /aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/utils/bin/qemu-wrapper.sh
./sample-2.exe
terminate called after throwing an instance of 'std::runtime_error'
what(): random_device::random_device(const std::string&)
*** EXIT code 4242
FAIL: experimental/algorithm/sample-2.cc execution test
Does this ring a bell?
Thanks,
Christophe