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
3061  : _M_fun(_Fun)
3062  {
3063  _M_root = 0;
3064  _M_number = 0;
3065  }
size_t _M_number
Definition: ppl.h:3050
_Bucket * _M_root
Definition: ppl.h:3051
const _Sym_fun & _M_fun
Definition: ppl.h:3049
template<typename _Ty , typename _Sym_fun >
Concurrency::_Order_combinable< _Ty, _Sym_fun >::~_Order_combinable ( )
inline
3068  {
3069  while (_M_root)
3070  {
3071  _Bucket *_Cur = _M_root;
3072  _M_root = _M_root->_Next;
3073  reinterpret_cast<_Ty &>(_Cur->_Value).~_Ty();
3074  ::Concurrency::Free(_Cur);
3075  }
3076  }
_Bucket * _M_root
Definition: ppl.h:3051
_Bucket * _Next
Definition: ppl.h:3027
_CONCRTIMP 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
3056  {
3057  _Bucket * _Ret = static_cast<_Bucket *>(::Concurrency::Alloc(sizeof(_Bucket)));
3058  return new(_Ret)_Bucket(_Par);
3059  }
_CONCRTIMP 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
3080  {
3081  _Ty _Ret(reinterpret_cast<_Ty &>(_M_root->_Value));
3082  _Bucket *_Cur = _M_root;
3083  _M_root = _M_root->_Next;
3084 
3085  while (_M_root)
3086  {
3087  reinterpret_cast<_Ty &>(_Cur->_Value).~_Ty();
3088  ::Concurrency::Free(_Cur);
3089  _Cur = _M_root;
3090  _Ret = _M_fun(reinterpret_cast <_Ty &> (_Cur->_Value), _Ret);
3091  _M_root = _M_root->_Next;
3092  }
3093 
3094  reinterpret_cast<_Ty &>(_Cur->_Value).~_Ty();
3095  ::Concurrency::Free(_Cur);
3096 
3097  return _Ret;
3098  }
_Bucket * _M_root
Definition: ppl.h:3051
_Bucket * _Next
Definition: ppl.h:3027
_CONCRTIMP 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:3049
char _Value[(sizeof(_Ty)/sizeof(char))]
Definition: ppl.h:3026
template<typename _Ty , typename _Sym_fun >
_Bucket* Concurrency::_Order_combinable< _Ty, _Sym_fun >::_Unsafe_push_back ( )
inline
3102  {
3103  return _M_root = _Construct(_M_root);
3104  }
_Bucket * _M_root
Definition: ppl.h:3051
_Bucket * _Construct(_Bucket *_Par=0)
Definition: ppl.h:3055
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: