GCC Code Coverage Report


Directory: ./
File: tasks/kolotukhin_a_elem_vec_sum/seq/src/ops_seq.cpp
Date: 2026-01-27 01:59:34
Exec Total Coverage
Lines: 18 18 100.0%
Functions: 5 5 100.0%
Branches: 2 2 100.0%

Line Branch Exec Source
1 #include "kolotukhin_a_elem_vec_sum/seq/include/ops_seq.hpp"
2
3 #include <cstdint>
4
5 #include "kolotukhin_a_elem_vec_sum/common/include/common.hpp"
6
7 namespace kolotukhin_a_elem_vec_sum {
8
9 40 KolotukhinAElemVecSumSEQ::KolotukhinAElemVecSumSEQ(const InType &in) {
10 SetTypeOfTask(GetStaticTypeOfTask());
11 40 GetInput() = in;
12 GetOutput() = 0;
13 40 }
14
15 40 bool KolotukhinAElemVecSumSEQ::ValidationImpl() {
16 40 return std::equal_to<>()(typeid(GetInput()), typeid(std::uint64_t &));
17 }
18
19 40 bool KolotukhinAElemVecSumSEQ::PreProcessingImpl() {
20 40 GetOutput() = 0;
21 40 return true;
22 }
23
24 40 bool KolotukhinAElemVecSumSEQ::RunImpl() {
25 40 std::uint64_t size = GetInput();
26 std::int64_t seed = 42;
27 40 volatile std::int64_t total_sum = 0;
28
2/2
✓ Branch 0 taken 81152 times.
✓ Branch 1 taken 40 times.
81192 for (std::uint64_t i = 0; i < size; i++) {
29 81152 seed = (seed * 13 + 7) % 10000;
30 81152 total_sum += seed;
31 }
32 40 GetOutput() = total_sum;
33 40 return true;
34 }
35
36 40 bool KolotukhinAElemVecSumSEQ::PostProcessingImpl() {
37 40 return true;
38 }
39
40 } // namespace kolotukhin_a_elem_vec_sum
41