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

daisytuner / sdfglib / 20770413849

06 Jan 2026 10:50PM UTC coverage: 62.168% (+21.4%) from 40.764%
20770413849

push

github

web-flow
Merge pull request #433 from daisytuner/clang-coverage

updates clang coverage flags

14988 of 24109 relevant lines covered (62.17%)

88.57 hits per line

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

81.82
/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(
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) {}
8✔
19

20
bool SumNode::expand_reduction(
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
) {
5✔
31
    auto& block = builder.add_block(body, {}, this->debug_info());
5✔
32

33
    bool is_int = types::is_integer(output_type.primitive_type());
5✔
34
    data_flow::TaskletCode opcode = is_int ? data_flow::TaskletCode::int_add : data_flow::TaskletCode::fp_add;
5✔
35

36
    auto& tasklet = builder.add_tasklet(block, opcode, {"_out"}, {"_in1", "_in2"}, this->debug_info());
5✔
37

38
    auto& in_access = builder.add_access(block, input_name, this->debug_info());
5✔
39
    auto& out_read_access = builder.add_access(block, output_name, this->debug_info());
5✔
40
    auto& out_write_access = builder.add_access(block, output_name, this->debug_info());
5✔
41

42
    builder.add_computational_memlet(block, in_access, tasklet, "_in1", input_subset, input_type, this->debug_info());
5✔
43
    builder
5✔
44
        .add_computational_memlet(block, out_read_access, tasklet, "_in2", output_subset, output_type, this->debug_info());
5✔
45
    builder.add_computational_memlet(
5✔
46
        block, tasklet, "_out", out_write_access, output_subset, output_type, this->debug_info()
5✔
47
    );
5✔
48

49
    return true;
5✔
50
}
5✔
51

52
std::string SumNode::identity() const { return "0.0"; }
5✔
53

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

60
} // namespace tensor
61
} // namespace math
62
} // 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