VTK  9.6.20260516
vtkONNXInternalUtils Namespace Reference

Functions

Ort::Value RawToTensor (float *data, const std::vector< int64_t > &shape)
 Wraps a raw float buffer into a ONNX Runtime 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.
 

Function Documentation

◆ RawToTensor()

Ort::Value vtkONNXInternalUtils::RawToTensor ( float * data,
const std::vector< int64_t > & shape )
inline

Wraps a raw float buffer into a ONNX Runtime tensor.

Note that the ONNX object directly references the memory pointed by data and does not manage or own it.

Definition at line 27 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 40 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.