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

daisytuner / docc / 27476586673

13 Jun 2026 07:21PM UTC coverage: 61.297% (+0.02%) from 61.274%
27476586673

Pull #759

github

web-flow
Merge 9b87889fc into 9754c0592
Pull Request #759: Removes cleanup passes from transformations

1 of 5 new or added lines in 3 files covered. (20.0%)

2 existing lines in 1 file now uncovered.

36249 of 59137 relevant lines covered (61.3%)

1122.62 hits per line

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

70.59
/opt/src/transformations/omp_transform.cpp
1
#include "sdfg/transformations/omp_transform.h"
2

3
#include <stdexcept>
4

5
#include "sdfg/optimization_report/pass_report_consumer.h"
6

7
namespace sdfg {
8
namespace transformations {
9

10
OMPTransform::OMPTransform(structured_control_flow::Map& map) : map_(map) {}
14✔
11

12
std::string OMPTransform::name() const { return "OMPTransform"; }
7✔
13

14
bool OMPTransform::can_be_applied(builder::StructuredSDFGBuilder& builder, analysis::AnalysisManager& analysis_manager) {
6✔
15
    auto result = map_.schedule_type().value() == structured_control_flow::ScheduleType_Sequential::value();
6✔
16

17
    if (report_) {
6✔
18
        if (result) {
×
19
            report_->transform_possible(this);
×
20
        } else {
×
21
            report_->transform_impossible(this, "not sequential");
×
22
        }
×
23
    }
×
24
    return result;
6✔
25
}
6✔
26

27
void OMPTransform::apply(builder::StructuredSDFGBuilder& builder, analysis::AnalysisManager& analysis_manager) {
5✔
28
    builder.update_schedule_type(this->map_, omp::ScheduleType_OMP::create());
5✔
29
    if (report_) report_->transform_applied(this);
5✔
30
}
5✔
31

32
void OMPTransform::to_json(nlohmann::json& j) const {
2✔
33
    j["transformation_type"] = this->name();
2✔
34
    j["subgraph"] = {{"0", {{"element_id", this->map_.element_id()}, {"type", "map"}}}};
2✔
35
    j["transformation_type"] = this->name();
2✔
36
}
2✔
37

38
OMPTransform OMPTransform::from_json(builder::StructuredSDFGBuilder& builder, const nlohmann::json& desc) {
2✔
39
    auto map_id = desc["subgraph"]["0"]["element_id"].get<size_t>();
2✔
40
    auto element = builder.find_element_by_id(map_id);
2✔
41
    if (element == nullptr) {
2✔
NEW
42
        throw std::runtime_error("Element with ID " + std::to_string(map_id) + " not found.");
×
43
    }
×
44

45
    auto loop = dynamic_cast<structured_control_flow::Map*>(element);
2✔
46

47
    if (loop == nullptr) {
2✔
NEW
48
        throw std::runtime_error("Element with ID " + std::to_string(map_id) + " is not a Map.");
×
49
    }
×
50

51
    return OMPTransform(*loop);
2✔
52
}
2✔
53

54
} // namespace transformations
55
} // 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