Skip to content

Commit 6f356bf

Browse files
authored
Apply clang-tidy hotfixes (#282)
1 parent b1a952f commit 6f356bf

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

app/Graph/onnx_subgraphs.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@ using namespace it_lab_ai;
1616

1717
void alexnet_inf_careless(Graph& graph, const RuntimeOptions& options,
1818
Tensor& input, Tensor& output) {
19-
auto* o = new Tensor(output);
20-
auto* i = new Tensor(input);
21-
graph.inference(options);
2219
if (graph.getLayersCount() == 0) {
2320
throw std::runtime_error("No layers");
2421
}
25-
graph.setOutput(graph.getLayerFromID(graph.getLayersCount() - 1), *o);
26-
graph.setInput(graph.getLayerFromID(0), *i);
22+
graph.setInput(graph.getLayerFromID(0), input);
23+
graph.setOutput(graph.getLayerFromID(graph.getLayersCount() - 1), output);
24+
graph.inference(options);
2725
}
2826

2927
void alexnet_comparison() {

include/layers/Shape.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class Shape {
1919
Shape(const std::initializer_list<size_t>& l) : dims_(l) {}
2020
Shape(const Shape& c) = default;
2121
Shape& operator=(const Shape& c) = default;
22+
Shape(Shape&&) noexcept = default;
23+
Shape& operator=(Shape&&) noexcept = default;
2224
size_t operator[](size_t i) const noexcept { return dims_[i]; }
2325
size_t& operator[](size_t i) noexcept { return dims_[i]; }
2426
[[nodiscard]] size_t at(size_t i) const {

include/layers/Tensor.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ class Tensor {
8686
values_ = a;
8787
}
8888

89-
Tensor(const Tensor& t) noexcept = default;
89+
Tensor(const Tensor& t) = default;
9090
Tensor(Tensor&& t) noexcept = default;
91-
Tensor& operator=(const Tensor& t) noexcept = default;
91+
Tensor& operator=(const Tensor& t) = default;
9292
Tensor& operator=(Tensor&& t) noexcept = default;
9393

9494
[[nodiscard]] Shape get_shape() const { return shape_; }

0 commit comments

Comments
 (0)