#include <tensor_shape.h>
Definition at line 43 of file tensor_shape.h.
onnxruntime::TensorShape::TensorShape |
( |
| ) |
|
|
default |
onnxruntime::TensorShape::TensorShape |
( |
const TensorShape & |
other | ) |
|
|
inline |
onnxruntime::TensorShape::TensorShape |
( |
TensorShape && |
other | ) |
|
|
inlinenoexcept |
onnxruntime::TensorShape::TensorShape |
( |
gsl::span< const int64_t > |
dims | ) |
|
onnxruntime::TensorShape::TensorShape |
( |
std::initializer_list< int64_t > |
dims | ) |
|
|
inline |
onnxruntime::TensorShape::TensorShape |
( |
const int64_t * |
dimension_sizes, |
|
|
size_t |
dimension_count |
|
) |
| |
|
inline |
onnxruntime::TensorShape::TensorShape |
( |
const std::vector< int64_t > & |
dims, |
|
|
size_t |
start, |
|
|
size_t |
end |
|
) |
| |
|
inline |
void onnxruntime::TensorShape::CopyDims |
( |
int64_t * |
dims, |
|
|
size_t |
num_dims |
|
) |
| const |
|
inline |
Copy dims into an array with given size
Definition at line 86 of file tensor_shape.h.
void onnxruntime::TensorShape::CopyDims |
( |
int64_t * |
dims, |
|
|
size_t |
start_dim, |
|
|
size_t |
num_dims |
|
) |
| const |
|
inline |
Copy dims from a specific start dim into an array with given size start_dim
is expected to be in the inclusive range [0, NumDimensions() - 1] and this function does no checks to ensure that
Definition at line 95 of file tensor_shape.h.
static const TensorShape onnxruntime::TensorShape::FromExistingBuffer |
( |
const std::vector< int64_t > & |
data | ) |
|
|
inlinestatic |
gsl::span<const int64_t> onnxruntime::TensorShape::GetDims |
( |
| ) |
const |
|
inline |
Return underlying vector representation.
Definition at line 102 of file tensor_shape.h.
bool onnxruntime::TensorShape::IsScalar |
( |
| ) |
const |
|
inline |
empty shape or 1D shape (1) is regarded as scalar tensor
Definition at line 155 of file tensor_shape.h.
size_t onnxruntime::TensorShape::NumDimensions |
( |
| ) |
const |
|
inlinenoexcept |
bool onnxruntime::TensorShape::operator== |
( |
const TensorShape & |
other | ) |
const |
|
inlinenoexcept |
int64_t onnxruntime::TensorShape::operator[] |
( |
size_t |
idx | ) |
const |
|
inline |
Return the dimension specified by <idx>.
Definition at line 73 of file tensor_shape.h.
int64_t& onnxruntime::TensorShape::operator[] |
( |
size_t |
idx | ) |
|
|
inline |
int64_t onnxruntime::TensorShape::Size |
( |
| ) |
const |
Return the total number of elements. Returns 1 for an empty (rank 0) TensorShape.
May return -1
int64_t onnxruntime::TensorShape::SizeFromDimension |
( |
size_t |
dimension | ) |
const |
Return the total number of elements from the specified dimension to the end of the tensor shape. If the dimension interval is empty (dimension == this->NumDimensions()), return 1.
- Parameters
-
dimension | Return size from this dimension to the end. Value must be between 0 and this->NumDimensions(), inclusive. |
int64_t onnxruntime::TensorShape::SizeHelper |
( |
size_t |
start, |
|
|
size_t |
end |
|
) |
| const |
Calculate size between start and end. Assumes start and end are between 0 and this->NumDimensions(), inclusive, and that start < end.
int64_t onnxruntime::TensorShape::SizeToDimension |
( |
size_t |
dimension | ) |
const |
Return the total number of elements up to the specified dimension. If the dimension interval is empty (dimension == 0), return 1.
- Parameters
-
dimension | Return size up to this dimension. Value must be between 0 and this->NumDimensions(), inclusive. |
TensorShape onnxruntime::TensorShape::Slice |
( |
size_t |
dimstart, |
|
|
size_t |
dimend |
|
) |
| const |
Return a new TensorShape of the dimensions from dimstart to dimend.
TensorShape onnxruntime::TensorShape::Slice |
( |
size_t |
dimstart | ) |
const |
|
inline |
std::string onnxruntime::TensorShape::ToString |
( |
| ) |
const |
output dimensions nicely formatted
friend struct ProviderHostImpl |
|
friend |
The documentation for this class was generated from the following file: