50 static int const kN = 0;
53 static int const kH = 1;
56 static int const kW = 2;
59 static int const kC = 3;
79 Index const &
n()
const {
return this->
at(kN); }
87 Index const &
h()
const {
return this->
at(kH); }
95 Index const &
w()
const {
return this->
at(kW); }
CUTLASS_HOST_DEVICE Index & n()
Returns the batch of the coordinate.
Definition: tensor_coord.h:83
Defines a canonical 4D coordinate used by tensor operations.
Definition: tensor_coord.h:38
Definition: aligned_buffer.h:35
CUTLASS_HOST_DEVICE Tensor4DCoord operator/(Base const &b) const
Element-wise division.
Definition: tensor_coord.h:133
CUTLASS_HOST_DEVICE Coord & operator*=(Coord const &b)
In-place multiplication.
Definition: coord.h:222
A Coord is a coordinate of arbitrary rank into a tensor or matrix.
CUTLASS_HOST_DEVICE Coord< 1 > make_Coord(int _0)
Helper to make a 2-element coordinate.
Definition: coord.h:387
CUTLASS_HOST_DEVICE Coord & operator-=(Coord const &b)
In-place subtraction.
Definition: coord.h:213
CUTLASS_HOST_DEVICE Index & w()
Returns the column of the coordinate.
Definition: tensor_coord.h:99
CUTLASS_HOST_DEVICE Index const & w() const
Returns the column of the coordinate.
Definition: tensor_coord.h:95
int Index
Index type used to store elements.
Definition: coord.h:55
CUTLASS_HOST_DEVICE Tensor4DCoord operator*(Base const &b) const
Element-wise multiplication.
Definition: tensor_coord.h:127
CUTLASS_HOST_DEVICE Tensor4DCoord()
Default ctor.
Definition: tensor_coord.h:67
CUTLASS_HOST_DEVICE Index const & c() const
Returns the channel of the coordinate.
Definition: tensor_coord.h:103
static int const kC
Channels dimension.
Definition: tensor_coord.h:59
CUTLASS_HOST_DEVICE Index & c()
Returns the channel of the coordinate.
Definition: tensor_coord.h:107
#define CUTLASS_HOST_DEVICE
Definition: cutlass.h:89
typename Base::LongIndex LongIndex
LongIndex type.
Definition: tensor_coord.h:47
CUTLASS_HOST_DEVICE Coord & operator/=(Coord const &b)
In-place division.
Definition: coord.h:231
CUTLASS_HOST_DEVICE Tensor4DCoord & operator/=(Base const &b)
In-place division.
Definition: tensor_coord.h:160
CUTLASS_HOST_DEVICE Tensor4DCoord & operator-=(Base const &b)
In-place subtraction.
Definition: tensor_coord.h:146
Statically-sized array specifying Coords within a tensor.
Definition: coord.h:43
CUTLASS_HOST_DEVICE Index const & n() const
Returns the batch of the coordinate.
Definition: tensor_coord.h:79
CUTLASS_HOST_DEVICE Tensor4DCoord(Coord< 4 > const &coord)
Constructs from Coord<4>
Definition: tensor_coord.h:71
CUTLASS_HOST_DEVICE Index & h()
Returns the row of the coordinate.
Definition: tensor_coord.h:91
static int const kN
Batch dimension.
Definition: tensor_coord.h:50
CUTLASS_HOST_DEVICE Tensor4DCoord(Index n, Index h, Index w, Index c)
Helper to construct from N, H, W, and C.
Definition: tensor_coord.h:75
static int const kW
Width dimension.
Definition: tensor_coord.h:56
CUTLASS_HOST_DEVICE Tensor4DCoord & operator+=(Base const &b)
In-place addition.
Definition: tensor_coord.h:139
CUTLASS_HOST_DEVICE Coord & operator+=(Coord const &b)
In-place addition.
Definition: coord.h:204
CUTLASS_HOST_DEVICE Index const & h() const
Returns the row of the coordinate.
Definition: tensor_coord.h:87
int64_t LongIndex
Type used to represent linear offsets.
Definition: coord.h:58
CUTLASS_HOST_DEVICE Tensor4DCoord & operator*=(Base const &b)
In-place multiplication.
Definition: tensor_coord.h:153
CUTLASS_HOST_DEVICE Index & at()
Gets the index of a given Coord element.
Definition: coord.h:255
CUTLASS_HOST_DEVICE Tensor4DCoord operator+(Base const &b) const
Element-wise addition.
Definition: tensor_coord.h:115
Basic include for CUTLASS.
static int const kH
Height dimension.
Definition: tensor_coord.h:53
typename Base::Index Index
Index type.
Definition: tensor_coord.h:44
CUTLASS_HOST_DEVICE Tensor4DCoord operator-(Base const &b) const
Element-wise subtraction.
Definition: tensor_coord.h:121