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

daisytuner / sdfglib / 15656007340

14 Jun 2025 08:51PM UTC coverage: 13.234% (-49.9%) from 63.144%
15656007340

Pull #76

github

web-flow
Merge 9586c8161 into 413c53212
Pull Request #76: New Loop Dependency Analysis

361 of 465 new or added lines in 7 files covered. (77.63%)

6215 existing lines in 110 files now uncovered.

1612 of 12181 relevant lines covered (13.23%)

13.64 hits per line

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

0.0
/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>
UNCOV
29
    PrettyPrinter& operator<<(const T& value) {
×
UNCOV
30
        if (frozen_) {
×
UNCOV
31
            throw std::runtime_error("PrettyPrinter is frozen");
×
32
        }
UNCOV
33
        applyIndent();
×
UNCOV
34
        stream << value;
×
UNCOV
35
        return *this;
×
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
    Reference(types::StorageType storage_type, size_t alignment, const std::string& initializer,
59
              const types::IType& reference_);
60

61
    std::unique_ptr<types::IType> clone() const override;
62

63
    types::PrimitiveType primitive_type() const override;
64

65
    bool is_symbol() const override;
66

67
    const types::IType& reference_type() const;
68

69
    bool operator==(const types::IType& other) const override;
70

71
    std::string print() const override;
72
};
73

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