struct ngraph::runtime::reference::TensorSlice¶
Overview¶
#include <unique.hpp>
template <typename Index_t, typename Count_t>
struct TensorSlice
{
// fields
Index_t idx = 0;
Index_t rev_idx = -1;
Count_t count = 1;
DescriptorType descriptor_type = DescriptorType::SINGLE_VALUE;
// construction
TensorSlice(const Index_t idx_, const DescriptorType descriptor_type_);
TensorSlice(const Index_t idx_, const Index_t rev_idx_, const Count_t count_);
};
Detailed Documentation¶
Fields¶
Index_t idx = 0
The index of the current element in the original input tensor. It never changes even if the elements get sorted. This value is used as a mapping between a unique element in the first output tensor and the position of this element in the original input tensor.
Index_t rev_idx = -1
The rev_idx is a mapping between every element in the original input and the location of a unique element in the first output tensor. More than one Element can have the same rev_idx.
Count_t count = 1
The number of occurrences of a given element in the input tensor. This value is different than one only for duplicates found in the input tensor.
DescriptorType descriptor_type = DescriptorType::SINGLE_VALUE
Indicates if this object points to a single value in the input tensor (rather than a slice of the tensor)