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

daisytuner / sdfglib / 15499223741

06 Jun 2025 08:29PM UTC coverage: 57.303% (-0.001%) from 57.304%
15499223741

push

github

web-flow
Merge pull request #61 from daisytuner/copy

Copy

57 of 111 new or added lines in 16 files covered. (51.35%)

2 existing lines in 1 file now uncovered.

7584 of 13235 relevant lines covered (57.3%)

116.03 hits per line

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

76.47
/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,
355✔
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),
355✔
13
      code_(code),
355✔
14
      output_(output),
355✔
15
      inputs_(inputs),
355✔
16
      condition_(condition) {};
710✔
17

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

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

24
const std::pair<std::string, sdfg::types::Scalar>& Tasklet::output() const {
549✔
25
    return this->output_;
549✔
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

NEW
32
const sdfg::types::Scalar& Tasklet::input_type(const std::string& input) const {
×
NEW
33
    return std::find_if(this->inputs_.begin(), this->inputs_.end(),
×
NEW
34
                        [&input](const std::pair<std::string, sdfg::types::Scalar>& p) {
×
NEW
35
                            return p.first == input;
×
36
                        })
NEW
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

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

UNCOV
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_); };
332✔
55

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

62
void Tasklet::replace(const symbolic::Expression& old_expression,
12✔
63
                      const symbolic::Expression& new_expression) {
64
    this->condition_ = symbolic::subs(this->condition_, old_expression, new_expression);
12✔
65
};
12✔
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