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

daisytuner / sdfglib / 17489752953

05 Sep 2025 09:46AM UTC coverage: 59.136% (+0.08%) from 59.057%
17489752953

Pull #221

github

web-flow
Merge c20622d90 into d3ce1d10c
Pull Request #221: Schedule type extension

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

3 existing lines in 1 file now uncovered.

9269 of 15674 relevant lines covered (59.14%)

115.96 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

8
namespace sdfg {
9
namespace structured_control_flow {
10

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

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

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

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

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

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