Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
3 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "lib/Api.Experimental/pch/pch.h"
#include "LearningModelSessionOptionsExperimental.h"
#include "winrt/Windows.Foundation.Collections.h"
#include "LearningModelSession.h"
#include "LearningModelSessionOptions.h"
#include "iengine.h"
 
namespace WINML_EXPERIMENTALP {
LearningModelSessionOptionsExperimental::LearningModelSessionOptionsExperimental(
  const winml::LearningModelSessionOptions& options
)
  : options_(options) {
}
 
LearningModelSessionOptionsExperimental::LearningModelSessionOptionsExperimental(
  const winml::LearningModelSession& session
)
  : options_(nullptr) {
  com_ptr<WINMLP::LearningModelSession> session_impl = session.as<WINMLP::LearningModelSession>();
  options_ = session_impl->Options();
 
  _winml::IEngine* engine = session_impl->GetEngine();
  engine->GetNamedDimensionOverrides(overrides_);
}
 
wfc::IMapView<winrt::hstring, uint32_t> LearningModelSessionOptionsExperimental::GetNamedDimensionOverrides() {
  telemetry_helper.LogApiUsage("LearningModelSessionOptionsExperimental::GetNamedDimensionOverrides");
  return overrides_;
}
 
void LearningModelSessionOptionsExperimental::RegisterCustomOpsLibrary(const hstring& path) {
  telemetry_helper.LogApiUsage("LearningModelSessionOptionsExperimental::RegisterCustomOpsLibrary");
  com_ptr<WINMLP::LearningModelSessionOptions> options_impl = options_.as<WINMLP::LearningModelSessionOptions>();
  options_impl->RegisterCustomOpsLibrary(path);
}
 
}  // namespace WINML_EXPERIMENTALP