STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Friends | List of all members
Concurrency::details::_Array_view_shape< _Rank, _Element_size > Class Template Reference

#include <amp.h>

Inheritance diagram for Concurrency::details::_Array_view_shape< _Rank, _Element_size >:
Concurrency::details::_Array_view_base< _Rank, sizeof(_Value_type)/sizeof(int)> Concurrency::details::_Array_view_base< _Rank, _Element_size > Concurrency::array_view< _Value_type, _Rank > Concurrency::array_view< const _Value_type, _Rank >

Public Member Functions

__declspec(property(get=get_extent)) Concurrency Concurrency::extent< _Rank > get_extent () const __GPU
 The extent of this array or view. More...
 
 ~_Array_view_shape () __GPU
 

Protected Member Functions

int _Base_linear_offset () const __GPU
 
 _Array_view_shape (const _Array_view_shape &_Other) __GPU
 
 _Array_view_shape (const _Array_view_shape &_Other, const Concurrency::index< _Rank > &_Section_origin, const Concurrency::extent< _Rank > &_Section_extent) __GPU
 
 _Array_view_shape (int _Base_linear_offset, const Concurrency::extent< _Rank > &_Array_extent) __GPU
 
 _Array_view_shape (int _Base_linear_offset, const Concurrency::extent< _Rank > &_Array_extent, const Concurrency::index< _Rank > &_Section_origin, const Concurrency::extent< _Rank > &_Section_extent) __GPU
 
_Array_view_shapeoperator= (const _Array_view_shape &_Other) __GPU
 
void _Project0 (int _I, _Array_view_shape< _Rank-1, _Element_size > &_Projected_shape) const __GPU
 
 _Array_view_shape () __GPU
 

Protected Attributes

Concurrency::extent< _Rank > _M_array_extent
 
Concurrency::extent< _Rank > _M_array_multiplier
 
Concurrency::index< _Rank > _M_view_offset
 
int _M_total_linear_offset
 
Concurrency::extent< _Rank > _M_view_extent
 

Private Types

typedef _Array_flatten_helper< _Rank, typename Concurrency::extent< _Rank >::value_type, typename Concurrency::index< _Rank >::value_type > _Flatten_helper
 

Private Member Functions

void _Initialize_multiplier () __GPU
 

Friends

class _Array_view_shape< _Rank+1, _Element_size >
 

Member Typedef Documentation

template<int _Rank, int _Element_size>
typedef _Array_flatten_helper<_Rank, typename Concurrency::extent<_Rank>::value_type, typename Concurrency::index<_Rank>::value_type> Concurrency::details::_Array_view_shape< _Rank, _Element_size >::_Flatten_helper
private

Constructor & Destructor Documentation

template<int _Rank, int _Element_size>
Concurrency::details::_Array_view_shape< _Rank, _Element_size >::~_Array_view_shape ( )
inline
1568 {}
template<int _Rank, int _Element_size>
Concurrency::details::_Array_view_shape< _Rank, _Element_size >::_Array_view_shape ( const _Array_view_shape< _Rank, _Element_size > &  _Other)
inlineprotected
1577  :
1583  {
1584  }
Concurrency::extent< _Rank > _M_array_multiplier
Definition: amp.h:1669
Concurrency::extent< _Rank > _M_view_extent
Definition: amp.h:1672
Concurrency::extent< _Rank > _M_array_extent
Definition: amp.h:1668
int _M_total_linear_offset
Definition: amp.h:1671
Concurrency::index< _Rank > _M_view_offset
Definition: amp.h:1670
template<int _Rank, int _Element_size>
Concurrency::details::_Array_view_shape< _Rank, _Element_size >::_Array_view_shape ( const _Array_view_shape< _Rank, _Element_size > &  _Other,
const Concurrency::index< _Rank > &  _Section_origin,
const Concurrency::extent< _Rank > &  _Section_extent 
)
inlineprotected
1588  :
1591  _M_view_offset(_Other._M_view_offset + _Section_origin),
1592  _M_view_extent(_Section_extent)
1593  {
1594  _Is_valid_section(_Other._M_view_extent, _Section_origin, _Section_extent);
1595 
1597  }
Concurrency::extent< _Rank > _M_array_multiplier
Definition: amp.h:1669
static void _Is_valid_section(const _T2< _Rank > &_Base_extent, const _T1< _Rank > &_Section_origin, const _T2< _Rank > &_Section_extent) __CPU_ONLY
Definition: xxamp.h:1106
int _Base_linear_offset() const __GPU
Definition: amp.h:1571
Concurrency::extent< _Rank > _M_view_extent
Definition: amp.h:1672
Concurrency::extent< _Rank > _M_array_extent
Definition: amp.h:1668
int _M_total_linear_offset
Definition: amp.h:1671
static _T2 func(const _T1 *_Multiplier, const _T2 *_Index) __GPU
Definition: xxamp.h:924
Concurrency::index< _Rank > _M_view_offset
Definition: amp.h:1670
template<int _Rank, int _Element_size>
Concurrency::details::_Array_view_shape< _Rank, _Element_size >::_Array_view_shape ( int  _Base_linear_offset,
const Concurrency::extent< _Rank > &  _Array_extent 
)
inlineprotected
1600  :
1601  _M_array_extent(_Array_extent),
1602  _M_view_offset(index<_Rank>()),
1604  _M_view_extent(_Array_extent)
1605  {
1607  }
int _Base_linear_offset() const __GPU
Definition: amp.h:1571
Concurrency::extent< _Rank > _M_view_extent
Definition: amp.h:1672
void _Initialize_multiplier() __GPU
Definition: amp.h:1660
Concurrency::extent< _Rank > _M_array_extent
Definition: amp.h:1668
int _M_total_linear_offset
Definition: amp.h:1671
Concurrency::index< _Rank > _M_view_offset
Definition: amp.h:1670
template<int _Rank, int _Element_size>
Concurrency::details::_Array_view_shape< _Rank, _Element_size >::_Array_view_shape ( int  _Base_linear_offset,
const Concurrency::extent< _Rank > &  _Array_extent,
const Concurrency::index< _Rank > &  _Section_origin,
const Concurrency::extent< _Rank > &  _Section_extent 
)
inlineprotected
1611  :
1612  _M_array_extent(_Array_extent),
1613  _M_view_offset(_Section_origin),
1615  _M_view_extent(_Section_extent)
1616  {
1617  _Is_valid_section(_Array_extent, _Section_origin, _Section_extent);
1618 
1620  _M_total_linear_offset += (_Element_size * _Flatten_helper::func(_M_array_multiplier._M_base, _M_view_offset._M_base));
1621  }
Concurrency::extent< _Rank > _M_array_multiplier
Definition: amp.h:1669
static void _Is_valid_section(const _T2< _Rank > &_Base_extent, const _T1< _Rank > &_Section_origin, const _T2< _Rank > &_Section_extent) __CPU_ONLY
Definition: xxamp.h:1106
int _Base_linear_offset() const __GPU
Definition: amp.h:1571
Concurrency::extent< _Rank > _M_view_extent
Definition: amp.h:1672
void _Initialize_multiplier() __GPU
Definition: amp.h:1660
Concurrency::extent< _Rank > _M_array_extent
Definition: amp.h:1668
int _M_total_linear_offset
Definition: amp.h:1671
static _T2 func(const _T1 *_Multiplier, const _T2 *_Index) __GPU
Definition: xxamp.h:924
Concurrency::index< _Rank > _M_view_offset
Definition: amp.h:1670
template<int _Rank, int _Element_size>
Concurrency::details::_Array_view_shape< _Rank, _Element_size >::_Array_view_shape ( )
inlineprotected
1655  {
1656  }
Concurrency::extent< _Rank > _M_array_multiplier
Definition: amp.h:1669
Concurrency::extent< _Rank > _M_view_extent
Definition: amp.h:1672
Concurrency::extent< _Rank > _M_array_extent
Definition: amp.h:1668
Concurrency::index< _Rank > _M_view_offset
Definition: amp.h:1670

Member Function Documentation

template<int _Rank, int _Element_size>
int Concurrency::details::_Array_view_shape< _Rank, _Element_size >::_Base_linear_offset ( ) const
inlineprotected
1572  {
1573  return (_M_total_linear_offset - (_Element_size * _Flatten_helper::func(_M_array_multiplier._M_base, _M_view_offset._M_base)));
1574  }
Concurrency::extent< _Rank > _M_array_multiplier
Definition: amp.h:1669
int _M_total_linear_offset
Definition: amp.h:1671
static _T2 func(const _T1 *_Multiplier, const _T2 *_Index) __GPU
Definition: xxamp.h:924
Concurrency::index< _Rank > _M_view_offset
Definition: amp.h:1670
template<int _Rank, int _Element_size>
void Concurrency::details::_Array_view_shape< _Rank, _Element_size >::_Initialize_multiplier ( )
inlineprivate
1661  {
1663  unsigned int _Ext = _M_array_extent[_Rank-1];
1664  details::_Array_init_helper<Concurrency::extent<_Rank>, Concurrency::extent<_Rank>>::func(_Ext, _M_array_multiplier, _M_array_extent);
1665  }
Concurrency::extent< _Rank > _M_array_multiplier
Definition: amp.h:1669
static void _Is_valid_extent(const _T< _Rank > &_Tuple) __CPU_ONLY
Definition: xxamp.h:1195
Concurrency::extent< _Rank > _M_array_extent
Definition: amp.h:1668
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
template<int _Rank, int _Element_size>
void Concurrency::details::_Array_view_shape< _Rank, _Element_size >::_Project0 ( int  _I,
_Array_view_shape< _Rank-1, _Element_size > &  _Projected_shape 
) const
inlineprotected
1634  {
1635  static_assert(_Rank > 1, "Projection is only supported on array_views with a rank of 2 or higher");
1636 
1638 
1639  typedef Concurrency::extent<_Rank-1> _RES_EXT;
1640  typedef Concurrency::extent<_Rank> _SRC_EXT;
1641  typedef Concurrency::index<_Rank-1> _RES_IDX;
1642  typedef Concurrency::index<_Rank> _SRC_IDX;
1644  _Projected_shape._M_array_extent, this->_M_array_extent,
1645  _Projected_shape._M_array_multiplier, this->_M_array_multiplier,
1646  _Projected_shape._M_view_offset, this->_M_view_offset,
1647  _Projected_shape._M_view_extent, this->_M_view_extent);
1648 
1649  _Projected_shape._M_total_linear_offset = _M_total_linear_offset + (_Element_size * _I * _M_array_multiplier[0]);
1650  }
Concurrency::extent< _Rank > _M_array_multiplier
Definition: amp.h:1669
Concurrency::extent< _Rank > _M_view_extent
Definition: amp.h:1672
static void _Is_valid_projection(int _I, const _T1< _Rank > &_Base_extent) __CPU_ONLY
Definition: xxamp.h:1131
static void func(_RES_EXT &_ResArrayExtent, const _SRC_EXT &_SrcArrayExtent, _RES_EXT &_ResArrayMultiplier, const _SRC_EXT &_SrcArrayMultiplier, _RES_IDX &_ResViewOffset, const _SRC_IDX &_SrcViewOffset, _RES_EXT &_ResViewExtent, const _SRC_EXT &_SrcViewExtent) __GPU
Definition: xxamp.h:768
Concurrency::extent< _Rank > _M_array_extent
Definition: amp.h:1668
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
int _M_total_linear_offset
Definition: amp.h:1671
Define an N-dimensional index point; which may also be viewed as a vector based at the origin in N-sp...
Definition: amp.h:53
Concurrency::index< _Rank > _M_view_offset
Definition: amp.h:1670
template<int _Rank, int _Element_size>
__declspec (property(get=get_extent)) Concurrency Concurrency::extent<_Rank> Concurrency::details::_Array_view_shape< _Rank, _Element_size >::get_extent ( ) const
inline

The extent of this array or view.

1564  {
1565  return _M_view_extent;
1566  }
Concurrency::extent< _Rank > _M_view_extent
Definition: amp.h:1672
template<int _Rank, int _Element_size>
_Array_view_shape& Concurrency::details::_Array_view_shape< _Rank, _Element_size >::operator= ( const _Array_view_shape< _Rank, _Element_size > &  _Other)
inlineprotected
1624  {
1627  _M_view_offset = _Other._M_view_offset;
1629  _M_view_extent = _Other._M_view_extent;
1630  return *this;
1631  }
Concurrency::extent< _Rank > _M_array_multiplier
Definition: amp.h:1669
Concurrency::extent< _Rank > _M_view_extent
Definition: amp.h:1672
Concurrency::extent< _Rank > _M_array_extent
Definition: amp.h:1668
int _M_total_linear_offset
Definition: amp.h:1671
Concurrency::index< _Rank > _M_view_offset
Definition: amp.h:1670

Friends And Related Function Documentation

template<int _Rank, int _Element_size>
friend class _Array_view_shape< _Rank+1, _Element_size >
friend

Member Data Documentation

template<int _Rank, int _Element_size>
Concurrency::extent<_Rank> Concurrency::details::_Array_view_shape< _Rank, _Element_size >::_M_array_extent
protected
template<int _Rank, int _Element_size>
Concurrency::extent<_Rank> Concurrency::details::_Array_view_shape< _Rank, _Element_size >::_M_array_multiplier
protected
template<int _Rank, int _Element_size>
int Concurrency::details::_Array_view_shape< _Rank, _Element_size >::_M_total_linear_offset
protected
template<int _Rank, int _Element_size>
Concurrency::extent<_Rank> Concurrency::details::_Array_view_shape< _Rank, _Element_size >::_M_view_extent
protected
template<int _Rank, int _Element_size>
Concurrency::index<_Rank> Concurrency::details::_Array_view_shape< _Rank, _Element_size >::_M_view_offset
protected

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