CUTLASS
CUDA Templates for Linear Algebra Subroutines and Solvers
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
cutlass::layout::PitchLinear Class Reference

Mapping function for pitch-linear memory.

#include <pitch_linear.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 = PitchLinearCoord
 Logical coordinate. More...
 
using Stride = Coord< kStrideRank, Index >
 Stride vector. More...
 

Public Member Functions

CUTLASS_HOST_DEVICE PitchLinear (Index ldm=0)
 Constructor. More...
 
CUTLASS_HOST_DEVICE PitchLinear (Stride _stride)
 Constructor. More...
 
CUTLASS_HOST_DEVICE LongIndex operator() (TensorCoord const &coord) const
 
CUTLASS_HOST_DEVICE TensorCoord inverse (LongIndex index) const
 Returns the logical coordinate given an offset. 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 Index stride (int rank) const
 Returns the stride of the layout. More...
 
CUTLASS_HOST_DEVICE Indexstride (int rank)
 Returns the stride of the layout. More...
 
CUTLASS_HOST_DEVICE LongIndex capacity (TensorCoord const &extent) const
 Compute the number of contiguous elements needed to store a tensor with the given size. More...
 

Static Public Member Functions

static CUTLASS_HOST_DEVICE PitchLinear packed (TensorCoord const &extent)
 Helper returns a layout to a tightly packed tensor. More...
 

Static Public Attributes

static int const kRank = 2
 Logical rank of tensor. More...
 
static int const kStrideRank = 1
 Rank of stride vector. More...
 

Member Typedef Documentation

Constructor & Destructor Documentation

CUTLASS_HOST_DEVICE cutlass::layout::PitchLinear::PitchLinear ( Index  ldm = 0)
inline
CUTLASS_HOST_DEVICE cutlass::layout::PitchLinear::PitchLinear ( Stride  _stride)
inline

Member Function Documentation

CUTLASS_HOST_DEVICE LongIndex cutlass::layout::PitchLinear::capacity ( TensorCoord const &  extent) const
inline
CUTLASS_HOST_DEVICE TensorCoord cutlass::layout::PitchLinear::inverse ( LongIndex  index) const
inline
CUTLASS_HOST_DEVICE LongIndex cutlass::layout::PitchLinear::operator() ( TensorCoord const &  coord) const
inline

Returns the offset of a coordinate in linear memory. Assumes coordinate has convention (contiguous, strided)

static CUTLASS_HOST_DEVICE PitchLinear cutlass::layout::PitchLinear::packed ( TensorCoord const &  extent)
inlinestatic
CUTLASS_HOST_DEVICE Stride cutlass::layout::PitchLinear::stride ( ) const
inline
CUTLASS_HOST_DEVICE Stride& cutlass::layout::PitchLinear::stride ( )
inline
CUTLASS_HOST_DEVICE Index cutlass::layout::PitchLinear::stride ( int  rank) const
inline
CUTLASS_HOST_DEVICE Index& cutlass::layout::PitchLinear::stride ( int  rank)
inline

Member Data Documentation

int const cutlass::layout::PitchLinear::kRank = 2
static
int const cutlass::layout::PitchLinear::kStrideRank = 1
static

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