STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Attributes | List of all members
Concurrency::details::_Reference_counter Class Reference

#include <amprt.h>

Inheritance diagram for Concurrency::details::_Reference_counter:
Concurrency::details::_Buffer Concurrency::details::_Sampler Concurrency::details::_Ubiquitous_buffer Concurrency::details::_View_shape Concurrency::details::_Texture

Public Member Functions

 _Reference_counter ()
 
virtual ~_Reference_counter () noexcept(false)
 
size_t _Add_reference ()
 
size_t _Remove_reference ()
 
_AMPIMP void _Release ()
 
size_t _Get_reference_count ()
 

Private Attributes

size_t _M_rc
 

Constructor & Destructor Documentation

Concurrency::details::_Reference_counter::_Reference_counter ( )
inline
126 : _M_rc(0) {}
size_t _M_rc
Definition: amprt.h:162
virtual Concurrency::details::_Reference_counter::~_Reference_counter ( )
inlinevirtualnoexcept
129 {}

Member Function Documentation

size_t Concurrency::details::_Reference_counter::_Add_reference ( )
inline
134  {
135  return InterlockedIncrement(reinterpret_cast<LONG volatile*>(&_M_rc));
136  }
size_t _M_rc
Definition: amprt.h:162
size_t Concurrency::details::_Reference_counter::_Get_reference_count ( )
inline
157  {
158  return _M_rc;
159  }
size_t _M_rc
Definition: amprt.h:162
_AMPIMP void Concurrency::details::_Reference_counter::_Release ( )
size_t Concurrency::details::_Reference_counter::_Remove_reference ( )
inline
141  {
142  _ASSERTE(_M_rc > 0);
143 
144  size_t refCount = InterlockedDecrement(reinterpret_cast<LONG volatile*>(&_M_rc));
145 
146  if (refCount == 0)
147  this->_Release();
148 
149  return refCount;
150  }
size_t _M_rc
Definition: amprt.h:162
#define _ASSERTE(expr)
Definition: crtdbg.h:707

Member Data Documentation

size_t Concurrency::details::_Reference_counter::_M_rc
private

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