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

daisytuner / docc / 26520678771

27 May 2026 03:22PM UTC coverage: 60.864% (-0.02%) from 60.886%
26520678771

Pull #719

github

web-flow
Merge 99c5e4f9d into 707dadcf8
Pull Request #719: Libnode ptr edges

961 of 1749 new or added lines in 52 files covered. (54.95%)

90 existing lines in 29 files now uncovered.

35222 of 57870 relevant lines covered (60.86%)

11043.61 hits per line

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

46.15
/sdfg/src/data_flow/library_node.cpp
1
#include "sdfg/data_flow/library_node.h"
2

3
#include <string>
4
#include "sdfg/data_flow/data_flow_graph.h"
5
#include "sdfg/symbolic/symbolic.h"
6
#include "symengine/symengine_rcp.h"
7

8
namespace sdfg {
9
namespace data_flow {
10

11
LibraryNode::LibraryNode(
12
    size_t element_id,
13
    const DebugInfo& debug_info,
14
    const graph::Vertex vertex,
15
    DataFlowGraph& parent,
16
    const LibraryNodeCode& code,
17
    const std::vector<std::string>& outputs,
18
    const std::vector<std::string>& inputs,
19
    const bool side_effect,
20
    const ImplementationType& implementation_type
21
)
22
    : CodeNode(element_id, debug_info, vertex, parent, outputs, inputs), code_(code), side_effect_(side_effect),
1,420✔
23
      implementation_type_(implementation_type) {}
1,420✔
24

25
const LibraryNodeCode& LibraryNode::code() const { return this->code_; };
373✔
26

27
const ImplementationType& LibraryNode::implementation_type() const { return this->implementation_type_; };
13✔
28

29
ImplementationType& LibraryNode::implementation_type() { return this->implementation_type_; };
72✔
30

31
bool LibraryNode::side_effect() const { return this->side_effect_; };
34✔
32

33
std::string LibraryNode::toStr() const { return std::string(this->code_.value()); }
×
34

35
symbolic::Expression LibraryNode::flop() const { return SymEngine::null; }
×
36

37
PointerAccessType LibraryNode::pointer_access_type(const Memlet& edge) const {
11✔
38
    auto& conn = edge.dst_conn();
11✔
39
    auto idx = std::find(inputs_.begin(), inputs_.end(), conn) - inputs_.begin();
11✔
40
    return pointer_access_type(idx);
11✔
41
}
11✔
42

43
EdgeRemoveOption LibraryNode::can_remove_out_edge(const data_flow::DataFlowGraph& graph, const Memlet* memlet) const {
2✔
44
    if (graph.out_edges_for_connector(*this, memlet->src_conn()).size() > 1) {
2✔
45
        return EdgeRemoveOption::Trivially;
×
46
    } else if (!side_effect_ && outputs_.size() == 1) {
2✔
47
        return EdgeRemoveOption::RemoveNodeAfter;
×
48
    } else {
2✔
49
        // cannot remove the last edge per connector in general
50
        return EdgeRemoveOption::NotRemovable;
2✔
51
    }
2✔
52
}
2✔
53

NEW
54
EdgeRemoveOption LibraryNode::can_remove_in_edge(const data_flow::DataFlowGraph& graph, const Memlet* memlet) const {
×
NEW
55
    return EdgeRemoveOption::NotRemovable;
×
NEW
56
}
×
57

NEW
58
bool LibraryNode::pointer_use_creates_side_effects(const DataFlowGraph& dataflow, const Function& func) {
×
NEW
59
    for (int i = 0; i < inputs_.size(); ++i) {
×
NEW
60
        auto& conn = inputs_.at(i);
×
NEW
61
        auto* edge = dataflow.in_edge_for_connector(*this, conn);
×
NEW
62
        if (edge && edge->result_type(func)->type_id() == types::TypeID::Pointer) {
×
NEW
63
            auto access = pointer_access_type(i);
×
NEW
64
            if (!access || !access->no_capture() || (access->may_contain_reads() && !access->access_read_pattern()) ||
×
NEW
65
                (access->may_contain_writes() && !access->access_write_pattern())) {
×
NEW
66
                return true;
×
NEW
67
            }
×
NEW
68
        }
×
NEW
69
    }
×
NEW
70
    return false;
×
NEW
71
}
×
72

73
} // namespace data_flow
74
} // 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