Επεξεργασία

Κοινή χρήση μέσω


tiled_index Class

Provides an index into a tiled_extent object. This class has properties to access elements relative to the local tile origin and relative to the global origin. For more information about tiled spaces, see Using Tiles.

Syntax

template <
    int _Dim0,
    int _Dim1 = 0,
    int _Dim2 = 0
>
class tiled_index : public _Tiled_index_base<3>;

template <
    int _Dim0,
    int _Dim1
>
class tiled_index<_Dim0, _Dim1, 0> : public _Tiled_index_base<2>;

template <
    int _Dim0
>
class tiled_index<_Dim0, 0, 0> : public _Tiled_index_base<1>;

Parameters

_Dim0
The length of the most significant dimension.

_Dim1
The length of the next-to-most significant dimension.

_Dim2
The length of the least significant dimension.

Members

Public Constructors

Name Description
tiled_index Constructor Initializes a new instance of the tile_index class.

Public Methods

Name Description
get_tile_extent Returns an extent object that has the values of the tiled_index template arguments _Dim0, _Dim1, and _Dim2.

Public Constants

Name Description
barrier Constant Stores a tile_barrier object that represents a barrier in the current tile of threads.
global Constant Stores an index object of rank 1, 2, or 3 that represents the global index in a grid object.
local Constant Stores an index object of rank 1, 2, or 3 that represents the relative index in the current tile of a tiled_extent object.
rank Constant Stores the rank of the tiled_index object.
tile Constant Stores an index object of rank 1, 2, or 3 that represents the coordinates of the current tile of a tiled_extent object.
tile_dim0 Constant Stores the length of the most significant dimension.
tile_dim1 Constant Stores the length of the next-to-most significant dimension.
tile_dim2 Constant Stores the length of the least significant dimension.
tile_origin Constant Stores an index object of rank 1, 2, or 3 that represents the global coordinates of the origin of the current tile in a tiled_extent object.

Public Data Members

Name Description
tile_extent Gets an extent object that has the values of the tiled_index template arguments tiled_index template arguments _Dim0, _Dim1, and _Dim2.

Inheritance Hierarchy

_Tiled_index_base

tiled_index

Requirements

Header: amp.h

Namespace: Concurrency

tiled_index Constructor

Initializes a new instance of the tiled_index class.

Syntax

tiled_index(
    const index<rank>& _Global,
    const index<rank>& _Local,
    const index<rank>& _Tile,
    const index<rank>& _Tile_origin,
    const tile_barrier& _Barrier ) restrict(amp,cpu);

tiled_index(
    const tiled_index& _Other ) restrict(amp,cpu);

Parameters

_Global
The global index of the constructed tiled_index.

_Local
The local index of the constructed tiled_index

_Tile
The tile index of the constructed tiled_index

_Tile_origin
The tile origin index of the constructed tiled_index

_Barrier
The tile_barrier object of the constructed tiled_index.

_Other
The tile_index object to be copied to the constructed tiled_index.

Overloads

Name Description
tiled_index(const index<rank>& _Global, const index<rank>& _Local, const index<rank>& _Tile, const index<rank>& _Tile_origin, const tile_barrier& _Barrier restrict(amp,cpu); Initializes a new instance of the tile_index class from the index of the tile in global coordinates and the relative position in the tile in local coordinates. The _Global and _Tile_origin parameters are computed.
tiled_index( const tiled_index& _Other) restrict(amp,cpu); Initializes a new instance of the tile_index class by copying the specified tiled_index object.

get_tile_extent

Returns an extent object that has the values of the tiled_index template arguments _Dim0, _Dim1, and _Dim2.

Syntax

extent<rank> get_tile_extent()restrict(amp,cpu);

Return Value

An extent object that has the values of the tiled_index template arguments _Dim0, _Dim1, and _Dim2.

barrier

Stores a tile_barrier object that represents a barrier in the current tile of threads.

Syntax

const tile_barrier barrier;

global

Stores an index object of rank 1, 2, or 3 that represents the global index of an object.

Syntax

const index<rank> global;

local

Stores an index object of rank 1, 2, or 3 that represents the relative index in the current tile of a tiled_extent object.

Syntax

const index<rank> local;

rank

Stores the rank of the tiled_index object.

Syntax

static const int rank = _Rank;

tile

Stores an index object of rank 1, 2, or 3 that represents the coordinates of the current tile of a tiled_extent object.

Syntax

const index<rank> tile;

tile_dim0

Stores the length of the most significant dimension.

Syntax

static const int tile_dim0 = _Dim0;

tile_dim1

Stores the length of the next-to-most significant dimension.

Syntax

static const int tile_dim1 = _Dim1;

tile_dim2

Stores the length of the least significant dimension.

Syntax

static const int tile_dim2 = _Dim2;

tile_origin

Stores an index object of rank 1, 2, or 3 that represents the global coordinates of the origin of the current tile within a tiled_extent object.

Syntax

const index<rank> tile_origin

tile_extent

Gets an extent object that has the values of the tiled_index template arguments tiled_index template arguments _Dim0, _Dim1, and _Dim2.

Syntax

__declspec(property(get= get_tile_extent)) extent<rank> tile_extent;

See also

Concurrency Namespace (C++ AMP)