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

#include <matrix_traits.h>

Inheritance diagram for cutlass::MatrixCoord:
cutlass::Coord< 2, int >

Public Types

typedef int Index
 Integer-valued index. More...
 
typedef Coord< 2, IndexBase
 Base type is a Coord of rank=2. More...
 
- Public Types inherited from cutlass::Coord< 2, int >
typedef int Index
 Index type used to store elements. More...
 

Public Member Functions

CUTLASS_HOST_DEVICE MatrixCoord ()
 Default ctor. More...
 
CUTLASS_HOST_DEVICE MatrixCoord (Coord< 2, Index > const &coord)
 Constructs from Coord<2> More...
 
CUTLASS_HOST_DEVICE MatrixCoord (Index row, Index column)
 Helper to construct from a row and column. More...
 
CUTLASS_HOST_DEVICE Index const & row () const
 Returns the row of the coordinate. More...
 
CUTLASS_HOST_DEVICE Indexrow ()
 Returns the row of the coordinate. More...
 
CUTLASS_HOST_DEVICE Index const & column () const
 Returns the column of the coordinate. More...
 
CUTLASS_HOST_DEVICE Indexcolumn ()
 Returns the column of the coordinate. More...
 
CUTLASS_HOST_DEVICE MatrixCoord operator+ (Base const &b) const
 Element-wise addition. More...
 
CUTLASS_HOST_DEVICE MatrixCoord operator- (Base const &b) const
 Element-wise subtraction. More...
 
CUTLASS_HOST_DEVICE MatrixCoord operator* (Base const &b) const
 Element-wise multiplication. More...
 
CUTLASS_HOST_DEVICE MatrixCoord operator/ (Base const &b) const
 Element-wise division. More...
 
CUTLASS_HOST_DEVICE MatrixCoordoperator+= (Base const &b)
 In-place addition. More...
 
CUTLASS_HOST_DEVICE MatrixCoordoperator-= (Base const &b)
 In-place subtraction. More...
 
CUTLASS_HOST_DEVICE MatrixCoordoperator*= (Base const &b)
 In-place multiplication. More...
 
CUTLASS_HOST_DEVICE MatrixCoordoperator/= (Base const &b)
 In-place division. More...
 
- Public Member Functions inherited from cutlass::Coord< 2, int >
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 const kRow = 0
 Rows dimension. More...
 
static int const kColumn = 1
 Columns dimension. More...
 
- Static Public Attributes inherited from cutlass::Coord< 2, int >
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< 2, int >
Index idx [kRank]
 Indices. More...
 

Detailed Description

MatrixCoord wraps Coord<2, int> to provide a helper for accessing named dimensions. Classes expecting a coordinate in the rank=2 index space of a matrix should use MatrixCoord.

Member Typedef Documentation

◆ Base

◆ Index

Constructor & Destructor Documentation

◆ MatrixCoord() [1/3]

CUTLASS_HOST_DEVICE cutlass::MatrixCoord::MatrixCoord ( )
inline

◆ MatrixCoord() [2/3]

CUTLASS_HOST_DEVICE cutlass::MatrixCoord::MatrixCoord ( Coord< 2, Index > const &  coord)
inline

◆ MatrixCoord() [3/3]

CUTLASS_HOST_DEVICE cutlass::MatrixCoord::MatrixCoord ( Index  row,
Index  column 
)
inline

Member Function Documentation

◆ column() [1/2]

CUTLASS_HOST_DEVICE Index const& cutlass::MatrixCoord::column ( ) const
inline

◆ column() [2/2]

CUTLASS_HOST_DEVICE Index& cutlass::MatrixCoord::column ( )
inline

◆ operator*()

CUTLASS_HOST_DEVICE MatrixCoord cutlass::MatrixCoord::operator* ( Base const &  b) const
inline

◆ operator*=()

CUTLASS_HOST_DEVICE MatrixCoord& cutlass::MatrixCoord::operator*= ( Base const &  b)
inline

◆ operator+()

CUTLASS_HOST_DEVICE MatrixCoord cutlass::MatrixCoord::operator+ ( Base const &  b) const
inline

◆ operator+=()

CUTLASS_HOST_DEVICE MatrixCoord& cutlass::MatrixCoord::operator+= ( Base const &  b)
inline

◆ operator-()

CUTLASS_HOST_DEVICE MatrixCoord cutlass::MatrixCoord::operator- ( Base const &  b) const
inline

◆ operator-=()

CUTLASS_HOST_DEVICE MatrixCoord& cutlass::MatrixCoord::operator-= ( Base const &  b)
inline

◆ operator/()

CUTLASS_HOST_DEVICE MatrixCoord cutlass::MatrixCoord::operator/ ( Base const &  b) const
inline

◆ operator/=()

CUTLASS_HOST_DEVICE MatrixCoord& cutlass::MatrixCoord::operator/= ( Base const &  b)
inline

◆ row() [1/2]

CUTLASS_HOST_DEVICE Index const& cutlass::MatrixCoord::row ( ) const
inline

◆ row() [2/2]

CUTLASS_HOST_DEVICE Index& cutlass::MatrixCoord::row ( )
inline

Member Data Documentation

◆ kColumn

int const cutlass::MatrixCoord::kColumn = 1
static

◆ kRow

int const cutlass::MatrixCoord::kRow = 0
static

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