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

daisytuner / sdfglib / 15704003944

17 Jun 2025 09:51AM UTC coverage: 64.576% (-0.4%) from 64.973%
15704003944

push

github

web-flow
Merge pull request #84 from daisytuner/element-ids

Use counter-based element ids

196 of 215 new or added lines in 29 files covered. (91.16%)

58 existing lines in 5 files now uncovered.

8041 of 12452 relevant lines covered (64.58%)

117.69 hits per line

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

77.14
/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(size_t element_id, const DebugInfo& debug_info, const graph::Vertex vertex,
353✔
9
                 DataFlowGraph& parent, const TaskletCode code,
10
                 const std::pair<std::string, sdfg::types::Scalar>& output,
11
                 const std::vector<std::pair<std::string, sdfg::types::Scalar>>& inputs,
12
                 const symbolic::Condition& condition)
13
    : CodeNode(element_id, debug_info, vertex, parent),
353✔
14
      code_(code),
353✔
15
      output_(output),
353✔
16
      inputs_(inputs),
353✔
17
      condition_(condition) {};
706✔
18

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

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

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

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

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

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

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

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

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

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

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

64
void Tasklet::replace(const symbolic::Expression& old_expression,
5✔
65
                      const symbolic::Expression& new_expression) {
66
    this->condition_ = symbolic::subs(this->condition_, old_expression, new_expression);
5✔
67
};
5✔
68

69
}  // namespace data_flow
70
}  // 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