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

daisytuner / docc / 28177795453

25 Jun 2026 02:33PM UTC coverage: 61.743% (+0.1%) from 61.644%
28177795453

Pull #802

github

web-flow
Merge 08f22df91 into fe9abd1cb
Pull Request #802: adds reduce as new structured loop type

705 of 985 new or added lines in 34 files covered. (71.57%)

5 existing lines in 4 files now uncovered.

38837 of 62901 relevant lines covered (61.74%)

978.19 hits per line

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

34.18
/sdfg/src/visitor/immutable_structured_sdfg_visitor.cpp
1
#include "sdfg/visitor/immutable_structured_sdfg_visitor.h"
2

3
namespace sdfg {
4
namespace visitor {
5

6
ImmutableStructuredSDFGVisitor::
7
    ImmutableStructuredSDFGVisitor(StructuredSDFG& sdfg, analysis::AnalysisManager& analysis_manager)
8
    : sdfg_(sdfg), analysis_manager_(analysis_manager) {}
20✔
9

10
bool ImmutableStructuredSDFGVisitor::visit() { return this->visit_internal(sdfg_.root()); }
×
11

12
bool ImmutableStructuredSDFGVisitor::visit_internal(structured_control_flow::Sequence& parent) {
37✔
13
    if (this->accept(parent)) {
37✔
14
        return true;
×
15
    }
×
16

17
    for (size_t i = 0; i < parent.size(); i++) {
73✔
18
        auto& current = parent.at(i).first;
36✔
19

20
        if (auto block_stmt = dynamic_cast<structured_control_flow::Block*>(&current)) {
36✔
21
            if (this->accept(*block_stmt)) {
21✔
22
                return true;
×
23
            }
×
24
        } else if (auto sequence_stmt = dynamic_cast<structured_control_flow::Sequence*>(&current)) {
21✔
25
            if (this->visit_internal(*sequence_stmt)) {
×
26
                return true;
×
27
            }
×
28
        } else if (auto if_else_stmt = dynamic_cast<structured_control_flow::IfElse*>(&current)) {
15✔
29
            if (this->accept(*if_else_stmt)) {
2✔
30
                return true;
×
31
            }
×
32

33
            for (size_t i = 0; i < if_else_stmt->size(); i++) {
6✔
34
                if (this->visit_internal(if_else_stmt->at(i).first)) {
4✔
35
                    return true;
×
36
                }
×
37
            }
4✔
38
        } else if (auto for_stmt = dynamic_cast<structured_control_flow::For*>(&current)) {
13✔
39
            if (this->accept(*for_stmt)) {
2✔
40
                return true;
×
41
            }
×
42

43
            if (this->visit_internal(for_stmt->root())) {
2✔
44
                return true;
×
45
            }
×
46
        } else if (auto map_stmt = dynamic_cast<structured_control_flow::Map*>(&current)) {
11✔
47
            if (this->accept(*map_stmt)) {
11✔
48
                return true;
×
49
            }
×
50

51
            if (this->visit_internal(map_stmt->root())) {
11✔
52
                return true;
×
53
            }
×
54
        } else if (auto reduce_stmt = dynamic_cast<structured_control_flow::Reduce*>(&current)) {
11✔
NEW
55
            if (this->accept(*reduce_stmt)) {
×
NEW
56
                return true;
×
NEW
57
            }
×
58

NEW
59
            if (this->visit_internal(reduce_stmt->root())) {
×
NEW
60
                return true;
×
NEW
61
            }
×
62
        } else if (auto while_stmt = dynamic_cast<structured_control_flow::While*>(&current)) {
×
63
            if (this->accept(*while_stmt)) {
×
64
                return true;
×
65
            }
×
66

67
            if (this->visit_internal(while_stmt->root())) {
×
68
                return true;
×
69
            }
×
70
        } else if (auto continue_stmt = dynamic_cast<structured_control_flow::Continue*>(&current)) {
×
71
            if (this->accept(*continue_stmt)) {
×
72
                return true;
×
73
            }
×
74
        } else if (auto break_stmt = dynamic_cast<structured_control_flow::Break*>(&current)) {
×
75
            if (this->accept(*break_stmt)) {
×
76
                return true;
×
77
            }
×
78
        } else if (auto return_stmt = dynamic_cast<structured_control_flow::Return*>(&current)) {
×
79
            if (this->accept(*return_stmt)) {
×
80
                return true;
×
81
            }
×
82
        }
×
83
    }
36✔
84

85
    return false;
37✔
86
};
37✔
87

88
bool ImmutableStructuredSDFGVisitor::accept(structured_control_flow::Block& node) { return false; };
×
89

90
bool ImmutableStructuredSDFGVisitor::accept(structured_control_flow::Sequence& node) { return false; };
37✔
91

92
bool ImmutableStructuredSDFGVisitor::accept(structured_control_flow::Return& node) { return false; };
×
93

94
bool ImmutableStructuredSDFGVisitor::accept(structured_control_flow::IfElse& node) { return false; };
2✔
95

96
bool ImmutableStructuredSDFGVisitor::accept(structured_control_flow::While& node) { return false; };
×
97

98
bool ImmutableStructuredSDFGVisitor::accept(structured_control_flow::Continue& node) { return false; };
×
99

100
bool ImmutableStructuredSDFGVisitor::accept(structured_control_flow::Break& node) { return false; };
×
101

102
bool ImmutableStructuredSDFGVisitor::accept(structured_control_flow::For& node) { return false; };
2✔
103

104
bool ImmutableStructuredSDFGVisitor::accept(structured_control_flow::Map& node) { return false; };
11✔
105

NEW
106
bool ImmutableStructuredSDFGVisitor::accept(structured_control_flow::Reduce& node) { return false; };
×
107

108
} // namespace visitor
109
} // 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