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

daisytuner / sdfglib / 16440807098

22 Jul 2025 09:49AM UTC coverage: 66.011% (+0.9%) from 65.094%
16440807098

Pull #153

github

web-flow
Merge 194f87ac9 into abe57c083
Pull Request #153: Introduces different memlet types for computation, references and dereferencing

244 of 352 new or added lines in 30 files covered. (69.32%)

70 existing lines in 7 files now uncovered.

8322 of 12607 relevant lines covered (66.01%)

133.98 hits per line

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

83.33
/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(
340✔
7
    size_t element_id,
8
    const DebugInfo& debug_info,
9
    symbolic::Symbol indvar,
10
    symbolic::Expression init,
11
    symbolic::Expression update,
12
    symbolic::Condition condition
13
)
14
    : ControlFlowNode(element_id, debug_info), indvar_(indvar), init_(init), update_(update), condition_(condition) {
170✔
15
    this->root_ = std::unique_ptr<Sequence>(new Sequence(++element_id, debug_info));
170✔
16
}
170✔
17

NEW
18
void StructuredLoop::validate(const Function& function) const {
×
19
    // TODO: Implement validation
20
};
×
21

22
const symbolic::Symbol& StructuredLoop::indvar() const { return this->indvar_; };
22✔
23

24
symbolic::Symbol& StructuredLoop::indvar() { return this->indvar_; };
747✔
25

26
const symbolic::Expression& StructuredLoop::init() const { return this->init_; };
14✔
27

28
symbolic::Expression& StructuredLoop::init() { return this->init_; };
401✔
29

30
const symbolic::Expression& StructuredLoop::update() const { return this->update_; };
14✔
31

32
symbolic::Expression& StructuredLoop::update() { return this->update_; };
393✔
33

34
const symbolic::Condition& StructuredLoop::condition() const { return this->condition_; };
14✔
35

36
symbolic::Condition& StructuredLoop::condition() { return this->condition_; };
437✔
37

38
Sequence& StructuredLoop::root() const { return *this->root_; };
2,807✔
39

40
void StructuredLoop::replace(const symbolic::Expression& old_expression, const symbolic::Expression& new_expression) {
2✔
41
    if (symbolic::eq(this->indvar_, old_expression) && SymEngine::is_a<SymEngine::Symbol>(*new_expression)) {
2✔
42
        this->indvar_ = SymEngine::rcp_static_cast<const SymEngine::Symbol>(new_expression);
×
43
    }
×
44
    this->init_ = symbolic::subs(this->init_, old_expression, new_expression);
2✔
45
    this->update_ = symbolic::subs(this->update_, old_expression, new_expression);
2✔
46
    this->condition_ = symbolic::subs(this->condition_, old_expression, new_expression);
2✔
47

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

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