![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
A minimalistic class that reference a Tensor. More...
#include <Indexer.h>

Public Member Functions | |
| TensorRef () | |
| TensorRef (const Tensor &t) | |
| void | Permute (const SizeVector &dims) |
| Permute (dimension shuffle) the reference to a Tensor. More... | |
| bool | IsContiguous () const |
| Returns True if the underlying memory buffer is contiguous. More... | |
| bool | operator== (const TensorRef &other) const |
| bool | operator!= (const TensorRef &other) const |
Public Attributes | |
| void * | data_ptr_ |
| int64_t | ndims_ = 0 |
| int64_t | dtype_byte_size_ = 0 |
| int64_t | shape_ [MAX_DIMS] |
| int64_t | byte_strides_ [MAX_DIMS] |
|
inline |
Definition at line 112 of file Indexer.h.
References byte_strides_, cloudViewer::core::Dtype::ByteSize(), data_ptr_, dtype_byte_size_, cloudViewer::core::Tensor::GetDataPtr(), cloudViewer::core::Tensor::GetDtype(), cloudViewer::core::Tensor::GetShape(), cloudViewer::core::Tensor::GetStride(), LogError, cloudViewer::core::MAX_DIMS, ndims_, cloudViewer::core::Tensor::NumDims(), and shape_.
|
inline |
Returns True if the underlying memory buffer is contiguous.
Definition at line 164 of file Indexer.h.
References byte_strides_, cloudViewer::core::shape_util::DefaultStrides(), dtype_byte_size_, ndims_, and shape_.
Referenced by cloudViewer::core::Indexer::UpdateContiguousFlags().
|
inline |
|
inline |
Definition at line 174 of file Indexer.h.
References byte_strides_, data_ptr_, dtype_byte_size_, ndims_, and shape_.
|
inline |
Permute (dimension shuffle) the reference to a Tensor.
| dims | The desired ordering of dimensions. |
Note: This only affects this Tensor reference, but not the underlying Tensor.
Definition at line 132 of file Indexer.h.
References byte_strides_, LogError, ndims_, shape_, cloudViewer::core::SmallVectorBase< Size_T >::size(), and cloudViewer::core::shape_util::WrapDim().
Referenced by cloudViewer::core::Indexer::ReorderDimensions().
| int64_t cloudViewer::core::TensorRef::byte_strides_[MAX_DIMS] |
Definition at line 197 of file Indexer.h.
Referenced by cloudViewer::core::Indexer::BroadcastRestride(), cloudViewer::core::Indexer::CoalesceDimensions(), cloudViewer::core::Indexer::GetPerOutputIndexer(), cloudViewer::core::TensorIterator::GetPtr(), cloudViewer::core::Indexer::GetWorkloadDataPtr(), IsContiguous(), cloudViewer::core::Indexer::IsReductionDim(), operator==(), Permute(), cloudViewer::core::Indexer::ReductionRestride(), cloudViewer::core::Indexer::ReorderDimensions(), and TensorRef().
| void* cloudViewer::core::TensorRef::data_ptr_ |
Definition at line 193 of file Indexer.h.
Referenced by cloudViewer::core::Indexer::GetPerOutputIndexer(), cloudViewer::core::TensorIterator::GetPtr(), cloudViewer::core::Indexer::GetWorkloadDataPtr(), operator==(), cloudViewer::core::Indexer::ShrinkDim(), and TensorRef().
| int64_t cloudViewer::core::TensorRef::dtype_byte_size_ = 0 |
Definition at line 195 of file Indexer.h.
Referenced by cloudViewer::core::TensorIterator::GetPtr(), cloudViewer::core::Indexer::GetWorkloadDataPtr(), IsContiguous(), operator==(), and TensorRef().
| int64_t cloudViewer::core::TensorRef::ndims_ = 0 |
Definition at line 194 of file Indexer.h.
Referenced by cloudViewer::core::Indexer::BroadcastRestride(), cloudViewer::core::Indexer::CoalesceDimensions(), cloudViewer::core::Indexer::Indexer(), IsContiguous(), operator==(), Permute(), cloudViewer::core::Indexer::ReductionRestride(), and TensorRef().
| int64_t cloudViewer::core::TensorRef::shape_[MAX_DIMS] |
Definition at line 196 of file Indexer.h.
Referenced by cloudViewer::core::Indexer::BroadcastRestride(), cloudViewer::core::Indexer::GetPerOutputIndexer(), cloudViewer::core::Indexer::Indexer(), IsContiguous(), cloudViewer::core::TensorIterator::NumWorkloads(), operator==(), Permute(), cloudViewer::core::Indexer::ReductionRestride(), and TensorRef().