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

daisytuner / sdfglib / 17488803855

05 Sep 2025 09:05AM UTC coverage: 59.132% (+0.08%) from 59.057%
17488803855

Pull #221

github

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

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

4 existing lines in 2 files now uncovered.

9269 of 15675 relevant lines covered (59.13%)

115.96 hits per line

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

26.09
/src/transformations/parallelization.cpp
1
#include "sdfg/transformations/parallelization.h"
2
#include <stdexcept>
3

4
namespace sdfg {
5
namespace transformations {
6

7
Parallelization::Parallelization(structured_control_flow::Map& map) : map_(map) {}
2✔
8

9
std::string Parallelization::name() const { return "Parallelization"; }
×
10

11
bool Parallelization::can_be_applied(builder::StructuredSDFGBuilder& builder, analysis::AnalysisManager& analysis_manager) {
2✔
12
    return map_.schedule_type().value() == structured_control_flow::ScheduleType_Sequential::value();
2✔
UNCOV
13
}
×
14

15
void Parallelization::apply(builder::StructuredSDFGBuilder& builder, analysis::AnalysisManager& analysis_manager) {
2✔
16
    this->map_.schedule_type() = structured_control_flow::ScheduleType_CPU_Parallel::create();
2✔
17
}
2✔
18

19
void Parallelization::to_json(nlohmann::json& j) const {
×
20
    j["transformation_type"] = this->name();
×
21
    j["subgraph"] = {{"0", {{"element_id", this->map_.element_id()}, {"type", "map"}}}};
×
22
    j["transformation_type"] = this->name();
×
23
}
×
24

25
Parallelization Parallelization::from_json(builder::StructuredSDFGBuilder& builder, const nlohmann::json& desc) {
×
26
    auto map_id = desc["subgraph"]["0"]["element_id"].get<size_t>();
×
27
    auto element = builder.find_element_by_id(map_id);
×
28
    if (element == nullptr) {
×
29
        throw std::runtime_error("Element with ID " + std::to_string(map_id) + " not found.");
×
30
    }
31

32
    auto loop = dynamic_cast<structured_control_flow::Map*>(element);
×
33

34
    if (loop == nullptr) {
×
35
        throw std::runtime_error("Element with ID " + std::to_string(map_id) + " is not a Map.");
×
36
    }
37

38
    return Parallelization(*loop);
×
39
}
×
40

41
} // namespace transformations
42
} // 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