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

daisytuner / sdfglib / 17697974118

13 Sep 2025 02:36PM UTC coverage: 60.51% (+1.2%) from 59.335%
17697974118

Pull #219

github

web-flow
Merge a1c5ecbc6 into 6c1992b40
Pull Request #219: stdlib Library Nodes and ConstantNodes

565 of 1799 new or added lines in 102 files covered. (31.41%)

102 existing lines in 38 files now uncovered.

9442 of 15604 relevant lines covered (60.51%)

107.02 hits per line

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

94.12
/src/data_flow/library_nodes/math/ml/relu.cpp
1
#include "sdfg/data_flow/library_nodes/math/ml/relu.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
namespace sdfg {
9
namespace math {
10
namespace ml {
11

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

21
bool ReLUNode::expand_operation(
2✔
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& subset
30
) {
31
    // Add code
32
    types::Scalar base_type(input_type.primitive_type());
2✔
33

34
    auto& code_block = builder.add_block(body);
2✔
35
    auto& input_node_new = builder.add_access(code_block, input_name);
2✔
36
    auto& output_node_new = builder.add_access(code_block, output_name);
2✔
37
    auto& zero_node = builder.add_constant(code_block, "0.0", base_type);
2✔
38
    auto& tasklet = builder.add_tasklet(code_block, data_flow::TaskletCode::max, "_out", {"_in1", "_in2"});
2✔
39
    builder.add_computational_memlet(code_block, zero_node, tasklet, "_in1", {}, base_type);
2✔
40
    builder.add_computational_memlet(code_block, input_node_new, tasklet, "_in2", subset, input_type);
2✔
41
    builder.add_computational_memlet(code_block, tasklet, "_out", output_node_new, subset, output_type);
2✔
42

43
    return true;
44
}
2✔
45

46
std::unique_ptr<data_flow::DataFlowNode> ReLUNode::
47
    clone(size_t element_id, const graph::Vertex vertex, data_flow::DataFlowGraph& parent) const {
1✔
48
    return std::unique_ptr<
1✔
49
        data_flow::DataFlowNode>(new ReLUNode(element_id, this->debug_info(), vertex, parent, this->shape_));
1✔
UNCOV
50
}
×
51

52
} // namespace ml
53
} // namespace math
54
} // 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