STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Attributes | List of all members
Concurrency::tiled_extent< _Dim0, _Dim1, _Dim2 > Class Template Reference

A tiled_extent is an extent of 1 to 3 dimensions which also subdivides the extent space into 1-, 2-, or 3-dimensional tiles. It has three specialized forms: tiled_extent<_Dim0>, tiled_extent<_Dim0,_Dim1>, and tiled_extent<_Dim0,_Dim1,_Dim2>, where _Dim0-2 specify the length of the tile along each dimension, with _Dim0 being the most-significant dimension and _Dim2 being the least-significant. More...

#include <amp.h>

Inheritance diagram for Concurrency::tiled_extent< _Dim0, _Dim1, _Dim2 >:
Concurrency::extent< 3 >

Public Member Functions

 tiled_extent () __GPU
 Default constructor. More...
 
 tiled_extent (const Concurrency::extent< rank > &_Other) __GPU
 Constructs a new tiled_extent from the supplied extent. More...
 
 tiled_extent (const tiled_extent &_Other) __GPU
 Copy constructor. Constructs a new tiled_extent from the supplied argument "_Other". More...
 
tiled_extentoperator= (const tiled_extent &_Other) __GPU
 copy-assignment operator More...
 
__declspec(property(get=get_tile_extent)) Concurrency Concurrency::extent< rankget_tile_extent () const __GPU
 Returns an instance of an extent that captures the values of the tiled_extent template arguments _Dim0, _Dim1, _Dim2. More...
 
tiled_extent pad () const __GPU
 Returns a new tiled_extent with extents adjusted up to be evenly divisible by the tile dimensions. More...
 
tiled_extent truncate () const __GPU
 Returns a new tiled_extent with extents adjusted down to be evenly divisible by the tile dimensions. More...
 
tiled_index< _Dim0, _Dim1, _Dim2 > _map_index (const index< rank > &_Local, const index< rank > &_Tile, const index< rank > &_Global, tile_barrier &_Barrier) const __GPU
 
- Public Member Functions inherited from Concurrency::extent< 3 >
 _CPP_AMP_VERIFY_RANK (_Rank, extent)
 
 extent () __GPU
 Default constructor. The value at each dimension is initialized to zero. More...
 
 extent (const extent< _Rank > &_Other) __GPU
 Copy constructor. Constructs a new extent from the supplied argument _Other. More...
 
 extent (int _I) __GPU
 Constructor for extent<1>. More...
 
 extent (int _I0, int _I1) __GPU
 Constructor for extent<2> More...
 
 extent (int _I0, int _I1, int _I2) __GPU
 Constructor for extent<3> More...
 
 extent (const int _Array[_Rank]) __GPU
 Constructs an extent with the coordinate values provided the array of int component values. If the coordinate array length is not N, the behavior is undefined. More...
 
extent< _Rank > & operator= (const extent< _Rank > &_Other) __GPU
 copy-assignment operator More...
 
int operator[] (unsigned int _Index) const __GPU
 Index operator. More...
 
int & operator[] (unsigned int _Index) __GPU
 Index operators. More...
 
unsigned int size () const __GPU
 Returns the total linear size of this extent (in units of elements). More...
 
bool contains (const index< rank > &_Index) const __GPU
 Tests whether the index "_Index" is properly contained within this extent. More...
 
tiled_extent< _Dim0 > tile () const __GPU
 Produces a tiled_extent object with the tile extents given by _Dim0. More...
 
tiled_extent< _Dim0, _Dim1 > tile () const __GPU
 Produces a tiled_extent object with the tile extents given by _Dim0, _Dim1 More...
 
tiled_extent< _Dim0, _Dim1, _Dim2 > tile () const __GPU
 Produces a tiled_extent object with the tile extents given by _Dim0, _Dim1, _Dim2. More...
 
extent< _Rank > operator+ (const index< _Rank > &_Rhs) const __GPU
 Element-wise addition of this extent with an index. More...
 
extent< _Rank > operator- (const index< _Rank > &_Rhs) const __GPU
 Element-wise subtraction of this extent with an index. More...
 
extent< _Rank > & operator+= (const extent< _Rank > &_Rhs) __GPU
 Element-wise addition of this extent with another extent. More...
 
extent< _Rank > & operator+= (const index< _Rank > &_Rhs) __GPU
 Element-wise addition of this extent with an index. More...
 
extent< _Rank > & operator+= (int _Rhs) __GPU
 Adds an integer value to each element of this extent. More...
 
extent< _Rank > & operator-= (const extent< _Rank > &_Rhs) __GPU
 Element-wise subtraction of this extent with another extent. More...
 
extent< _Rank > & operator-= (const index< _Rank > &_Rhs) __GPU
 Element-wise subtraction of this extent with an index. More...
 
extent< _Rank > & operator-= (int _Rhs) __GPU
 Subtracts an integer value from each element of this extent. More...
 
extent< _Rank > & operator*= (int _Rhs) __GPU
 Multiplies an integer value to each element of this extent. More...
 
extent< _Rank > & operator/= (int _Rhs) __GPU
 Divides an integer value into each element of this extent. More...
 
extent< _Rank > & operator%= (int _Rhs) __GPU
 Modulus an integer value from each element of this extent. More...
 
extent< _Rank > & operator++ () __GPU
 Pre-increments each element of this extent. More...
 
extent< _Rank > operator++ (int) __GPU
 Post-increments each element of this extent. More...
 
extent< _Rank > & operator-- () __GPU
 Pre-decrements each element of this extent. More...
 
extent< _Rank > operator-- (int) __GPU
 Post-decrements each element of this extent. More...
 
index< _Rank > _map_index (const index< _Rank > &_Index) const __GPU
 

Static Public Attributes

static const int tile_dim0 = _Dim0
 These constants allow access to the template arguments of tiled_extent. More...
 
static const int tile_dim1 = _Dim1
 
static const int tile_dim2 = _Dim2
 
- Static Public Attributes inherited from Concurrency::extent< 3 >
static const int rank
 

Additional Inherited Members

- Public Types inherited from Concurrency::extent< 3 >
typedef int value_type
 

Detailed Description

template<int _Dim0, int _Dim1, int _Dim2>
class Concurrency::tiled_extent< _Dim0, _Dim1, _Dim2 >

A tiled_extent is an extent of 1 to 3 dimensions which also subdivides the extent space into 1-, 2-, or 3-dimensional tiles. It has three specialized forms: tiled_extent<_Dim0>, tiled_extent<_Dim0,_Dim1>, and tiled_extent<_Dim0,_Dim1,_Dim2>, where _Dim0-2 specify the length of the tile along each dimension, with _Dim0 being the most-significant dimension and _Dim2 being the least-significant.

Constructor & Destructor Documentation

template<int _Dim0, int _Dim1, int _Dim2>
Concurrency::tiled_extent< _Dim0, _Dim1, _Dim2 >::tiled_extent ( )
inline

Default constructor.

1285 {}
template<int _Dim0, int _Dim1, int _Dim2>
Concurrency::tiled_extent< _Dim0, _Dim1, _Dim2 >::tiled_extent ( const Concurrency::extent< rank > &  _Other)
inline

Constructs a new tiled_extent from the supplied extent.

1290  : Concurrency::extent<rank>(_Other)
1291  {}
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
template<int _Dim0, int _Dim1, int _Dim2>
Concurrency::tiled_extent< _Dim0, _Dim1, _Dim2 >::tiled_extent ( const tiled_extent< _Dim0, _Dim1, _Dim2 > &  _Other)
inline

Copy constructor. Constructs a new tiled_extent from the supplied argument "_Other".

1296  : Concurrency::extent<rank>(_Other)
1297  {}
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383

Member Function Documentation

template<int _Dim0, int _Dim1, int _Dim2>
tiled_index<_Dim0, _Dim1, _Dim2> Concurrency::tiled_extent< _Dim0, _Dim1, _Dim2 >::_map_index ( const index< rank > &  _Local,
const index< rank > &  _Tile,
const index< rank > &  _Global,
tile_barrier _Barrier 
) const
inline
1352  {
1353  index<rank> _Tile_origin = details::_Create_uninitialized_tuple<index<rank>>();
1354  details::_arithmetic_op_loop_helper<index<rank>, details::opMul>::func(_Tile_origin, _Tile, tile_extent);
1355  return tiled_index<_Dim0, _Dim1, _Dim2>(_Global, _Local, _Tile, _Tile_origin, _Barrier);
1356  }
Definition: xxamp.h:242
bool _Local() const _NOEXCEPT
Definition: functional:419
template<int _Dim0, int _Dim1, int _Dim2>
__declspec (property(get=get_tile_extent)) Concurrency Concurrency::extent<rank> Concurrency::tiled_extent< _Dim0, _Dim1, _Dim2 >::get_tile_extent ( ) const
inline

Returns an instance of an extent that captures the values of the tiled_extent template arguments _Dim0, _Dim1, _Dim2.

1314  {
1315  return Concurrency::extent<rank>(_Dim0, _Dim1, _Dim2);
1316  }
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
template<int _Dim0, int _Dim1, int _Dim2>
tiled_extent& Concurrency::tiled_extent< _Dim0, _Dim1, _Dim2 >::operator= ( const tiled_extent< _Dim0, _Dim1, _Dim2 > &  _Other)
inline

copy-assignment operator

1303  {
1305  return *this;
1306  }
extent< _Rank > & operator=(const extent< _Rank > &_Other) __GPU
copy-assignment operator
Definition: amp.h:484
template<int _Dim0, int _Dim1, int _Dim2>
tiled_extent Concurrency::tiled_extent< _Dim0, _Dim1, _Dim2 >::pad ( ) const
inline

Returns a new tiled_extent with extents adjusted up to be evenly divisible by the tile dimensions.

1322  {
1323  Concurrency::extent<rank> _New_extent(((static_cast<unsigned int>((*this)[0]) + _Dim0 - 1)/_Dim0) * _Dim0,
1324  ((static_cast<unsigned int>((*this)[1]) + _Dim1 - 1)/_Dim1) * _Dim1,
1325  ((static_cast<unsigned int>((*this)[2]) + _Dim2 - 1)/_Dim2) * _Dim2);
1326 
1327  return tiled_extent<_Dim0,_Dim1,_Dim2>(_New_extent);
1328  }
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
template<int _Dim0, int _Dim1, int _Dim2>
tiled_extent Concurrency::tiled_extent< _Dim0, _Dim1, _Dim2 >::truncate ( ) const
inline

Returns a new tiled_extent with extents adjusted down to be evenly divisible by the tile dimensions.

1334  {
1335  Concurrency::extent<rank> _New_extent(((*this)[0]/_Dim0) * _Dim0, ((*this)[1]/_Dim1) * _Dim1, ((*this)[2]/_Dim2) * _Dim2);
1336  return tiled_extent<_Dim0,_Dim1,_Dim2>(_New_extent);
1337  }
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383

Member Data Documentation

template<int _Dim0, int _Dim1, int _Dim2>
const int Concurrency::tiled_extent< _Dim0, _Dim1, _Dim2 >::tile_dim0 = _Dim0
static

These constants allow access to the template arguments of tiled_extent.

template<int _Dim0, int _Dim1, int _Dim2>
const int Concurrency::tiled_extent< _Dim0, _Dim1, _Dim2 >::tile_dim1 = _Dim1
static
template<int _Dim0, int _Dim1, int _Dim2>
const int Concurrency::tiled_extent< _Dim0, _Dim1, _Dim2 >::tile_dim2 = _Dim2
static

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