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

daisytuner / docc / 26520678771

27 May 2026 03:22PM UTC coverage: 60.864% (-0.02%) from 60.886%
26520678771

Pull #719

github

web-flow
Merge 99c5e4f9d into 707dadcf8
Pull Request #719: Libnode ptr edges

961 of 1749 new or added lines in 52 files covered. (54.95%)

90 existing lines in 29 files now uncovered.

35222 of 57870 relevant lines covered (60.86%)

11043.61 hits per line

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

80.0
/sdfg/src/data_flow/library_nodes/math/tensor/elementwise_ops/relu_node.cpp
1
#include "sdfg/data_flow/library_nodes/math/tensor/elementwise_ops/relu_node.h"
2

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

6
#include "sdfg/analysis/scope_analysis.h"
7

8
#include "sdfg/data_flow/library_nodes/math/cmath/cmath_node.h"
9

10
namespace sdfg {
11
namespace math {
12
namespace tensor {
13

14
ReLUNode::ReLUNode(
15
    size_t element_id,
16
    const DebugInfo& debug_info,
17
    const graph::Vertex vertex,
18
    data_flow::DataFlowGraph& parent,
19
    const std::vector<symbolic::Expression>& shape
20
)
21
    : ElementWiseUnaryNode(element_id, debug_info, vertex, parent, LibraryNodeType_ReLU, shape) {}
19✔
22

23
bool ReLUNode::expand_operation(
24
    builder::StructuredSDFGBuilder& builder,
25
    analysis::AnalysisManager& analysis_manager,
26
    structured_control_flow::Sequence& body,
27
    const std::string& input_name,
28
    const std::string& output_name,
29
    const types::Tensor& input_type,
30
    const types::Tensor& output_type,
31
    const data_flow::Subset& subset
32
) {
4✔
33
    // Add code
34
    types::Scalar base_type(input_type.primitive_type());
4✔
35
    types::Tensor scalar_tensor(base_type.primitive_type(), {});
4✔
36

37
    auto& code_block = builder.add_block(body);
4✔
38
    auto& input_node_new = builder.add_access(code_block, input_name);
4✔
39
    auto& output_node_new = builder.add_access(code_block, output_name);
4✔
40
    auto& zero_node = builder.add_constant(code_block, "0.0", base_type);
4✔
41

42
    auto& tasklet = builder.add_library_node<math::cmath::CMathNode>(
4✔
43
        code_block, code_block.debug_info(), cmath::CMathFunction::fmax, input_type.primitive_type()
4✔
44
    );
4✔
45

46
    builder.add_computational_memlet(code_block, zero_node, tasklet, "_in1", {}, scalar_tensor);
4✔
47
    builder.add_computational_memlet(code_block, input_node_new, tasklet, "_in2", subset, input_type);
4✔
48
    builder.add_computational_memlet(code_block, tasklet, "_out", output_node_new, subset, output_type);
4✔
49

50
    return true;
4✔
51
}
4✔
52

53
std::unique_ptr<data_flow::DataFlowNode> ReLUNode::
UNCOV
54
    clone(size_t element_id, const graph::Vertex vertex, data_flow::DataFlowGraph& parent) const {
×
UNCOV
55
    return std::unique_ptr<
×
UNCOV
56
        data_flow::DataFlowNode>(new ReLUNode(element_id, this->debug_info(), vertex, parent, this->shape_));
×
UNCOV
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