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

#include <amprt.h>

Public Member Functions

 _Buffer_descriptor () __GPU
 
 _Buffer_descriptor (_In_ void *_Data_ptr, _In_ _Ubiquitous_buffer *_Buffer_ptr, _Access_mode _Curr_cpu_access_mode, _Access_mode _Type_mode) __GPU
 
 ~_Buffer_descriptor () __GPU
 
 _Buffer_descriptor (const _Buffer_descriptor &_Other) __GPU
 
_Buffer_descriptoroperator= (const _Buffer_descriptor &_Other) __GPU
 
_Ret_ _Ubiquitous_buffer_Get_buffer_ptr () const __CPU_ONLY
 
void _Set_buffer_ptr (_In_opt_ _Ubiquitous_buffer *_Buffer_ptr) __CPU_ONLY
 
void _Set_buffer_ptr (_In_opt_ _Ubiquitous_buffer *) __GPU_ONLY
 
bool _Is_array () const
 
_Ret_ _View_key _Get_view_key ()
 
const _View_key _Get_view_key () const
 
_AMPIMP void _Get_CPU_access (_Access_mode _Requested_mode) const
 

Public Attributes

void_M_data_ptr
 
_Access_mode _M_curr_cpu_access_mode
 
_Access_mode _M_type_access_mode
 

Private Attributes

_Ubiquitous_buffer_M_buffer_ptr
 

Friends

_Event _Get_access_async (const _View_key _Key, accelerator_view _Av, _Access_mode _Mode, _Buffer_ptr &_Buf_ptr)
 

Constructor & Destructor Documentation

Concurrency::details::_Buffer_descriptor::_Buffer_descriptor ( )
inline
464  {
465  }
#define NULL
Definition: vcruntime.h:236
_Ubiquitous_buffer * _M_buffer_ptr
Definition: amprt.h:445
Definition: amprt.h:93
_Access_mode _M_curr_cpu_access_mode
Definition: amprt.h:450
_Access_mode _M_type_access_mode
Definition: amprt.h:455
void * _M_data_ptr
Definition: amprt.h:438
Definition: amprt.h:90
Concurrency::details::_Buffer_descriptor::_Buffer_descriptor ( _In_ void _Data_ptr,
_In_ _Ubiquitous_buffer _Buffer_ptr,
_Access_mode  _Curr_cpu_access_mode,
_Access_mode  _Type_mode 
)
inline
469  : _M_data_ptr(_Data_ptr), _M_buffer_ptr(NULL),
470  _M_curr_cpu_access_mode(_Curr_cpu_access_mode), _M_type_access_mode(_Type_mode)
471  {
473  }
details::_Reference_counted_obj_ptr< details::_Buffer > _Buffer_ptr
Definition: amprt.h:308
#define NULL
Definition: vcruntime.h:236
_Ubiquitous_buffer * _M_buffer_ptr
Definition: amprt.h:445
void _Set_buffer_ptr(_In_opt_ _Ubiquitous_buffer *_Buffer_ptr) __CPU_ONLY
Definition: amprt.h:508
_Access_mode _M_curr_cpu_access_mode
Definition: amprt.h:450
_Access_mode _M_type_access_mode
Definition: amprt.h:455
void * _M_data_ptr
Definition: amprt.h:438
Concurrency::details::_Buffer_descriptor::~_Buffer_descriptor ( )
inline
477  {
479  }
#define NULL
Definition: vcruntime.h:236
void _Set_buffer_ptr(_In_opt_ _Ubiquitous_buffer *_Buffer_ptr) __CPU_ONLY
Definition: amprt.h:508
Concurrency::details::_Buffer_descriptor::_Buffer_descriptor ( const _Buffer_descriptor _Other)
inline
485  {
487  }
#define NULL
Definition: vcruntime.h:236
_Ubiquitous_buffer * _M_buffer_ptr
Definition: amprt.h:445
void _Set_buffer_ptr(_In_opt_ _Ubiquitous_buffer *_Buffer_ptr) __CPU_ONLY
Definition: amprt.h:508
_Access_mode _M_curr_cpu_access_mode
Definition: amprt.h:450
_Access_mode _M_type_access_mode
Definition: amprt.h:455
void * _M_data_ptr
Definition: amprt.h:438

Member Function Documentation

_Ret_ _Ubiquitous_buffer* Concurrency::details::_Buffer_descriptor::_Get_buffer_ptr ( ) const
inline
504  {
505  return _M_buffer_ptr;
506  }
_Ubiquitous_buffer * _M_buffer_ptr
Definition: amprt.h:445
_AMPIMP void Concurrency::details::_Buffer_descriptor::_Get_CPU_access ( _Access_mode  _Requested_mode) const
_Ret_ _View_key Concurrency::details::_Buffer_descriptor::_Get_view_key ( )
inline
538  {
539  return this;
540  }
const _View_key Concurrency::details::_Buffer_descriptor::_Get_view_key ( ) const
inline
543  {
544  return ((const _View_key)(this));
545  }
bool Concurrency::details::_Buffer_descriptor::_Is_array ( ) const
inline
533  {
535  }
Definition: amprt.h:93
_Access_mode _M_type_access_mode
Definition: amprt.h:455
void Concurrency::details::_Buffer_descriptor::_Set_buffer_ptr ( _In_opt_ _Ubiquitous_buffer _Buffer_ptr)
inline
509  {
510  if (_M_buffer_ptr != _Buffer_ptr)
511  {
512  if (_M_buffer_ptr != NULL) {
513  reinterpret_cast<_Reference_counter*>(_M_buffer_ptr)->_Remove_reference();
514  }
515 
517 
518  if (_M_buffer_ptr != NULL) {
519  reinterpret_cast<_Reference_counter*>(_M_buffer_ptr)->_Add_reference();
520  }
521  }
522  }
details::_Reference_counted_obj_ptr< details::_Buffer > _Buffer_ptr
Definition: amprt.h:308
#define NULL
Definition: vcruntime.h:236
_Ubiquitous_buffer * _M_buffer_ptr
Definition: amprt.h:445
Definition: type_traits:92
void Concurrency::details::_Buffer_descriptor::_Set_buffer_ptr ( _In_opt_ _Ubiquitous_buffer )
inline
526  {
527  // No need to set the buffer ptr on the GPU
529  }
#define NULL
Definition: vcruntime.h:236
_Ubiquitous_buffer * _M_buffer_ptr
Definition: amprt.h:445
_Buffer_descriptor& Concurrency::details::_Buffer_descriptor::operator= ( const _Buffer_descriptor _Other)
inline
491  {
492  if (this != &_Other)
493  {
494  _M_data_ptr = _Other._M_data_ptr;
498  }
499 
500  return *this;
501  }
_Ubiquitous_buffer * _M_buffer_ptr
Definition: amprt.h:445
void _Set_buffer_ptr(_In_opt_ _Ubiquitous_buffer *_Buffer_ptr) __CPU_ONLY
Definition: amprt.h:508
_Access_mode _M_curr_cpu_access_mode
Definition: amprt.h:450
_Access_mode _M_type_access_mode
Definition: amprt.h:455
void * _M_data_ptr
Definition: amprt.h:438

Friends And Related Function Documentation

_Event _Get_access_async ( const _View_key  _Key,
accelerator_view  _Av,
_Access_mode  _Mode,
_Buffer_ptr _Buf_ptr 
)
friend
3390  {
3391  return _Key->_Get_buffer_ptr()->_Get_access_async(_Key->_Get_view_key(), _Av, _Mode, _Buf_ptr);
3392  }
_Ret_ _View_key _Get_view_key()
Definition: amprt.h:537
_Ret_ _Ubiquitous_buffer * _Get_buffer_ptr() const __CPU_ONLY
Definition: amprt.h:503
friend _Event _Get_access_async(const _View_key _Key, accelerator_view _Av, _Access_mode _Mode, _Buffer_ptr &_Buf_ptr)
Definition: amprt.h:3389

Member Data Documentation

_Ubiquitous_buffer* Concurrency::details::_Buffer_descriptor::_M_buffer_ptr
private
_Access_mode Concurrency::details::_Buffer_descriptor::_M_curr_cpu_access_mode
void* Concurrency::details::_Buffer_descriptor::_M_data_ptr
mutable
_Access_mode Concurrency::details::_Buffer_descriptor::_M_type_access_mode

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