CUTLASS
CUDA Templates for Linear Algebra Subroutines and Solvers
Public Types | Public Member Functions | Static Public Attributes | List of all members
cutlass::IdentityTensorLayout< Rank > Class Template Reference

#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 Stridestride ()
 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...
 

Detailed Description

template<int Rank>
class cutlass::IdentityTensorLayout< Rank >

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<>.

Member Typedef Documentation

template<int Rank>
using cutlass::IdentityTensorLayout< Rank >::Index = int32_t
template<int Rank>
using cutlass::IdentityTensorLayout< Rank >::LongIndex = int64_t
template<int Rank>
using cutlass::IdentityTensorLayout< Rank >::Stride = Coord<kStrideRank, Index>
template<int Rank>
using cutlass::IdentityTensorLayout< Rank >::TensorCoord = Coord<kRank, Index>

Constructor & Destructor Documentation

template<int Rank>
CUTLASS_HOST_DEVICE cutlass::IdentityTensorLayout< Rank >::IdentityTensorLayout ( Stride const &  stride = Stride())
inline

Member Function Documentation

template<int Rank>
CUTLASS_HOST_DEVICE LongIndex cutlass::IdentityTensorLayout< Rank >::capacity ( TensorCoord const &  size) const
inline
template<int Rank>
CUTLASS_HOST_DEVICE LongIndex cutlass::IdentityTensorLayout< Rank >::operator() ( Coord< Rank > const &  coord) const
inline
template<int Rank>
CUTLASS_HOST_DEVICE Stride cutlass::IdentityTensorLayout< Rank >::stride ( ) const
inline
template<int Rank>
CUTLASS_HOST_DEVICE Stride& cutlass::IdentityTensorLayout< Rank >::stride ( )
inline

Member Data Documentation

template<int Rank>
int const cutlass::IdentityTensorLayout< Rank >::kRank = Rank
static
template<int Rank>
int const cutlass::IdentityTensorLayout< Rank >::kStrideRank = Rank
static

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