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

daisytuner / docc / 28793626242

06 Jul 2026 01:04PM UTC coverage: 62.962% (+0.2%) from 62.801%
28793626242

Pull #740

github

web-flow
Merge b7e03d389 into 23e67a4ab
Pull Request #740: Expand pass

594 of 962 new or added lines in 31 files covered. (61.75%)

36 existing lines in 10 files now uncovered.

40557 of 64415 relevant lines covered (62.96%)

972.09 hits per line

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

63.64
/sdfg/src/data_flow/library_nodes/math/tensor/tensor_expansion_utils.cpp
1
#include "sdfg/data_flow/library_nodes/math/tensor/tensor_expansion_utils.h"
2

3
#include "sdfg/data_flow/data_flow_node.h"
4
#include "sdfg/exceptions.h"
5
#include "sdfg/structured_control_flow/map.h"
6
#include "sdfg/types/scalar.h"
7

8
namespace sdfg::math::tensor {
9

10
InputContainerInfo find_usable_input_access_node(
11
    data_flow::DataFlowGraph& dataflow, data_flow::LibraryNode& node, const std::string& input_conn
UNCOV
12
) {
×
UNCOV
13
    auto* edge = dataflow.in_edge_for_connector(node, input_conn);
×
UNCOV
14
    if (!edge) {
×
15
        throw InvalidSDFGException(node.toStr() + " requires input on " + input_conn);
×
16
    }
×
UNCOV
17
    auto* access_node = dynamic_cast<const data_flow::AccessNode*>(&edge->src());
×
UNCOV
18
    if (!access_node) {
×
19
        throw InvalidSDFGException(node.toStr() + " requires input on " + input_conn + " to be an access node");
×
20
    }
×
21

UNCOV
22
    return {
×
UNCOV
23
        .name = access_node->data(),
×
UNCOV
24
        .is_const = !!dynamic_cast<const data_flow::ConstantNode*>(&edge->src()),
×
UNCOV
25
        .memlet = edge,
×
UNCOV
26
        .access_to_remove = access_node
×
UNCOV
27
    };
×
UNCOV
28
}
×
29

30
std::string
31
create_temp_var(builder::StructuredSDFGBuilder& builder, const std::string& prefix, int gen, const types::IType& type) {
6✔
32
    std::string n = prefix + "_" + std::to_string(gen);
6✔
33
    auto name = builder.find_new_name(n);
6✔
34
    builder.add_container(name, type);
6✔
35
    return name;
6✔
36
}
6✔
37

38
std::vector<MapDimension> create_maps(
39
    builder::StructuredSDFGBuilder& builder,
40
    const std::vector<symbolic::Expression>& shape,
41
    structured_control_flow::Sequence& parent_seq
42
) {
1✔
43
    std::vector<MapDimension> result;
1✔
44
    result.reserve(shape.size());
1✔
45

46
    types::Scalar indvar_type(types::PrimitiveType::Int64);
1✔
47
    structured_control_flow::Sequence* current_seq = &parent_seq;
1✔
48

49
    for (size_t i = 0; i < shape.size(); ++i) {
5✔
50
        // Create induction variable for this dimension
51
        std::string loop_var_name = builder.find_new_name("i" + std::to_string(i));
4✔
52
        builder.add_container(loop_var_name, indvar_type);
4✔
53
        auto loop_var = symbolic::symbol(loop_var_name);
4✔
54

55
        // Create the map: for (i = 0; i < dim_size; i++)
56
        auto& map = builder.add_map(
4✔
57
            *current_seq,
4✔
58
            loop_var,
4✔
59
            symbolic::Lt(loop_var, shape[i]),
4✔
60
            symbolic::integer(0),
4✔
61
            symbolic::add(loop_var, symbolic::one()),
4✔
62
            structured_control_flow::ScheduleType_Sequential::create()
4✔
63
        );
4✔
64

65
        // Store the map dimension info
66
        result.push_back(MapDimension{.indvar = loop_var, .seq = map.root(), .loop = map});
4✔
67

68
        // Next iteration will add to the sequence inside this map
69
        current_seq = &map.root();
4✔
70
    }
4✔
71

72
    return result;
1✔
73
}
1✔
74

75
} // namespace sdfg::math::tensor
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