microsoft/onnxruntime-extensions

Public

mirrored fromhttps://github.com/microsoft/onnxruntime-extensionsAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
ba200b4a0e391b45c0df4f9b1a506f0a9f574dd4

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

operators/string_tensor.h

24lines · modecode

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