Cutlass
CUDA Templates for Linear Algebra Subroutines and Solvers
Classes | Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
cutlass::TensorRefArray< Storage_, Rank_, MapFunc_, StorageRank_, Index_, LongIndex_ > Struct Template Reference

#include <tensor_ref_collection.h>

Classes

class  ConstIterator
 TensorRefIterator over TensorRef objects in TensorRefArray. More...
 

Public Types

typedef Storage_ Storage
 Element pointed to by the TensorRef. More...
 
typedef Index_ Index
 Index type. More...
 
typedef LongIndex_ LongIndex
 Typically, strides in memory can be very large. More...
 
typedef TensorRef< Storage_, Rank_, MapFunc_, StorageRank_, Index_, LongIndex_ > TensorRef
 TensorRef type obtained from the TensorRefArray. More...
 

Public Member Functions

CUTLASS_HOST_DEVICE TensorRefArray ()
 
CUTLASS_HOST_DEVICE TensorRefArray (Storage **_pointers, Index _strides[kStorageRank - 1])
 
CUTLASS_HOST_DEVICE TensorRef at (Index idx=0) const
 
CUTLASS_HOST_DEVICE ConstIterator begin ()
 Returns an TesnorRefIterator over the TensorRef objects in this collection. More...
 

Public Attributes

Storage ** pointers
 Base addresses. More...
 
Indexstrides [kStorageRank - 1]
 Array of strides. More...
 

Static Public Attributes

static int const kStorageRank = StorageRank_
 Rank of the stride vector. More...
 

Detailed Description

template<typename Storage_, int Rank_, typename MapFunc_ = IdentityTensorMapFunc<Rank_>, int StorageRank_ = MapFunc_::kStorageRank, typename Index_ = int, typename LongIndex_ = long long>
struct cutlass::TensorRefArray< Storage_, Rank_, MapFunc_, StorageRank_, Index_, LongIndex_ >

This satisfies TensorRefCollection and stores a collection of TensorRef objects. This is a structure of arrays in that the individual members of the TensorRef are held in distinct arrays.

Note, TensorRef maps a logical coordinate space to an n-D array with rank kStorageRank. It maintains a stride vector of similar rank, but the least significant rank is defined to be 1.

The least significant stride of 1 is not stored, and therefore the number of stride arrays is kStorageRank - 1.

Member Typedef Documentation

◆ Index

template<typename Storage_ , int Rank_, typename MapFunc_ = IdentityTensorMapFunc<Rank_>, int StorageRank_ = MapFunc_::kStorageRank, typename Index_ = int, typename LongIndex_ = long long>
typedef Index_ cutlass::TensorRefArray< Storage_, Rank_, MapFunc_, StorageRank_, Index_, LongIndex_ >::Index

◆ LongIndex

template<typename Storage_ , int Rank_, typename MapFunc_ = IdentityTensorMapFunc<Rank_>, int StorageRank_ = MapFunc_::kStorageRank, typename Index_ = int, typename LongIndex_ = long long>
typedef LongIndex_ cutlass::TensorRefArray< Storage_, Rank_, MapFunc_, StorageRank_, Index_, LongIndex_ >::LongIndex

◆ Storage

template<typename Storage_ , int Rank_, typename MapFunc_ = IdentityTensorMapFunc<Rank_>, int StorageRank_ = MapFunc_::kStorageRank, typename Index_ = int, typename LongIndex_ = long long>
typedef Storage_ cutlass::TensorRefArray< Storage_, Rank_, MapFunc_, StorageRank_, Index_, LongIndex_ >::Storage

◆ TensorRef

template<typename Storage_ , int Rank_, typename MapFunc_ = IdentityTensorMapFunc<Rank_>, int StorageRank_ = MapFunc_::kStorageRank, typename Index_ = int, typename LongIndex_ = long long>
typedef TensorRef<Storage_, Rank_, MapFunc_, StorageRank_, Index_, LongIndex_> cutlass::TensorRefArray< Storage_, Rank_, MapFunc_, StorageRank_, Index_, LongIndex_ >::TensorRef

Constructor & Destructor Documentation

◆ TensorRefArray() [1/2]

template<typename Storage_ , int Rank_, typename MapFunc_ = IdentityTensorMapFunc<Rank_>, int StorageRank_ = MapFunc_::kStorageRank, typename Index_ = int, typename LongIndex_ = long long>
CUTLASS_HOST_DEVICE cutlass::TensorRefArray< Storage_, Rank_, MapFunc_, StorageRank_, Index_, LongIndex_ >::TensorRefArray ( )
inline

◆ TensorRefArray() [2/2]

template<typename Storage_ , int Rank_, typename MapFunc_ = IdentityTensorMapFunc<Rank_>, int StorageRank_ = MapFunc_::kStorageRank, typename Index_ = int, typename LongIndex_ = long long>
CUTLASS_HOST_DEVICE cutlass::TensorRefArray< Storage_, Rank_, MapFunc_, StorageRank_, Index_, LongIndex_ >::TensorRefArray ( Storage **  _pointers,
Index  _strides[kStorageRank - 1] 
)
inline

Member Function Documentation

◆ at()

template<typename Storage_ , int Rank_, typename MapFunc_ = IdentityTensorMapFunc<Rank_>, int StorageRank_ = MapFunc_::kStorageRank, typename Index_ = int, typename LongIndex_ = long long>
CUTLASS_HOST_DEVICE TensorRef cutlass::TensorRefArray< Storage_, Rank_, MapFunc_, StorageRank_, Index_, LongIndex_ >::at ( Index  idx = 0) const
inline

◆ begin()

template<typename Storage_ , int Rank_, typename MapFunc_ = IdentityTensorMapFunc<Rank_>, int StorageRank_ = MapFunc_::kStorageRank, typename Index_ = int, typename LongIndex_ = long long>
CUTLASS_HOST_DEVICE ConstIterator cutlass::TensorRefArray< Storage_, Rank_, MapFunc_, StorageRank_, Index_, LongIndex_ >::begin ( )
inline

Member Data Documentation

◆ kStorageRank

template<typename Storage_ , int Rank_, typename MapFunc_ = IdentityTensorMapFunc<Rank_>, int StorageRank_ = MapFunc_::kStorageRank, typename Index_ = int, typename LongIndex_ = long long>
int const cutlass::TensorRefArray< Storage_, Rank_, MapFunc_, StorageRank_, Index_, LongIndex_ >::kStorageRank = StorageRank_
static

◆ pointers

template<typename Storage_ , int Rank_, typename MapFunc_ = IdentityTensorMapFunc<Rank_>, int StorageRank_ = MapFunc_::kStorageRank, typename Index_ = int, typename LongIndex_ = long long>
Storage** cutlass::TensorRefArray< Storage_, Rank_, MapFunc_, StorageRank_, Index_, LongIndex_ >::pointers

◆ strides

template<typename Storage_ , int Rank_, typename MapFunc_ = IdentityTensorMapFunc<Rank_>, int StorageRank_ = MapFunc_::kStorageRank, typename Index_ = int, typename LongIndex_ = long long>
Index* cutlass::TensorRefArray< Storage_, Rank_, MapFunc_, StorageRank_, Index_, LongIndex_ >::strides[kStorageRank - 1]

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