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

daisytuner / sdfglib / 16525628849

25 Jul 2025 03:25PM UTC coverage: 65.266% (-0.05%) from 65.32%
16525628849

push

github

web-flow
Merge pull request #162 from daisytuner/transfer-tuning

Transfer tuning

25 of 53 new or added lines in 6 files covered. (47.17%)

1 existing line in 1 file now uncovered.

8976 of 13753 relevant lines covered (65.27%)

125.53 hits per line

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

27.27
/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() == structured_control_flow::ScheduleType_Sequential;
2✔
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;
2✔
17
}
2✔
18

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

25
Parallelization Parallelization::from_json(builder::StructuredSDFGBuilder& builder, const nlohmann::json& desc) {
×
NEW
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