Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
2 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
#pragma once
 
#include "Env.h"
#include "EpContextDataReadCallback.h"
#include <jsi/jsi.h>
#include <memory>
#include "onnxruntime_cxx_api.h"
#include <vector>
 
namespace onnxruntimejsi {
 
extern const std::vector<const char*> supportedBackends;
 
/**
 * @brief Parse the JavaScript session options into `sessionOptions`.
 *
 * Must be called on the JS thread. When the options register an `epContextDataRead` callback,
 * `epContextDataRead` receives the state that backs it; the caller must keep that state alive for
 * at least as long as the session created from `sessionOptions`.
 */
void parseSessionOptions(facebook::jsi::Runtime& runtime,
                         const facebook::jsi::Value& optionsValue,
                         Ort::SessionOptions& sessionOptions,
                         const std::shared_ptr<Env>& env,
                         std::shared_ptr<EpContextDataReadCallback>& epContextDataRead);
 
void parseRunOptions(facebook::jsi::Runtime& runtime,
                     const facebook::jsi::Value& optionsValue,
                     Ort::RunOptions& runOptions);
 
}  // namespace onnxruntimejsi