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::TensorNCHW Class Reference

Mapping function for 4-D NCHW tensors.

#include <tensor.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 = Tensor4DCoord
 Logical coordinate. More...
using Stride = Coord< kStrideRank >
 Stride vector. More...

Public Member Functions

CUTLASS_HOST_DEVICE TensorNCHW (Stride const &stride=Stride(0))
 Constructor. More...
CUTLASS_HOST_DEVICE LongIndex operator() (TensorCoord 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...
 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 TensorNCHW packed (TensorCoord const &extent)
 Helper returns a layout to a tightly packed tensor. More...

Static Public Attributes

static int const kRank = 4
 Logical rank of tensor. More...
static int const kStrideRank = 3
 Rank of stride vector. More...

Member Typedef Documentation

Constructor & Destructor Documentation

CUTLASS_HOST_DEVICE cutlass::layout::TensorNCHW::TensorNCHW ( Stride const &  stride = Stride(0))

Member Function Documentation

CUTLASS_HOST_DEVICE LongIndex cutlass::layout::TensorNCHW::capacity ( TensorCoord const &  extent) const
CUTLASS_HOST_DEVICE LongIndex cutlass::layout::TensorNCHW::operator() ( TensorCoord const &  coord) const
static CUTLASS_HOST_DEVICE TensorNCHW cutlass::layout::TensorNCHW::packed ( TensorCoord const &  extent)
CUTLASS_HOST_DEVICE Stride cutlass::layout::TensorNCHW::stride ( ) const
CUTLASS_HOST_DEVICE Stride& cutlass::layout::TensorNCHW::stride ( )

Member Data Documentation

int const cutlass::layout::TensorNCHW::kRank = 4
int const cutlass::layout::TensorNCHW::kStrideRank = 3

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