STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
Concurrency::_Iterator_helper< _Forward_iterator, _Iterator_kind > Class Template Reference

#include <ppl.h>

Public Types

typedef std::iterator_traits< _Forward_iterator >::value_type value_type
 

Public Member Functions

 _Iterator_helper ()
 
size_t _Populate (_Forward_iterator &_First, _Forward_iterator _Last)
 
void _Populate (_Forward_iterator &_First, size_t _Length)
 
void _Store (const value_type &_Elem, size_t _Index) const
 
std::iterator_traits< _Forward_iterator >::reference _Load (size_t _Index) const
 

Static Public Attributes

static const size_t _Size = 1024
 

Private Attributes

std::iterator_traits< _Forward_iterator >::pointer _M_element_array [_Size]
 

Member Typedef Documentation

template<typename _Forward_iterator, typename _Iterator_kind>
typedef std::iterator_traits<_Forward_iterator>::value_type Concurrency::_Iterator_helper< _Forward_iterator, _Iterator_kind >::value_type

Constructor & Destructor Documentation

template<typename _Forward_iterator, typename _Iterator_kind>
Concurrency::_Iterator_helper< _Forward_iterator, _Iterator_kind >::_Iterator_helper ( )
inline
3601  {
3602  static_assert(!std::is_same<_Iterator_kind, std::input_iterator_tag>::value
3603  && !std::is_same<_Iterator_kind, std::output_iterator_tag>::value,
3604  "iterator can not be input_iterator or output_iterator.");
3605  }

Member Function Documentation

template<typename _Forward_iterator, typename _Iterator_kind>
std::iterator_traits<_Forward_iterator>::reference Concurrency::_Iterator_helper< _Forward_iterator, _Iterator_kind >::_Load ( size_t  _Index) const
inline
3635  {
3636  return *(_M_element_array[_Index]);
3637  }
std::iterator_traits< _Forward_iterator >::pointer _M_element_array[_Size]
Definition: ppl.h:3640
template<typename _Forward_iterator, typename _Iterator_kind>
size_t Concurrency::_Iterator_helper< _Forward_iterator, _Iterator_kind >::_Populate ( _Forward_iterator &  _First,
_Forward_iterator  _Last 
)
inline
3608  {
3609  size_t _Length = 0;
3610  static_assert(std::is_lvalue_reference<decltype(*_First)>::value, "lvalue required for forward iterator operator *");
3611 
3612  for (size_t _Index=0; (_Index < _Size) && (_First != _Last); _Index++)
3613  {
3614  // We only support l-value here, so it's safe
3615  _M_element_array[_Length++] = &(*_First++);
3616  }
3617 
3618  return _Length;
3619  }
static const size_t _Size
Definition: ppl.h:3597
std::iterator_traits< _Forward_iterator >::pointer _M_element_array[_Size]
Definition: ppl.h:3640
_FwdIt _Last
Definition: algorithm:1936
template<typename _Forward_iterator, typename _Iterator_kind>
void Concurrency::_Iterator_helper< _Forward_iterator, _Iterator_kind >::_Populate ( _Forward_iterator &  _First,
size_t  _Length 
)
inline
3622  {
3623  for (size_t _Index=0; _Index < _Length; _Index++)
3624  {
3625  _M_element_array[_Index] = &(*_First++);
3626  }
3627  }
std::iterator_traits< _Forward_iterator >::pointer _M_element_array[_Size]
Definition: ppl.h:3640
template<typename _Forward_iterator, typename _Iterator_kind>
void Concurrency::_Iterator_helper< _Forward_iterator, _Iterator_kind >::_Store ( const value_type _Elem,
size_t  _Index 
) const
inline
3630  {
3631  *(_M_element_array[_Index]) = _Elem;
3632  }
std::iterator_traits< _Forward_iterator >::pointer _M_element_array[_Size]
Definition: ppl.h:3640

Member Data Documentation

template<typename _Forward_iterator, typename _Iterator_kind>
std::iterator_traits<_Forward_iterator>::pointer Concurrency::_Iterator_helper< _Forward_iterator, _Iterator_kind >::_M_element_array[_Size]
private
template<typename _Forward_iterator, typename _Iterator_kind>
const size_t Concurrency::_Iterator_helper< _Forward_iterator, _Iterator_kind >::_Size = 1024
static

The documentation for this class was generated from the following file: