Cutlass
CUDA Templates for Linear Algebra Subroutines and Solvers
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
cutlass::FragmentIterator< Fragment_, Iterations_, AccessType_ > Struct Template Reference

A template defining Fragment Iterator Concept.

#include <fragment.h>

Public Types

typedef FragmentIterator< Fragment_, Iterations_, AccessType_ > This_
 This class. More...
 
typedef Fragment_ Fragment
 The fragment. More...
 
typedef Iterations_ Iterations
 The number of iterations. More...
 
typedef AccessType_ AccessType
 The access type. More...
 
typedef Fragment::Element Element
 The element. More...
 
typedef ShapeMul< Iterations, Shape< 1, 1, 1, kElementsPerAccess > >::Shape FragmentShape
 The shape of the the fragment. More...
 
typedef ShapeStrides< FragmentShape, kElementsPerAccess >::Shape Strides
 The linear strides for iterations. More...
 

Public Member Functions

template<typename OtherFragment_ >
CUTLASS_HOST_DEVICE FragmentIterator (OtherFragment_ &fragment, int offset=0)
 Ctor. More...
 
CUTLASS_HOST_DEVICE AccessType const & at (int d, int h, int w, int c=0) const
 The accessor. More...
 
CUTLASS_HOST_DEVICE AccessTypeat (int d, int h, int w, int c=0)
 The accessor. More...
 
CUTLASS_HOST_DEVICE AccessType const & operator[] (int i) const
 The accessor. More...
 
CUTLASS_HOST_DEVICE AccessTypeoperator[] (int i)
 The accessor. More...
 
CUTLASS_HOST_DEVICE bool valid (int d, int h, int w, int c) const
 Is the iterator valid? More...
 

Public Attributes

Elementpointer
 The pointer. More...
 

Static Public Attributes

static int const kElementsPerAccess = (int)(sizeof(AccessType) / sizeof(Element))
 The number of elements per access. More...
 

Member Typedef Documentation

◆ AccessType

template<typename Fragment_, typename Iterations_, typename AccessType_>
typedef AccessType_ cutlass::FragmentIterator< Fragment_, Iterations_, AccessType_ >::AccessType

◆ Element

template<typename Fragment_, typename Iterations_, typename AccessType_>
typedef Fragment::Element cutlass::FragmentIterator< Fragment_, Iterations_, AccessType_ >::Element

◆ Fragment

template<typename Fragment_, typename Iterations_, typename AccessType_>
typedef Fragment_ cutlass::FragmentIterator< Fragment_, Iterations_, AccessType_ >::Fragment

◆ FragmentShape

template<typename Fragment_, typename Iterations_, typename AccessType_>
typedef ShapeMul<Iterations, Shape<1, 1, 1, kElementsPerAccess> >::Shape cutlass::FragmentIterator< Fragment_, Iterations_, AccessType_ >::FragmentShape

◆ Iterations

template<typename Fragment_, typename Iterations_, typename AccessType_>
typedef Iterations_ cutlass::FragmentIterator< Fragment_, Iterations_, AccessType_ >::Iterations

◆ Strides

template<typename Fragment_, typename Iterations_, typename AccessType_>
typedef ShapeStrides<FragmentShape, kElementsPerAccess>::Shape cutlass::FragmentIterator< Fragment_, Iterations_, AccessType_ >::Strides

◆ This_

template<typename Fragment_, typename Iterations_, typename AccessType_>
typedef FragmentIterator<Fragment_, Iterations_, AccessType_> cutlass::FragmentIterator< Fragment_, Iterations_, AccessType_ >::This_

Constructor & Destructor Documentation

◆ FragmentIterator()

template<typename Fragment_, typename Iterations_, typename AccessType_>
template<typename OtherFragment_ >
CUTLASS_HOST_DEVICE cutlass::FragmentIterator< Fragment_, Iterations_, AccessType_ >::FragmentIterator ( OtherFragment_ &  fragment,
int  offset = 0 
)
inline

Member Function Documentation

◆ at() [1/2]

template<typename Fragment_, typename Iterations_, typename AccessType_>
CUTLASS_HOST_DEVICE AccessType const& cutlass::FragmentIterator< Fragment_, Iterations_, AccessType_ >::at ( int  d,
int  h,
int  w,
int  c = 0 
) const
inline

◆ at() [2/2]

template<typename Fragment_, typename Iterations_, typename AccessType_>
CUTLASS_HOST_DEVICE AccessType& cutlass::FragmentIterator< Fragment_, Iterations_, AccessType_ >::at ( int  d,
int  h,
int  w,
int  c = 0 
)
inline

◆ operator[]() [1/2]

template<typename Fragment_, typename Iterations_, typename AccessType_>
CUTLASS_HOST_DEVICE AccessType const& cutlass::FragmentIterator< Fragment_, Iterations_, AccessType_ >::operator[] ( int  i) const
inline

◆ operator[]() [2/2]

template<typename Fragment_, typename Iterations_, typename AccessType_>
CUTLASS_HOST_DEVICE AccessType& cutlass::FragmentIterator< Fragment_, Iterations_, AccessType_ >::operator[] ( int  i)
inline

◆ valid()

template<typename Fragment_, typename Iterations_, typename AccessType_>
CUTLASS_HOST_DEVICE bool cutlass::FragmentIterator< Fragment_, Iterations_, AccessType_ >::valid ( int  d,
int  h,
int  w,
int  c 
) const
inline

Member Data Documentation

◆ kElementsPerAccess

template<typename Fragment_, typename Iterations_, typename AccessType_>
int const cutlass::FragmentIterator< Fragment_, Iterations_, AccessType_ >::kElementsPerAccess = (int)(sizeof(AccessType) / sizeof(Element))
static

◆ pointer

template<typename Fragment_, typename Iterations_, typename AccessType_>
Element* cutlass::FragmentIterator< Fragment_, Iterations_, AccessType_ >::pointer

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