microsoft/onnxruntime-extensions
Publicmirrored fromhttps://github.com/microsoft/onnxruntime-extensionsAvailable
base/string_tensor.h
22lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include "ocos.h" |
| 7 | #include <string> |
| 8 | |
| 9 | // Retrieves a vector of strings if the input type is std::string. |
| 10 | // It is a copy of the input data and can be modified to compute the output. |
| 11 | void GetTensorMutableDataString(const OrtApi& api, const OrtW::CustomOpApi& ort, const OrtKernelContext* context, |
| 12 | const OrtValue* value, std::vector<std::string>& output); |
| 13 | void FillTensorDataString(const OrtApi& api, const OrtW::CustomOpApi& ort, const OrtKernelContext* context, |
| 14 | const std::vector<std::string>& value, OrtValue* output); |
| 15 | |
| 16 | |
| 17 | class ustring; |
| 18 | void GetTensorMutableDataString(const OrtApi& api, const OrtW::CustomOpApi& ort, const OrtKernelContext* context, |
| 19 | const OrtValue* value, std::vector<ustring>& output); |
| 20 | |
| 21 | void FillTensorDataString(const OrtApi& api, const OrtW::CustomOpApi& ort, const OrtKernelContext* context, |
| 22 | const std::vector<ustring>& value, OrtValue* output); |
| 23 | |