Host-side reference implementation of tensor operations.
|
CUTLASS_HOST_DEVICE | TensorView () |
| Default constructor. More...
|
|
CUTLASS_HOST_DEVICE | TensorView (TensorRef_t const &_ref, Coord_t const &_size) |
| Constructs a Tensor_view from a TensorRef and size. More...
|
|
CUTLASS_HOST_DEVICE bool | good () const |
| Returns true if the Tensor_view is bound to some memory. More...
|
|
CUTLASS_HOST_DEVICE T * | data () const |
| Returns a pointer to data. More...
|
|
CUTLASS_HOST_DEVICE void | reset (TensorRef_t const &_ref=TensorRef_t(0), Coord_t const &_size=Coord_t()) |
| Updates the reference and size of a Tensor_view object. More...
|
|
CUTLASS_HOST_DEVICE TensorRef_t & | ref () |
| Accesses the tensor reference pointing to data. More...
|
|
CUTLASS_HOST_DEVICE ConstTensorRef_t | const_ref () |
|
CUTLASS_HOST_DEVICE TensorRef_t const & | ref () const |
| Accesses the tensor reference pointing to data. More...
|
|
CUTLASS_HOST_DEVICE Coord_t const & | size () const |
| Accesses the size. More...
|
|
CUTLASS_HOST_DEVICE int | size (int dim) const |
| Accesses the size. More...
|
|
CUTLASS_HOST_DEVICE Coord_t const & | stride () const |
| Accesses the stride. More...
|
|
CUTLASS_HOST_DEVICE int const & | stride (int dim) const |
| Accesses the stride. More...
|
|
CUTLASS_HOST_DEVICE TensorView & | operator= (TensorView const &_tensor) |
| Assigns the Tensor_view. More...
|
|
CUTLASS_HOST_DEVICE Offset_t | offset (Coord_t const &coord) const |
| Returns the index of an element. More...
|
|
CUTLASS_HOST_DEVICE bool | contains (Coord_t const &coord) const |
| Determines whether a location is within a tensor. More...
|
|
CUTLASS_HOST_DEVICE T & | at (Coord_t const &coord) const |
| Element-wise accessor. More...
|
|
T & | operator[] (Coord< Rank > const &coord) const |
| Element-wise accessor. More...
|
|
CUTLASS_HOST_DEVICE T & | at (Offset_t idx) const |
| Element-wise accessor. More...
|
|
CUTLASS_HOST_DEVICE TensorView< T > | subview (Coord_t const &location, Coord_t size) const |
| Returns a Tensor_view given location and size quantities. More...
|
|
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...
|
|
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...
|
|
CUTLASS_HOST_DEVICE Storage & | at (int idx) const |
| Returns a reference to the element at a given Coord. More...
|
|
Storage & | operator[] (Coord< Rank > const &coord) const |
| Element-wise accessor. 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...
|
|