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

daisytuner / sdfglib / 16312353091

16 Jul 2025 06:41AM UTC coverage: 64.622% (-0.2%) from 64.843%
16312353091

Pull #141

github

web-flow
Merge 750219df9 into 9bcea5e19
Pull Request #141: Several convenience improvements for library nodes

60 of 141 new or added lines in 14 files covered. (42.55%)

8 existing lines in 7 files now uncovered.

8556 of 13240 relevant lines covered (64.62%)

178.39 hits per line

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

40.74
/src/data_flow/memlet.cpp
1
#include <sdfg/data_flow/memlet.h>
2

3
#include "sdfg/symbolic/symbolic.h"
4

5
namespace sdfg {
6
namespace data_flow {
7

8
Memlet::Memlet(
614✔
9
    size_t element_id,
10
    const DebugInfo& debug_info,
11
    const graph::Edge& edge,
12
    DataFlowGraph& parent,
13
    DataFlowNode& src,
14
    const std::string& src_conn,
15
    DataFlowNode& dst,
16
    const std::string& dst_conn,
17
    const Subset& subset
18
)
19
    : Element(element_id, debug_info), edge_(edge), parent_(&parent), src_(src), dst_(dst), src_conn_(src_conn),
1,228✔
20
      dst_conn_(dst_conn), begin_subset_(subset), end_subset_(subset) {
614✔
21

22
      };
614✔
23

NEW
24
Memlet::Memlet(
×
25
    size_t element_id,
26
    const DebugInfo& debug_info,
27
    const graph::Edge& edge,
28
    DataFlowGraph& parent,
29
    DataFlowNode& src,
30
    const std::string& src_conn,
31
    DataFlowNode& dst,
32
    const std::string& dst_conn,
33
    const Subset& begin_subset,
34
    const Subset& end_subset
35
)
NEW
36
    : Element(element_id, debug_info), edge_(edge), parent_(&parent), src_(src), dst_(dst), src_conn_(src_conn),
×
NEW
37
      dst_conn_(dst_conn), begin_subset_(begin_subset), end_subset_(end_subset) {
×
38

UNCOV
39
      };
×
40

41
const graph::Edge Memlet::edge() const { return this->edge_; };
16✔
42

43
const DataFlowGraph& Memlet::get_parent() const { return *this->parent_; };
×
44

45
DataFlowGraph& Memlet::get_parent() { return *this->parent_; };
×
46

47
const DataFlowNode& Memlet::src() const { return this->src_; };
242✔
48

49
DataFlowNode& Memlet::src() { return this->src_; };
23✔
50

51
const DataFlowNode& Memlet::dst() const { return this->dst_; };
210✔
52

53
DataFlowNode& Memlet::dst() { return this->dst_; };
22✔
54

55
const std::string& Memlet::src_conn() const { return this->src_conn_; };
716✔
56

57
const std::string& Memlet::dst_conn() const { return this->dst_conn_; };
748✔
58

59
const Subset Memlet::subset() const { return this->begin_subset_; };
1,237✔
60

61
void Memlet::set_subset(const Subset& subset) {
12✔
62
    this->begin_subset_ = subset;
12✔
63
    this->end_subset_ = subset;
12✔
64
};
12✔
65

NEW
66
const Subset Memlet::begin_subset() const { return this->begin_subset_; };
×
67

NEW
68
const Subset Memlet::end_subset() const { return this->end_subset_; };
×
69

NEW
70
void Memlet::set_subset(const Subset& begin_subset, const Subset& end_subset) {
×
NEW
71
    this->begin_subset_ = begin_subset;
×
NEW
72
    this->end_subset_ = end_subset;
×
NEW
73
};
×
74

NEW
75
bool Memlet::has_range() const {
×
NEW
76
    for (size_t i = 0; i < this->begin_subset_.size(); i++) {
×
NEW
77
        if (!symbolic::eq(this->begin_subset_[i], this->end_subset_[i])) {
×
NEW
78
            return true;
×
79
        }
NEW
80
    }
×
NEW
81
    return true;
×
NEW
82
};
×
83

84
std::unique_ptr<Memlet> Memlet::clone(
×
85
    size_t element_id, const graph::Edge& edge, DataFlowGraph& parent, DataFlowNode& src, DataFlowNode& dst
86
) const {
87
    return std::unique_ptr<Memlet>(new Memlet(
×
NEW
88
        element_id,
×
NEW
89
        this->debug_info_,
×
NEW
90
        edge,
×
NEW
91
        parent,
×
NEW
92
        src,
×
NEW
93
        this->src_conn_,
×
NEW
94
        dst,
×
NEW
95
        this->dst_conn_,
×
NEW
96
        this->begin_subset_,
×
NEW
97
        this->end_subset_
×
98
    ));
99
};
×
100

101
void Memlet::replace(const symbolic::Expression& old_expression, const symbolic::Expression& new_expression) {
8✔
102
    for (auto& dim : this->begin_subset_) {
14✔
103
        dim = symbolic::subs(dim, old_expression, new_expression);
6✔
104
    }
105
    for (auto& dim : this->end_subset_) {
14✔
106
        dim = symbolic::subs(dim, old_expression, new_expression);
6✔
107
    }
108
};
8✔
109

110
} // namespace data_flow
111
} // 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