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

daisytuner / sdfglib / 15206945066

23 May 2025 09:24AM UTC coverage: 60.604% (+0.1%) from 60.482%
15206945066

Pull #26

github

web-flow
Merge e28a4e995 into aa7d2127d
Pull Request #26: Develop Map node

254 of 387 new or added lines in 26 files covered. (65.63%)

17 existing lines in 14 files now uncovered.

8264 of 13636 relevant lines covered (60.6%)

101.91 hits per line

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

52.94
/src/structured_control_flow/map.cpp
1
#include "sdfg/structured_control_flow/map.h"
2

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

5
namespace sdfg {
6
namespace structured_control_flow {
7

8
Map::Map(size_t element_id, const DebugInfo& debug_info, symbolic::Symbol indvar,
26✔
9
         symbolic::Expression num_iterations)
10
    : ControlFlowNode(element_id, debug_info), indvar_(indvar), num_iterations_(num_iterations) {
13✔
11
    this->root_ = std::unique_ptr<Sequence>(new Sequence(++element_id, debug_info));
13✔
12
};
13✔
13

14
const symbolic::Symbol& Map::indvar() const { return this->indvar_; };
6✔
15

16
symbolic::Symbol& Map::indvar() { return this->indvar_; };
17✔
17

18
const symbolic::Expression& Map::num_iterations() const { return this->num_iterations_; };
6✔
19

20
symbolic::Expression& Map::num_iterations() { return this->num_iterations_; };
4✔
21

22
Sequence& Map::root() const { return *this->root_; };
35✔
23

NEW
24
void Map::replace(const symbolic::Expression& old_expression,
×
25
                  const symbolic::Expression& new_expression) {
NEW
26
    if (symbolic::eq(this->indvar_, old_expression)) {
×
NEW
27
        assert(SymEngine::is_a<SymEngine::Symbol>(*new_expression) &&
×
28
               "New Indvar must be a symbol");
NEW
29
        this->indvar_ = SymEngine::rcp_static_cast<const SymEngine::Symbol>(new_expression);
×
NEW
30
    }
×
NEW
31
    this->num_iterations_ = symbolic::subs(this->num_iterations_, old_expression, new_expression);
×
32

NEW
33
    this->root_->replace(old_expression, new_expression);
×
NEW
34
};
×
35

36
}  // namespace structured_control_flow
37
}  // 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