Representation and Reference Lowering of ONNX Models in MLIR Compiler Infrastructure
View the Project on GitHub onnx/onnx-mlir
This project is maintained by onnx
Hosted on GitHub Pages — Theme by orderedlist
onnx-mlir
|
#include "onnx-mlir/Runtime/OMTensor.h"
Go to the source code of this file.
Typedefs | |
typedef struct OMTensorList | OMTensorList |
Functions | |
OM_EXTERNAL_VISIBILITY OMTensorList * | omTensorListCreate (OMTensor **tensors, int64_t n) |
OMTensorList creator. | |
OM_EXTERNAL_VISIBILITY void | omTensorListDestroy (OMTensorList *list) |
OMTensorList destroyer. | |
OM_EXTERNAL_VISIBILITY void | omTensorListDestroyShallow (OMTensorList *list) |
OMTensorList shallow destroyer which does not destroy the tensors. | |
OM_EXTERNAL_VISIBILITY OMTensor ** | omTensorListGetOmtArray (const OMTensorList *list) |
OMTensorList OMTensor array getter. | |
OM_EXTERNAL_VISIBILITY int64_t | omTensorListGetSize (const OMTensorList *list) |
OMTensorList size getter. | |
OM_EXTERNAL_VISIBILITY OMTensor * | omTensorListGetOmtByIndex (const OMTensorList *list, int64_t index) |
OMTensorList OMTensor getter by index. | |
typedef struct OMTensorList OMTensorList |
OM_EXTERNAL_VISIBILITY OMTensorList * omTensorListCreate | ( | OMTensor ** | tensors, |
int64_t | n | ||
) |
OMTensorList creator.
Create an OMTensorList with specified OMTensor array.
Internally OMTensorList creates its own copy of the passed-in tensor pointer array. This copy is freed when the OMTensorList is destroyed.
tensors | array of pointers to OMTensor |
n | number of elements in tensors array |
OM_EXTERNAL_VISIBILITY void omTensorListDestroy | ( | OMTensorList * | list | ) |
OMTensorList destroyer.
Destroy the OMTensorList struct recursively. That is to say, both the OMTensorList and OMTensors it contains are freed.
list | pointer to the OMTensorList to be destroyed. The function simply returns when pointer is null. |
OM_EXTERNAL_VISIBILITY void omTensorListDestroyShallow | ( | OMTensorList * | list | ) |
OMTensorList shallow destroyer which does not destroy the tensors.
Destroys the OMTensorList and its internal array of pointers. The OMTensors inside the OMTensorList are not destroyed.
list | pointer to the OMTensorList to be freed. The function simply returns when pointer is null. |
OM_EXTERNAL_VISIBILITY OMTensor ** omTensorListGetOmtArray | ( | const OMTensorList * | list | ) |
OMTensorList OMTensor array getter.
The pointer to OMTensor pointers are returned without copying, so caller should not free the returned pointer.
list | pointer to the OMTensorList |
OM_EXTERNAL_VISIBILITY OMTensor * omTensorListGetOmtByIndex | ( | const OMTensorList * | list, |
int64_t | index | ||
) |
OMTensorList OMTensor getter by index.
list | pointer to the OMTensorList |
index | index of the OMTensor |
OM_EXTERNAL_VISIBILITY int64_t omTensorListGetSize | ( | const OMTensorList * | list | ) |
OMTensorList size getter.
list | pointer to the OMTensorList |