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

daisytuner / sdfglib / 16069945621

04 Jul 2025 08:56AM UTC coverage: 64.375% (-0.2%) from 64.606%
16069945621

push

github

web-flow
Merge pull request #137 from daisytuner/clang-format

runs clang-format on codebase

609 of 827 new or added lines in 63 files covered. (73.64%)

46 existing lines in 30 files now uncovered.

8578 of 13325 relevant lines covered (64.38%)

177.24 hits per line

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

85.0
/src/types/array.cpp
1
#include "sdfg/types/array.h"
2

3
namespace sdfg {
4
namespace types {
5

6
Array::Array(const IType& element_type, const symbolic::Expression& num_elements)
89✔
7
    : element_type_(element_type.clone()), num_elements_(num_elements) {};
89✔
8

9
Array::Array(
316✔
10
    StorageType storage_type,
11
    size_t alignment,
12
    const std::string& initializer,
13
    const IType& element_type,
14
    const symbolic::Expression& num_elements
15
)
16
    : IType(storage_type, alignment, initializer), element_type_(element_type.clone()), num_elements_(num_elements) {};
316✔
17

18
PrimitiveType Array::primitive_type() const { return this->element_type_->primitive_type(); };
2✔
19

20
bool Array::is_symbol() const { return false; };
43✔
21

22
const IType& Array::element_type() const { return *this->element_type_; };
208✔
23

24
const symbolic::Expression& Array::num_elements() const { return this->num_elements_; };
76✔
25

26
TypeID Array::type_id() const { return TypeID::Array; };
1✔
27

28
bool Array::operator==(const IType& other) const {
4✔
29
    if (auto array_type = dynamic_cast<const Array*>(&other)) {
4✔
30
        return symbolic::eq(this->num_elements_, array_type->num_elements_) &&
7✔
31
               *(this->element_type_) == *array_type->element_type_;
3✔
32
    } else {
33
        return false;
×
34
    }
35
};
4✔
36

37
std::unique_ptr<IType> Array::clone() const {
301✔
38
    return std::make_unique<
301✔
39
        Array>(this->storage_type(), this->alignment(), this->initializer(), *this->element_type_, this->num_elements_);
301✔
UNCOV
40
};
×
41

42
std::string Array::print() const { return "Array(" + this->element_type_->print() + ")"; };
×
43

44
} // namespace types
45
} // 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