Skip to main content

QuantTess.h File

SimaAI quant-tessellation node wrapper. More...

Included Headers

#include "builder/ConfigJsonConsumer.h" #include "builder/ConfigJsonOverride.h" #include "builder/ConfigJsonProvider.h" #include "builder/Node.h" #include <functional> #include <memory> #include <optional> #include <string> #include <vector>

Namespaces Index

namespacesimaai
namespaceneat
namespacenodes

Classes Index

structQuantTessOptions
classQuantTess

Description

SimaAI quant-tessellation node wrapper.

File Listing

The file content with the documentation metadata removed is:

1
6#pragma once
7
8#include "builder/ConfigJsonConsumer.h"
9#include "builder/ConfigJsonOverride.h"
10#include "builder/ConfigJsonProvider.h"
11#include "builder/Node.h"
12
13#include <functional>
14#include <memory>
15#include <optional>
16#include <string>
17#include <vector>
18
19namespace simaai::neat {
20class Model;
21
23 QuantTessOptions() = default;
24 explicit QuantTessOptions(const simaai::neat::Model& model);
25
26 std::string config_path;
27 std::string config_dir;
28 bool keep_config = false;
29 std::optional<nlohmann::json> config_json;
30 std::string element_name;
31 int num_buffers = 0;
33 bool num_buffers_locked = false;
34};
35
36class QuantTess final : public Node,
37 public ConfigJsonProvider,
38 public ConfigJsonOverride,
39 public ConfigJsonConsumer {
40public:
41 explicit QuantTess(QuantTessOptions opt = {});
42 struct ConfigHolder;
43
44 std::string kind() const override {
45 return "QuantTess";
46 }
47 NodeCapsBehavior caps_behavior() const override {
48 return NodeCapsBehavior::Static;
49 }
50 bool has_config_json() const override {
51 return true;
52 }
53 bool wire_input_names(const std::vector<std::string>& upstream_names,
54 const std::string& tag) override;
55 std::string backend_fragment(int node_index) const override;
56 std::vector<std::string> element_names(int node_index) const override;
57
58 const nlohmann::json* config_json() const override;
59 bool override_config_json(const std::function<void(nlohmann::json&)>& edit,
60 const std::string& tag) override;
61 void apply_upstream_config(const nlohmann::json& upstream,
62 const std::string& upstream_kind) override;
63
64 const QuantTessOptions& options() const {
65 return opt_;
66 }
67 const std::string& config_path() const {
68 return config_path_;
69 }
70
71private:
73 std::shared_ptr<ConfigHolder> config_holder_;
74 std::string config_path_;
75};
76
77} // namespace simaai::neat
78
79namespace simaai::neat::nodes {
80std::shared_ptr<simaai::neat::Node> QuantTess(QuantTessOptions opt = {});
81} // namespace simaai::neat::nodes

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.1.