Skip to main content

DetessDequant.h File

SimaAI detessellation + dequantization node wrapper. More...

Included Headers

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

Namespaces Index

namespacesimaai
namespaceneat
namespacenodes

Classes Index

structDetessDequantOptions
classDetessDequant

Description

SimaAI detessellation + dequantization 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#include "builder/OutputSpec.h"
13
14#include <functional>
15#include <memory>
16#include <optional>
17#include <string>
18#include <vector>
19
20namespace simaai::neat {
21class Model;
22} // namespace simaai::neat
23
24namespace simaai::neat {
25
29
30 std::string config_path;
31 std::string config_dir;
32 bool keep_config = false;
33 std::optional<nlohmann::json> config_json;
34 std::string upstream_name;
35 std::string element_name;
36 int num_buffers = 0;
38 bool num_buffers_locked = false;
39};
40
41class DetessDequant final : public Node,
42 public OutputSpecProvider,
43 public ConfigJsonProvider,
44 public ConfigJsonOverride,
45 public ConfigJsonConsumer {
46public:
48 struct ConfigHolder;
49
50 std::string kind() const override {
51 return "DetessDequant";
52 }
53 NodeCapsBehavior caps_behavior() const override {
54 return NodeCapsBehavior::Static;
55 }
56 bool has_config_json() const override {
57 return true;
58 }
59 bool wire_input_names(const std::vector<std::string>& upstream_names,
60 const std::string& tag) override;
61 std::string backend_fragment(int node_index) const override;
62 std::vector<std::string> element_names(int node_index) const override;
63 OutputSpec output_spec(const OutputSpec& input) const override;
64
65 const nlohmann::json* config_json() const override;
66 bool override_config_json(const std::function<void(nlohmann::json&)>& edit,
67 const std::string& tag) override;
68 void apply_upstream_config(const nlohmann::json& upstream,
69 const std::string& upstream_kind) override;
70
72 return opt_;
73 }
74 const std::string& config_path() const {
75 return config_path_;
76 }
77
78private:
80 std::shared_ptr<ConfigHolder> config_holder_;
81 std::string config_path_;
82};
83
84} // namespace simaai::neat
85
86namespace simaai::neat::nodes {
87std::shared_ptr<simaai::neat::Node> DetessDequant(DetessDequantOptions opt = {});
88} // namespace simaai::neat::nodes

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.1.