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

daisytuner / sdfglib / 17523565363

05 Sep 2025 11:40AM UTC coverage: 59.145% (+0.09%) from 59.057%
17523565363

push

github

web-flow
Schedule type extension (#221)

* Initial Draft

* Simplify schedule type class for serialization

* string ref

* fix and = operator

60 of 72 new or added lines in 19 files covered. (83.33%)

4 existing lines in 2 files now uncovered.

9274 of 15680 relevant lines covered (59.15%)

115.92 hits per line

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

95.65
/src/structured_control_flow/map.cpp
1
#include "sdfg/structured_control_flow/map.h"
2
#include <string>
3

4
#include "sdfg/serializer/json_serializer.h"
5
#include "sdfg/symbolic/symbolic.h"
6
#include "symengine/expression.h"
7
#include "symengine/symengine_rcp.h"
8

9
namespace sdfg {
10
namespace structured_control_flow {
11

12
Map::
13
    Map(size_t element_id,
77✔
14
        const DebugInfo& debug_info,
15
        symbolic::Symbol indvar,
16
        symbolic::Expression init,
17
        symbolic::Expression update,
18
        symbolic::Condition condition,
19
        const ScheduleType& schedule_type)
20
    : StructuredLoop(element_id, debug_info, indvar, init, update, condition), schedule_type_(schedule_type) {};
77✔
21

22
void Map::validate(const Function& function) const { this->root_->validate(function); };
20✔
23

24
ScheduleType& Map::schedule_type() { return this->schedule_type_; };
29✔
25

26
const ScheduleType& Map::schedule_type() const { return this->schedule_type_; };
2✔
27

28
void ScheduleType_CPU_Parallel::num_threads(ScheduleType& schedule, const symbolic::Expression& num_threads) {
1✔
29
    serializer::JSONSerializer serializer;
1✔
30
    schedule.set_property("num_threads", serializer.expression(num_threads));
1✔
31
}
1✔
32
const symbolic::Expression ScheduleType_CPU_Parallel::num_threads(const ScheduleType& schedule) {
1✔
33
    serializer::JSONSerializer serializer;
1✔
34
    if (schedule.properties().find("num_threads") == schedule.properties().end()) {
1✔
NEW
35
        return SymEngine::null;
×
36
    }
37
    std::string expr_str = schedule.properties().at("num_threads");
1✔
38
    SymEngine::Expression expr(expr_str);
1✔
39
    return expr;
1✔
40
}
1✔
41
void ScheduleType_CPU_Parallel::set_dynamic(ScheduleType& schedule) { schedule.set_property("dynamic", "true"); }
1✔
42
bool ScheduleType_CPU_Parallel::dynamic(const ScheduleType& schedule) {
2✔
43
    if (schedule.properties().find("dynamic") == schedule.properties().end()) {
2✔
44
        return false;
1✔
45
    }
46
    return schedule.properties().at("dynamic") == "true";
1✔
47
}
2✔
48

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