CUTLASS: cutlass::Coord< Rank_, Index_, LongIndex_ > Struct Template Reference

| CUTLASS CUDA Templates for Linear Algebra Subroutines and Solvers

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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

Statically-sized array specifying Coords within a tensor.

`#include <coord.h>`

## Public Types
using | Index = Index_
| Index type used to store elements. More...
using | LongIndex = LongIndex_
| Type used to represent linear offsets. More...

## Public Member Functions
CUTLASS_HOST_DEVICE | Coord (Index value=Index(0))
| Default ctor initializes uniformly. More...
CUTLASS_HOST_DEVICE | Coord (Index const (&_idx)[kRank])
| Constructs from an array of integers. More...
CUTLASS_HOST_DEVICE | Coord (Coord< kRank, Index, LongIndex > const &coord)
| Copy constructor. More...
template<int Slice>
CUTLASS_HOST_DEVICE Coord< Slice > | slice (int start=0, Index identity=0) const
CUTLASS_HOST_DEVICE int | min_dim_index () const
| Returns the index of the dimension with least value. More...
CUTLASS_HOST_DEVICE int | max_dim_index () const
| Returns the index of the dimension with greatest value. More...
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...
CUTLASS_HOST_DEVICE LongIndex | dot (Coord const &b, LongIndex sum=LongIndex(0)) const
| Computes the dot product with anotherCoord object. 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 const &b) const
| Determines if two Coord<> objects are equal. More...
CUTLASS_HOST_DEVICE bool | operator!= (Coord const &b) const
| Not equal. More...
CUTLASS_HOST_DEVICE Coord & | clamp (Coord const &max, Coord const &min=Coord())
| Clamps a coordinate to a range specified by maximum and minimum values. More...
CUTLASS_HOST_DEVICE Index | sum () const
| Returns the sum of all elements. More...
CUTLASS_HOST_DEVICE LongIndex | product () const
| Returns the product of all elements. More...
CUTLASS_HOST_DEVICE bool | operator< (Coord const &b) const
| Less than operator. More...
CUTLASS_HOST_DEVICE bool | operator<= (Coord const &b) const
| Less than or equals operator. More...
CUTLASS_HOST_DEVICE bool | operator> (Coord const &b) const
| Greater than operator. More...
CUTLASS_HOST_DEVICE bool | operator>= (Coord const &b) const
| Greater than or equals operator. More...

## Static Public Attributes
static int const | kRank = Rank_
| Number of elements in Coord. More...

## Member Typedef Documentation

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

using cutlass::Coord< Rank_, Index_, LongIndex_ >::Index = Index_

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

using cutlass::Coord< Rank_, Index_, LongIndex_ >::LongIndex = LongIndex_

## Constructor & Destructor Documentation

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

## Member Function Documentation

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

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

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

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

CUTLASS_HOST_DEVICE LongIndex cutlass::Coord< Rank_, Index_, LongIndex_ >::dot | ( | Coord< Rank_, Index_, LongIndex_ > const & | b,
|  | LongIndex | sum = `LongIndex(0)`
| ) |  | const
| inline

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

CUTLASS_HOST_DEVICE int cutlass::Coord< Rank_, Index_, LongIndex_ >::max_dim_index | ( |  | ) | const
| inline

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

CUTLASS_HOST_DEVICE int cutlass::Coord< Rank_, Index_, LongIndex_ >::min_dim_index | ( |  | ) | const
| inline

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

CUTLASS_HOST_DEVICE LongIndex cutlass::Coord< Rank_, Index_, LongIndex_ >::product | ( |  | ) | const
| inline

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

CUTLASS_HOST_DEVICE Coord<Slice> cutlass::Coord< Rank_, Index_, LongIndex_ >::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.

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

## Member Data Documentation

template<int Rank_, typename Index_ = int, typename LongIndex_ = int64_t>

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

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

- coord.h