diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-03-22 13:55:11 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-03-22 13:55:11 +0000 |
commit | c2a532e722cf82f70ad82b3e307ee6001f40886a (patch) | |
tree | f34a0200952a36d3f4b25dffbcc22ea2c9d868b7 /libstdc++-v3 | |
parent | 1538bf193ac8d3dfa969dab4d58a7d56aa8c5e5d (diff) | |
download | gcc-c2a532e722cf82f70ad82b3e307ee6001f40886a.tar.gz |
2010-03-22 Paolo Carlini <paolo.carlini@oracle.com>
* include/parallel/base.h (_PseudoSequence): Do not forward declare.
(_VoidFunctor): Remove, unused.
(__median_of_three_iterators): Take __comp by value.
(_PseudoSequenceIterator<>::operator++(int)): Do not const qualify
the return type.
(_PseudoSequenceIterator<>::operator!=): Fix return type to bool.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157628 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 9 | ||||
-rw-r--r-- | libstdc++-v3/include/parallel/base.h | 26 |
2 files changed, 16 insertions, 19 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 59c5a8e17e0..dac1b8ef5cc 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,14 @@ 2010-03-22 Paolo Carlini <paolo.carlini@oracle.com> + * include/parallel/base.h (_PseudoSequence): Do not forward declare. + (_VoidFunctor): Remove, unused. + (__median_of_three_iterators): Take __comp by value. + (_PseudoSequenceIterator<>::operator++(int)): Do not const qualify + the return type. + (_PseudoSequenceIterator<>::operator!=): Fix return type to bool. + +2010-03-22 Paolo Carlini <paolo.carlini@oracle.com> + * include/parallel/base.h (_Less): Use std::less. (_Plus): Likewise use std::plus. (_Multiplies): Likewise use std::multiplies. diff --git a/libstdc++-v3/include/parallel/base.h b/libstdc++-v3/include/parallel/base.h index 6656b2caabb..1a8c3cb60a8 100644 --- a/libstdc++-v3/include/parallel/base.h +++ b/libstdc++-v3/include/parallel/base.h @@ -297,9 +297,6 @@ namespace __gnu_parallel struct _Multiplies<_Tp, _Tp, _Tp> : public std::multiplies<_Tp> { }; - template<typename _Tp, typename _DifferenceTp> - class _PseudoSequence; - /** @brief _Iterator associated with __gnu_parallel::_PseudoSequence. * If features the usual random-access iterator functionality. * @param _Tp Sequence _M_value type. @@ -311,11 +308,6 @@ namespace __gnu_parallel public: typedef _DifferenceTp _DifferenceType; - private: - const _Tp& _M_val; - _DifferenceType _M_pos; - - public: _PseudoSequenceIterator(const _Tp& __val, _DifferenceType __pos) : _M_val(__val), _M_pos(__pos) { } @@ -328,7 +320,7 @@ namespace __gnu_parallel } // Post-increment operator. - const _PseudoSequenceIterator + _PseudoSequenceIterator operator++(int) { return _PseudoSequenceIterator(_M_pos++); } @@ -344,13 +336,17 @@ namespace __gnu_parallel operator==(const _PseudoSequenceIterator& __i2) { return _M_pos == __i2._M_pos; } - _DifferenceType + bool operator!=(const _PseudoSequenceIterator& __i2) { return _M_pos != __i2._M_pos; } _DifferenceType operator-(const _PseudoSequenceIterator& __i2) { return _M_pos - __i2._M_pos; } + + private: + const _Tp& _M_val; + _DifferenceType _M_pos; }; /** @brief Sequence that conceptually consists of multiple copies of @@ -390,14 +386,6 @@ namespace __gnu_parallel _DifferenceType _M_count; }; - /** @brief Functor that does nothing */ - template<typename _ValueTp> - class _VoidFunctor - { - inline void - operator()(const _ValueTp& __v) const { } - }; - /** @brief Compute the median of three referenced elements, according to @c __comp. * @param __a First iterator. @@ -408,7 +396,7 @@ namespace __gnu_parallel template<typename _RAIter, typename _Compare> _RAIter __median_of_three_iterators(_RAIter __a, _RAIter __b, - _RAIter __c, _Compare& __comp) + _RAIter __c, _Compare __comp) { if (__comp(*__a, *__b)) if (__comp(*__b, *__c)) |