CUTLASS
CUDA Templates for Linear Algebra Subroutines and Solvers
|
#include <tensor_ref.h>
Public Types | |
using | Index = int32_t |
Index type used for coordinates. More... | |
using | LongIndex = int64_t |
Long index type used for offsets. More... | |
using | TensorCoord = Coord< kRank, Index > |
Logical coordinate. More... | |
using | Stride = Coord< kStrideRank, Index > |
Stride vector. More... | |
Public Member Functions | |
CUTLASS_HOST_DEVICE | IdentityTensorLayout (Stride const &stride=Stride()) |
CUTLASS_HOST_DEVICE LongIndex | operator() (Coord< Rank > const &coord) const |
Returns the offset of a coordinate in linear memory. More... | |
CUTLASS_HOST_DEVICE Stride | stride () const |
Returns the stride of the layout. More... | |
CUTLASS_HOST_DEVICE Stride & | stride () |
Returns the stride of the layout. More... | |
CUTLASS_HOST_DEVICE LongIndex | capacity (TensorCoord const &size) const |
Compute the number of contiguous elements needed to store a tensor with the given size. More... | |
Static Public Attributes | |
static int const | kRank = Rank |
Logical rank of tensor. More... | |
static int const | kStrideRank = Rank |
Rank of stride vector. More... | |
Default layout function from coordinates in a tensor's index space into the n-D array held in memory.
All layout functions must define at least the members shown in IdentityTensorLayout<>.
using cutlass::IdentityTensorLayout< Rank >::Index = int32_t |
using cutlass::IdentityTensorLayout< Rank >::LongIndex = int64_t |
using cutlass::IdentityTensorLayout< Rank >::Stride = Coord<kStrideRank, Index> |
using cutlass::IdentityTensorLayout< Rank >::TensorCoord = Coord<kRank, Index> |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
|
static |