Back to Cutlass

CUTLASS: cutlass::layout::TensorNHWC Class Reference

docs/classcutlass_1_1layout_1_1TensorNHWC.html

4.4.210.2 KB
Original Source

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

Mapping function for 4-D NHWC 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 (n, h, w, c) More...
| | | | using | Stride = Coord< kStrideRank > | | | Stride vector. More...
| | |

|

Public Member Functions

| | CUTLASS_HOST_DEVICE | TensorNHWC (Stride const &stride=Stride(0)) | | | Constructor. More...
| | | | CUTLASS_HOST_DEVICE | TensorNHWC (typename Stride::Index c, typename Stride::Index wc, typename Stride::Index hwc) | | | Constructor. More...
| | | | CUTLASS_HOST_DEVICE LongIndex | operator() (TensorCoord const &coord) const | | | Returns the offset of a coordinate (n, h, w, c) in linear memory. More...
| | | | CUTLASS_HOST_DEVICE | operator RowMajor () | | | Returns a RowMajor equivalent for a TensorNHWC layout. More...
| | | | CUTLASS_HOST_DEVICE TensorCoord | inverse (LongIndex index) const | | | Returns the logical coordinate (n, h, w, c) from a given offset in linear memory. More...
| | | | CUTLASS_HOST_DEVICE Stride | stride () const | | | Returns the stride of the layout. More...
| | | | CUTLASS_HOST_DEVICE Stride & | stride () | | | 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 TensorNHWC | packed (TensorCoord const &extent) | | | Helper returns a layout to a tightly packed NHWC 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

| using cutlass::layout::TensorNHWC::Index = int32_t |

| using cutlass::layout::TensorNHWC::LongIndex = int64_t |

| using cutlass::layout::TensorNHWC::Stride = Coord<kStrideRank> |

| using cutlass::layout::TensorNHWC::TensorCoord = Tensor4DCoord |

Constructor & Destructor Documentation

|

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

| inline |

|

| CUTLASS_HOST_DEVICE cutlass::layout::TensorNHWC::TensorNHWC | ( | typename Stride::Index | c, | | | | typename Stride::Index | wc, | | | | typename Stride::Index | hwc | | | ) | | |

| inline |

Member Function Documentation

|

| CUTLASS_HOST_DEVICE LongIndex cutlass::layout::TensorNHWC::capacity | ( | TensorCoord const & | extent | ) | const |

| inline |

|

| CUTLASS_HOST_DEVICE TensorCoord cutlass::layout::TensorNHWC::inverse | ( | LongIndex | index | ) | const |

| inline |

|

| CUTLASS_HOST_DEVICE cutlass::layout::TensorNHWC::operator RowMajor | ( | | ) | |

| inlineexplicit |

|

| CUTLASS_HOST_DEVICE LongIndex cutlass::layout::TensorNHWC::operator() | ( | TensorCoord const & | coord | ) | const |

| inline |

|

| static CUTLASS_HOST_DEVICE TensorNHWC cutlass::layout::TensorNHWC::packed | ( | TensorCoord const & | extent | ) | |

| inlinestatic |

|

| CUTLASS_HOST_DEVICE Stride cutlass::layout::TensorNHWC::stride | ( | | ) | const |

| inline |

|

| CUTLASS_HOST_DEVICE Stride& cutlass::layout::TensorNHWC::stride | ( | | ) | |

| inline |

Member Data Documentation

|

| int const cutlass::layout::TensorNHWC::kRank = 4 |

| static |

|

| int const cutlass::layout::TensorNHWC::kStrideRank = 3 |

| static |


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


Generated by 1.8.11