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

daisytuner / sdfglib / 20555877698

28 Dec 2025 03:34PM UTC coverage: 38.976% (-0.1%) from 39.111%
20555877698

push

github

web-flow
Merge pull request #408 from daisytuner/codegen-malloc

Several fixes for library nodes

13539 of 45102 branches covered (30.02%)

Branch coverage included in aggregate %.

1 of 99 new or added lines in 11 files covered. (1.01%)

14 existing lines in 7 files now uncovered.

11671 of 19578 relevant lines covered (59.61%)

83.78 hits per line

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

0.0
/src/data_flow/library_nodes/math/ml/div.cpp
1
#include "sdfg/data_flow/library_nodes/math/ml/div.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
DivNode::DivNode(
×
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
    : ElementWiseBinaryNode(element_id, debug_info, vertex, parent, LibraryNodeType_Div, shape) {}
×
20

21
bool DivNode::expand_operation(
×
22
    builder::StructuredSDFGBuilder& builder,
23
    analysis::AnalysisManager& analysis_manager,
24
    structured_control_flow::Sequence& body,
25
    const std::string& input_name_a,
26
    const std::string& input_name_b,
27
    const std::string& output_name,
28
    const types::IType& input_type_a,
29
    const types::IType& input_type_b,
30
    const types::IType& output_type,
31
    const data_flow::Subset& subset
32
) {
UNCOV
33
    auto& code_block = builder.add_block(body);
×
34
    data_flow::AccessNode* input_node_a;
NEW
35
    if (builder.subject().exists(input_name_a)) {
×
NEW
36
        input_node_a = &builder.add_access(code_block, input_name_a);
×
NEW
37
    } else {
×
NEW
38
        input_node_a = &builder.add_constant(code_block, input_name_a, input_type_a);
×
39
    }
40
    data_flow::AccessNode* input_node_b;
NEW
41
    if (builder.subject().exists(input_name_b)) {
×
NEW
42
        input_node_b = &builder.add_access(code_block, input_name_b);
×
NEW
43
    } else {
×
NEW
44
        input_node_b = &builder.add_constant(code_block, input_name_b, input_type_b);
×
45
    }
UNCOV
46
    auto& output_node = builder.add_access(code_block, output_name);
×
47

48
    auto& tasklet = builder.add_tasklet(code_block, data_flow::TaskletCode::fp_div, "_out", {"_in1", "_in2"});
×
49

NEW
50
    if (input_type_a.type_id() == types::TypeID::Scalar) {
×
NEW
51
        builder.add_computational_memlet(code_block, *input_node_a, tasklet, "_in1", {}, input_type_a);
×
NEW
52
    } else {
×
NEW
53
        builder.add_computational_memlet(code_block, *input_node_a, tasklet, "_in1", subset, input_type_a);
×
54
    }
NEW
55
    if (input_type_b.type_id() == types::TypeID::Scalar) {
×
NEW
56
        builder.add_computational_memlet(code_block, *input_node_b, tasklet, "_in2", {}, input_type_b);
×
NEW
57
    } else {
×
NEW
58
        builder.add_computational_memlet(code_block, *input_node_b, tasklet, "_in2", subset, input_type_b);
×
59
    }
UNCOV
60
    builder.add_computational_memlet(code_block, tasklet, "_out", output_node, subset, output_type);
×
61

62
    return true;
×
63
}
×
64

65
std::unique_ptr<data_flow::DataFlowNode> DivNode::
66
    clone(size_t element_id, const graph::Vertex vertex, data_flow::DataFlowGraph& parent) const {
×
67
    return std::unique_ptr<
×
68
        data_flow::DataFlowNode>(new DivNode(element_id, this->debug_info(), vertex, parent, this->shape_));
×
69
}
×
70

71
} // namespace ml
72
} // namespace math
73
} // 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