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

daisytuner / sdfglib / 16779684622

06 Aug 2025 02:21PM UTC coverage: 64.3% (-1.0%) from 65.266%
16779684622

push

github

web-flow
Merge pull request #172 from daisytuner/opaque-pointers

Opaque pointers, typed memlets, untyped tasklet connectors

330 of 462 new or added lines in 38 files covered. (71.43%)

382 existing lines in 30 files now uncovered.

8865 of 13787 relevant lines covered (64.3%)

116.73 hits per line

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

77.14
/src/types/pointer.cpp
1
#include "sdfg/types/pointer.h"
2

3
namespace sdfg {
4
namespace types {
5

6
Pointer::Pointer() : pointee_type_(std::nullopt) {};
67✔
7

8
Pointer::Pointer(const IType& pointee_type) : pointee_type_(pointee_type.clone()) {};
107✔
9

10
Pointer::Pointer(StorageType storage_type, size_t alignment, const std::string& initializer)
95✔
11
    : IType(storage_type, alignment, initializer), pointee_type_(std::nullopt) {};
95✔
12

13
Pointer::Pointer(StorageType storage_type, size_t alignment, const std::string& initializer, const IType& pointee_type)
162✔
14
    : IType(storage_type, alignment, initializer), pointee_type_(pointee_type.clone()) {};
162✔
15

16
bool Pointer::has_pointee_type() const { return this->pointee_type_.has_value(); };
547✔
17

18
std::unique_ptr<IType> Pointer::clone() const {
249✔
19
    if (this->has_pointee_type()) {
249✔
20
        return std::make_unique<
155✔
21
            Pointer>(this->storage_type(), this->alignment(), this->initializer(), *this->pointee_type_.value());
155✔
22
    } else {
23
        return std::make_unique<Pointer>(this->storage_type(), this->alignment(), this->initializer());
94✔
24
    }
25
};
249✔
26

27
TypeID Pointer::type_id() const { return TypeID::Pointer; };
292✔
28

29
PrimitiveType Pointer::primitive_type() const {
7✔
30
    if (this->has_pointee_type()) {
7✔
31
        return this->pointee_type_.value()->primitive_type();
1✔
32
    } else {
33
        return PrimitiveType::Void;
6✔
34
    }
35
};
7✔
36

37
bool Pointer::is_symbol() const { return true; };
104✔
38

39
const IType& Pointer::pointee_type() const { return *this->pointee_type_.value(); };
281✔
40

41
bool Pointer::operator==(const IType& other) const {
7✔
42
    if (auto pointer_type = dynamic_cast<const Pointer*>(&other)) {
7✔
43
        if (this->has_pointee_type() != pointer_type->has_pointee_type()) {
7✔
NEW
44
            return false;
×
45
        }
46
        if (this->has_pointee_type()) {
7✔
47
            return *(this->pointee_type_.value()) == *pointer_type->pointee_type_.value();
7✔
48
        } else {
NEW
49
            return true;
×
50
        }
51
    } else {
UNCOV
52
        return false;
×
53
    }
54
};
7✔
55

NEW
56
std::string Pointer::print() const {
×
NEW
57
    if (this->has_pointee_type()) {
×
NEW
58
        return "Pointer(" + this->pointee_type_.value()->print() + ")";
×
59
    } else {
NEW
60
        return "Pointer()";
×
61
    }
NEW
62
};
×
63

64
} // namespace types
65
} // 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