Ulrich Drepper
48c7b524c1
Optimize bulk mode for normal_distribution<double> for SSE3.
...
2012-09-26 Ulrich Drepper <drepper@gmail.com>
Optimize bulk mode for normal_distribution<double> for SSE3.
* configure.host: Define cpu_opt_bits_random.
* configure.ac: Substitute CPU_OPT_BITS_RANDOM.
* include/Makefile.am (bits_headers): Add ${bits_host_headers}.
(bits_host_headers): Define.
* include/bits/random.tcc: Move __details::_Power_of_2 to...
* include/bits/random.h: ...here.
* include/std/random: Include <bits/opt_random.h>.
* config/cpu/i486/opt/bits/opt_random.h: New file.
* config/cpu/generic/opt/bits/opt_random.h: New file.
* configure: Regenerated.
* Makefile.in: Regenerated.
* aclocal.m4: Regenerated.
* doc/Makefile.in: Regenerated.
* include/Makefile.in: Regenerated.
* libsupc++/Makefile.in: Regenerated.
* po/Makefile.in: Regenerated.
* python/Makefile.in: Regenerated.
* src/Makefile.in: Regenerated.
* src/c++11/Makefile.in: Regenerated.
* src/c++98/Makefile.in: Regenerated.
* testsuite/Makefile.in: Regenerated.
* config/cpu/generic/opt/ext/opt_random.h: Fix comment.
From-SVN: r191758
2012-09-26 13:10:26 +00:00
Edward Smith-Rowland
21a8ccc02f
Implement the K-distribution as an extension.
...
From-SVN: r191688
2012-09-25 03:26:36 +00:00
François Dumont
55826ab6d1
re PR libstdc++/44436 ([C++0x] Implement emplace* in associative containers)
...
2012-09-24 François Dumont <fdumont@gcc.gnu.org>
PR libstdc++/44436
* include/bits/stl_tree.h
(_Rb_tree<>::_M_insert_): Take _Base_ptr rather than
_Const_Base_ptr.
(_Rb_tree<>::_M_insert_node): New.
(_Rb_tree<>::_M_get_insert_unique_pos): New, search code of
_M_insert_unique method.
(_Rb_tree<>::_M_insert_unique): Use latter.
(_Rb_tree<>::_M_emplace_unique): New, likewise.
(_Rb_tree<>::_M_get_insert_equal_pos): New, search code of
_M_insert_equal method.
(_Rb_tree<>::_M_insert_equal): Use latter.
(_Rb_tree<>::_M_emplace_equal): New, likewise.
(_Rb_tree<>::_M_get_insert_hint_unique_pos): New, search code of
_M_insert_unique_ method.
(_Rb_tree<>::_M_insert_unique_): Use latter.
(_Rb_tree<>::_M_emplace_hint_unique): New, likewise.
(_Rb_tree<>::_M_get_insert_hint_equal_pos): New, search code of
_M_insert_equal_ method.
(_Rb_tree<>::_M_insert_equal_): Use latter.
(_Rb_tree<>::_M_emplace_hint_equal): New, likewise.
(_Rb_tree<>::_M_insert_lower): Remove first _Base_ptr parameter,
useless as always null.
* include/bits/stl_map.h: Include <tuple> in C++11.
(map<>::operator[](const key_type&)): Use
_Rb_tree<>::_M_emplace_hint_unique in C++11.
(map<>::operator[](key_type&&)): Likewise.
(map<>::emplace): New.
(map<>::emplace_hint): New.
* include/bits/stl_multimap.h (multimap<>::emplace): New.
(multimap<>::emplace_hint): New.
* include/bits/stl_set.h (set<>::emplace): New.
(set<>::emplace_hint): New.
* include/bits/stl_multiset.h (multiset<>::emplace): New.
(multiset<>::emplace_hint): New.
* include/debug/map.h (std::__debug::map<>::emplace): New.
(std::__debug::map<>::emplace_hint): New.
* include/debug/multimap.h (std::__debug::multimap<>::emplace):
New.
(std::__debug::multimap<>::emplace_hint): New.
* include/debug/set.h (std::__debug::set<>::emplace): New.
(std::__debug::set<>::emplace_hint): New.
* include/debug/multiset.h (std::__debug::multiset<>::emplace):
New.
(std::__debug::multiset<>::emplace_hint): New.
* include/profile/map.h (std::__profile::map<>::emplace): New.
(std::__profile::map<>::emplace_hint): New.
* include/profile/multimap.h (std::__profile::multimap<>::emplace):
New.
(std::__profile::multimap<>::emplace_hint): New.
* include/profile/set.h (std::__profile::set<>::emplace): New.
(std::__profile::set<>::emplace_hint): New.
* include/profile/multiset.h (std::__profile::multiset<>::emplace):
New.
(std::__profile::multiset<>::emplace_hint): New.
* testsuite/util/testsuite_container_traits.h: Signal that emplace
and emplace_hint are available on std::map, std::multimap,
std::set and std::multiset in C++11.
* testsuite/23_containers/map/operators/2.cc: New.
* testsuite/23_containers/map/modifiers/emplace/1.cc: New.
* testsuite/23_containers/multimap/modifiers/emplace/1.cc: New.
* testsuite/23_containers/set/modifiers/emplace/1.cc: New.
* testsuite/23_containers/multiset/modifiers/emplace/1.cc: New.
From-SVN: r191679
2012-09-24 19:53:36 +00:00
Paolo Carlini
4fd97a6380
revert: stl_algobase.h (max, min): Use conditional operator.
...
2012-09-23 Paolo Carlini <paolo.carlini@oracle.com>
Revert:
2012-09-21 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/stl_algobase.h (max, min): Use conditional operator.
From-SVN: r191652
2012-09-23 19:58:16 +00:00
Uros Bizjak
37f1d5c9f9
re PR libstdc++/54675 (Many libstdc++ testsuite failures in ext/random)
...
PR libstdc++/54675
* include/ext/random: Avoid the badname __alpha (and, for
consistency, __mu, __nu, __sigma and __omega too).
* include/bits/random.tcc: Likewise.
From-SVN: r191650
2012-09-23 13:24:46 +02:00
Edward Smith-Rowland
0c105b723d
Implement the Pareto distribution as an extension.
...
From-SVN: r191612
2012-09-21 12:33:20 +00:00
Paolo Carlini
88a4c78be1
stl_algobase.h (max, min): Use conditional operator.
...
2012-09-21 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/stl_algobase.h (max, min): Use conditional operator.
From-SVN: r191608
2012-09-21 10:48:30 +00:00
Benjamin Kosnik
ac6d1200be
re PR libstdc++/28811 (--with-pic vs static libraries and libstdc++)
...
2012-09-18 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/28811
PR libstdc++/54482
* configure.ac (glibcxx_lt_pic_flag,
glibcxx_compiler_pic_flag,
glibcxx_compiler_shared_flag): New. Use them.
(lt_prog_compiler_pic_CXX): Set via glibcxx_*_flag(s) above.
(pic_mode): Set to default.
(PIC_CXXFLAGS): Remove.
* Makefile.am (PICFLAG, PICFLAG_FOR_TARGET): Remove. Comment.
* libsupc++/Makefile.am: Use glibcxx_ld_pic_flag and
glibcxx_compiler_shared_flag. Comment.
* src/c++11/Makefile.am: Same.
* src/c++98/Makefile.am: Same.
* src/Makefile.am: Use glibcxx_compiler_pic_flag.
* Makefile.in: Regenerated.
* aclocal.m4: Same.
* configure: Same.
* doc/Makefile.in: Same.
* include/Makefile.in: Same.
* libsupc++/Makefile.in: Same.
* po/Makefile.in: Same.
* python/Makefile.in: Same.
* src/Makefile.in: Same.
* src/c++11/Makefile.in: Same.
* src/c++98/Makefile.in: Same.
* testsuite/Makefile.in: Same.
* src/c++11/compatibility-atomic-c++0x.cc: Use
_GLIBCXX_SHARED instead of PIC to designate shared-only
code blocks.
* src/c++11/compatibility-c++0x.cc: Same.
* src/c++11/compatibility-thread-c++0x.cc: Same.
* src/c++98/compatibility-list-2.cc: Same.
* src/c++98/compatibility.cc: : Same.
* testsuite/17_intro/shared_with_static_deps.cc: New.
* doc/xml/manual/build_hacking.xml: Separate configure from
make/build issues, add build details.
From-SVN: r191509
2012-09-20 02:10:22 +00:00
Edward Smith-Rowland
19ece7ec02
Implement the Nakagami statistical distribution as an extension.
...
From-SVN: r191434
2012-09-18 16:14:09 +00:00
Paolo Carlini
ecfce0b850
re PR libstdc++/54612 (Many failures in ext/random testsuite)
...
2012-09-18 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/54612
* include/ext/random.tcc (operator==
(const __gnu_cxx::simd_fast_mersenne_twister_engine<>&,
const __gnu_cxx::simd_fast_mersenne_twister_engine<>&)): Fix
state_size use.
* config/cpu/i486/opt/ext/opt_random.h: Guard with __SSE2__.
From-SVN: r191424
2012-09-18 14:02:20 +00:00
Ulrich Drepper
9bf714c23f
configure.ac: Substitute CPU_OPT_EXT_RANDOM.
...
* configure.ac: Substitute CPU_OPT_EXT_RANDOM.
* configure.host: Define cpu_opt_ext_random to location of the
optimized version of <ext/random>.
* include/Makefile.am (ext_headers): Add ${ext_host_headers}.
(ext_host_headers): Define.
* include/ext/random (simd_fast_mersenne_twister_engine<>
::operator==): Don't define function here.
* include/ext/random.tcc (simd_fast_mersenne_twister_engine): Don't
define code using SSE2 here. Define generic code only if
_GLIBCXX_OPT_HAVE_RANDOM_SFMT_GEN_READ is not defined.
(simd_fast_mersenne_twister_engine<>
::operator==): Define here if
_GLIBCXX_OPT_HAVE_RANDOM_SFMT_OPERATOREQUAL is not defined.
* config/cpu/generic/opt/ext/opt_random.h: New file.
* config/cpu/i486/opt/ext/opt_random.h: New file.
* libsupc++/Makefile.in: Regenerated.
* testsuite/Makefile.in: Regenerated.
* po/Makefile.in: Regenerated.
* configure: Regenerated.
* Makefile.in: Regenerated.
* doc/Makefile.in: Regenerated.
* aclocal.m4: Regenerated.
* python/Makefile.in: Regenerated.
* include/Makefile.in: Regenerated.
* src/c++98/Makefile.in: Regenerated.
* src/c++11/Makefile.in: Regenerated.
* src/Makefile.in: Regenerated.
From-SVN: r191384
2012-09-17 13:02:39 +00:00
Edward Smith-Rowland
f0e1e86d22
Fix a paste-o in ext/random.tcc - declared an Adapted urng that was not used ot needed.
...
From-SVN: r191371
2012-09-17 03:46:40 +00:00
Paolo Carlini
d9d69f64b1
random (rice_distribution<>::operator==): Change inline friend definition to non-template.
...
2012-09-16 Paolo Carlini <paolo.carlini@oracle.com>
* include/ext/random (rice_distribution<>::operator==): Change
inline friend definition to non-template.
* testsuite/ext/random/rice_distribution/requirements/
explicit_instantiation/1.cc: New.
* testsuite/26_numerics/random/normal_mv_distribution: Move...
* testsuite/ext/random/normal_mv_distribution: ... here.
* testsuite/26_numerics/random/simd_fast_mersenne_twister_engine:
Move...
* testsuite/ext/random/simd_fast_mersenne_twister_engine: ... here.
* testsuite/26_numerics/random/beta_distribution: Move...
* testsuite/ext/random/beta_distribution: ... here.
* testsuite/26_numerics/random/rice_distribution: Move...
* testsuite/ext/random/rice_distribution: ... here.
From-SVN: r191367
2012-09-16 22:28:21 +00:00
Edward Smith-Rowland
283126182e
Add the rice distribution as an extension.
...
From-SVN: r191362
2012-09-16 17:36:56 +00:00
Rainer Orth
9520425b6b
Clear hardware capabilities on libstdc++.so with Sun as
...
* acinclude.m4 (GLIBCXX_CHECK_ASSEMBLER_HWCAP): Define.
* configure.ac: Call GLIBCXX_CHECK_ASSEMBLER_HWCAP.
* fragment.am (CONFIG_CXXFLAGS): Add $(HWCAP_FLAGS).
* configure: Regenerate.
* Makefile.in: Regenerate.
* doc/Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* libsupc++/Makefile.in: Regenerate.
* po/Makefile.in: Regenerate.
* python/Makefile.in: Regenerate.
* src/Makefile.in: Regenerate.
* src/c++11/Makefile.in: Regenerate.
* src/c++98/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
From-SVN: r191218
2012-09-12 12:38:15 +00:00
Jonathan Wakely
885e812159
re PR libstdc++/54388 (std::array.at() const results in undefined behaviour)
...
PR libstdc++/54388
* include/std/array (array::at() const): Ensure lvalue result.
* testsuite/23_containers/array/element_access/54388.cc: New.
* testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust
dg-error line numbers.
* testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
Likewise.
From-SVN: r191114
2012-09-09 18:56:51 +01:00
François Dumont
3157879227
re PR libstdc++/54296 (using the object in the map to erase element from the map crashes)
...
2012-09-05 François Dumont <fdumont@gcc.gnu.org>
PR libstdc++/54296
* include/bits/hashtable.h (_M_erase(size_type, __node_base*,
__node_type*)): New.
(erase(const_iterator)): Use latter.
(_M_erase(std::true_type, const key_type&)): New, likewise.
(_M_erase(std::false_type, const key_type&)): New. Find all nodes
matching the key before deallocating them so that the key doesn't
get invalidated.
(erase(const key_type&)): Use the new member functions.
* testsuite/23_containers/unordered_map/erase/54296.cc: New.
* testsuite/23_containers/unordered_multimap/erase/54296.cc: New.
From-SVN: r190991
2012-09-05 19:41:16 +00:00
Ulrich Drepper
ff99de9860
* include/ext/random.tcc (__gnu_cxx:normal_mv_distribution<>)
...
(operator()): Use __generate() function of _M_nd.
From-SVN: r190975
2012-09-05 12:41:17 +00:00
Ulrich Drepper
bf30f22962
random: Add __gnu_cxx:normal_mv_distribution<> class.
...
* include/ext/random: Add __gnu_cxx:normal_mv_distribution<> class.
* include/ext/random.tccAdd out-of-line functions for
__gnu_cxx::normal_mv_distribution<>.
* testsuite/26_numerics/random/normal_mv_distribution/
operators/equal.cc: New file.
* testsuite/26_numerics/random/normal_mv_distribution/
operators/serialize.cc: New file.
* testsuite/26_numerics/random/normal_mv_distribution/
operators/inequal.cc: New file.
* testsuite/26_numerics/random/normal_mv_distribution/
cons/default.cc: New file.
* testsuite/26_numerics/random/normal_mv_distribution/
cons/parms.cc: New file.
* testsuite/26_numerics/random/normal_mv_distribution/
requirements/explicit_instantiation/1.cc: New file.
* testsuite/26_numerics/random/normal_mv_distribution/
requirements/typedefs.cc: New file.
From-SVN: r190960
2012-09-05 04:06:24 +00:00
Ulrich Drepper
d4d348a9fe
random: Add __gnu_cxx::beta_distribution<> class.
...
* libstdc++-v3/include/ext/random: Add __gnu_cxx::beta_distribution<>
class.
* libstdc++-v3/include/ext/random.tcc: Add out-of-line functions for
__gnu_cxx::beta_distribution<>.
* libstdc++-v3/testsuite/26_numerics/random/beta_distribution/
operators/equal.cc: New file.
* libstdc++-v3/testsuite/26_numerics/random/beta_distribution/
operators/serialize.cc: New file.
* libstdc++-v3/testsuite/26_numerics/random/beta_distribution/
operators/inequal.cc: New file.
* libstdc++-v3/testsuite/26_numerics/random/beta_distribution/
cons/parms.cc: New file.
* libstdc++-v3/testsuite/26_numerics/random/beta_distribution/
cons/default.cc: New file.
* libstdc++-v3/testsuite/26_numerics/random/beta_distribution/
requirements/typedefs.cc: New file.
* libstdc++-v3/testsuite/26_numerics/random/beta_distribution/
requirements/explicit_instantiation/1.cc: New file.
From-SVN: r190954
2012-09-04 22:57:09 +00:00
Steven Bosscher
1a044f416a
re PR bootstrap/54453 (r190783 breaks bootstrap on powerpc64-unknown-linux-gnu)
...
PR bootstrap/54453
* include/Makefile.am: Fix regex.
* include/Makefile.in: Regenerate.
From-SVN: r190939
2012-09-04 15:28:39 +00:00
Benjamin Kosnik
3e7e2f128b
PR libstdc++/54005 continued
...
2012-08-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/54005 continued
* include/std/atomic: Use __atomic_lock_free with
* include/bits/atomic_base.h: Same.
From-SVN: r190810
2012-08-30 19:24:58 +00:00
Ulrich Drepper
25270f5e5a
random.h (random_device): Remove 'return' from constructor.
...
* include/bits/random.h (random_device) [GLIBCXX_USE_RANDOM_TR1]:
Remove 'return' from constructor.
From-SVN: r190806
2012-08-30 16:33:09 +00:00
Ulrich Drepper
a8c3f4c972
random.h (random_device): Move implementation to...
...
* include/bits/random.h (random_device): Move implementation to...
* src/c++11/random.cc: ...here. New file.
* config/abi/pre/gnu.ver: Add new version GLIBCXX_3.4.18. Export
std::random_device::* symbols.
* config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Generated.
* src/c++11/Makefile.am (sources): Add random.cc.
* src/c++11/Makefile.in: Regenerated.
From-SVN: r190787
2012-08-29 22:05:41 +00:00
Ulrich Drepper
1860430ab5
Add simd_fast_mersenne_twister_engine class.
...
* include/ext/random: New file.
* include/ext/random.tcc: New file.
* include/Makefile.am (ext_headers): Add random and random.tcc.
* testsuite/26_numerics/random/simd_fast_mersenne_twister_engine/
operators/inequal.cc: New file.
* testsuite/26_numerics/random/simd_fast_mersenne_twister_engine/
operators/equal.cc: New file.
* testsuite/26_numerics/random/simd_fast_mersenne_twister_engine/
operators/serialize.cc: New file.
* testsuite/26_numerics/random/simd_fast_mersenne_twister_engine/
cons/seed2.cc: New file.
* testsuite/26_numerics/random/simd_fast_mersenne_twister_engine/
cons/default.cc: New file.
* testsuite/26_numerics/random/simd_fast_mersenne_twister_engine/
cons/seed_seq.cc: New file.
* testsuite/26_numerics/random/simd_fast_mersenne_twister_engine/
cons/copy.cc: New file.
* testsuite/26_numerics/random/simd_fast_mersenne_twister_engine/
cons/seed1.cc: New file.
From-SVN: r190783
2012-08-29 18:43:08 +00:00
Ulrich Drepper
7b93bdde91
Add interfaces to retrieve random numbers in bulk.
...
* include/bits/random.h (uniform_int_distribution<>): Add __generate
and __generate_impl functions.
(uniform_real_distribution<>): Likewise.
(bernoulli_distribution): Likewise.
(geometric_distribution<>): Likewise.
(negative_binomial_distribution<>): Likewise.
(poisson_distribution<>): Likewise.
(exponential_distribution<>): Likewise.
(normal_distribution<>): Likewise.
(lognormal_distribution<>): Likewise.
(chi_squared_distribution<>): Likewise.
(cauchy_distribution<>): Likewise.
(fisher_f_distribution<>): Likewise.
(student_t_distribution<>): Likewise.
(gamma_distribution<>): Likewise.
(weibull_distribution<>): Likewise.
(extreme_value_distribution<>): Likewise.
(discrete_distribution<>): Likewise.
(piecewise_constant_distribution<>): Likewise.
(piecewise_linear_distribution<>): Likewise.
* include/bits/random.tcc (__detail::_Power_of_2): New function.
(uniform_int_distribution<>::__generate_impl): New function.
(uniform_real_distribution<>::__generate_impl): New function.
(bernoulli_distribution::__generate_impl): New function.
(geometric_distribution<>::__generate_impl): New function.
(negative_binomial_distribution<>::__generate_impl): New function.
(poisson_distribution<>::__generate_impl): New function.
(exponential_distribution<>::__generate_impl): New function.
(normal_distribution<>::__generate_impl): New function.
(lognormal_distribution<>::__generate_impl): New function.
(chi_squared_distribution<>::__generate_impl): New function.
(cauchy_distribution<>::__generate_impl): New function.
(fisher_f_distribution<>::__generate_impl): New function.
(student_t_distribution<>::__generate_impl): New function.
(gamma_distribution<>::__generate_impl): New function.
(weibull_distribution<>::__generate_impl): New function.
(extreme_value_distribution<>::__generate_impl): New function.
(discrete_distribution<>::__generate_impl): New function.
(piecewise_constant_distribution<>::__generate_impl): New function.
(piecewise_linear_distribution<>::__generate_impl): New function.
From-SVN: r190712
2012-08-27 14:13:15 +00:00
Ulrich Drepper
b668e41af6
random.h (mersenne_twister_engine): Don't inline discard here.
...
* include/bits/random.h (mersenne_twister_engine): Don't inline
discard here. New member function _M_gen_rand.
* include/bits/random.tcc (mersenne_twister_engine<>::_M_gen_rand):
New function. Extracted from operator().
(mersenne_twister_engine<>::discard): New implementation which
skips in large steps.
(mersenne_twister_engine<>::operator()): Use _M_gen_rand.
From-SVN: r190711
2012-08-27 12:08:16 +00:00
Marc Glisse
a30e18c147
re PR libstdc++/54376 (incorrect complaint about redefinition)
...
2012-08-26 Marc Glisse <marc.glisse@inria.fr>
Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/54376
* include/bits/random.h (lognormal_distribution<>::operator==,
gamma_distribution<>::operator==,
chi_squared_distribution<>::operator==,
fisher_f_distribution<>::operator==,
student_t_distribution<>::operator==,
binomial_distribution<>::operator==,
negative_binomial_distribution<>::operator==,
poisson_distribution<>::operator==): Change inline friend definition
to non-template.
* testsuite/26_numerics/random/binomial_distribution/requirements/
explicit_instantiation/1.cc: New.
* testsuite/26_numerics/random/cauchy_distribution/requirements/
explicit_instantiation/1.cc: Likewise.
* testsuite/26_numerics/random/chi_squared_distribution/
requirements/explicit_instantiation/1.cc: Likewise.
* testsuite/26_numerics/random/discrete_distribution/requirements/
explicit_instantiation/1.cc: Likewise.
* testsuite/26_numerics/random/exponential_distribution/
requirements/explicit_instantiation/1.cc: Likewise.
* testsuite/26_numerics/random/extreme_value_distribution/
requirements/explicit_instantiation/1.cc: Likewise.
* testsuite/26_numerics/random/fisher_f_distribution/requirements/
explicit_instantiation/1.cc: Likewise.
* testsuite/26_numerics/random/gamma_distribution/requirements/
explicit_instantiation/1.cc: Likewise.
* testsuite/26_numerics/random/geometric_distribution/requirements/
explicit_instantiation/1.cc: Likewise.
* testsuite/26_numerics/random/lognormal_distribution/requirements/
explicit_instantiation/1.cc: Likewise.
* testsuite/26_numerics/random/negative_binomial_distribution/
requirements/explicit_instantiation/1.cc: Likewise.
* testsuite/26_numerics/random/normal_distribution/requirements/
explicit_instantiation/1.cc: Likewise.
* testsuite/26_numerics/random/piecewise_constant_distribution/
requirements/explicit_instantiation/1.cc: Likewise.
* testsuite/26_numerics/random/piecewise_linear_distribution/
requirements/explicit_instantiation/1.cc: Likewise.
* testsuite/26_numerics/random/poisson_distribution/requirements/
explicit_instantiation/1.cc: Likewise.
* testsuite/26_numerics/random/student_t_distribution/requirements/
explicit_instantiation/1.cc: Likewise.
* testsuite/26_numerics/random/uniform_int_distribution/
requirements/explicit_instantiation/1.cc: Likewise.
* testsuite/26_numerics/random/uniform_real_distribution/
requirements/explicit_instantiation/1.cc: Likewise.
* testsuite/26_numerics/random/weibull_distribution/requirements/
explicit_instantiation/1.cc: Likewise.
Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>
From-SVN: r190694
2012-08-26 17:22:43 +00:00
Jonathan Wakely
3dd808fe94
re PR libstdc++/54297 ([C++11] Segmentation fault with std::async and released shared state)
...
PR libstdc++/54297
* src/c++11/future.cc (~_Async_state_common): Move to...
* src/c++11/compatibility-thread-c++0x.cc (~_Async_state_common):
Here.
(_GLIBCXX_ABI_COMPAT_ASYNC): Rename to _GLIBCXX_ASYNC_ABI_COMPAT.
* include/std/future (_GLIBCXX_ABI_COMPAT_ASYNC): Likewise.
From-SVN: r190685
2012-08-26 14:49:44 +01:00
Jonathan Wakely
6d79ba303c
re PR libstdc++/54351 (~unique_ptr() should not set stored pointer to null)
...
PR libstdc++/54351
* include/bits/unique_ptr.h (unique_ptr<T>::~unique_ptr): Do not use
reset().
(unique_ptr<T[]>::~unique_ptr()): Likewise.
* testsuite/20_util/unique_ptr/54351.cc: New.
* testsuite/20_util/unique_ptr/assign/48635_neg.cc: Adjust dg-error
line numbers.
From-SVN: r190676
2012-08-26 01:12:40 +01:00
Jonathan Wakely
277f43d2d0
re PR libstdc++/54297 ([C++11] Segmentation fault with std::async and released shared state)
...
PR libstdc++/54297
* include/std/future (~_Async_state_impl): Join thread before
derived class members are destroyed.
(~_Async_state_common): Only define non-trivial destructor when
included from future.cc for ABI compatibility reasons.
* src/c++11/future.cc (_GLIBCXX_ABI_COMPAT_ASYNC): Define.
* testsuite/30_threads/async/54297.cc: New.
From-SVN: r190672
2012-08-26 00:01:40 +01:00
Jonathan Wakely
05ee55c46b
re PR libstdc++/54248 (Comment in standard library header talks about boost)
...
PR libstdc++/54248
* include/bits/concept_check.h: Replace references to boost
namespace.
From-SVN: r190668
2012-08-25 19:51:53 +01:00
François Dumont
181a5a136f
2012-08-10 François Dumont <fdumont@gcc.gnu.org>
...
Ollie Wild <aaw@google.com>
* include/bits/hashtable.h
(_Hashtable<>_M_insert_multi_node(hash_code, node_type*)): New.
(_Hashtable<>_M_insert(_Args&&, false_type)): Use latter.
(_Hashtable<>::_M_emplace(false_type, _Args&&...)): Likewise.
(_Hashtable<>::_M_insert_bucket): Replace by ...
(_Hashtable<>::_M_insert_unique_node(size_type, hash_code, node_type*)):
... this, new.
(_Hashtable<>::_M_insert(_Args&&, true_type)): Use latter.
(_Hashtable<>::_M_emplace(true_type, _Args&&...)): Likewise.
* include/bits/hashtable_policy.h (_Map_base<>::operator[]): Use
latter, emplace the value_type rather than insert.
* include/std/unordered_map: Include tuple.
* include/std/unordered_set: Likewise.
* testsuite/util/testsuite_counter_type.h: New.
* testsuite/23_containers/unordered_map/operators/2.cc: New.
Co-Authored-By: Ollie Wild <aaw@google.com>
From-SVN: r190355
2012-08-13 19:43:19 +00:00
Marc Glisse
6a9573cc7b
re PR libstdc++/54112 (including complex.h and complex fails in C++03)
...
2012-08-13 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/54112
* include/c_compatibility/complex.h: Undefine complex, always
include system's complex.h if present.
* testsuite/26_numerics/complex/c99.cc: New testcase.
* testsuite/17_intro/headers/c++1998/complex.cc: Likewise.
* doc/xml/manual/numerics.xml: Document it.
From-SVN: r190340
2012-08-13 11:55:00 +00:00
Jonathan Wakely
9ab48d6e6c
acinclude.m4: Update references to final C++11 standard.
...
* acinclude.m4: Update references to final C++11 standard.
* include/bits/shared_ptr.h: Likewise.
* include/bits/shared_ptr_base.h: Likewise.
* include/bits/unique_ptr.h: Likewise.
* include/std/chrono: Likewise.
* include/std/thread: Likewise.
From-SVN: r190271
2012-08-09 23:45:20 +01:00
Benjamin Kosnik
743ca87fe8
re PR libstdc++/54005 (Use __atomic_always_lock_free in libstdc++ is_lock_free instead of __atomic_is_lock_free)
...
2012-08-07 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/54005
* include/std/atomic: Use __atomic_always_lock_free.
* include/bits/atomic_base.h: Same.
From-SVN: r190216
2012-08-07 23:03:55 +00:00
Paolo Carlini
ef859c9d3c
[multiple changes]
...
2012-08-06 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/decimal/mixed-mode-cmp_neg.cc: Add test variable; minor
tweaks.
* testsuite/decimal/unary-arith.cc: Likewise.
* testsuite/decimal/ctor.cc: Likewise.
* testsuite/decimal/conversion-to-integral.cc: Likewise.
* testsuite/decimal/make-decimal.cc: Likewise.
* testsuite/decimal/comparison.cc: Likewise.
* testsuite/decimal/incdec-memfunc.cc: Likewise.
* testsuite/decimal/conversion-to-generic-float.cc: Likewise.
* testsuite/decimal/compound-assignment-memfunc.cc: Likewise.
* testsuite/decimal/cast_neg.cc: Likewise.
* testsuite/decimal/incdec.cc: Likewise.
* testsuite/decimal/mixed-mode-arith_neg.cc: Likewise.
* testsuite/decimal/binary-arith.cc: Likewise.
* testsuite/decimal/conversion-from-float.cc: Likewise.
* testsuite/decimal/conversion-from-integral.cc: Likewise.
* testsuite/decimal/compound-assignment.cc: Likewise.
2012-08-06 Peter Bergner <bergner@vnet.ibm.com>
PR libstdc++/54036
* include/decimal/decimal.h (_DEFINE_DECIMAL_UNARY_OP): Use _Op as
a unary operator.
* testsuite/decimal/pr54036-1.cc: New test.
* testsuite/decimal/pr54036-2.cc: Likewise.
* testsuite/decimal/pr54036-3.cc: Likewise.
From-SVN: r190186
2012-08-06 18:06:42 +00:00
Paolo Carlini
75235f0597
revert: stl_map.h (operator[](key_type&&)): Replace std::make_pair with value_type.
...
2012-08-04 Paolo Carlini <paolo.carlini@oracle.com>
Revert:
2012-08-03 Ollie Wild <aaw@google.com>
Richard Smith <richardsmith@google.com>
* include/bits/stl_map.h (operator[](key_type&&)): Replace
std::make_pair with value_type.
* testsuite/23_containers/map/operators/2.cc: New test.
From-SVN: r190142
2012-08-04 11:44:28 +00:00
François Dumont
4d02a6956b
functions.h (__check_partition_lower_aux): Remove redundant comparison with pivot value.
...
2012-08-03 François Dumont <fdumont@gcc.gnu.org>
* include/debug/functions.h (__check_partition_lower_aux): Remove
redundant comparison with pivot value.
(__check_partition_upper_aux): Likewise.
From-SVN: r190134
2012-08-03 19:34:49 +00:00
Ollie Wild
2222df9f39
stl_map.h (operator[](key_type&&)): Replace std::make_pair with value_type.
...
2012-08-03 Ollie Wild <aaw@google.com>
Richard Smith <richardsmith@google.com>
* include/bits/stl_map.h (operator[](key_type&&)): Replace
std::make_pair with value_type.
* testsuite/23_containers/map/operators/2.cc: New test.
Co-Authored-By: Richard Smith <richardsmith@google.com>
From-SVN: r190128
2012-08-03 15:26:36 +00:00
Jonathan Wakely
6e48db73ed
memory: Include auto_ptr.h later.
...
* include/std/memory: Include auto_ptr.h later.
* include/bits/shared_ptr.h (shared_ptr(auto_ptr<_Up>&&): Remove
definition.
* include/bits/shared_ptr_base.h (__shared_ptr(auto_ptr<_Up>&&):
Likewise.
* include/bits/unique_ptr.h (unique_ptr(auto_ptr<_Up>&&): Likewise.
* include/backward/auto_ptr.h (unique_ptr(auto_ptr<_Up>&&): Define.
(shared_ptr(auto_ptr<_Up>&&, __shared_ptr(auto_ptr<_Up>&&): Likewise.
* include/std/future: Reduce header dependencies.
* testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line
numbers.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Likewise.
* testsuite/20_util/unique_ptr/assign/48635_neg.cc: Likewise.
From-SVN: r190109
2012-08-03 01:27:48 +01:00
François Dumont
62d3d3d431
c++config (_GLIBCXX_END_NAMESPACE_CONTAINER): Fix order of closures.
...
2012-07-30 François Dumont <fdumont@gcc.gnu.org>
* include/bits/c++config (_GLIBCXX_END_NAMESPACE_CONTAINER): Fix
order of closures.
(_GLIBCXX_END_NAMESPACE_ALGO): Likewise.
From-SVN: r189986
2012-07-30 20:08:59 +00:00
François Dumont
78aa145d9e
re PR libstdc++/54075 ([4.7.1] unordered_map insert still slower than 4.6.2)
...
2012-07-29 François Dumont <fdumont@gcc.gnu.org>
PR libstdc++/54075
* include/bits/hashtable_policy.h
(_Prime_rehash_policy::_M_next_bkt): Add a growth factor set to 2
to boost growth in the number of buckets.
* testsuite/performance/23_containers/insert/unordered_set.cc: New.
From-SVN: r189938
2012-07-29 16:44:18 +00:00
François Dumont
2514d7f1ff
re PR libstdc++/54075 ([4.7.1] unordered_map insert still slower than 4.6.2)
...
2012-07-25 François Dumont <fdumont@gcc.gnu.org>
PR libstdc++/54075
* include/bits/hashtable.h
(_Hashtable<>::_Hashtable(_InputIterator, _InputIterator,
size_type, ...): Remove std::max usage to guarantee that hashtable
state is consistent with hash policy state.
(_Hashtable<>::rehash): Likewise. Set _M_prev_resize to 0 to avoid
the hashtable to be shrinking on next insertion.
* testsuite/23_containers/unordered_set/modifiers/reserve.cc: New.
* testsuite/23_containers/unordered_multiset/modifiers/reserve.cc: New.
* testsuite/23_containers/unordered_map/modifiers/reserve.cc: New.
* testsuite/23_containers/unordered_multimap/modifiers/reserve.cc: New.
From-SVN: r189863
2012-07-25 19:32:48 +00:00
Chip Salzenberg
d069a690ee
re PR libstdc++/54025 (atomic<chrono::duration> won't compile: chrono::duration::duration() is not C++11 compliant)
...
2012-07-20 Chip Salzenberg <chip@pobox.com>
Jonathan Wakely <jwakely.gcc@gmail.com>
PR libstdc++/54025
* include/std/chrono (duration<>::duration): Fix per C++11.
* testsuite/20_util/duration/cons/54025.cc: New.
* testsuite/20_util/duration/cons/constexpr.cc: Adjust.
Co-Authored-By: Jonathan Wakely <jwakely.gcc@gmail.com>
From-SVN: r189711
2012-07-20 09:48:57 +00:00
Jonathan Wakely
eb407c3432
re PR libstdc++/53270 (Error when bootstrapping gcc on hppa2.0-unknown-linux-gcc)
...
PR libstdc++/53270
* include/ext/concurrence.h (__mutex, __recursive_mutex, __cond): Use
NSDMI in C++98 mode too.
* include/ext/rope: Add system_header pragma.
(_Refcount_Base, _Rope_RopeRep): Use NSDMI.
(_Rope_RopeRep::~_Rope_RopeRep): Destroy mutex.
From-SVN: r189553
2012-07-16 22:57:18 +01:00
Jonathan Wakely
8db81fb2fe
re PR libstdc++/53978 (Missing static const definitions in <bits/alloc_traits.h>)
...
PR libstdc++/53978
* include/bits/alloc_traits.h (allocator_traits): Define static
constants.
* include/bits/ptr_traits.h (pointer_traits): Likewise.
* include/ext/alloc_traits.h (__allocator_always_compares_equal):
Likewise.
From-SVN: r189547
2012-07-16 21:43:11 +01:00
Paolo Carlini
57cee56a1e
re PR libstdc++/53657 ([C++11] pair(pair&&) move constructor is non-trivial)
...
2012-07-13 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/53657
* include/bits/stl_pair.h (pair<>::pair(pair&&)): Declare defaulted,
per C++11.
* include/bits/stl_map.h (map<>::insert(_Pair&&), map<>::insert
(const_iterator, _Pair&&)): Constrain with std::is_constructible,
per LWG2005.
* include/bits/stl_multimap.h (multimap<>::insert(_Pair&&),
multimap<>::insert(const_iterator, _Pair&&)): Likewise.
* include/bits/hashtable_policy.h (_Insert<>::insert(_Pair&&),
_Insert<>::insert(const_iterator, _Pair&&)): Likewise.
* include/debug/unordered_map: Adjust.
* include/debug/map.h: Likewise.
* include/debug/multimap.h: Likewise.
* include/profile/unordered_map: Likewise.
* include/profile/map.h: Likewise.
* include/profile/multimap.h: Likewise.
From-SVN: r189456
2012-07-13 08:59:58 +00:00
Paolo Carlini
f8b54112b5
re PR libstdc++/53872 ([C++11] ADL bug in std::thread)
...
2012-07-06 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/53872
* include/std/thread (thread::_M_make_routine): Qualify make_shared
to prevent ADL.
* testsuite/30_threads/thread/adl.cc: New.
From-SVN: r189329
2012-07-06 13:55:58 +00:00
Jonathan Wakely
b63d8901d1
* include/std/condition_variable: Update copyright years.
...
From-SVN: r189277
2012-07-05 02:14:35 +01:00