STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Concurrency::_Order_combinable< _Ty, _Sym_fun > Class Template Reference

#include <ppl.h>

Classes

struct  _Bucket
 

Public Member Functions

_Bucket_Construct (_Bucket *_Par=0)
 
 _Order_combinable (const _Sym_fun &_Fun)
 
 ~_Order_combinable ()
 
_Ty _Serial_combine_release ()
 
_Bucket_Unsafe_push_back ()
 

Private Member Functions

_Order_combinableoperator= (const _Order_combinable &other)
 

Private Attributes

const _Sym_fun & _M_fun
 
size_t _M_number
 
_Bucket_M_root
 

Constructor & Destructor Documentation

template<typename _Ty , typename _Sym_fun >
Concurrency::_Order_combinable< _Ty, _Sym_fun >::_Order_combinable ( const _Sym_fun &  _Fun)
inline
3236  : _M_fun(_Fun)
3237  {
3238  _M_root = 0;
3239  _M_number = 0;
3240  }
size_t _M_number
Definition: ppl.h:3225
_Bucket * _M_root
Definition: ppl.h:3226
const _Sym_fun & _M_fun
Definition: ppl.h:3224
template<typename _Ty , typename _Sym_fun >
Concurrency::_Order_combinable< _Ty, _Sym_fun >::~_Order_combinable ( )
inline
3243  {
3244  while (_M_root)
3245  {
3246  _Bucket *_Cur = _M_root;
3247  _M_root = _M_root->_Next;
3248  reinterpret_cast<_Ty &>(_Cur->_Value).~_Ty();
3249  Concurrency::Free(_Cur);
3250  }
3251  }
_Bucket * _M_root
Definition: ppl.h:3226
_Bucket * _Next
Definition: ppl.h:3202
_CRTIMP void __cdecl Free(_Pre_maybenull_ _Post_invalid_ void *_PAllocation)
Releases a block of memory previously allocated by the Alloc method to the Concurrency Runtime Cachin...

Member Function Documentation

template<typename _Ty , typename _Sym_fun >
_Bucket* Concurrency::_Order_combinable< _Ty, _Sym_fun >::_Construct ( _Bucket _Par = 0)
inline
3231  {
3232  _Bucket * _Ret = static_cast<_Bucket *>(Concurrency::Alloc(sizeof(_Bucket)));
3233  return new(_Ret)_Bucket(_Par);
3234  }
_CRTIMP void *__cdecl Alloc(size_t _NumBytes)
Allocates a block of memory of the size specified from the Concurrency Runtime Caching Suballocator...
template<typename _Ty , typename _Sym_fun >
_Ty Concurrency::_Order_combinable< _Ty, _Sym_fun >::_Serial_combine_release ( )
inline
3255  {
3256  _Ty _Ret(reinterpret_cast<_Ty &>(_M_root->_Value));
3257  _Bucket *_Cur = _M_root;
3258  _M_root = _M_root->_Next;
3259 
3260  while (_M_root)
3261  {
3262  reinterpret_cast<_Ty &>(_Cur->_Value).~_Ty();
3263  Concurrency::Free(_Cur);
3264  _Cur = _M_root;
3265  _Ret = _M_fun(reinterpret_cast <_Ty &> (_Cur->_Value), _Ret);
3266  _M_root = _M_root->_Next;
3267  }
3268 
3269  reinterpret_cast<_Ty &>(_Cur->_Value).~_Ty();
3270  Concurrency::Free(_Cur);
3271 
3272  return _Ret;
3273  }
_Bucket * _M_root
Definition: ppl.h:3226
_Bucket * _Next
Definition: ppl.h:3202
_CRTIMP void __cdecl Free(_Pre_maybenull_ _Post_invalid_ void *_PAllocation)
Releases a block of memory previously allocated by the Alloc method to the Concurrency Runtime Cachin...
const _Sym_fun & _M_fun
Definition: ppl.h:3224
char _Value[(sizeof(_Ty)/sizeof(char))]
Definition: ppl.h:3201
template<typename _Ty , typename _Sym_fun >
_Bucket* Concurrency::_Order_combinable< _Ty, _Sym_fun >::_Unsafe_push_back ( )
inline
3277  {
3278  return _M_root = _Construct(_M_root);
3279  }
_Bucket * _M_root
Definition: ppl.h:3226
_Bucket * _Construct(_Bucket *_Par=0)
Definition: ppl.h:3230
template<typename _Ty , typename _Sym_fun >
_Order_combinable& Concurrency::_Order_combinable< _Ty, _Sym_fun >::operator= ( const _Order_combinable< _Ty, _Sym_fun > &  other)
private

Member Data Documentation

template<typename _Ty , typename _Sym_fun >
const _Sym_fun& Concurrency::_Order_combinable< _Ty, _Sym_fun >::_M_fun
private
template<typename _Ty , typename _Sym_fun >
size_t Concurrency::_Order_combinable< _Ty, _Sym_fun >::_M_number
private
template<typename _Ty , typename _Sym_fun >
_Bucket* Concurrency::_Order_combinable< _Ty, _Sym_fun >::_M_root
private

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