HCC
HCC is a single-source, C/C++ compiler for heterogeneous computing. It's optimized with HSA (http://www.hsafoundation.com/).
|
Represents a unique position in N-dimensional space. More...
#include <amp.h>
Public Types | |
typedef int | value_type |
The element type of extent<N>. | |
Public Member Functions | |
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 & | operator= (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... | |
template<int D0, int D1, int D2> | |
extent (const tiled_extent< D0, D1, D2 > &other) | |
extent (int e0) | |
Constructs an extent<N> with the coordinate values provided by . More... | |
template<typename... _Tp> | |
extent (_Tp...__t) | |
Constructs an extent<N> with the coordinate values provided by . 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... | |
template<int D0> | |
tiled_extent< D0 > | tile () const |
Produces a tiled_extent object with the tile extents given by D0, D1, and D2. More... | |
template<int D0, int D1> | |
tiled_extent< D0, D1 > | tile () const |
Produces a tiled_extent object with the tile extents given by D0, D1, and D2. More... | |
template<int D0, int D1, int D2> | |
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... | |
extent & | operator+= (const extent &__r) |
Adds (or subtracts) an object of type extent<N> from this extent to form a new extent. More... | |
extent & | operator-= (const extent &__r) |
Adds (or subtracts) an object of type extent<N> from this extent to form a new extent. More... | |
extent & | operator*= (const extent &__r) |
Adds (or subtracts) an object of type extent<N> from this extent to form a new extent. More... | |
extent & | operator/= (const extent &__r) |
Adds (or subtracts) an object of type extent<N> from this extent to form a new extent. More... | |
extent & | operator%= (const extent &__r) |
Adds (or subtracts) an object of type extent<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... | |
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... | |
extent & | operator+= (int value) |
For a given operator , produces the same effect as (*this) = (*this) value. More... | |
extent & | operator-= (int value) |
For a given operator , produces the same effect as (*this) = (*this) value. More... | |
extent & | operator*= (int value) |
For a given operator , produces the same effect as (*this) = (*this) value. More... | |
extent & | operator/= (int value) |
For a given operator , produces the same effect as (*this) = (*this) value. More... | |
extent & | operator%= (int value) |
For a given operator , produces the same effect as (*this) = (*this) value. More... | |
extent & | operator++ () |
For a given operator , produces the same effect as (*this) = (*this) 1. More... | |
extent | operator++ (int) |
For a given operator , produces the same effect as (*this) = (*this) 1. More... | |
extent & | operator-- () |
For a given operator , produces the same effect as (*this) = (*this) 1. More... | |
extent | operator-- (int) |
For a given operator , produces the same effect as (*this) = (*this) 1. More... | |
Static Public Attributes | |
static const int | rank = N |
A static member of extent<N> that contains the rank of this extent. | |
Friends | |
template<int K, typename Q > | |
struct | Kalmar::index_helper |
template<int K, typename Q1 , typename Q2 > | |
struct | Kalmar::amp_helper |
Represents a unique position in N-dimensional space.
N | The dimension to this extent applies. Special constructors are supplied for the cases where , but N can be any integer greater than or equal to 1. |
|
inline |
Default constructor.
The value at each dimension is initialized to zero. Thus, "extent<3> ix;" initializes the variable to the position (0,0,0).
Referenced by Concurrency::array< T, N >::operator=(), Concurrency::array_view< T, N >::operator=(), and Concurrency::array_view< const T, N >::operator=().
|
inline |
Copy constructor.
Constructs a new extent<N> from the supplied argument.
other | An object of type extent<N> from which to initialize this new extent. |
|
inlineexplicit |
Constructs an extent<N> with the coordinate values provided by .
These are specialized constructors that are only valid when the rank of the extent . Invoking a specialized constructor whose argument will result in a compilation error.
[in] | e0 | The component values of the extent vector. |
|
inlineexplicit |
Constructs an extent<N> with the coordinate values provided by .
These are specialized constructors that are only valid when the rank of the extent . Invoking a specialized constructor whose argument will result in a compilation error.
[in] | e0 | The component values of the extent vector. |
|
inlineexplicit |
Constructs an extent<N> with the coordinate values provided the array of int component values.
If the coordinate array length N, the behavior is undefined. If the array value is NULL or not a valid pointer, the behavior is undefined.
[in] | components | An array of N int values. |
|
inlineexplicit |
Constructs an extent<N> with the coordinate values provided the array of int component values.
If the coordinate array length N, the behavior is undefined. If the array value is NULL or not a valid pointer, the behavior is undefined.
[in] | components | An array of N int values. |
|
inline |
Tests whether the index "idx" is properly contained within this extent (with an assumed origin of zero).
[in] | idx | An object of type index<N> |
|
inline |
Compares two objects of extent<N>.
The expression leftExt rightExt is true if leftExt[i] rightExt[i] for every i from 0 to N-1.
[in] | other | The right-hand extent<N> to be compared. |
|
inline |
Adds (or subtracts) an object of type extent<N> from this extent to form a new extent.
The result extent<N> is such that for a given operator , result[i] = this[i] ext[i]
[in] | ext | The right-hand extent<N> to be added or subtracted. |
|
inline |
For a given operator , produces the same effect as (*this) = (*this) value.
The return value is "*this".
[in] | value | The right-hand int of the arithmetic operation. |
|
inline |
Adds (or subtracts) an object of type extent<N> from this extent to form a new extent.
The result extent<N> is such that for a given operator , result[i] = this[i] ext[i]
[in] | ext | The right-hand extent<N> to be added or subtracted. |
|
inline |
For a given operator , produces the same effect as (*this) = (*this) value.
The return value is "*this".
[in] | value | The right-hand int of the arithmetic operation. |
|
inline |
Adds (or subtracts) an object of type index<N> from this extent to form a new extent.
The result extent<N> is such that for a given operator , result[i] = this[i] idx[i]
[in] | idx | The right-hand index<N> to be added or subtracted. |
|
inline |
For a given operator , produces the same effect as (*this) = (*this) 1.
For prefix increment and decrement, the return value is "*this". Otherwise a new extent<N> is returned.
|
inline |
For a given operator , produces the same effect as (*this) = (*this) 1.
For prefix increment and decrement, the return value is "*this". Otherwise a new extent<N> is returned.
|
inline |
Adds (or subtracts) an object of type extent<N> from this extent to form a new extent.
The result extent<N> is such that for a given operator , result[i] = this[i] ext[i]
[in] | ext | The right-hand extent<N> to be added or subtracted. |
|
inline |
Adds (or subtracts) an object of type index<N> from this extent to form a new extent.
The result extent<N> is such that for a given operator , result[i] = this[i] idx[i]
[in] | idx | The right-hand index<N> to be added or subtracted. |
|
inline |
For a given operator , produces the same effect as (*this) = (*this) value.
The return value is "*this".
[in] | value | The right-hand int of the arithmetic operation. |
|
inline |
Adds (or subtracts) an object of type index<N> from this extent to form a new extent.
The result extent<N> is such that for a given operator , result[i] = this[i] idx[i]
[in] | idx | The right-hand index<N> to be added or subtracted. |
|
inline |
For a given operator , produces the same effect as (*this) = (*this) 1.
For prefix increment and decrement, the return value is "*this". Otherwise a new extent<N> is returned.
|
inline |
For a given operator , produces the same effect as (*this) = (*this) 1.
For prefix increment and decrement, the return value is "*this". Otherwise a new extent<N> is returned.
|
inline |
Adds (or subtracts) an object of type extent<N> from this extent to form a new extent.
The result extent<N> is such that for a given operator , result[i] = this[i] ext[i]
[in] | ext | The right-hand extent<N> to be added or subtracted. |
|
inline |
Adds (or subtracts) an object of type index<N> from this extent to form a new extent.
The result extent<N> is such that for a given operator , result[i] = this[i] idx[i]
[in] | idx | The right-hand index<N> to be added or subtracted. |
|
inline |
For a given operator , produces the same effect as (*this) = (*this) value.
The return value is "*this".
[in] | value | The right-hand int of the arithmetic operation. |
|
inline |
Adds (or subtracts) an object of type extent<N> from this extent to form a new extent.
The result extent<N> is such that for a given operator , result[i] = this[i] ext[i]
[in] | ext | The right-hand extent<N> to be added or subtracted. |
|
inline |
For a given operator , produces the same effect as (*this) = (*this) value.
The return value is "*this".
[in] | value | The right-hand int of the arithmetic operation. |
|
inline |
Assigns the component values of "other" to this extent<N> object.
[in] | other | An object of type extent<N> from which to copy into this extent. |
|
inline |
Compares two objects of extent<N>.
The expression leftExt rightExt is true if leftExt[i] rightExt[i] for every i from 0 to N-1.
[in] | other | The right-hand extent<N> to be compared. |
|
inline |
Returns the extent component value at position c.
[in] | c | The dimension axis whose coordinate is to be accessed. |
|
inline |
Returns the extent component value at position c.
[in] | c | The dimension axis whose coordinate is to be accessed. |
|
inline |
This member function returns the total linear size of this extent<N> (in units of elements), which is computed as: extent[0] * extent[1] ...
Referenced by Concurrency::array< T, N >::array(), Concurrency::array_view< T, N >::array_view(), Concurrency::array_view< const T, N >::array_view(), Concurrency::array< T, N >::operator std::vector< T >(), Concurrency::array< T, N >::reinterpret_as(), Concurrency::array_view< T, N >::reinterpret_as(), Concurrency::array_view< const T, N >::reinterpret_as(), Concurrency::array< T, N >::view_as(), Concurrency::array_view< T, N >::view_as(), and Concurrency::array_view< const T, N >::view_as().
Produces a tiled_extent object with the tile extents given by D0, D1, and D2.
tile<D0,D1,D2>() is only supported on extent<3>. It will produce a compile-time error if used on an extent where N 3. tile<D0,D1>() is only supported on extent<2>. It will produce a compile-time error if used on an extent where N 2. tile<D0>() is only supported on extent<1>. It will produce a compile-time error if used on an extent where N 1.
|
inline |
Produces a tiled_extent object with the tile extents given by D0, D1, and D2.
tile<D0,D1,D2>() is only supported on extent<3>. It will produce a compile-time error if used on an extent where N 3. tile<D0,D1>() is only supported on extent<2>. It will produce a compile-time error if used on an extent where N 2. tile<D0>() is only supported on extent<1>. It will produce a compile-time error if used on an extent where N 1.
|
inline |
Produces a tiled_extent object with the tile extents given by D0, D1, and D2.
tile<D0,D1,D2>() is only supported on extent<3>. It will produce a compile-time error if used on an extent where N 3. tile<D0,D1>() is only supported on extent<2>. It will produce a compile-time error if used on an extent where N 2. tile<D0>() is only supported on extent<1>. It will produce a compile-time error if used on an extent where N 1.