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

daisytuner / docc / 23249128422

18 Mar 2026 02:12PM UTC coverage: 63.938% (+0.3%) from 63.617%
23249128422

Pull #584

github

web-flow
Merge 0fcde60dc into 64d54d7de
Pull Request #584: adds diamond tiling test

18 of 20 new or added lines in 1 file covered. (90.0%)

1180 existing lines in 28 files now uncovered.

26122 of 40855 relevant lines covered (63.94%)

407.69 hits per line

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

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

3
#include "sdfg/analysis/analysis.h"
4
#include "sdfg/builder/structured_sdfg_builder.h"
5
#include "sdfg/data_flow/library_nodes/math/cmath/cmath_node.h"
6
#include "sdfg/data_flow/library_nodes/math/tensor/tensor_node.h"
7
#include "sdfg/types/type.h"
8

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

13
MaximumNode::MaximumNode(
14
    size_t element_id,
15
    const DebugInfo& debug_info,
16
    const graph::Vertex vertex,
17
    data_flow::DataFlowGraph& parent,
18
    const std::vector<symbolic::Expression>& shape
19
)
20
    : ElementWiseBinaryNode(element_id, debug_info, vertex, parent, LibraryNodeType_Maximum, shape) {}
7✔
21

22
bool MaximumNode::expand_operation(
23
    builder::StructuredSDFGBuilder& builder,
24
    analysis::AnalysisManager& analysis_manager,
25
    structured_control_flow::Sequence& body,
26
    const std::string& input_name_a,
27
    const std::string& input_name_b,
28
    const std::string& output_name,
29
    const types::Tensor& input_type_a,
30
    const types::Tensor& input_type_b,
31
    const types::Tensor& output_type,
32
    const data_flow::Subset& subset
33
) {
7✔
34
    auto& code_block = builder.add_block(body);
7✔
35
    auto& output_node = builder.add_access(code_block, output_name);
7✔
36

37
    bool is_int = types::is_integer(input_type_a.primitive_type());
7✔
38

39
    data_flow::CodeNode* code_node;
7✔
40
    if (is_int) {
7✔
41
        // Use tasklets for integer types - distinguish between signed and unsigned
42
        auto tasklet_code = TensorNode::get_integer_minmax_tasklet(input_type_a.primitive_type(), true);
3✔
43
        code_node = &builder.add_tasklet(code_block, tasklet_code, "_out", {"_in1", "_in2"});
3✔
44

45
    } else {
4✔
46
        // Use intrinsics for floating-point types with correct suffix
47
        code_node = &builder.add_library_node<
4✔
48
            cmath::CMathNode>(code_block, this->debug_info(), cmath::CMathFunction::fmax, input_type_a.primitive_type());
4✔
49
    }
4✔
50

51
    create_input_memlet(builder, "_in1", input_name_a, input_type_a, subset, code_block, *code_node);
7✔
52
    create_input_memlet(builder, "_in2", input_name_b, input_type_b, subset, code_block, *code_node);
7✔
53
    builder.add_computational_memlet(code_block, *code_node, "_out", output_node, subset, output_type);
7✔
54

55
    return true;
7✔
56
}
7✔
57

58
std::unique_ptr<data_flow::DataFlowNode> MaximumNode::
UNCOV
59
    clone(size_t element_id, const graph::Vertex vertex, data_flow::DataFlowGraph& parent) const {
×
UNCOV
60
    return std::unique_ptr<
×
UNCOV
61
        data_flow::DataFlowNode>(new MaximumNode(element_id, this->debug_info(), vertex, parent, this->shape_));
×
UNCOV
62
}
×
63

64
} // namespace tensor
65
} // namespace math
66
} // 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