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

Represents an extent subdivided into tiles. More...

#include <hc.hpp>

Inheritance diagram for hc::tiled_extent< 1 >:
Inheritance graph
Collaboration diagram for hc::tiled_extent< 1 >:
Collaboration graph

Public Member Functions

 tiled_extent () __CPU__ __HC__
 Default constructor. More...
 
 tiled_extent (int e0, int t0) __CPU__ __HC__
 Construct an tiled extent with the size of extent and the size of tile specified. More...
 
 tiled_extent (int e0, int t0, int size) __CPU__ __HC__
 Construct an tiled extent with the size of extent and the size of tile specified. More...
 
 tiled_extent (const tiled_extent< 1 > &other) __CPU__ __HC__
 Copy constructor. More...
 
 tiled_extent (const extent< 1 > &ext, int t0) __CPU__ __HC__
 Constructs a tiled_extent<N> with the extent "ext". More...
 
 tiled_extent (const extent< 1 > &ext, int t0, int size) __CPU__ __HC__
 Constructs a tiled_extent<N> with the extent "ext". More...
 
void set_dynamic_group_segment_size (unsigned int size) __CPU__
 Set the size of dynamic group segment. More...
 
unsigned int get_dynamic_group_segment_size () const __CPU__
 Return the size of dynamic group segment in bytes.
 
- Public Member Functions inherited from hc::extent< 1 >
 extent () __CPU__ __HC__
 Default constructor. More...
 
 extent (const extent &other) __CPU__ __HC__
 Copy constructor. More...
 
 extent (const int components[]) __CPU__ __HC__
 Constructs an extent<N> with the coordinate values provided the array of int component values. More...
 
 extent (int components[]) __CPU__ __HC__
 Constructs an extent<N> with the coordinate values provided the array of int component values. More...
 
extentoperator= (const extent &other) __CPU__ __HC__
 Assigns the component values of "other" to this extent<N> object. More...
 
bool contains (const index< N > &idx) const __CPU__ __HC__
 Tests whether the index "idx" is properly contained within this extent (with an assumed origin of zero). More...
 
unsigned int size () const __CPU__ __HC__
 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) __CPU__ __HC__
 Constructs an extent<N> with the coordinate values provided by $e_{0..2}$. More...
 
 extent (_Tp...__t) __CPU__ __HC__
 Constructs an extent<N> with the coordinate values provided by $e_{0..2}$. More...
 
int operator[] (unsigned int c) const __CPU__ __HC__
 Returns the extent component value at position c. More...
 
int & operator[] (unsigned int c) __CPU__ __HC__
 Returns the extent component value at position c. More...
 
tiled_extent< 1 > tile (int t0) const
 Produces a tiled_extent object with the tile extents given by t0, t1, and t2. More...
 
tiled_extent< 2 > tile (int t0, int t1) const
 Produces a tiled_extent object with the tile extents given by t0, t1, and t2. More...
 
tiled_extent< 3 > tile (int t0, int t1, int t2) const
 Produces a tiled_extent object with the tile extents given by t0, t1, and t2. More...
 
tiled_extent< 1 > tile_with_dynamic (int t0, int dynamic_size) const
 Produces a tiled_extent object with the tile extents given by t0, t1, and t2, plus a certain amount of dynamic group segment.
 
tiled_extent< 2 > tile_with_dynamic (int t0, int t1, int dynamic_size) const
 Produces a tiled_extent object with the tile extents given by t0, t1, and t2, plus a certain amount of dynamic group segment.
 
tiled_extent< 3 > tile_with_dynamic (int t0, int t1, int t2, int dynamic_size) const
 Produces a tiled_extent object with the tile extents given by t0, t1, and t2, plus a certain amount of dynamic group segment.
 
bool operator== (const extent &other) const __CPU__ __HC__
 Compares two objects of extent<N>. More...
 
bool operator!= (const extent &other) const __CPU__ __HC__
 Compares two objects of extent<N>. More...
 
extentoperator+= (const extent &__r) __CPU__ __HC__
 Adds (or subtracts) an object of type extent<N> from this extent to form a new extent. More...
 
extentoperator-= (const extent &__r) __CPU__ __HC__
 Adds (or subtracts) an object of type extent<N> from this extent to form a new extent. More...
 
extentoperator*= (const extent &__r) __CPU__ __HC__
 Adds (or subtracts) an object of type extent<N> from this extent to form a new extent. More...
 
extentoperator/= (const extent &__r) __CPU__ __HC__
 Adds (or subtracts) an object of type extent<N> from this extent to form a new extent. More...
 
extentoperator%= (const extent &__r) __CPU__ __HC__
 Adds (or subtracts) an object of type extent<N> from this extent to form a new extent. More...
 
extentoperator+= (const index< N > &idx) __CPU__ __HC__
 Adds (or subtracts) an object of type index<N> from this extent to form a new extent. More...
 
extentoperator-= (const index< N > &idx) __CPU__ __HC__
 Adds (or subtracts) an object of type index<N> from this extent to form a new extent. More...
 
extent operator+ (const index< N > &idx) __CPU__ __HC__
 Adds (or subtracts) an object of type index<N> from this extent to form a new extent. More...
 
extent operator- (const index< N > &idx) __CPU__ __HC__
 Adds (or subtracts) an object of type index<N> from this extent to form a new extent. More...
 
extentoperator+= (int value) __CPU__ __HC__
 For a given operator $\oplus$, produces the same effect as (*this) = (*this) $\oplus$ value. More...
 
extentoperator-= (int value) __CPU__ __HC__
 For a given operator $\oplus$, produces the same effect as (*this) = (*this) $\oplus$ value. More...
 
extentoperator*= (int value) __CPU__ __HC__
 For a given operator $\oplus$, produces the same effect as (*this) = (*this) $\oplus$ value. More...
 
extentoperator/= (int value) __CPU__ __HC__
 For a given operator $\oplus$, produces the same effect as (*this) = (*this) $\oplus$ value. More...
 
extentoperator%= (int value) __CPU__ __HC__
 For a given operator $\oplus$, produces the same effect as (*this) = (*this) $\oplus$ value. More...
 
extentoperator++ () __CPU__ __HC__
 For a given operator $\oplus$, produces the same effect as (*this) = (*this) $\oplus$ 1. More...
 
extent operator++ (int) __CPU__ __HC__
 For a given operator $\oplus$, produces the same effect as (*this) = (*this) $\oplus$ 1. More...
 
extentoperator-- () __CPU__ __HC__
 For a given operator $\oplus$, produces the same effect as (*this) = (*this) $\oplus$ 1. More...
 
extent operator-- (int) __CPU__ __HC__
 For a given operator $\oplus$, produces the same effect as (*this) = (*this) $\oplus$ 1. More...
 

Public Attributes

int tile_dim [1]
 Tile size for each dimension.
 

Static Public Attributes

static const int rank = 1
 
- Static Public Attributes inherited from hc::extent< 1 >
static const int rank
 A static member of extent<N> that contains the rank of this extent.
 

Additional Inherited Members

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

Detailed Description

template<>
class hc::tiled_extent< 1 >

Represents an extent subdivided into tiles.

Tile sizes can be specified at runtime. This class is 1D specialization of tiled_extent.

Constructor & Destructor Documentation

hc::tiled_extent< 1 >::tiled_extent ( )
inline

Default constructor.

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

hc::tiled_extent< 1 >::tiled_extent ( int  e0,
int  t0 
)
inline

Construct an tiled extent with the size of extent and the size of tile specified.

Parameters
[in]e0Size of extent.
[in]t0Size of tile.
hc::tiled_extent< 1 >::tiled_extent ( int  e0,
int  t0,
int  size 
)
inline

Construct an tiled extent with the size of extent and the size of tile specified.

Parameters
[in]e0Size of extent.
[in]t0Size of tile.
[in]sizeSize of dynamic group segment.
hc::tiled_extent< 1 >::tiled_extent ( const tiled_extent< 1 > &  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.
hc::tiled_extent< 1 >::tiled_extent ( const extent< 1 > &  ext,
int  t0 
)
inline

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

Parameters
[in]extThe extent of this tiled_extent
[in]t0Size of tile.
hc::tiled_extent< 1 >::tiled_extent ( const extent< 1 > &  ext,
int  t0,
int  size 
)
inline

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

Parameters
[in]extThe extent of this tiled_extent
[in]t0Size of tile.
[in]sizeSize of dynamic group segment

Member Function Documentation

void hc::tiled_extent< 1 >::set_dynamic_group_segment_size ( unsigned int  size)
inline

Set the size of dynamic group segment.

The function should be called in host code, prior to a kernel is dispatched.

Parameters
[in]sizeThe amount of dynamic group segment needed.

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