• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

daisytuner / sdfglib / 20095110671

10 Dec 2025 10:17AM UTC coverage: 40.342% (-21.5%) from 61.872%
20095110671

push

github

web-flow
Merge pull request #384 from daisytuner/viz-struct-subset-fix

Fixing a bug in handling subsets on structures that caused crashes in…

13651 of 43783 branches covered (31.18%)

Branch coverage included in aggregate %.

0 of 8 new or added lines in 1 file covered. (0.0%)

250 existing lines in 14 files now uncovered.

11659 of 18956 relevant lines covered (61.51%)

101.74 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

11.11
/include/sdfg/codegen/code_snippet_factory.h
1
#pragma once
2
#include <string>
3

4
#include "utils.h"
5

6
namespace sdfg {
7
namespace codegen {
8

9
inline std::string CODE_SNIPPET_INIT_ONCE = "init_once";
10
inline std::string CODE_SNIPPET_DEINIT_ONCE = "deinit_once";
11

12
class CodeSnippet {
13
protected:
14
    PrettyPrinter stream_;
15
    std::string extension_;
16
    bool as_file_;
17
    std::string name_;
18

19
public:
20
    CodeSnippet(const std::string& name, const std::string& extension, bool as_file)
×
21
        : extension_(extension), as_file_(as_file), name_(name) {};
×
22

UNCOV
23
    PrettyPrinter& stream() { return stream_; }
×
24

25
    const PrettyPrinter& stream() const { return stream_; }
26

27
    const std::string& extension() const { return extension_; }
×
28

29
    bool is_as_file() const { return as_file_; }
30

31
    const std::string& name() const { return name_; }
32
};
33

34
class CodeSnippetFactory {
35
protected:
36
    std::unordered_map<std::string, CodeSnippet> snippets_;
37
    const std::filesystem::path output_path_;
38
    const std::filesystem::path header_path_;
39

40
public:
41
    CodeSnippetFactory(const std::pair<std::filesystem::path, std::filesystem::path>* config = nullptr);
42

43
    virtual ~CodeSnippetFactory() = default;
46✔
44

45
    CodeSnippet& require(const std::string& name, const std::string& extension, bool as_file = true);
46

47
    std::unordered_map<std::string, CodeSnippet>::iterator find(const std::string& name);
48

49
    const std::unordered_map<std::string, CodeSnippet>& snippets() const;
50

51
    const std::filesystem::path& output_path() const { return output_path_; }
52
    const std::filesystem::path& header_path() const { return header_path_; }
53
};
54

55

56
} // namespace codegen
57
} // namespace sdfg
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc