onnx-mlir
Typedefs | Functions
OMTensorList.h File Reference
#include "onnx-mlir/Runtime/OMTensor.h"

Go to the source code of this file.

Typedefs

typedef struct OMTensorList OMTensorList
 

Functions

OMTensorListomTensorListCreate (OMTensor **tensors, int n)
 OMTensorList creator. More...
 
void omTensorListDestroy (OMTensorList *list)
 OMTensorList destroyer. More...
 
OMTensor ** omTensorListGetOmtArray (OMTensorList *list)
 OMTensorList OMTensor array getter. More...
 
int omTensorListGetSize (OMTensorList *list)
 OMTensorList size getter. More...
 
OMTensoromTensorListGetOmtByIndex (OMTensorList *list, size_t index)
 OMTensorList OMTensor getter by index. More...
 

Typedef Documentation

◆ OMTensorList

typedef struct OMTensorList OMTensorList

Function Documentation

◆ omTensorListCreate()

OMTensorList* omTensorListCreate ( OMTensor **  tensors,
int  n 
)

OMTensorList creator.

Create an OMTensorList with specified OMTensor array. The array of pointers to OMTensor pointers is used without copying, so caller should not free the tensors ptr.

Parameters
tensorsarray of pointers to OMTensor
nnumber of elements in tensors array
Returns
pointer to the OMTensorList created, NULL if creation failed.

◆ omTensorListDestroy()

void omTensorListDestroy ( OMTensorList list)

OMTensorList destroyer.

Destroy the OMTensorList struct recursively. That is to say, both the ptr to the OMTensor pointers AND the OMTensor pointers are freed.

Parameters
listpointer to the OMTensorList to be destroyed

◆ omTensorListGetOmtArray()

OMTensor** omTensorListGetOmtArray ( OMTensorList list)

OMTensorList OMTensor array getter.

The pointer to OMTensor pointers are returned without copying, so caller should not free the returned pointer.

Parameters
listpointer to the OMTensorList
Returns
pointer to the array of OMTensor pointers.

◆ omTensorListGetOmtByIndex()

OMTensor* omTensorListGetOmtByIndex ( OMTensorList list,
size_t  index 
)

OMTensorList OMTensor getter by index.

Parameters
listpointer to the OMTensorList
indexindex of the OMTensor pointer to the OMTensor, NULL if not found.

◆ omTensorListGetSize()

int omTensorListGetSize ( OMTensorList list)

OMTensorList size getter.

Parameters
listpointer to the OMTensorList
Returns
number of elements in the OMTensor array.