GCC Code Coverage Report


Directory: ./
File: tasks/makovskiy_i_gauss_filter_vert/common/include/common.hpp
Date: 2026-01-10 02:40:41
Exec Total Coverage
Lines: 3 3 100.0%
Functions: 0 0 -%
Branches: 0 0 -%

Line Branch Exec Source
1 #pragma once
2
3 #include <algorithm>
4 #include <cstddef>
5 #include <task/include/task.hpp>
6 #include <tuple>
7 #include <vector>
8
9 namespace makovskiy_i_gauss_filter_vert {
10
11 using InType = std::tuple<std::vector<int>, int, int>;
12 using OutType = std::vector<int>;
13
14 using BaseTask = ppc::task::Task<InType, OutType>;
15
16 inline int GetPixel(const std::vector<int> &image, int x, int y, int width, int height) {
17 1983 int clamped_x = std::clamp(x, 0, width - 1);
18 1821 int clamped_y = std::clamp(y, 0, height - 1);
19 1983 return image[(static_cast<size_t>(clamped_y) * width) + clamped_x];
20 }
21
22 } // namespace makovskiy_i_gauss_filter_vert
23