GCC Code Coverage Report


Directory: ./
File: tasks/lifanov_k_allreduce/seq/src/ops_seq.cpp
Date: 2026-01-10 02:40:41
Exec Total Coverage
Lines: 0 16 0.0%
Functions: 0 5 0.0%
Branches: 0 10 0.0%

Line Branch Exec Source
1 #include "lifanov_k_allreduce/seq/include/ops_seq.hpp"
2
3 #include <vector>
4
5 #include "lifanov_k_allreduce/common/include/common.hpp"
6
7 namespace lifanov_k_allreduce {
8
9 LifanovKAllreduceSEQ::LifanovKAllreduceSEQ(const InType &in) {
10 SetTypeOfTask(GetStaticTypeOfTask());
11 GetInput() = in;
12 GetOutput().clear();
13 }
14
15 bool LifanovKAllreduceSEQ::ValidationImpl() {
16 return !GetInput().empty();
17 }
18
19 bool LifanovKAllreduceSEQ::PreProcessingImpl() {
20 return true;
21 }
22
23 bool LifanovKAllreduceSEQ::RunImpl() {
24 std::vector<int> current_values = GetInput();
25 GetOutput().resize(1);
26 int global_sum = 0;
27 for (int current_value : current_values) {
28 global_sum += current_value;
29 }
30 GetOutput()[0] = global_sum;
31
32 return true;
33 }
34
35 bool LifanovKAllreduceSEQ::PostProcessingImpl() {
36 return true;
37 }
38
39 } // namespace lifanov_k_allreduce
40