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

daisytuner / sdfglib / 16810003333

07 Aug 2025 04:19PM UTC coverage: 64.316% (+0.02%) from 64.3%
16810003333

push

github

web-flow
Merge pull request #177 from daisytuner/block-fusion-fix

limits block fusion to purely computational dataflow

14 of 21 new or added lines in 2 files covered. (66.67%)

8882 of 13810 relevant lines covered (64.32%)

117.24 hits per line

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

71.88
/src/data_flow/access_node.cpp
1
#include "sdfg/data_flow/access_node.h"
2

3
#include "sdfg/data_flow/data_flow_graph.h"
4
#include "sdfg/function.h"
5

6
namespace sdfg {
7
namespace data_flow {
8

9
AccessNode::AccessNode(
556✔
10
    size_t element_id,
11
    const DebugInfo& debug_info,
12
    const graph::Vertex vertex,
13
    DataFlowGraph& parent,
14
    const std::string& data
15
)
16
    : DataFlowNode(element_id, debug_info, vertex, parent), data_(data) {
556✔
17

18
      };
556✔
19

20
void AccessNode::validate(const Function& function) const {
507✔
21
    auto& graph = this->get_parent();
507✔
22

23
    if (graph.out_degree(*this) > 1) {
507✔
24
        MemletType type = (*graph.out_edges(*this).begin()).type();
1✔
25
        for (auto& oedge : graph.out_edges(*this)) {
3✔
26
            if (oedge.type() != type) {
2✔
NEW
27
                throw InvalidSDFGException("Access node " + this->data() + " used with multiple memlet types");
×
28
            }
29
        }
30
    }
1✔
31

32
    if (graph.in_degree(*this) > 1) {
507✔
NEW
33
        MemletType type = (*graph.in_edges(*this).begin()).type();
×
NEW
34
        for (auto& iedge : graph.in_edges(*this)) {
×
NEW
35
            if (iedge.type() != type) {
×
NEW
36
                throw InvalidSDFGException("Access node " + this->data() + " used with multiple memlet types");
×
37
            }
38
        }
NEW
39
    }
×
40
}
507✔
41

42
const std::string& AccessNode::data() const { return this->data_; };
879✔
43

44
std::string& AccessNode::data() { return this->data_; };
1,126✔
45

46
std::unique_ptr<DataFlowNode> AccessNode::clone(size_t element_id, const graph::Vertex vertex, DataFlowGraph& parent)
×
47
    const {
48
    return std::unique_ptr<AccessNode>(new AccessNode(element_id, this->debug_info_, vertex, parent, this->data_));
×
49
};
×
50

51
void AccessNode::replace(const symbolic::Expression& old_expression, const symbolic::Expression& new_expression) {
7✔
52
    if (SymEngine::is_a<SymEngine::Symbol>(*old_expression) && SymEngine::is_a<SymEngine::Symbol>(*new_expression)) {
7✔
53
        auto old_symbol = SymEngine::rcp_static_cast<const SymEngine::Symbol>(old_expression);
7✔
54
        if (this->data_ == old_symbol->get_name()) {
7✔
55
            auto new_symbol = SymEngine::rcp_static_cast<const SymEngine::Symbol>(new_expression);
5✔
56
            this->data_ = new_symbol->get_name();
5✔
57
        }
5✔
58
    }
7✔
59
};
7✔
60

61
} // namespace data_flow
62
} // 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