mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-16 21:00:14 +00:00
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.
42 lines
1.3 KiB
C++
42 lines
1.3 KiB
C++
#include "lib/Api.Experimental/pch/pch.h"
|
|
#include "LearningModelExperimental.h"
|
|
#include "LearningModel.h"
|
|
#include "LearningModelJoinOptions.h"
|
|
|
|
namespace WINML_EXPERIMENTALP {
|
|
|
|
LearningModelExperimental::LearningModelExperimental(Microsoft::AI::MachineLearning::LearningModel const& model)
|
|
: model_(model) {
|
|
}
|
|
|
|
winml::LearningModel LearningModelExperimental::JoinModel(
|
|
winml::LearningModel const& other, winml_experimental::LearningModelJoinOptions const& options
|
|
) {
|
|
telemetry_helper.LogApiUsage("LearningModelExperimental::JoinModel");
|
|
|
|
auto modelp = model_.as<winmlp::LearningModel>();
|
|
auto optionsp = options.as<winml_experimentalp::LearningModelJoinOptions>();
|
|
|
|
modelp->JoinModel(
|
|
other,
|
|
optionsp->GetLinkages(),
|
|
optionsp->PromoteUnlinkedOutputsToFusedOutputs(),
|
|
optionsp->CloseModelOnJoin(),
|
|
optionsp->JoinedNodePrefix()
|
|
);
|
|
|
|
return model_;
|
|
}
|
|
|
|
void LearningModelExperimental::Save(hstring const& file_name) {
|
|
telemetry_helper.LogApiUsage("LearningModelExperimental::Save");
|
|
auto modelp = model_.as<winmlp::LearningModel>();
|
|
modelp->SaveToFile(file_name);
|
|
}
|
|
|
|
void LearningModelExperimental::SetName(hstring const& model_name) {
|
|
auto modelp = model_.as<winmlp::LearningModel>();
|
|
modelp->SetName(model_name);
|
|
}
|
|
|
|
} // namespace WINML_EXPERIMENTALP
|