Cutlass
CUDA Templates for Linear Algebra Subroutines and Solvers
Public Types | Public Member Functions | Static Public Attributes | List of all members
cutlass::TileCoord< Index_ > Struct Template Reference

#include <tile_coord.h>

Inheritance diagram for cutlass::TileCoord< Index_ >:
cutlass::Coord< 4, Index_ >

Public Types

typedef Index_ Index
 Index type. More...
 
typedef Coord< 4, IndexBase
 Underlying Coord<4> More...
 
- Public Types inherited from cutlass::Coord< 4, Index_ >
typedef Index_ Index
 Index type used to store elements. More...
 

Public Member Functions

CUTLASS_HOST_DEVICE TileCoord ()
 Default ctor. More...
 
CUTLASS_HOST_DEVICE TileCoord (Coord< 3, Index > const &coord)
 Constructs from Coord<3> and infers coord[kC] = 0. More...
 
CUTLASS_HOST_DEVICE TileCoord (Coord< 4, Index > const &coord)
 Constructs from Coord<4> More...
 
CUTLASS_HOST_DEVICE TileCoord (Index coord[4])
 Constructs from an array of coordinate elements. More...
 
CUTLASS_HOST_DEVICE TileCoord (Index d, Index h, Index w, Index c)
 Helper to construct from a row and column. More...
 
CUTLASS_HOST_DEVICE Index const & d () const
 Returns the D element of the coordinate. More...
 
CUTLASS_HOST_DEVICE Indexd ()
 Returns the D element of the coordinate. More...
 
CUTLASS_HOST_DEVICE Index const & h () const
 Returns the H element of the coordinate. More...
 
CUTLASS_HOST_DEVICE Indexh ()
 Returns the H element of the coordinate. More...
 
CUTLASS_HOST_DEVICE Index const & w () const
 Returns the W element of the coordinate. More...
 
CUTLASS_HOST_DEVICE Indexw ()
 Returns the W element of the coordinate. More...
 
CUTLASS_HOST_DEVICE Index const & c () const
 Returns the Celement of the coordinate. More...
 
CUTLASS_HOST_DEVICE Indexc ()
 Returns the C element of the coordinate. More...
 
CUTLASS_HOST_DEVICE Coord< 2 > hw () const
 Gets H and W dimensions as a Coord<2> More...
 
CUTLASS_HOST_DEVICE Coord< 3 > hwc () const
 Gets H, W, and C dimensions as a Coord<3> More...
 
CUTLASS_HOST_DEVICE Coord< 3 > dhw () const
 Gets D, H, and W dimensions as a Coord<3> More...
 
CUTLASS_HOST_DEVICE TileCoord operator+ (Base const &b) const
 Element-wise addition. More...
 
CUTLASS_HOST_DEVICE TileCoord operator- (Base const &b) const
 Element-wise subtraction. More...
 
CUTLASS_HOST_DEVICE TileCoord operator* (Base const &b) const
 Element-wise multiplication. More...
 
CUTLASS_HOST_DEVICE TileCoord operator/ (Base const &b) const
 Element-wise division. More...
 
CUTLASS_HOST_DEVICE TileCoordoperator+= (Base const &b)
 In-place addition. More...
 
CUTLASS_HOST_DEVICE TileCoordoperator-= (Base const &b)
 In-place subtraction. More...
 
CUTLASS_HOST_DEVICE TileCoordoperator*= (Base const &b)
 In-place multiplication. More...
 
CUTLASS_HOST_DEVICE TileCoordoperator/= (Base const &b)
 In-place division. More...
 
- Public Member Functions inherited from cutlass::Coord< 4, Index_ >
CUTLASS_HOST_DEVICE Coord (Index value=0)
 Default ctor initializes uniformly. More...
 
CUTLASS_HOST_DEVICE Coord (Index _idx[])
 Constructs from an array of integers. More...
 
CUTLASS_HOST_DEVICE Coord (Coord< kRank > const &coord)
 Constructs from an array of integers. More...
 
CUTLASS_HOST_DEVICE Coord< Slice > slice (int start=0, Index identity=0) const
 
CUTLASS_HOST_DEVICE operator bool () const
 Returns true if Coord is non-zero. More...
 
CUTLASS_HOST_DEVICE bool operator! () const
 Returns true if Coord is uniformly zero. More...
 
CUTLASS_HOST_DEVICE Coord operator+ (Coord const &b) const
 Element-wise addition. More...
 
CUTLASS_HOST_DEVICE Coord operator- (Coord const &b) const
 Element-wise subtraction. More...
 
CUTLASS_HOST_DEVICE Coord operator* (Coord const &b) const
 Element-wise multiplication. More...
 
CUTLASS_HOST_DEVICE Coord operator/ (Coord const &b) const
 Element-wise division. More...
 
CUTLASS_HOST_DEVICE Coordoperator+= (Coord const &b)
 In-place addition. More...
 
CUTLASS_HOST_DEVICE Coordoperator-= (Coord const &b)
 In-place subtraction. More...
 
CUTLASS_HOST_DEVICE Coordoperator*= (Coord const &b)
 In-place multiplication. More...
 
CUTLASS_HOST_DEVICE Coordoperator/= (Coord const &b)
 In-place division. More...
 
CUTLASS_HOST_DEVICE Indexoperator[] (int dim)
 Member access operator. More...
 
CUTLASS_HOST_DEVICE Index const & operator[] (int dim) const
 Member access operator. More...
 
CUTLASS_HOST_DEVICEdot (Coord const &b, T sum) const
 Computes the dot product of two Coord instances. More...
 
CUTLASS_HOST_DEVICEdot (Coord const &b) const
 Computes the dot product of two Coord instances. More...
 
CUTLASS_HOST_DEVICE Indexat ()
 Gets the index of a given Coord element. More...
 
CUTLASS_HOST_DEVICE Indexat (int dim)
 Access via index; may limit unrolling potential. More...
 
CUTLASS_HOST_DEVICE Index const & at () const
 Gets the index of a given Coord element. More...
 
CUTLASS_HOST_DEVICE Index const & at (int dim) const
 Access via index; may limit unrolling potential. More...
 
CUTLASS_HOST_DEVICE bool operator== (Coord< kRank > const &b) const
 Determines if two Coord<> objects are equal. More...
 
CUTLASS_HOST_DEVICE bool operator!= (Coord< kRank > const &b) const
 Not equal. More...
 
CUTLASS_HOST_DEVICE Coordclamp (Coord< kRank > const &max, Coord< kRank > const &min=Coord< kRank >())
 Clamps a coordinate to a range specified by maximum and minimum values. More...
 
CUTLASS_HOST_DEVICE Index count () const
 Returns the product of all elements. More...
 
CUTLASS_HOST_DEVICE bool operator< (Coord< kRank > const &b) const
 Less than operator. More...
 
CUTLASS_HOST_DEVICE bool operator<= (Coord< kRank > const &b) const
 Less than or equals operator. More...
 

Static Public Attributes

static int kD = 0
 D dimension. More...
 
static int kH = 1
 H dimension. More...
 
static int kW = 2
 W dimension. More...
 
static int kC = 3
 C dimension. More...
 
- Static Public Attributes inherited from cutlass::Coord< 4, Index_ >
static int const kRank
 Number of elements in Coord. More...
 
static int const N
 Number of elements in Coord, aliased for compatibility. More...
 

Additional Inherited Members

- Public Attributes inherited from cutlass::Coord< 4, Index_ >
Index idx [kRank]
 Indices. More...
 

Detailed Description

template<typename Index_ = int>
struct cutlass::TileCoord< Index_ >

TileCoord wraps Coord<4, int> to provide a helper for accessing named dimensions. Classes expecting a coordinate in the rank=4 index space of a CUTLASS tile structure should use TileCoord.

Member Typedef Documentation

◆ Base

template<typename Index_ = int>
typedef Coord<4, Index> cutlass::TileCoord< Index_ >::Base

◆ Index

template<typename Index_ = int>
typedef Index_ cutlass::TileCoord< Index_ >::Index

Constructor & Destructor Documentation

◆ TileCoord() [1/5]

template<typename Index_ = int>
CUTLASS_HOST_DEVICE cutlass::TileCoord< Index_ >::TileCoord ( )
inline

◆ TileCoord() [2/5]

template<typename Index_ = int>
CUTLASS_HOST_DEVICE cutlass::TileCoord< Index_ >::TileCoord ( Coord< 3, Index > const &  coord)
inline

◆ TileCoord() [3/5]

template<typename Index_ = int>
CUTLASS_HOST_DEVICE cutlass::TileCoord< Index_ >::TileCoord ( Coord< 4, Index > const &  coord)
inline

◆ TileCoord() [4/5]

template<typename Index_ = int>
CUTLASS_HOST_DEVICE cutlass::TileCoord< Index_ >::TileCoord ( Index  coord[4])
inline

◆ TileCoord() [5/5]

template<typename Index_ = int>
CUTLASS_HOST_DEVICE cutlass::TileCoord< Index_ >::TileCoord ( Index  d,
Index  h,
Index  w,
Index  c 
)
inline

Member Function Documentation

◆ c() [1/2]

template<typename Index_ = int>
CUTLASS_HOST_DEVICE Index const& cutlass::TileCoord< Index_ >::c ( ) const
inline

◆ c() [2/2]

template<typename Index_ = int>
CUTLASS_HOST_DEVICE Index& cutlass::TileCoord< Index_ >::c ( )
inline

◆ d() [1/2]

template<typename Index_ = int>
CUTLASS_HOST_DEVICE Index const& cutlass::TileCoord< Index_ >::d ( ) const
inline

◆ d() [2/2]

template<typename Index_ = int>
CUTLASS_HOST_DEVICE Index& cutlass::TileCoord< Index_ >::d ( )
inline

◆ dhw()

template<typename Index_ = int>
CUTLASS_HOST_DEVICE Coord<3> cutlass::TileCoord< Index_ >::dhw ( ) const
inline

◆ h() [1/2]

template<typename Index_ = int>
CUTLASS_HOST_DEVICE Index const& cutlass::TileCoord< Index_ >::h ( ) const
inline

◆ h() [2/2]

template<typename Index_ = int>
CUTLASS_HOST_DEVICE Index& cutlass::TileCoord< Index_ >::h ( )
inline

◆ hw()

template<typename Index_ = int>
CUTLASS_HOST_DEVICE Coord<2> cutlass::TileCoord< Index_ >::hw ( ) const
inline

◆ hwc()

template<typename Index_ = int>
CUTLASS_HOST_DEVICE Coord<3> cutlass::TileCoord< Index_ >::hwc ( ) const
inline

◆ operator*()

template<typename Index_ = int>
CUTLASS_HOST_DEVICE TileCoord cutlass::TileCoord< Index_ >::operator* ( Base const &  b) const
inline

◆ operator*=()

template<typename Index_ = int>
CUTLASS_HOST_DEVICE TileCoord& cutlass::TileCoord< Index_ >::operator*= ( Base const &  b)
inline

◆ operator+()

template<typename Index_ = int>
CUTLASS_HOST_DEVICE TileCoord cutlass::TileCoord< Index_ >::operator+ ( Base const &  b) const
inline

◆ operator+=()

template<typename Index_ = int>
CUTLASS_HOST_DEVICE TileCoord& cutlass::TileCoord< Index_ >::operator+= ( Base const &  b)
inline

◆ operator-()

template<typename Index_ = int>
CUTLASS_HOST_DEVICE TileCoord cutlass::TileCoord< Index_ >::operator- ( Base const &  b) const
inline

◆ operator-=()

template<typename Index_ = int>
CUTLASS_HOST_DEVICE TileCoord& cutlass::TileCoord< Index_ >::operator-= ( Base const &  b)
inline

◆ operator/()

template<typename Index_ = int>
CUTLASS_HOST_DEVICE TileCoord cutlass::TileCoord< Index_ >::operator/ ( Base const &  b) const
inline

◆ operator/=()

template<typename Index_ = int>
CUTLASS_HOST_DEVICE TileCoord& cutlass::TileCoord< Index_ >::operator/= ( Base const &  b)
inline

◆ w() [1/2]

template<typename Index_ = int>
CUTLASS_HOST_DEVICE Index const& cutlass::TileCoord< Index_ >::w ( ) const
inline

◆ w() [2/2]

template<typename Index_ = int>
CUTLASS_HOST_DEVICE Index& cutlass::TileCoord< Index_ >::w ( )
inline

Member Data Documentation

◆ kC

template<typename Index_ = int>
int cutlass::TileCoord< Index_ >::kC = 3
static

◆ kD

template<typename Index_ = int>
int cutlass::TileCoord< Index_ >::kD = 0
static

◆ kH

template<typename Index_ = int>
int cutlass::TileCoord< Index_ >::kH = 1
static

◆ kW

template<typename Index_ = int>
int cutlass::TileCoord< Index_ >::kW = 2
static

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