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

daisytuner / sdfglib / 16188914472

10 Jul 2025 07:30AM UTC coverage: 64.808% (+0.1%) from 64.705%
16188914472

push

github

web-flow
Merge pull request #138 from daisytuner/tenstorrent/trivial

lib_stream -> lib_snippet_factory in code generation

131 of 243 new or added lines in 18 files covered. (53.91%)

3 existing lines in 3 files now uncovered.

8545 of 13185 relevant lines covered (64.81%)

179.13 hits per line

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

23.08
/src/codegen/code_snippet_factory.cpp
1
#include "sdfg/codegen/code_snippet_factory.h"
2

3
namespace sdfg::codegen {
4

5
CodeSnippetFactory::CodeSnippetFactory(const std::pair<std::filesystem::path, std::filesystem::path>* config)
66✔
6
    : output_path_(config ? config->first : "."), header_path_(config ? config->second : "") {}
66✔
7

8

NEW
9
CodeSnippet& CodeSnippetFactory::require(const std::string& name, const std::string& extension, bool as_file) {
×
NEW
10
    auto [snippet, newly_created] = snippets_.try_emplace(name, extension, as_file);
×
11

NEW
12
    if (!newly_created && extension != snippet->second.extension()) {
×
NEW
13
        throw std::runtime_error(
×
NEW
14
            "Code snippet " + name + " already exists with '." + snippet->second.extension() +
×
NEW
15
            "', but was required with '." + extension + "'"
×
16
        );
17
    }
18

NEW
19
    return snippet->second;
×
NEW
20
}
×
21

NEW
22
std::unordered_map<std::string, CodeSnippet>::iterator CodeSnippetFactory::find(const std::string& name) {
×
NEW
23
    return snippets_.find(name);
×
24
}
25
const std::unordered_map<std::string, CodeSnippet>& CodeSnippetFactory::snippets() const { return snippets_; }
13✔
26

27
} // namespace sdfg::codegen
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

© 2025 Coveralls, Inc