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

daisytuner / sdfglib / 15049122732

15 May 2025 03:33PM UTC coverage: 62.241% (+4.7%) from 57.525%
15049122732

Pull #9

github

web-flow
Merge b96e33e0e into 9d3b1a2b3
Pull Request #9: Graphviz DOT Visualizer for SDFGs

520 of 542 new or added lines in 3 files covered. (95.94%)

782 existing lines in 68 files now uncovered.

8049 of 12932 relevant lines covered (62.24%)

504.09 hits per line

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

52.38
/src/codegen/utils.cpp
1
#include "sdfg/codegen/utils.h"
2

3
namespace sdfg {
4
namespace codegen {
5

6
// Constructor
7
PrettyPrinter::PrettyPrinter(int indent, bool frozen)
471✔
8
    : indentSize(indent), frozen_(frozen) {
471✔
9

10
      };
11

12
// Set the indentation level
13
void PrettyPrinter::setIndent(int indent) { indentSize = indent; };
2,202✔
14

15
int PrettyPrinter::indent() const { return indentSize; };
434✔
16

17
// Get the underlying string
18
std::string PrettyPrinter::str() const { return stream.str(); };
403✔
19

20
// Clear the stringstream content
21
void PrettyPrinter::clear() {
171✔
22
    stream.str("");
171✔
23
    stream.clear();
171✔
24
};
171✔
25

26
// Overload for manipulators (like std::endl)
27
PrettyPrinter& PrettyPrinter::operator<<(std::ostream& (*manip)(std::ostream&)) {
4,934✔
28
    if (frozen_) {
4,934✔
UNCOV
29
        throw std::runtime_error("PrettyPrinter is frozen");
×
30
    }
31
    stream << manip;
4,934✔
32
    // Reset indent application on new lines
33
    if (manip == static_cast<std::ostream& (*)(std::ostream&)>(std::endl)) {
4,934✔
34
        isNewLine = true;
4,934✔
35
    }
4,934✔
36
    return *this;
4,934✔
UNCOV
37
};
×
38

39
// Apply indentation only at the beginning of a new line
40
void PrettyPrinter::applyIndent() {
13,613✔
41
    if (isNewLine && indentSize > 0) {
13,613✔
42
        stream << std::setw(indentSize) << "";
4,096✔
43
        isNewLine = false;
4,096✔
44
    }
4,096✔
45
};
13,613✔
46

UNCOV
47
Reference::Reference(const types::IType& reference_)
×
48
    : reference_(reference_.clone()) {
×
49

UNCOV
50
      };
×
51

UNCOV
52
std::unique_ptr<types::IType> Reference::clone() const {
×
53
    return std::make_unique<Reference>(*this->reference_);
×
54
};
55

UNCOV
56
types::PrimitiveType Reference::primitive_type() const {
×
57
    return this->reference_->primitive_type();
×
58
};
59

UNCOV
60
bool Reference::is_symbol() const { return false; };
×
61

UNCOV
62
const types::IType& Reference::reference_type() const { return *this->reference_; };
×
63

UNCOV
64
bool Reference::operator==(const types::IType& other) const {
×
65
    if (auto reference = dynamic_cast<const Reference*>(&other)) {
×
66
        return *(this->reference_) == *reference->reference_;
×
67
    } else {
UNCOV
68
        return false;
×
69
    }
UNCOV
70
};
×
71

UNCOV
72
uint Reference::address_space() const { return this->reference_->address_space(); };
×
73

UNCOV
74
sdfg::types::DeviceLocation Reference::device_location() const {
×
75
    return this->reference_->device_location();
×
76
};
77

UNCOV
78
std::string Reference::initializer() const { return this->reference_->initializer(); };
×
79

80
}  // namespace codegen
81
}  // 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