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

daisytuner / sdfglib / 15744620952

18 Jun 2025 10:07PM UTC coverage: 64.591% (+0.005%) from 64.586%
15744620952

push

github

web-flow
Merge pull request #86 from daisytuner/add-optimizer

Add optimizer functionality

122 of 201 new or added lines in 9 files covered. (60.7%)

2 existing lines in 1 file now uncovered.

8141 of 12604 relevant lines covered (64.59%)

153.84 hits per line

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

74.07
/src/transformations/recorder.cpp
1
#include <sdfg/transformations/loop_distribute.h>
2
#include <sdfg/transformations/loop_interchange.h>
3
#include <sdfg/transformations/loop_slicing.h>
4
#include <sdfg/transformations/loop_tiling.h>
5
#include <sdfg/transformations/out_local_storage.h>
6
#include <sdfg/transformations/recorder.h>
7

8
namespace sdfg {
9
namespace transformations {
10

11
Recorder::Recorder() : history_(nlohmann::json::array()) {}
10✔
12

13
void Recorder::replay(builder::StructuredSDFGBuilder& builder,
3✔
14
                      analysis::AnalysisManager& analysis_manager,
15
                      const nlohmann::json& transformation_data) {
16
    for (const auto& desc : transformation_data) {
8✔
17
        auto transformation_name = desc["transformation_type"];
5✔
18

19
        if (transformation_name == "LoopTiling") {
5✔
20
            this->apply<transformations::LoopTiling>(builder, analysis_manager, desc);
3✔
21
        } else if (transformation_name == "LoopDistribute") {
5✔
NEW
22
            this->apply<transformations::LoopDistribute>(builder, analysis_manager, desc);
×
23
        } else if (transformation_name == "LoopInterchange") {
2✔
24
            this->apply<transformations::LoopInterchange>(builder, analysis_manager, desc);
1✔
25
        } else if (transformation_name == "LoopSlicing") {
2✔
26
            this->apply<transformations::LoopSlicing>(builder, analysis_manager, desc);
1✔
27
        } else if (transformation_name == "OutLocalStorage") {
1✔
NEW
28
            this->apply<transformations::OutLocalStorage>(builder, analysis_manager, desc);
×
NEW
29
        } else {
×
NEW
30
            throw transformations::InvalidTransformationDescriptionException(
×
NEW
31
                "Unknown transformation: " + transformation_name.get<std::string>());
×
32
        }
33
    }
5✔
34
}
3✔
35

36
void Recorder::save(std::filesystem::path path) const {
3✔
37
    std::ofstream file(path);
3✔
38
    if (!file.is_open()) {
3✔
NEW
39
        throw std::runtime_error("Failed to open file for saving transformations: " +
×
NEW
40
                                 path.string());
×
41
    }
42
    file << history_.dump(4);  // Pretty print with an indent of 4 spaces
3✔
43
    file.close();
3✔
44
}
3✔
45

46
}  // namespace transformations
47
}  // 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