microsoft/onnxruntime-extensions
Publicmirrored fromhttps://github.com/microsoft/onnxruntime-extensionsAvailable
operators/text/op_equal.hpp
21lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include "kernels.h" |
| 7 | #include "string_utils.h" |
| 8 | |
| 9 | struct KernelStringEqual : BaseKernel { |
| 10 | KernelStringEqual(OrtApi api); |
| 11 | void Compute(OrtKernelContext* context); |
| 12 | }; |
| 13 | |
| 14 | struct CustomOpStringEqual : Ort::CustomOpBase<CustomOpStringEqual, KernelStringEqual> { |
| 15 | size_t GetInputTypeCount() const; |
| 16 | size_t GetOutputTypeCount() const; |
| 17 | ONNXTensorElementDataType GetOutputType(size_t index) const; |
| 18 | const char* GetName() const; |
| 19 | void* CreateKernel(OrtApi api, const OrtKernelInfo* /* info */) const; |
| 20 | ONNXTensorElementDataType GetInputType(size_t index) const; |
| 21 | }; |
| 22 | |