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

daisytuner / sdfglib / 15612270835

12 Jun 2025 01:44PM UTC coverage: 60.871% (-0.8%) from 61.71%
15612270835

push

github

web-flow
Merge pull request #68 from daisytuner/loop-types

refactors symbolic analysis into polynomials, extreme values and cnf

638 of 862 new or added lines in 24 files covered. (74.01%)

334 existing lines in 20 files now uncovered.

6571 of 10795 relevant lines covered (60.87%)

100.35 hits per line

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

58.82
/src/data_flow/tasklet.cpp
1
#include "sdfg/data_flow/tasklet.h"
2

3
#include "sdfg/symbolic/symbolic.h"
4

5
namespace sdfg {
6
namespace data_flow {
7

8
Tasklet::Tasklet(const DebugInfo& debug_info, const graph::Vertex vertex, DataFlowGraph& parent,
317✔
9
                 const TaskletCode code, const std::pair<std::string, sdfg::types::Scalar>& output,
10
                 const std::vector<std::pair<std::string, sdfg::types::Scalar>>& inputs,
11
                 const symbolic::Condition& condition)
12
    : CodeNode(debug_info, vertex, parent),
317✔
13
      code_(code),
317✔
14
      output_(output),
317✔
15
      inputs_(inputs),
317✔
16
      condition_(condition) {};
634✔
17

18
TaskletCode Tasklet::code() const { return this->code_; };
753✔
19

20
const std::vector<std::pair<std::string, sdfg::types::Scalar>>& Tasklet::inputs() const {
601✔
21
    return this->inputs_;
601✔
22
};
23

24
const std::pair<std::string, sdfg::types::Scalar>& Tasklet::output() const {
517✔
25
    return this->output_;
517✔
26
};
27

28
const std::pair<std::string, sdfg::types::Scalar>& Tasklet::input(size_t index) const {
441✔
29
    return this->inputs_[index];
441✔
30
};
31

32
const sdfg::types::Scalar& Tasklet::input_type(const std::string& input) const {
×
33
    return std::find_if(this->inputs_.begin(), this->inputs_.end(),
×
34
                        [&input](const std::pair<std::string, sdfg::types::Scalar>& p) {
×
35
                            return p.first == input;
×
36
                        })
37
        ->second;
×
38
};
39

40
bool Tasklet::needs_connector(size_t index) const {
222✔
41
    // Is non-constant, if starts with _in prefix
42
    if (this->inputs_[index].first.compare(0, 3, "_in") == 0) {
222✔
43
        return true;
17✔
44
    }
45
    return false;
205✔
46
};
222✔
47

48
const sdfg::types::Scalar& Tasklet::output_type() const { return this->output_.second; };
×
49

50
const symbolic::Condition& Tasklet::condition() const { return this->condition_; };
×
51

52
symbolic::Condition& Tasklet::condition() { return this->condition_; };
17✔
53

54
bool Tasklet::is_conditional() const { return !symbolic::is_true(this->condition_); };
273✔
55

UNCOV
56
std::unique_ptr<DataFlowNode> Tasklet::clone(const graph::Vertex vertex,
×
57
                                             DataFlowGraph& parent) const {
UNCOV
58
    return std::unique_ptr<Tasklet>(new Tasklet(this->debug_info_, vertex, parent, this->code_,
×
UNCOV
59
                                                this->output_, this->inputs_, this->condition_));
×
60
};
×
61

UNCOV
62
void Tasklet::replace(const symbolic::Expression& old_expression,
×
63
                      const symbolic::Expression& new_expression) {
UNCOV
64
    this->condition_ = symbolic::subs(this->condition_, old_expression, new_expression);
×
UNCOV
65
};
×
66

67
}  // namespace data_flow
68
}  // 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