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

daisytuner / sdfglib / 15843927066

24 Jun 2025 07:17AM UTC coverage: 64.145% (-0.1%) from 64.276%
15843927066

push

github

web-flow
Merge pull request #103 from daisytuner/map-redefinition

adds new map definition into passes

34 of 38 new or added lines in 6 files covered. (89.47%)

2 existing lines in 2 files now uncovered.

8167 of 12732 relevant lines covered (64.15%)

138.22 hits per line

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

85.71
/src/structured_control_flow/structured_loop.cpp
1
#include "sdfg/structured_control_flow/structured_loop.h"
2

3
namespace sdfg {
4
namespace structured_control_flow {
5

6
StructuredLoop::StructuredLoop(size_t element_id, const DebugInfo& debug_info,
404✔
7
                               symbolic::Symbol indvar, symbolic::Expression init,
8
                               symbolic::Expression update, symbolic::Condition condition)
9
    : ControlFlowNode(element_id, debug_info),
202✔
10
      indvar_(indvar),
202✔
11
      init_(init),
202✔
12
      update_(update),
202✔
13
      condition_(condition) {
404✔
14
    this->root_ = std::unique_ptr<Sequence>(new Sequence(++element_id, debug_info));
202✔
15
}
202✔
16

17
const symbolic::Symbol& StructuredLoop::indvar() const { return this->indvar_; };
20✔
18

19
symbolic::Symbol& StructuredLoop::indvar() { return this->indvar_; };
768✔
20

21
const symbolic::Expression& StructuredLoop::init() const { return this->init_; };
4✔
22

23
symbolic::Expression& StructuredLoop::init() { return this->init_; };
467✔
24

25
const symbolic::Expression& StructuredLoop::update() const { return this->update_; };
4✔
26

27
symbolic::Expression& StructuredLoop::update() { return this->update_; };
440✔
28

29
const symbolic::Condition& StructuredLoop::condition() const { return this->condition_; };
12✔
30

31
symbolic::Condition& StructuredLoop::condition() { return this->condition_; };
478✔
32

33
Sequence& StructuredLoop::root() const { return *this->root_; };
1,868✔
34

35
void StructuredLoop::replace(const symbolic::Expression& old_expression,
2✔
36
                             const symbolic::Expression& new_expression) {
37
    if (symbolic::eq(this->indvar_, old_expression)) {
2✔
NEW
38
        if (!SymEngine::is_a<SymEngine::Symbol>(*new_expression)) {
×
NEW
39
            throw InvalidSDFGException("New Indvar must be a symbol");
×
40
        }
NEW
41
        this->indvar_ = SymEngine::rcp_static_cast<const SymEngine::Symbol>(new_expression);
×
NEW
42
    }
×
43
    this->init_ = symbolic::subs(this->init_, old_expression, new_expression);
2✔
44
    this->update_ = symbolic::subs(this->update_, old_expression, new_expression);
2✔
45
    this->condition_ = symbolic::subs(this->condition_, old_expression, new_expression);
2✔
46

47
    this->root_->replace(old_expression, new_expression);
2✔
48
};
2✔
49

50
}  // namespace structured_control_flow
51
}  // 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