TensorView¶
-
template<ScalarType T, int _dim>
class TensorView¶ Typed, dimension-checked view onto a Tensor’s data.
Indexing with
operator[]orgetpeels off leading dimensions until_dimreaches 0, at which point the view converts to and from a single element of typeT.Public Functions
-
inline TensorView(PackedTensorView<T, _dim> &packed_view)¶
-
inline const TensorView<T, _dim - 1> operator[](std::size_t index) const¶
-
inline TensorView<T, _dim - 1> operator[](std::size_t index)¶
-
TensorView<T, _dim> &operator=(TensorView<T, _dim> &value) = delete¶
-
inline std::size_t size(std::size_t index = 0) const¶
-
inline std::size_t *stride() const¶
-
inline std::size_t *shape() const¶
-
inline TensorView(PackedTensorView<T, _dim> &packed_view)¶