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

daisytuner / docc / 27477701050

13 Jun 2026 08:07PM UTC coverage: 61.376% (+0.1%) from 61.274%
27477701050

Pull #759

github

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

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

2 existing lines in 1 file now uncovered.

36296 of 59137 relevant lines covered (61.38%)

1126.78 hits per line

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

76.47
/opt/src/transformations/vectorize_transform.cpp
1
#include "sdfg/transformations/vectorize_transform.h"
2

3
#include "sdfg/optimization_report/pass_report_consumer.h"
4

5
namespace sdfg {
6
namespace transformations {
7

8
VectorizeTransform::VectorizeTransform(structured_control_flow::Map& map) : map_(map) {}
4✔
9

10
std::string VectorizeTransform::name() const { return "VectorizeTransform"; }
3✔
11

12
bool VectorizeTransform::
13
    can_be_applied(builder::StructuredSDFGBuilder& builder, analysis::AnalysisManager& analysis_manager) {
2✔
14
    auto result = map_.schedule_type().value() == structured_control_flow::ScheduleType_Sequential::value();
2✔
15

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

26
void VectorizeTransform::apply(builder::StructuredSDFGBuilder& builder, analysis::AnalysisManager& analysis_manager) {
1✔
27
    builder.update_schedule_type(this->map_, vectorize::ScheduleType_Vectorize::create());
1✔
28
    if (report_) report_->transform_applied(this);
1✔
29
}
1✔
30

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

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

44
    auto loop = dynamic_cast<structured_control_flow::Map*>(element);
1✔
45
    if (loop == nullptr) {
1✔
NEW
46
        throw InvalidTransformationDescriptionException("Element with ID " + std::to_string(map_id) + " is not a Map.");
×
47
    }
×
48

49
    return VectorizeTransform(*loop);
1✔
50
}
1✔
51

52
} // namespace transformations
53
} // 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