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

daisytuner / sdfglib / 20095110671

10 Dec 2025 10:17AM UTC coverage: 40.342% (-21.5%) from 61.872%
20095110671

push

github

web-flow
Merge pull request #384 from daisytuner/viz-struct-subset-fix

Fixing a bug in handling subsets on structures that caused crashes in…

13651 of 43783 branches covered (31.18%)

Branch coverage included in aggregate %.

0 of 8 new or added lines in 1 file covered. (0.0%)

250 existing lines in 14 files now uncovered.

11659 of 18956 relevant lines covered (61.51%)

101.74 hits per line

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

18.57
/include/sdfg/codegen/utils.h
1
#pragma once
2

3
#include <iomanip>
4
#include <iostream>
5
#include <sstream>
6

7
#include "sdfg/types/type.h"
8

9
namespace sdfg {
10
namespace codegen {
11

12
class PrettyPrinter {
13
public:
14
    // Constructor
15
    PrettyPrinter(int indent = 0, bool frozen = false);
16

17
    // Set the indentation level
18
    void setIndent(int indent);
19

20
    int indent() const;
21

22
    int changeIndent(int delta);
23

24
    // Get the underlying string
25
    std::string str() const;
26

27
    // Clear the stringstream content
28
    void clear();
29

30
    // Overload the insertion operator
31
    template<typename T>
32
    PrettyPrinter& operator<<(const T& value) {
14✔
33
        if (frozen_) {
52!
UNCOV
34
            throw std::runtime_error("PrettyPrinter is frozen");
×
35
        }
59✔
36
        applyIndent();
2,363✔
UNCOV
37
        stream << value;
×
38
        return *this;
74✔
39
    }
×
UNCOV
40

×
UNCOV
41
    // Overload for manipulators (like std::endl)
×
UNCOV
42
    PrettyPrinter& operator<<(std::ostream& (*manip)(std::ostream&) );
×
UNCOV
43

×
44
private:
415✔
45
    std::stringstream stream;
6✔
UNCOV
46
    int indentSize;
×
47
    bool isNewLine = true;
14✔
48
    bool frozen_;
52✔
UNCOV
49

×
50
    // Apply indentation only at the beginning of a new line
59✔
51
    void applyIndent();
2,363✔
UNCOV
52
};
×
53

74✔
UNCOV
54
class Reference : public types::IType {
×
UNCOV
55
private:
×
UNCOV
56
    std::unique_ptr<types::IType> reference_;
×
UNCOV
57

×
UNCOV
58
public:
×
59
    Reference(const types::IType& reference_);
415✔
60

6✔
UNCOV
61
    Reference(
×
UNCOV
62
        types::StorageType storage_type, size_t alignment, const std::string& initializer, const types::IType& reference_
×
UNCOV
63
    );
×
UNCOV
64

×
UNCOV
65
    std::unique_ptr<types::IType> clone() const override;
×
UNCOV
66

×
UNCOV
67
    virtual types::TypeID type_id() const override;
×
UNCOV
68

×
UNCOV
69
    types::PrimitiveType primitive_type() const override;
×
UNCOV
70

×
UNCOV
71
    bool is_symbol() const override;
×
UNCOV
72

×
UNCOV
73
    const types::IType& reference_type() const;
×
74

1✔
UNCOV
75
    bool operator==(const types::IType& other) const override;
×
UNCOV
76

×
77
    std::string print() const override;
14✔
78
};
52✔
UNCOV
79

×
80
} // namespace codegen
59✔
81
} // namespace sdfg
2,363✔
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