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

daisytuner / sdfglib / 15725654018

18 Jun 2025 06:34AM UTC coverage: 61.594% (-3.1%) from 64.66%
15725654018

push

github

web-flow
Changes in order for the Einsum plugin to work correctly (#70)

* Copy include dir to build and install dir

* Also copy include dir of symengine

* Remove warning that inputs to library must be scalars

* Extended add_library_node to be variadic

* Added toStr() to LibraryNode for visualizer

* Added zero element to language extensions

0 of 73 new or added lines in 6 files covered. (0.0%)

303 existing lines in 20 files now uncovered.

7589 of 12321 relevant lines covered (61.59%)

135.45 hits per line

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

71.43
/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) {
575✔
30
        if (frozen_) {
575✔
UNCOV
31
            throw std::runtime_error("PrettyPrinter is frozen");
×
32
        }
33
        applyIndent();
575✔
34
        stream << value;
575✔
35
        return *this;
575✔
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