• 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
/src/types/structure.cpp
1
#include "sdfg/types/structure.h"
2

3
namespace sdfg {
4
namespace types {
5

UNCOV
6
Structure::Structure(const std::string& name) : name_(name) {};
×
7

UNCOV
8
Structure::Structure(StorageType storage_type, size_t alignment, const std::string& initializer,
×
9
                     const std::string& name)
UNCOV
10
    : IType(storage_type, alignment, initializer), name_(name) {};
×
11

UNCOV
12
PrimitiveType Structure::primitive_type() const { return PrimitiveType::Void; };
×
13

UNCOV
14
bool Structure::is_symbol() const { return false; };
×
15

UNCOV
16
const std::string& Structure::name() const { return this->name_; };
×
17

UNCOV
18
bool Structure::operator==(const IType& other) const {
×
UNCOV
19
    if (auto structure_ = dynamic_cast<const Structure*>(&other)) {
×
UNCOV
20
        return this->name_ == structure_->name_ && this->alignment_ == structure_->alignment_;
×
21
    } else {
22
        return false;
×
23
    }
UNCOV
24
};
×
25

UNCOV
26
std::unique_ptr<IType> Structure::clone() const {
×
UNCOV
27
    return std::make_unique<Structure>(this->storage_type(), this->alignment(), this->initializer(),
×
UNCOV
28
                                       this->name_);
×
29
};
×
30

31
std::string Structure::print() const { return "Structure(" + this->name_ + ")"; };
×
32

UNCOV
33
StructureDefinition::StructureDefinition(const std::string& name, bool is_packed)
×
UNCOV
34
    : name_(name), is_packed_(is_packed), members_() {};
×
35

UNCOV
36
std::unique_ptr<StructureDefinition> StructureDefinition::clone() const {
×
UNCOV
37
    auto def = std::make_unique<StructureDefinition>(this->name_, this->is_packed_);
×
UNCOV
38
    for (unsigned i = 0; i < this->num_members(); i++) {
×
UNCOV
39
        def->add_member(this->member_type(symbolic::integer(i)));
×
UNCOV
40
    }
×
UNCOV
41
    return def;
×
UNCOV
42
};
×
43

UNCOV
44
const std::string& StructureDefinition::name() const { return this->name_; };
×
45

UNCOV
46
bool StructureDefinition::is_packed() const { return this->is_packed_; };
×
47

UNCOV
48
size_t StructureDefinition::num_members() const { return this->members_.size(); };
×
49

UNCOV
50
const IType& StructureDefinition::member_type(symbolic::Integer index) const {
×
UNCOV
51
    return *this->members_.at(index->as_uint());
×
52
};
53

UNCOV
54
void StructureDefinition::add_member(const IType& member_type) {
×
UNCOV
55
    this->members_.push_back(member_type.clone());
×
UNCOV
56
};
×
57

58
}  // namespace types
59
}  // 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

© 2025 Coveralls, Inc