diff options
author | Louis Dionne <ldionne@apple.com> | 2019-07-08 16:35:49 +0000 |
---|---|---|
committer | Louis Dionne <ldionne@apple.com> | 2019-07-08 16:35:49 +0000 |
commit | c862ea27b7ac0646e1dafe89a1f275ae7ec2d5e4 (patch) | |
tree | 1fbf351e58c0461de666536fe5cba3a997377304 /pstl | |
parent | 498687bff2b44527960b22fa8f5dffd506d07315 (diff) | |
download | llvm-c862ea27b7ac0646e1dafe89a1f275ae7ec2d5e4.zip llvm-c862ea27b7ac0646e1dafe89a1f275ae7ec2d5e4.tar.gz llvm-c862ea27b7ac0646e1dafe89a1f275ae7ec2d5e4.tar.bz2 |
[NFC][pstl] Remove unused utility code
llvm-svn: 365346
Diffstat (limited to 'pstl')
-rw-r--r-- | pstl/include/pstl/internal/parallel_backend_utils.h | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/pstl/include/pstl/internal/parallel_backend_utils.h b/pstl/include/pstl/internal/parallel_backend_utils.h index ced4963..c94cdc4 100644 --- a/pstl/include/pstl/internal/parallel_backend_utils.h +++ b/pstl/include/pstl/internal/parallel_backend_utils.h @@ -136,90 +136,6 @@ struct __serial_move_merge } }; -template <typename _RandomAccessIterator1, typename _OutputIterator> -void -__init_buf(_RandomAccessIterator1 __xs, _RandomAccessIterator1 __xe, _OutputIterator __zs, bool __bMove) -{ - const _OutputIterator __ze = __zs + (__xe - __xs); - typedef typename std::iterator_traits<_OutputIterator>::value_type _ValueType; - if (__bMove) - { - // Initialize the temporary buffer and move keys to it. - for (; __zs != __ze; ++__xs, ++__zs) - new (&*__zs) _ValueType(std::move(*__xs)); - } - else - { - // Initialize the temporary buffer - for (; __zs != __ze; ++__zs) - new (&*__zs) _ValueType; - } -} - -// TODO is this actually used anywhere? -template <typename _Buf> -class __stack -{ - typedef typename std::iterator_traits<decltype(_Buf(0).get())>::value_type _ValueType; - typedef typename std::iterator_traits<_ValueType*>::difference_type _DifferenceType; - - _Buf _M_buf; - _ValueType* _M_ptr; - _DifferenceType _M_maxsize; - - __stack(const __stack&) = delete; - void - operator=(const __stack&) = delete; - - public: - __stack(_DifferenceType __max_size) : _M_buf(__max_size), _M_maxsize(__max_size) { _M_ptr = _M_buf.get(); } - - ~__stack() - { - assert(size() <= _M_maxsize); - while (!empty()) - pop(); - } - - const _Buf& - buffer() const - { - return _M_buf; - } - size_t - size() const - { - assert(_M_ptr - _M_buf.get() <= _M_maxsize); - assert(_M_ptr - _M_buf.get() >= 0); - return _M_ptr - _M_buf.get(); - } - bool - empty() const - { - assert(_M_ptr >= _M_buf.get()); - return _M_ptr == _M_buf.get(); - } - void - push(const _ValueType& __v) - { - assert(size() < _M_maxsize); - new (_M_ptr) _ValueType(__v); - ++_M_ptr; - } - const _ValueType& - top() const - { - return *(_M_ptr - 1); - } - void - pop() - { - assert(_M_ptr > _M_buf.get()); - --_M_ptr; - (*_M_ptr).~_ValueType(); - } -}; - } // namespace __utils } // namespace __pstl |