Cutlass CUDA Templates for Linear Algebra Subroutines and Solvers

Public Types | Public Member Functions | Static Public Attributes | List of all members
cutlass::gemm::GemmCoord Struct Reference

`#include <gemm_coord.h>`

Inheritance diagram for cutlass::gemm::GemmCoord:

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

## Public Member Functions
CUTLASS_HOST_DEVICE | GemmCoord ()
| Default ctor. More...
CUTLASS_HOST_DEVICE | GemmCoord (Coord< 3, Index > const &coord, Index _batch=0)
| Constructs from Coord<3> and a batch. More...
CUTLASS_HOST_DEVICE | GemmCoord (Coord< 4, Index > const &coord)
| Constructs from Coord<4> More...
CUTLASS_HOST_DEVICE | GemmCoord (Index coord[4])
| Constructs from an array of coordinate elements. More...
CUTLASS_HOST_DEVICE | GemmCoord (Index k, Index n, Index m, Index batch=0)
| Helper to construct from a K, N, M, batch variables. More...
CUTLASS_HOST_DEVICE Index const & | m () const
| Returns the GEMM M coordinate. More...
CUTLASS_HOST_DEVICE Index & | m ()
| Returns reference to the GEMM M coordinate. More...
CUTLASS_HOST_DEVICE Index const & | n () const
| Returns the GEMM N coordinate. More...
CUTLASS_HOST_DEVICE Index & | n ()
| Returns reference to the GEMM N coordinate. More...
CUTLASS_HOST_DEVICE Index const & | k () const
| Returns the GEMM K coordinate. More...
CUTLASS_HOST_DEVICE Index & | k ()
| Returns reference to the GEMM K coordinate. More...
CUTLASS_HOST_DEVICE Index const & | batch () const
| Returns the GEMM batch coordinate. More...
CUTLASS_HOST_DEVICE Index & | batch ()
| Returns reference to the GEMM batch coordinate. More...
CUTLASS_HOST_DEVICE Coord< 3 > | knm () const
| Obtains a Coord<3> from GemmCoord. More...
CUTLASS_HOST_DEVICE Coord< 2 > | nm () const
| Obtains a Coord<2> from GemmCoord. More...
CUTLASS_HOST_DEVICE Coord< 2 > | mn () const
| Obtains a Coord<2> from GemmCoord. More...
CUTLASS_HOST_DEVICE Coord< 2 > | km () const
| Obtains a Coord<2> from GemmCoord. More...
CUTLASS_HOST_DEVICE Coord< 2 > | kn () const
| Obtains a Coord<2> from GemmCoord. More...
CUTLASS_HOST_DEVICE GemmCoord | operator+ (Base const &b) const
| Element-wise addition. More...
CUTLASS_HOST_DEVICE GemmCoord | operator- (Base const &b) const
| Element-wise subtraction. More...
CUTLASS_HOST_DEVICE GemmCoord | operator* (Base const &b) const
| Element-wise multiplication. More...
CUTLASS_HOST_DEVICE GemmCoord | operator/ (Base const &b) const
| Element-wise division. More...
CUTLASS_HOST_DEVICE GemmCoord & | operator+= (Base const &b)
| In-place addition. More...
CUTLASS_HOST_DEVICE GemmCoord & | operator-= (Base const &b)
| In-place subtraction. More...
CUTLASS_HOST_DEVICE GemmCoord & | operator*= (Base const &b)
| In-place multiplication. More...
CUTLASS_HOST_DEVICE GemmCoord & | operator/= (Base const &b)
| In-place division. More...
Public Member Functions inherited from cutlass::Coord< 4, 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 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 T | dot (Coord const &b, T sum) const
| Computes the dot product of two Coord instances. More...
CUTLASS_HOST_DEVICE T | dot (Coord const &b) const
| Computes the dot product of two Coord instances. More...
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...
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...

## Static Public Attributes
static int const | kK = 0
| GEMM K dimension - inner dimension of the GEMM problem. More...
static int const | kN = 1
| GEMM N dimension - columns of the output C matrix. More...
static int const | kM = 2
| GEMM M dimension - rows of the output C matrix. More...
static int const | kBatch = 3
| Batch dimension - for generalizing to larger problems. More...
Static Public Attributes inherited from cutlass::Coord< 4, 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< 4, int >
Index | idx [kRank]
| Indices. More...

## Detailed Description

GemmCoord is a structure derived from Coord<4> that specifies a location within the coordinate space of a GEMM problem.

## Member Typedef Documentation

## ◆ Base

typedef Coord<4, Index> cutlass::gemm::GemmCoord::Base

## ◆ Index

typedef int cutlass::gemm::GemmCoord::Index

## Constructor & Destructor Documentation

## ◆ GemmCoord() [1/5]

CUTLASS_HOST_DEVICE cutlass::gemm::GemmCoord::GemmCoord | ( |  | ) |
| inline

## ◆ GemmCoord() [2/5]

CUTLASS_HOST_DEVICE cutlass::gemm::GemmCoord::GemmCoord | ( | Coord< 3, Index > const & | coord,
|  | Index | _batch = `0`
| ) |  |
| inline

## ◆ GemmCoord() [3/5]

CUTLASS_HOST_DEVICE cutlass::gemm::GemmCoord::GemmCoord | ( | Coord< 4, Index > const & | coord | ) |
| inline

## ◆ GemmCoord() [4/5]

CUTLASS_HOST_DEVICE cutlass::gemm::GemmCoord::GemmCoord | ( | Index | coord[4] | ) |
| inline

## ◆ GemmCoord() [5/5]

CUTLASS_HOST_DEVICE cutlass::gemm::GemmCoord::GemmCoord | ( | Index | k,
|  | Index | n,
|  | Index | m,
|  | Index | batch = `0`
| ) |  |
| inline

## Member Function Documentation

## ◆ batch() [1/2]

CUTLASS_HOST_DEVICE Index const& cutlass::gemm::GemmCoord::batch | ( |  | ) | const
| inline

## ◆ batch() [2/2]

CUTLASS_HOST_DEVICE Index& cutlass::gemm::GemmCoord::batch | ( |  | ) |
| inline

## ◆ k() [1/2]

CUTLASS_HOST_DEVICE Index const& cutlass::gemm::GemmCoord::k | ( |  | ) | const
| inline

## ◆ k() [2/2]

CUTLASS_HOST_DEVICE Index& cutlass::gemm::GemmCoord::k | ( |  | ) |
| inline

## ◆ km()

CUTLASS_HOST_DEVICE Coord<2> cutlass::gemm::GemmCoord::km | ( |  | ) | const
| inline

## ◆ kn()

CUTLASS_HOST_DEVICE Coord<2> cutlass::gemm::GemmCoord::kn | ( |  | ) | const
| inline

## ◆ knm()

CUTLASS_HOST_DEVICE Coord<3> cutlass::gemm::GemmCoord::knm | ( |  | ) | const
| inline

## ◆ m() [1/2]

CUTLASS_HOST_DEVICE Index const& cutlass::gemm::GemmCoord::m | ( |  | ) | const
| inline

## ◆ m() [2/2]

CUTLASS_HOST_DEVICE Index& cutlass::gemm::GemmCoord::m | ( |  | ) |
| inline

## ◆ mn()

CUTLASS_HOST_DEVICE Coord<2> cutlass::gemm::GemmCoord::mn | ( |  | ) | const
| inline

## ◆ n() [1/2]

CUTLASS_HOST_DEVICE Index const& cutlass::gemm::GemmCoord::n | ( |  | ) | const
| inline

## ◆ n() [2/2]

CUTLASS_HOST_DEVICE Index& cutlass::gemm::GemmCoord::n | ( |  | ) |
| inline

## ◆ nm()

CUTLASS_HOST_DEVICE Coord<2> cutlass::gemm::GemmCoord::nm | ( |  | ) | const
| inline

## ◆ operator*()

CUTLASS_HOST_DEVICE GemmCoord cutlass::gemm::GemmCoord::operator* | ( | Base const & | b | ) | const
| inline

## ◆ operator*=()

CUTLASS_HOST_DEVICE GemmCoord& cutlass::gemm::GemmCoord::operator*= | ( | Base const & | b | ) |
| inline

## ◆ operator+()

CUTLASS_HOST_DEVICE GemmCoord cutlass::gemm::GemmCoord::operator+ | ( | Base const & | b | ) | const
| inline

## ◆ operator+=()

CUTLASS_HOST_DEVICE GemmCoord& cutlass::gemm::GemmCoord::operator+= | ( | Base const & | b | ) |
| inline

## ◆ operator-()

CUTLASS_HOST_DEVICE GemmCoord cutlass::gemm::GemmCoord::operator- | ( | Base const & | b | ) | const
| inline

## ◆ operator-=()

CUTLASS_HOST_DEVICE GemmCoord& cutlass::gemm::GemmCoord::operator-= | ( | Base const & | b | ) |
| inline

## ◆ operator/()

CUTLASS_HOST_DEVICE GemmCoord cutlass::gemm::GemmCoord::operator/ | ( | Base const & | b | ) | const
| inline

## ◆ operator/=()

CUTLASS_HOST_DEVICE GemmCoord& cutlass::gemm::GemmCoord::operator/= | ( | Base const & | b | ) |
| inline

## Member Data Documentation

## ◆ kBatch

int const cutlass::gemm::GemmCoord::kBatch = 3
| static

## ◆ kK

int const cutlass::gemm::GemmCoord::kK = 0
| static

## ◆ kM

int const cutlass::gemm::GemmCoord::kM = 2
| static

## ◆ kN

int const cutlass::gemm::GemmCoord::kN = 1
| static

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

- gemm_coord.h