onnxruntime/winml/lib/Api.Experimental/LearningModelOperator.h
Justin Chu 416dc2e84d
Fix clang-format comment indents on Windows for winml/ (#17144)
On Windows, clang-format has a bug when AlignTrailingComments.Kind is
set to `Leave`
(https://clang.llvm.org/docs/ClangFormatStyleOptions.html#aligntrailingcomments),
where it will keep adding indentation to comments after each formatting
runs.

This PR changes to always align comments so we do not hit the bug.

As a consequence of the options change we need to reformat some of the
files. Note that this option is aligned with the rest of the repository.
2023-08-14 23:50:14 -04:00

49 lines
1.9 KiB
C++

#pragma once
#include "LearningModelOperator.g.h"
#include "TensorFeatureDescriptor.h"
#include "iengine.h"
#include "LearningModelBuilder.h"
#include "LearningModelInputs.h"
namespace WINML_EXPERIMENTALP {
struct LearningModelOperator : LearningModelOperatorT<LearningModelOperator> {
LearningModelOperator() = delete;
LearningModelOperator(hstring const& type);
LearningModelOperator(hstring const& type, hstring const& domain);
winml_experimental::LearningModelOperator SetName(hstring const& name);
winml_experimental::LearningModelOperator SetInput(hstring const& operator_input_name, hstring const& input_name);
winml_experimental::LearningModelOperator SetConstant(
hstring const& operator_input_name, wf::IInspectable const& value
);
winml_experimental::LearningModelOperator SetOutput(hstring const& operator_output_name, hstring const& output_name);
winml_experimental::LearningModelOperator SetAttribute(hstring const& name, wf::IInspectable const& value);
hstring Name();
hstring Type();
hstring Domain();
wfc::IMap<winrt::hstring, winrt::hstring> InputMapping();
wfc::IMap<winrt::hstring, wf::IInspectable> ConstantInputMapping();
wfc::IMap<winrt::hstring, winrt::hstring> OutputMapping();
wfc::IMap<winrt::hstring, wf::IInspectable> AttributeMap();
private:
winrt::hstring name_;
winrt::hstring domain_;
winrt::hstring type_;
wfc::IMap<winrt::hstring, wf::IInspectable> attribute_values_;
wfc::IMap<winrt::hstring, wf::IInspectable> constant_input_mapping_;
wfc::IMap<winrt::hstring, winrt::hstring> input_mapping_;
wfc::IMap<winrt::hstring, winrt::hstring> output_mapping_;
};
} // namespace WINML_EXPERIMENTALP
namespace WINML_EXPERIMENTAL::factory_implementation {
struct LearningModelOperator : LearningModelOperatorT<LearningModelOperator, implementation::LearningModelOperator> {};
} // namespace WINML_EXPERIMENTAL::factory_implementation