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

daisytuner / sdfglib / 20588702450

29 Dec 2025 11:48PM UTC coverage: 39.581%. Remained the same
20588702450

push

github

web-flow
Merge pull request #412 from daisytuner/mean-std-nodes

adds mean/std library nodes

14647 of 48066 branches covered (30.47%)

Branch coverage included in aggregate %.

225 of 622 new or added lines in 14 files covered. (36.17%)

17 existing lines in 2 files now uncovered.

12489 of 20493 relevant lines covered (60.94%)

87.19 hits per line

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

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

3
#include "sdfg/builder/structured_sdfg_builder.h"
4
#include "sdfg/data_flow/library_nodes/math/cmath/cmath_node.h"
5

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

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

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

NEW
34
    auto& libnode = builder.add_library_node<math::cmath::CMathNode>(block, this->debug_info(), "fmax", 2);
×
35

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

NEW
40
    builder.add_computational_memlet(block, in_access, libnode, "_in1", input_subset, input_type, this->debug_info());
×
NEW
41
    builder
×
NEW
42
        .add_computational_memlet(block, out_read_access, libnode, "_in2", output_subset, output_type, this->debug_info());
×
NEW
43
    builder.add_computational_memlet(
×
NEW
44
        block, libnode, "_out", out_write_access, output_subset, output_type, this->debug_info()
×
45
    );
46

NEW
47
    return true;
×
NEW
48
}
×
49

NEW
50
std::string MaxNode::identity() const { return "-INFINITY"; }
×
51

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

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