This class is based on PyTorch's aten/src/ATen/native/Indexing.cpp.
More...
#include <AdvancedIndexing.h>
This class is based on PyTorch's aten/src/ATen/native/Indexing.cpp.
◆ AdvancedIndexPreprocessor()
open3d::core::AdvancedIndexPreprocessor::AdvancedIndexPreprocessor |
( |
const Tensor & |
tensor, |
|
|
const std::vector< Tensor > & |
index_tensors |
|
) |
| |
|
inline |
◆ ExpandBoolTensors()
std::vector< Tensor > open3d::core::AdvancedIndexPreprocessor::ExpandBoolTensors |
( |
const std::vector< Tensor > & |
index_tensors | ) |
|
|
staticprotected |
Expand boolean tensor to integer index.
◆ ExpandToCommonShapeExceptZeroDim()
std::pair< std::vector< Tensor >, SizeVector > open3d::core::AdvancedIndexPreprocessor::ExpandToCommonShapeExceptZeroDim |
( |
const std::vector< Tensor > & |
index_tensors | ) |
|
|
static |
Expand all tensors to the broadcasted shape, 0-dim tensors are ignored. Thorws exception if the common broadcasted shape does not exist.
◆ GetIndexedShape()
SizeVector open3d::core::AdvancedIndexPreprocessor::GetIndexedShape |
( |
| ) |
const |
|
inline |
◆ GetIndexedStrides()
SizeVector open3d::core::AdvancedIndexPreprocessor::GetIndexedStrides |
( |
| ) |
const |
|
inline |
◆ GetIndexTensors()
std::vector< Tensor > open3d::core::AdvancedIndexPreprocessor::GetIndexTensors |
( |
| ) |
const |
|
inline |
◆ GetOutputShape()
SizeVector open3d::core::AdvancedIndexPreprocessor::GetOutputShape |
( |
| ) |
const |
|
inline |
◆ GetTensor()
Tensor open3d::core::AdvancedIndexPreprocessor::GetTensor |
( |
| ) |
const |
|
inline |
◆ IsIndexSplittedBySlice()
bool open3d::core::AdvancedIndexPreprocessor::IsIndexSplittedBySlice |
( |
const std::vector< Tensor > & |
index_tensors | ) |
|
|
static |
Returns true if the indexed dimension is splitted by (full) slice. E.g. A[[1, 2], :, [1, 2]] returns true A[[1, 2], [1, 2], :] returns false
◆ RestrideIndexTensor()
Tensor open3d::core::AdvancedIndexPreprocessor::RestrideIndexTensor |
( |
const Tensor & |
index_tensor, |
|
|
int64_t |
dims_before, |
|
|
int64_t |
dims_after |
|
) |
| |
|
static |
◆ RestrideTensor()
Tensor open3d::core::AdvancedIndexPreprocessor::RestrideTensor |
( |
const Tensor & |
tensor, |
|
|
int64_t |
dims_before, |
|
|
int64_t |
dims_indexed, |
|
|
SizeVector |
replacement_shape |
|
) |
| |
|
static |
◆ RunPreprocess()
void open3d::core::AdvancedIndexPreprocessor::RunPreprocess |
( |
| ) |
|
|
protected |
Preprocess tensor and index tensors.
◆ ShuffleIndexedDimsToFront()
std::pair< Tensor, std::vector< Tensor > > open3d::core::AdvancedIndexPreprocessor::ShuffleIndexedDimsToFront |
( |
const Tensor & |
tensor, |
|
|
const std::vector< Tensor > & |
index_tensors |
|
) |
| |
|
static |
Shuffle indexed dimensions in front of the slice dimensions for the tensor and index tensors.
◆ index_tensors_
std::vector<Tensor> open3d::core::AdvancedIndexPreprocessor::index_tensors_ |
|
protected |
The processed index tensors.
◆ indexed_shape_
SizeVector open3d::core::AdvancedIndexPreprocessor::indexed_shape_ |
|
protected |
The shape of the indexed dimensions. See the docstring of RestrideTensor for details.
◆ indexed_strides_
SizeVector open3d::core::AdvancedIndexPreprocessor::indexed_strides_ |
|
protected |
The strides for indexed dimensions, in element numbers (not byte size). See the docstring of RestrideTensor for details.
◆ output_shape_
SizeVector open3d::core::AdvancedIndexPreprocessor::output_shape_ |
|
protected |
◆ tensor_
Tensor open3d::core::AdvancedIndexPreprocessor::tensor_ |
|
protected |
The processed tensors being indexed. The tensor still uses the same underlying memory, but it may have been reshaped and restrided.
The documentation for this class was generated from the following files: