• 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

85.71
/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
class PrettyPrinter {
12
   public:
13
    // Constructor
14
    PrettyPrinter(int indent = 0, bool frozen = false);
15

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

19
    int indent() const;
20

21
    // Get the underlying string
22
    std::string str() const;
23

24
    // Clear the stringstream content
25
    void clear();
26

27
    // Overload the insertion operator
28
    template <typename T>
29
    PrettyPrinter& operator<<(const T& value) {
13,614✔
30
        if (frozen_) {
13,614✔
31
            throw std::runtime_error("PrettyPrinter is frozen");
1✔
32
        }
33
        applyIndent();
13,613✔
34
        stream << value;
13,613✔
35
        return *this;
13,613✔
UNCOV
36
    }
×
37

38
    // Overload for manipulators (like std::endl)
39
    PrettyPrinter& operator<<(std::ostream& (*manip)(std::ostream&));
40

41
   private:
42
    std::stringstream stream;
43
    int indentSize;
44
    bool isNewLine = true;
45
    bool frozen_;
46

47
    // Apply indentation only at the beginning of a new line
48
    void applyIndent();
49
};
50

51
class Reference : public types::IType {
52
   private:
53
    std::unique_ptr<types::IType> reference_;
54

55
   public:
56
    Reference(const types::IType& reference_);
57

58
    std::unique_ptr<types::IType> clone() const override;
59

60
    types::PrimitiveType primitive_type() const override;
61

62
    bool is_symbol() const override;
63

64
    const types::IType& reference_type() const;
65

66
    bool operator==(const types::IType& other) const override;
67

68
    uint address_space() const override;
69

70
    sdfg::types::DeviceLocation device_location() const override;
71

72
    std::string initializer() const override;
73
};
74

75
}  // namespace codegen
76
}  // 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