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

daisytuner / sdfglib / 20564758202

29 Dec 2025 12:13AM UTC coverage: 40.366% (+1.4%) from 38.976%
20564758202

push

github

web-flow
Merge pull request #409 from daisytuner/lib-nodes-refactor

restructures library nodes

14298 of 45900 branches covered (31.15%)

Branch coverage included in aggregate %.

259 of 388 new or added lines in 19 files covered. (66.75%)

28 existing lines in 2 files now uncovered.

12247 of 19861 relevant lines covered (61.66%)

89.04 hits per line

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

58.62
/src/data_flow/library_nodes/math/tensor/reduce_ops/sum_node.cpp
1
#include "sdfg/data_flow/library_nodes/math/tensor/reduce_ops/sum_node.h"
2

3
#include "sdfg/builder/structured_sdfg_builder.h"
4

5
namespace sdfg {
6
namespace math {
7
namespace tensor {
8

9
SumNode::SumNode(
4✔
10
    size_t element_id,
11
    const DebugInfo& debug_info,
12
    const graph::Vertex vertex,
13
    data_flow::DataFlowGraph& parent,
14
    const std::vector<symbolic::Expression>& shape,
15
    const std::vector<int64_t>& axes,
16
    bool keepdims
17
)
18
    : ReduceNode(element_id, debug_info, vertex, parent, LibraryNodeType_Sum, shape, axes, keepdims) {}
4✔
19

20
bool SumNode::expand_reduction(
4✔
21
    builder::StructuredSDFGBuilder& builder,
22
    analysis::AnalysisManager& analysis_manager,
23
    structured_control_flow::Sequence& body,
24
    const std::string& input_name,
25
    const std::string& output_name,
26
    const types::IType& input_type,
27
    const types::IType& output_type,
28
    const data_flow::Subset& input_subset,
29
    const data_flow::Subset& output_subset
30
) {
31
    auto& block = builder.add_block(body, {}, this->debug_info());
4!
32

33
    auto& tasklet =
4✔
34
        builder.add_tasklet(block, data_flow::TaskletCode::fp_add, {"_out"}, {"_in1", "_in2"}, this->debug_info());
4!
35

36
    auto& in_access = builder.add_access(block, input_name, this->debug_info());
4✔
37
    auto& out_read_access = builder.add_access(block, output_name, this->debug_info());
4✔
38
    auto& out_write_access = builder.add_access(block, output_name, this->debug_info());
4✔
39

40
    builder.add_computational_memlet(block, in_access, tasklet, "_in1", input_subset, input_type, this->debug_info());
4!
41
    builder
8✔
42
        .add_computational_memlet(block, out_read_access, tasklet, "_in2", output_subset, output_type, this->debug_info());
4!
43
    builder.add_computational_memlet(
8!
44
        block, tasklet, "_out", out_write_access, output_subset, output_type, this->debug_info()
4!
45
    );
46

47
    return true;
4✔
NEW
48
}
×
49

50
std::string SumNode::identity() const { return "0.0"; }
4!
51

52
std::unique_ptr<data_flow::DataFlowNode> SumNode::
NEW
53
    clone(size_t element_id, const graph::Vertex vertex, data_flow::DataFlowGraph& parent) const {
×
NEW
54
    return std::make_unique<
×
NEW
55
        SumNode>(element_id, this->debug_info(), vertex, parent, this->shape_, this->axes_, this->keepdims_);
×
56
}
57

58
} // namespace tensor
59
} // namespace math
60
} // 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