VTK  9.7.20260912
vtkONNXInternalUtils Namespace Reference

Functions

int64_t TensorNumberOfElements (const std::vector< int64_t > &shape)
 Helper to find the total number of elements given the list of dimensions of a tensor.
bool IsPermutation (const std::vector< int > &permutation)
 This checks if a sequence actually represents a permutation.
std::vector< int > InversePermutation (const std::vector< int > &permutation)
 Computes the inverse of the input permutation, in other words the permutation you need to apply after the input to retrieve the original sequence.
void Permute (float *data, const std::vector< int64_t > &outputShape, const std::vector< int > &permutation)
 This reorders the memory pointed by data so that it matches the layout defined by outputShape and permutation.
std::vector< int > FindMatchingPermutation (int64_t numTuples, int64_t numComponents, const std::vector< int64_t > modelShape)
 This function tries to find the permutation required to match the dimensions of a VTK array to any N dimensional array.

Function Documentation

◆ TensorNumberOfElements()

int64_t vtkONNXInternalUtils::TensorNumberOfElements ( const std::vector< int64_t > & shape)
inline

Helper to find the total number of elements given the list of dimensions of a tensor.

Definition at line 31 of file vtkONNXInternalUtils.h.

◆ IsPermutation()

bool vtkONNXInternalUtils::IsPermutation ( const std::vector< int > & permutation)
inline

This checks if a sequence actually represents a permutation.

Definition at line 39 of file vtkONNXInternalUtils.h.

◆ InversePermutation()

std::vector< int > vtkONNXInternalUtils::InversePermutation ( const std::vector< int > & permutation)
inline

Computes the inverse of the input permutation, in other words the permutation you need to apply after the input to retrieve the original sequence.

Definition at line 51 of file vtkONNXInternalUtils.h.

◆ Permute()

void vtkONNXInternalUtils::Permute ( float * data,
const std::vector< int64_t > & outputShape,
const std::vector< int > & permutation )
inline

This reorders the memory pointed by data so that it matches the layout defined by outputShape and permutation.

Definition at line 65 of file vtkONNXInternalUtils.h.

◆ FindMatchingPermutation()

std::vector< int > vtkONNXInternalUtils::FindMatchingPermutation ( int64_t numTuples,
int64_t numComponents,
const std::vector< int64_t > modelShape )
inline

This function tries to find the permutation required to match the dimensions of a VTK array to any N dimensional array.

Definition at line 137 of file vtkONNXInternalUtils.h.