Wrapper around OrtModelMetadata.
More...
#include <onnxruntime_cxx_api.h>
Wrapper around OrtModelMetadata.
◆ ModelMetadata() [1/2]
Ort::ModelMetadata::ModelMetadata |
( |
std::nullptr_t |
| ) |
|
|
inlineexplicit |
Create an empty ModelMetadata object, must be assigned a valid one to be used.
◆ ModelMetadata() [2/2]
Used for interop with the C API.
◆ GetCustomMetadataMapKeysAllocated()
Returns a vector of copies of the custom metadata keys.
- Parameters
-
allocator | to allocate memory for the copy of the string returned |
- Returns
- a instance std::vector of smart pointers that would deallocate the buffers when out of scope. The OrtAllocator instance must be valid at the point of memory release. Wraps OrtApi::ModelMetadataGetCustomMetadataMapKeys
◆ GetDescriptionAllocated()
Returns a copy of the description.
- Parameters
-
allocator | to allocate memory for the copy of the string returned |
- Returns
- a instance of smart pointer that would deallocate the buffer when out of scope. The OrtAllocator instances must be valid at the point of memory release. Wraps OrtApi::ModelMetadataGetDescription
◆ GetDomainAllocated()
Returns a copy of the domain name.
- Parameters
-
allocator | to allocate memory for the copy of the name returned |
- Returns
- a instance of smart pointer that would deallocate the buffer when out of scope. The OrtAllocator instances must be valid at the point of memory release. Wraps OrtApi::ModelMetadataGetDomain
◆ GetGraphDescriptionAllocated()
Returns a copy of the graph description.
- Parameters
-
allocator | to allocate memory for the copy of the string returned |
- Returns
- a instance of smart pointer that would deallocate the buffer when out of scope. The OrtAllocator instances must be valid at the point of memory release. Wraps OrtApi::ModelMetadataGetGraphDescription
◆ GetGraphNameAllocated()
Returns a copy of the graph name.
- Parameters
-
allocator | to allocate memory for the copy of the name returned |
- Returns
- a instance of smart pointer that would deallocate the buffer when out of scope. The OrtAllocator instances must be valid at the point of memory release. Wraps OrtApi::ModelMetadataGetGraphName
◆ GetProducerNameAllocated()
Returns a copy of the producer name.
- Parameters
-
allocator | to allocate memory for the copy of the name returned |
- Returns
- a instance of smart pointer that would deallocate the buffer when out of scope. The OrtAllocator instances must be valid at the point of memory release. Wraps OrtApi::ModelMetadataGetProducerName
◆ GetVersion()
int64_t Ort::ModelMetadata::GetVersion |
( |
| ) |
const |
◆ LookupCustomMetadataMapAllocated()
Looks up a value by a key in the Custom Metadata map.
- Parameters
-
key | zero terminated string key to lookup |
allocator | to allocate memory for the copy of the string returned |
- Returns
- a instance of smart pointer that would deallocate the buffer when out of scope. maybe nullptr if key is not found.
The OrtAllocator instances must be valid at the point of memory release. Wraps OrtApi::ModelMetadataLookupCustomMetadataMap