Cutlass CUDA Templates for Linear Algebra Subroutines and Solvers

Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
cutlass::Coord< Rank_, Index_ > Struct Template Reference

Statically-sized array specifying Coords within a tensor.

`#include <coord.h>`

## Public Types
typedef Index_ | Index
| Index type used to store elements. More...

## Public Member Functions
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...
template<int Slice>
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 Coord & | operator+= (Coord const &b)
| In-place addition. More...
CUTLASS_HOST_DEVICE Coord & | operator-= (Coord const &b)
| In-place subtraction. More...
CUTLASS_HOST_DEVICE Coord & | operator*= (Coord const &b)
| In-place multiplication. More...
CUTLASS_HOST_DEVICE Coord & | operator/= (Coord const &b)
| In-place division. More...
CUTLASS_HOST_DEVICE Index & | operator[] (int dim)
| Member access operator. More...
CUTLASS_HOST_DEVICE Index const & | operator[] (int dim) const
| Member access operator. More...
template<typename T >
CUTLASS_HOST_DEVICE T | dot (Coord const &b, T sum) const
| Computes the dot product of two Coord instances. More...
template<typename T >
CUTLASS_HOST_DEVICE T | dot (Coord const &b) const
| Computes the dot product of two Coord instances. More...
template<int Dim>
CUTLASS_HOST_DEVICE Index & | at ()
| Gets the index of a given Coord element. More...
CUTLASS_HOST_DEVICE Index & | at (int dim)
| Access via index; may limit unrolling potential. More...
template<int Dim>
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 Coord & | clamp (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...

## Public Attributes
Index | idx [kRank]
| Indices. More...

## Static Public Attributes
static int const | kRank = Rank_
| Number of elements in Coord. More...
static int const | N = Rank_
| Number of elements in Coord, aliased for compatibility. More...

## Member Typedef Documentation

## ◆ Index

template<int Rank_, typename Index_ = int>

typedef Index_ cutlass::Coord< Rank_, Index_ >::Index

## Constructor & Destructor Documentation

## ◆ Coord() [1/3]

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE cutlass::Coord< Rank_, Index_ >::Coord | ( | Index | value = `0` | ) |
| inline

## ◆ Coord() [2/3]

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE cutlass::Coord< Rank_, Index_ >::Coord | ( | Index | _idx[] | ) |
| inline

## ◆ Coord() [3/3]

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE cutlass::Coord< Rank_, Index_ >::Coord | ( | Coord< kRank > const & | coord | ) |
| inline

## Member Function Documentation

## ◆ at() [1/4]

template<int Rank_, typename Index_ = int>
template<int Dim>

CUTLASS_HOST_DEVICE Index& cutlass::Coord< Rank_, Index_ >::at | ( |  | ) |
| inline

## ◆ at() [2/4]

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE Index& cutlass::Coord< Rank_, Index_ >::at | ( | int | dim | ) |
| inline

## ◆ at() [3/4]

template<int Rank_, typename Index_ = int>
template<int Dim>

CUTLASS_HOST_DEVICE Index const& cutlass::Coord< Rank_, Index_ >::at | ( |  | ) | const
| inline

## ◆ at() [4/4]

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE Index const& cutlass::Coord< Rank_, Index_ >::at | ( | int | dim | ) | const
| inline

## ◆ clamp()

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE Coord& cutlass::Coord< Rank_, Index_ >::clamp | ( | Coord< kRank > const & | max,
|  | Coord< kRank > const & | min = `Coord<kRank>()`
| ) |  |
| inline

## ◆ count()

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE Index cutlass::Coord< Rank_, Index_ >::count | ( |  | ) | const
| inline

## ◆ dot() [1/2]

template<int Rank_, typename Index_ = int>
template<typename T >

CUTLASS_HOST_DEVICE T cutlass::Coord< Rank_, Index_ >::dot | ( | Coord< Rank_, Index_ > const & | b,
|  | T | sum
| ) |  | const
| inline

## ◆ dot() [2/2]

template<int Rank_, typename Index_ = int>
template<typename T >

CUTLASS_HOST_DEVICE T cutlass::Coord< Rank_, Index_ >::dot | ( | Coord< Rank_, Index_ > const & | b | ) | const
| inline

## ◆ operator bool()

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE cutlass::Coord< Rank_, Index_ >::operator bool | ( |  | ) | const
| inline

## ◆ operator!()

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE bool cutlass::Coord< Rank_, Index_ >::operator! | ( |  | ) | const
| inline

## ◆ operator!=()

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE bool cutlass::Coord< Rank_, Index_ >::operator!= | ( | Coord< kRank > const & | b | ) | const
| inline

## ◆ operator*()

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE Coord cutlass::Coord< Rank_, Index_ >::operator* | ( | Coord< Rank_, Index_ > const & | b | ) | const
| inline

## ◆ operator*=()

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE Coord& cutlass::Coord< Rank_, Index_ >::operator*= | ( | Coord< Rank_, Index_ > const & | b | ) |
| inline

## ◆ operator+()

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE Coord cutlass::Coord< Rank_, Index_ >::operator+ | ( | Coord< Rank_, Index_ > const & | b | ) | const
| inline

## ◆ operator+=()

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE Coord& cutlass::Coord< Rank_, Index_ >::operator+= | ( | Coord< Rank_, Index_ > const & | b | ) |
| inline

## ◆ operator-()

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE Coord cutlass::Coord< Rank_, Index_ >::operator- | ( | Coord< Rank_, Index_ > const & | b | ) | const
| inline

## ◆ operator-=()

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE Coord& cutlass::Coord< Rank_, Index_ >::operator-= | ( | Coord< Rank_, Index_ > const & | b | ) |
| inline

## ◆ operator/()

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE Coord cutlass::Coord< Rank_, Index_ >::operator/ | ( | Coord< Rank_, Index_ > const & | b | ) | const
| inline

## ◆ operator/=()

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE Coord& cutlass::Coord< Rank_, Index_ >::operator/= | ( | Coord< Rank_, Index_ > const & | b | ) |
| inline

## ◆ operator<()

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE bool cutlass::Coord< Rank_, Index_ >::operator< | ( | Coord< kRank > const & | b | ) | const
| inline

## ◆ operator<=()

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE bool cutlass::Coord< Rank_, Index_ >::operator<= | ( | Coord< kRank > const & | b | ) | const
| inline

## ◆ operator==()

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE bool cutlass::Coord< Rank_, Index_ >::operator== | ( | Coord< kRank > const & | b | ) | const
| inline

## ◆ operator[]() [1/2]

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE Index& cutlass::Coord< Rank_, Index_ >::operator[] | ( | int | dim | ) |
| inline

## ◆ operator[]() [2/2]

template<int Rank_, typename Index_ = int>

CUTLASS_HOST_DEVICE Index const& cutlass::Coord< Rank_, Index_ >::operator[] | ( | int | dim | ) | const
| inline

## ◆ slice()

template<int Rank_, typename Index_ = int>
template<int Slice>

CUTLASS_HOST_DEVICE Coord<Slice> cutlass::Coord< Rank_, Index_ >::slice | ( | int | start = `0`,
|  | Index | identity = `0`
| ) |  | const
| inline

Returns a slice of the Coord which may be larger or smaller in rank than this.

## Member Data Documentation

## ◆ idx

template<int Rank_, typename Index_ = int>

Index cutlass::Coord< Rank_, Index_ >::idx[kRank]

## ◆ kRank

template<int Rank_, typename Index_ = int>

int const cutlass::Coord< Rank_, Index_ >::kRank = Rank_
| static

## ◆ N

template<int Rank_, typename Index_ = int>

int const cutlass::Coord< Rank_, Index_ >::N = Rank_
| static

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

- coord.h