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

daisytuner / sdfglib / 20606101998

30 Dec 2025 09:15PM UTC coverage: 39.289% (+0.002%) from 39.287%
20606101998

push

github

web-flow
Merge pull request #418 from daisytuner/formatting

formatting

14705 of 48717 branches covered (30.18%)

Branch coverage included in aggregate %.

2 of 19 new or added lines in 7 files covered. (10.53%)

1 existing line in 1 file now uncovered.

12576 of 20719 relevant lines covered (60.7%)

86.36 hits per line

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

16.67
/src/data_flow/library_nodes/stdlib/memmove.cpp
1
#include "sdfg/data_flow/library_nodes/stdlib/memcpy.h"
2

3
namespace sdfg {
4
namespace stdlib {
5

6
MemcpyNode::MemcpyNode(
7✔
7
    size_t element_id,
8
    const DebugInfo& debug_info,
9
    const graph::Vertex vertex,
10
    data_flow::DataFlowGraph& parent,
11
    const symbolic::Expression count
12
)
13
    : LibraryNode(
7!
14
          element_id,
7✔
15
          debug_info,
7✔
16
          vertex,
7✔
17
          parent,
7✔
18
          LibraryNodeType_Memcpy,
19
          {"_dst"},
7!
20
          {"_src"},
7!
21
          true,
22
          data_flow::ImplementationType_NONE
23
      ),
24
      count_(count) {}
7!
25

26
const symbolic::Expression MemcpyNode::count() const { return count_; }
4✔
27

28
void MemcpyNode::validate(const Function& function) const {}
5✔
29

30
symbolic::SymbolSet MemcpyNode::symbols() const {
2✔
31
    auto count_symbols = symbolic::atoms(this->count_);
2!
32
    return count_symbols;
2✔
33
}
2!
34

35
std::unique_ptr<data_flow::DataFlowNode> MemcpyNode::
36
    clone(size_t element_id, const graph::Vertex vertex, data_flow::DataFlowGraph& parent) const {
×
37
    return std::make_unique<MemcpyNode>(element_id, debug_info_, vertex, parent, count_);
×
38
}
39

40
void MemcpyNode::replace(const symbolic::Expression old_expression, const symbolic::Expression new_expression) {
×
41
    this->count_ = symbolic::subs(this->count_, old_expression, new_expression);
×
42
}
×
43

44
nlohmann::json MemcpyNodeSerializer::serialize(const data_flow::LibraryNode& library_node) {
×
45
    const MemcpyNode& node = static_cast<const MemcpyNode&>(library_node);
×
46

47
    nlohmann::json j;
×
48
    j["code"] = node.code().value();
×
49

50
    sdfg::serializer::JSONSerializer serializer;
×
51
    j["count"] = serializer.expression(node.count());
×
52

53
    return j;
×
54
}
×
55

56
data_flow::LibraryNode& MemcpyNodeSerializer::deserialize(
×
57
    const nlohmann::json& j, builder::StructuredSDFGBuilder& builder, structured_control_flow::Block& parent
58
) {
59
    assert(j.contains("code"));
×
60
    assert(j.contains("debug_info"));
×
61
    assert(j.contains("count"));
×
62

63
    auto code = j["code"].get<std::string>();
×
64
    if (code != LibraryNodeType_Memcpy.value()) {
×
65
        throw InvalidSDFGException("Invalid library node code");
×
66
    }
67

68
    // Extract debug info using JSONSerializer
69
    sdfg::serializer::JSONSerializer serializer;
×
70
    DebugInfo debug_info = serializer.json_to_debug_info(j["debug_info"]);
×
71

72
    // Extract properties
73
    auto count = symbolic::parse(j.at("count"));
×
74

75
    return builder.add_library_node<MemcpyNode>(parent, debug_info, count);
×
76
}
×
77

78
MemcpyNodeDispatcher::MemcpyNodeDispatcher(
×
79
    codegen::LanguageExtension& language_extension,
80
    const Function& function,
81
    const data_flow::DataFlowGraph& data_flow_graph,
82
    const MemcpyNode& node
83
)
84
    : codegen::LibraryNodeDispatcher(language_extension, function, data_flow_graph, node) {}
×
85

86
void MemcpyNodeDispatcher::dispatch_code(
×
87
    codegen::PrettyPrinter& stream,
88
    codegen::PrettyPrinter& globals_stream,
89
    codegen::CodeSnippetFactory& library_snippet_factory
90
) {
91
    auto& node = static_cast<const MemcpyNode&>(node_);
×
92

NEW
93
    stream << language_extension_.external_prefix() << "memcpy(" << node.outputs().at(0) << ", " << node.inputs().at(0)
×
NEW
94
           << ", " << language_extension_.expression(node.count()) << ")" << ";";
×
95
    stream << std::endl;
×
96
}
×
97

98
} // namespace stdlib
99
} // 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