|
Cutlass
CUDA Templates for Linear Algebra Subroutines and Solvers
|
Structure modeling a pointer and stride into a tensor.
#include <tensor_ref.h>
Public Types | |
| typedef Storage_ | Storage |
| Data type of individual access. More... | |
Public Member Functions | |
| CUTLASS_HOST_DEVICE | TensorRef () |
| Default ctor. More... | |
| CUTLASS_HOST_DEVICE | TensorRef (Storage *ptr, Coord< Rank > stride) |
| Constructs from a pointer, size, and stride. More... | |
| CUTLASS_HOST_DEVICE void | reset (Storage *ptr=nullptr, Coord< Rank > stride=Coord< Rank >(0)) |
| Updates the pointer, stride, and location within a TensorRef. More... | |
| template<typename T > | |
| TensorRef< T, Rank > | convert () |
| Conversion function. More... | |
| CUTLASS_HOST_DEVICE bool | good () const |
| Returns true if the TensorRef may be safely accessed. More... | |
| CUTLASS_HOST_DEVICE Storage * | data () const |
| Returns the pointer to referenced data. More... | |
| CUTLASS_HOST_DEVICE Coord< Rank > const & | stride () const |
| Returns the stride of the tensor. More... | |
| CUTLASS_HOST_DEVICE int const & | stride (int dim) const |
| Returns the stride of the tensor in the given dimension. More... | |
| CUTLASS_HOST_DEVICE int | leading_dim () const |
| Returns the maximum stride element as the 'leading dimension'. More... | |
| CUTLASS_HOST_DEVICE long long | offset (Coord< Rank > const &coord) const |
| Computes the offset of an index from the origin of the tensor. More... | |
| CUTLASS_HOST_DEVICE Storage & | at (Coord< Rank > const &coord) const |
| Returns a reference to the element at a given Coord. More... | |
| Storage & | operator[] (Coord< Rank > const &coord) const |
| Element-wise accessor. More... | |
| CUTLASS_HOST_DEVICE Storage & | at (int idx) const |
| Returns a reference to the element at a given Coord. More... | |
| Storage & | operator[] (int idx) const |
| Element-wise accessor. More... | |
| CUTLASS_HOST_DEVICE TensorRef & | advance (Coord< Rank > const &b) |
| Adds an offset to the pointer. More... | |
| CUTLASS_HOST_DEVICE TensorRef | operator+ (Coord< Rank > const &b) const |
| Returns a TensorRef offset by a given amount. More... | |
| CUTLASS_HOST_DEVICE TensorRef | operator- (Coord< Rank > const &b) const |
| Returns a TensorRef offset by a given amount. More... | |
Static Public Attributes | |
| static int const | Rank = Rank_ |
| Rank of tensor. More... | |
| typedef Storage_ cutlass::TensorRef< Storage_, Rank_ >::Storage |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
1.8.14