HCC
HCC is a single-source, C/C++ compiler for heterogeneous computing. It's optimized with HSA (http://www.hsafoundation.com/).
Public Member Functions | Static Public Attributes | List of all members
Concurrency::tiled_extent< D0, D1, D2 > Class Template Reference

Represents an extent subdivided into 1-, 2-, or 3-dimensional tiles. More...

#include <amp.h>

Inheritance diagram for Concurrency::tiled_extent< D0, D1, D2 >:
Inheritance graph
Collaboration diagram for Concurrency::tiled_extent< D0, D1, D2 >:
Collaboration graph

Public Member Functions

 tiled_extent ()
 Default constructor. More...
 
 tiled_extent (const tiled_extent &other)
 Copy constructor. More...
 
 tiled_extent (const extent< 3 > &ext)
 Constructs a tiled_extent<N> with the extent "ext". More...
 
tiled_extentoperator= (const tiled_extent &other)
 Assigns the component values of "other" to this tiled_extent<N> object. More...
 
tiled_extent pad () const
 Returns a new tiled_extent with the extents adjusted up to be evenly divisible by the tile dimensions. More...
 
tiled_extent truncate () const
 Returns a new tiled_extent with the extents adjusted down to be evenly divisible by the tile dimensions. More...
 
extent< 3 > get_tile_extent () const
 Returns an instance of an extent<N> that captures the values of the tiled_extent template arguments D0, D1, and D2. More...
 
- Public Member Functions inherited from Concurrency::extent< 3 >
 extent ()
 Default constructor. More...
 
 extent (const extent &other)
 Copy constructor. More...
 
 extent (const int components[])
 Constructs an extent<N> with the coordinate values provided the array of int component values. More...
 
 extent (int components[])
 Constructs an extent<N> with the coordinate values provided the array of int component values. More...
 
 extent (const tiled_extent< D0, D1, D2 > &other)
 
extentoperator= (const extent &other)
 Assigns the component values of "other" to this extent<N> object. More...
 
bool contains (const index< N > &idx) const
 Tests whether the index "idx" is properly contained within this extent (with an assumed origin of zero). More...
 
unsigned int size () const
 This member function returns the total linear size of this extent<N> (in units of elements), which is computed as: extent[0] * extent[1] ... More...
 
 extent (int e0)
 Constructs an extent<N> with the coordinate values provided by $e_{0..2}$. More...
 
 extent (_Tp...__t)
 Constructs an extent<N> with the coordinate values provided by $e_{0..2}$. More...
 
int operator[] (unsigned int c) const
 Returns the extent component value at position c. More...
 
int & operator[] (unsigned int c)
 Returns the extent component value at position c. More...
 
tiled_extent< D0 > tile () const
 Produces a tiled_extent object with the tile extents given by D0, D1, and D2. More...
 
tiled_extent< D0, D1 > tile () const
 Produces a tiled_extent object with the tile extents given by D0, D1, and D2. More...
 
tiled_extent< D0, D1, D2 > tile () const
 Produces a tiled_extent object with the tile extents given by D0, D1, and D2. More...
 
bool operator== (const extent &other) const
 Compares two objects of extent<N>. More...
 
bool operator!= (const extent &other) const
 Compares two objects of extent<N>. More...
 
extentoperator+= (const extent &__r)
 Adds (or subtracts) an object of type extent<N> from this extent to form a new extent. More...
 
extentoperator-= (const extent &__r)
 Adds (or subtracts) an object of type extent<N> from this extent to form a new extent. More...
 
extentoperator*= (const extent &__r)
 Adds (or subtracts) an object of type extent<N> from this extent to form a new extent. More...
 
extentoperator/= (const extent &__r)
 Adds (or subtracts) an object of type extent<N> from this extent to form a new extent. More...
 
extentoperator%= (const extent &__r)
 Adds (or subtracts) an object of type extent<N> from this extent to form a new extent. More...
 
extentoperator+= (const index< N > &idx)
 Adds (or subtracts) an object of type index<N> from this extent to form a new extent. More...
 
extentoperator-= (const index< N > &idx)
 Adds (or subtracts) an object of type index<N> from this extent to form a new extent. More...
 
extent operator+ (const index< N > &idx)
 Adds (or subtracts) an object of type index<N> from this extent to form a new extent. More...
 
extent operator- (const index< N > &idx)
 Adds (or subtracts) an object of type index<N> from this extent to form a new extent. More...
 
extentoperator+= (int value)
 For a given operator $\oplus$, produces the same effect as (*this) = (*this) $\oplus$ value. More...
 
extentoperator-= (int value)
 For a given operator $\oplus$, produces the same effect as (*this) = (*this) $\oplus$ value. More...
 
extentoperator*= (int value)
 For a given operator $\oplus$, produces the same effect as (*this) = (*this) $\oplus$ value. More...
 
extentoperator/= (int value)
 For a given operator $\oplus$, produces the same effect as (*this) = (*this) $\oplus$ value. More...
 
extentoperator%= (int value)
 For a given operator $\oplus$, produces the same effect as (*this) = (*this) $\oplus$ value. More...
 
extentoperator++ ()
 For a given operator $\oplus$, produces the same effect as (*this) = (*this) $\oplus$ 1. More...
 
extent operator++ (int)
 For a given operator $\oplus$, produces the same effect as (*this) = (*this) $\oplus$ 1. More...
 
extentoperator-- ()
 For a given operator $\oplus$, produces the same effect as (*this) = (*this) $\oplus$ 1. More...
 
extent operator-- (int)
 For a given operator $\oplus$, produces the same effect as (*this) = (*this) $\oplus$ 1. More...
 

Static Public Attributes

static const int rank = 3
 
static const int tile_dim0 = D0
 These constants allow access to the template arguments of tiled_extent.
 
static const int tile_dim1 = D1
 These constants allow access to the template arguments of tiled_extent.
 
static const int tile_dim2 = D2
 These constants allow access to the template arguments of tiled_extent.
 
- Static Public Attributes inherited from Concurrency::extent< 3 >
static const int rank
 A static member of extent<N> that contains the rank of this extent.
 

Friends

bool operator== (const tiled_extent &lhs, const tiled_extent &rhs)
 Compares two objects of tiled_extent<N>. More...
 
bool operator!= (const tiled_extent &lhs, const tiled_extent &rhs)
 Compares two objects of tiled_extent<N>. More...
 

Additional Inherited Members

- Public Types inherited from Concurrency::extent< 3 >
typedef int value_type
 The element type of extent<N>.
 

Detailed Description

template<int D0, int D1, int D2>
class Concurrency::tiled_extent< D0, D1, D2 >

Represents an extent subdivided into 1-, 2-, or 3-dimensional tiles.

Template Parameters
D0,D1,D2The length of the tile in each specified dimension, where D0 is the most-significant dimension and D2 is the least-significant.

Constructor & Destructor Documentation

template<int D0, int D1, int D2>
Concurrency::tiled_extent< D0, D1, D2 >::tiled_extent ( )
inline

Default constructor.

The origin and extent is default-constructed and thus zero.

template<int D0, int D1, int D2>
Concurrency::tiled_extent< D0, D1, D2 >::tiled_extent ( const tiled_extent< D0, D1, D2 > &  other)
inline

Copy constructor.

Constructs a new tiled_extent from the supplied argument "other".

Parameters
[in]otherAn object of type tiled_extent from which to initialize this new extent.
template<int D0, int D1, int D2>
Concurrency::tiled_extent< D0, D1, D2 >::tiled_extent ( const extent< 3 > &  ext)
inline

Constructs a tiled_extent<N> with the extent "ext".

Notice that this constructor allows implicit conversions from extent<N> to tiled_extent<N>.

Parameters
[in]extThe extent of this tiled_extent

Member Function Documentation

template<int D0, int D1, int D2>
extent<3> Concurrency::tiled_extent< D0, D1, D2 >::get_tile_extent ( ) const

Returns an instance of an extent<N> that captures the values of the tiled_extent template arguments D0, D1, and D2.

For example:

tiled_extent<64,16,4> tg;
extent<3> myTileExtent = tg.tile_extent;
assert(myTileExtent[0] == 64);
assert(myTileExtent[1] == 16);
assert(myTileExtent[2] == 4);
template<int D0, int D1, int D2>
tiled_extent& Concurrency::tiled_extent< D0, D1, D2 >::operator= ( const tiled_extent< D0, D1, D2 > &  other)

Assigns the component values of "other" to this tiled_extent<N> object.

Parameters
[in]otherAn object of type tiled_extent<N> from which to copy into this.
Returns
Returns *this.
template<int D0, int D1, int D2>
tiled_extent Concurrency::tiled_extent< D0, D1, D2 >::pad ( ) const
inline

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

The origin of the new tiled_extent is the same as the origin of this one.

template<int D0, int D1, int D2>
tiled_extent Concurrency::tiled_extent< D0, D1, D2 >::truncate ( ) const
inline

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

The origin of the new tiled_extent is the same as the origin of this one.

Friends And Related Function Documentation

template<int D0, int D1, int D2>
bool operator!= ( const tiled_extent< D0, D1, D2 > &  lhs,
const tiled_extent< D0, D1, D2 > &  rhs 
)
friend

Compares two objects of tiled_extent<N>.

The expression lhs $\oplus$ rhs is true if lhs.extent $\oplus$ rhs.extent and lhs.origin $\oplus$ rhs.origin.

template<int D0, int D1, int D2>
bool operator== ( const tiled_extent< D0, D1, D2 > &  lhs,
const tiled_extent< D0, D1, D2 > &  rhs 
)
friend

Compares two objects of tiled_extent<N>.

The expression lhs $\oplus$ rhs is true if lhs.extent $\oplus$ rhs.extent and lhs.origin $\oplus$ rhs.origin.


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