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

daisytuner / sdfglib / 17651658650

11 Sep 2025 04:58PM UTC coverage: 61.012% (+1.3%) from 59.755%
17651658650

Pull #219

github

web-flow
Merge 742a12367 into f744ac9f5
Pull Request #219: stdlib Library Nodes and ConstantNodes

499 of 1681 new or added lines in 81 files covered. (29.68%)

95 existing lines in 36 files now uncovered.

9718 of 15928 relevant lines covered (61.01%)

108.0 hits per line

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

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

3
namespace sdfg {
4
namespace stdlib {
5

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

NEW
26
const symbolic::Expression& MemmoveNode::count() const { return count_; }
×
27

NEW
28
void MemmoveNode::validate(const Function& function) const {}
×
29

NEW
30
symbolic::SymbolSet MemmoveNode::symbols() const {
×
NEW
31
    auto count_symbols = symbolic::atoms(this->count_);
×
NEW
32
    return count_symbols;
×
NEW
33
}
×
34

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

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

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

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

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

NEW
53
    return j;
×
NEW
54
}
×
55

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

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

NEW
68
    sdfg::serializer::JSONSerializer serializer;
×
NEW
69
    DebugInfoRegion debug_info = serializer.json_to_debug_info_region(j["debug_info"], builder.debug_info());
×
70

71
    // Extract properties
NEW
72
    SymEngine::Expression count(j.at("count"));
×
73

NEW
74
    return builder.add_library_node<MemmoveNode>(parent, debug_info, count);
×
NEW
75
}
×
76

NEW
77
MemmoveNodeDispatcher::MemmoveNodeDispatcher(
×
78
    codegen::LanguageExtension& language_extension,
79
    const Function& function,
80
    const data_flow::DataFlowGraph& data_flow_graph,
81
    const MemmoveNode& node
82
)
NEW
83
    : codegen::LibraryNodeDispatcher(language_extension, function, data_flow_graph, node) {}
×
84

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

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

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