summaryrefslogtreecommitdiffstats
path: root/libcxx/test/numerics/rand
Commit message (Collapse)AuthorAgeFilesLines
* Move test into test/std subdirectory.Eric Fiselier2014-12-20495-25941/+0
| | | | llvm-svn: 224658
* Mark a bunch of long running tests as 'REQUIRES: long_tests'Jonathan Roelofs2014-12-1136-0/+72
| | | | | | This lets us skip them as UNSUPPORTED on slow systems like QEMU llvm-svn: 224032
* libc++: add NaCl and PNaCl support for std::random_deviceJF Bastien2014-12-011-30/+66
| | | | | | | | | | | | | | | | | Summary: The NaCl sandbox doesn't allow opening files under /dev, but it offers an API which provides the same capabilities. This is the same random device emulation that nacl_io performs for POSIX support, but nacl_io is an optional library so libc++ can't assume that device emulation will be performed. Note that NaCl only supports /dev/urandom, not /dev/random. This patch also cleans up some of the preprocessor #endif, and fixes the test for Win32 (it accepts any token, and would therefore never throw regardless of the token provided). Test Plan: ninja check-libcxx Reviewers: dschuff, mclow.lists, danalbert Subscribers: jfb, cfe-commits Differential Revision: http://reviews.llvm.org/D6442 llvm-svn: 223068
* Fix PR#20843: binomial_distribution<unsigned> is broken. Add test to ensure ↵Marshall Clow2014-09-171-0/+11
| | | | | | that signed and unsigned verstions produce the same sequence. llvm-svn: 217976
* [libc++] Don't return uninitialized data from random_device::operator()David Majnemer2014-06-031-2/+14
| | | | | | | | | | Make sure we appropriately retry calls to read if the return result is less than what we asked for. Additionally, check and handle IO errors: EINTR results in the read operation getting restarted; other errors turn into exceptions. llvm-svn: 210061
* [libc++] random_device fails if open returns zeroDavid Majnemer2014-06-031-0/+11
| | | | | | | | | | | | | random_device::random_device(const string&) wrongly assumes that open can only validly return a file descriptor greater than zero. This results in random_device believing that it didn't successfully open the device causing it to throw in it's constructor, this ends up leaking a file descriptor. The fix is simple, don't error on file descriptors which are zero. llvm-svn: 210060
* Fix a couple of bugs in linear_congruential_engine::seed. Regression test ↵Howard Hinnant2013-05-211-0/+8
| | | | | | added. llvm-svn: 182421
* Marshall Clow found some divide-by-zero warnings with UBSan in rand's ↵Howard Hinnant2013-03-231-25/+65
| | | | | | binomial_distribution test. This eliminates the divide-by-zeros and describes in comments the numerical difficulties the test is having. Each of the problematic tests are exploring edge cases of the distribution. llvm-svn: 177826
* Fix bug in test; found by AddressSanitizerMarshall Clow2013-03-201-1/+1
| | | | llvm-svn: 177464
* Fix bug in test; found by AddressSanitizerMarshall Clow2013-03-181-1/+1
| | | | llvm-svn: 177355
* Zhang Xiongpang: Add definitions for const data members. Fixes ↵Howard Hinnant2012-12-125-0/+60
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=14585. llvm-svn: 170026
* Update <random> with constexpr support. Patch contributed by Jonathan Sauer.Howard Hinnant2012-04-024-12/+20
| | | | llvm-svn: 153896
* Fix test for default constructor of discrete_distribution. This partially ↵Howard Hinnant2012-04-021-6/+3
| | | | | | addresses http://llvm.org/bugs/show_bug.cgi?id=12436. llvm-svn: 153873
* Fixed PR10574: http://llvm.org/bugs/show_bug.cgi?id=10574Howard Hinnant2011-08-1211-17/+26
| | | | llvm-svn: 137522
* Warning suppression in test.Howard Hinnant2011-05-141-2/+0
| | | | llvm-svn: 131344
* Warning suppression in test.Howard Hinnant2011-05-141-2/+0
| | | | llvm-svn: 131343
* Fix bug in Sseq constraints found by Seth CantrellHoward Hinnant2011-04-112-2/+2
| | | | llvm-svn: 129285
* license changeHoward Hinnant2010-11-16495-990/+990
| | | | llvm-svn: 119395
* Changed __config to react to all of clang's currently documented has_feature ↵Howard Hinnant2010-09-047-14/+14
| | | | | | flags, and renamed _LIBCPP_MOVE to _LIBCPP_HAS_NO_RVALUE_REFERENCES to be more consistent with the rest of the libc++'s flags, and with clang's nomenclature. llvm-svn: 113086
* Fixing whitespace problemsHoward Hinnant2010-08-2233-43/+37
| | | | llvm-svn: 111762
* Implemented some adaptor constructors which I had missed.Howard Hinnant2010-05-286-0/+181
| | | | llvm-svn: 104946
* [rand.dist.samp.plinear]. This means we've got a fully tested and ↵Howard Hinnant2010-05-2524-0/+1505
| | | | | | functional <random>! 489 tests over 48 sections are passing. :-) The only thing still on my plate in this area is to back-port some of this technology to random_shuffle/shuffle in <algorithm>. That will involve shuffling header bits around (<random> depepends on <algorithm>), but it won't entail that much development (compared to what has been required for <random>). llvm-svn: 104575
* [rand.dist.samp.pconst] plus some bug fixes in the tests of the other ↵Howard Hinnant2010-05-2055-388/+2221
| | | | | | distributions llvm-svn: 104224
* [rand.dist.samp.discrete]Howard Hinnant2010-05-1924-0/+1326
| | | | llvm-svn: 104103
* [rand.dist.norm.t]Howard Hinnant2010-05-1818-0/+797
| | | | llvm-svn: 104052
* [rand.dist.norm.f]Howard Hinnant2010-05-1818-0/+745
| | | | llvm-svn: 104035
* Better cauchy testsHoward Hinnant2010-05-182-19/+118
| | | | llvm-svn: 104008
* [rand.dist.norm.cauchy]. I'm having trouble testing the output as all ↵Howard Hinnant2010-05-1718-0/+595
| | | | | | statistical properties are undefined. They do not converge upon any one value as the number of samples increases. Suggestions for tests welcome. llvm-svn: 103983
* [rand.dist.norm.lognormal]Howard Hinnant2010-05-1718-0/+1024
| | | | llvm-svn: 103957
* [rand.dist.pois.extreme]Howard Hinnant2010-05-1718-0/+914
| | | | llvm-svn: 103942
* [rand.dist.bern.geo]Howard Hinnant2010-05-1718-0/+941
| | | | llvm-svn: 103937
* [rand.dist.bern.negbin]Howard Hinnant2010-05-1720-4/+965
| | | | llvm-svn: 103916
* Beefed up the tests for all of the distributions to include checks against ↵Howard Hinnant2010-05-1621-294/+2181
| | | | | | the expected skewness and kurtosis llvm-svn: 103910
* [rand.dist.pois.weibull]Howard Hinnant2010-05-1618-0/+727
| | | | llvm-svn: 103891
* [rand.dist.norm.chisq]Howard Hinnant2010-05-1521-0/+743
| | | | llvm-svn: 103888
* Revisited [rand.dist.bern.bin] and [rand.dist.pois.poisson] with better ↵Howard Hinnant2010-05-156-83/+350
| | | | | | algorithms llvm-svn: 103886
* [rand.dist.pois.poisson]Howard Hinnant2010-05-1418-0/+698
| | | | llvm-svn: 103814
* [rand.dist.pois.gamma]Howard Hinnant2010-05-1418-0/+727
| | | | llvm-svn: 103788
* partial [rand.dist.pois.gamma]Howard Hinnant2010-05-131-2/+2
| | | | llvm-svn: 103722
* [rand.dist.norm.normal]Howard Hinnant2010-05-1218-0/+641
| | | | llvm-svn: 103646
* [rand.dist.pois.exp]Howard Hinnant2010-05-1219-2/+621
| | | | llvm-svn: 103621
* tests for [rand.dist.bern.bin]Howard Hinnant2010-05-1218-0/+676
| | | | llvm-svn: 103612
* [rand.dist.bern.bin]. The evaluation function for this binomial ↵Howard Hinnant2010-05-111-1/+1
| | | | | | distribution is hopefully just a placeholder. It is using the simplest and slowest method for computing the distribution and needs to be upgraded. llvm-svn: 103524
* Wiped out some non-ascii characters that snuck into the copyright.Howard Hinnant2010-05-11162-162/+162
| | | | llvm-svn: 103516
* libcxx initial importHoward Hinnant2010-05-11162-0/+7781
llvm-svn: 103490
OpenPOWER on IntegriCloud