KleidiCV Coverage Report


Directory: ./
File: kleidicv/include/kleidicv/filters/filter_2d_window_loader_5x5.h
Date: 2025-09-25 14:13:34
Exec Total Coverage
Lines: 52 52 100.0%
Functions: 28 28 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 // SPDX-FileCopyrightText: 2025 Arm Limited and/or its affiliates <open-source-office@arm.com>
2 //
3 // SPDX-License-Identifier: Apache-2.0
4
5 #ifndef KLEIDICV_FILTER_2D_WINDOW_LOADER_5X5_H
6 #define KLEIDICV_FILTER_2D_WINDOW_LOADER_5X5_H
7
8 #include "kleidicv/workspace/border_5x5.h"
9
10 namespace KLEIDICV_TARGET_NAMESPACE {
11 template <typename SourceType>
12 class Filter2dWindowLoader5x5 {
13 public:
14 using BorderInfoType =
15 typename KLEIDICV_TARGET_NAMESPACE::FixedBorderInfo5x5<SourceType>;
16 using BorderOffsets = typename BorderInfoType::Offsets;
17
18 template <typename LoadArrayElementFunctionType, typename KernelWindowFunctor>
19 119270 static void load_window(KernelWindowFunctor& KernelWindow,
20 LoadArrayElementFunctionType load_array_element,
21 Rows<const SourceType> src_rows,
22 BorderOffsets window_row_offsets,
23 BorderOffsets window_col_offsets,
24 size_t index) KLEIDICV_STREAMING {
25 119270 KernelWindow(0, 0) = load_array_element(
26 119270 src_rows.at(window_row_offsets.c0(), window_col_offsets.c0())[index]);
27 119270 KernelWindow(0, 1) = load_array_element(
28 119270 src_rows.at(window_row_offsets.c0(), window_col_offsets.c1())[index]);
29 119270 KernelWindow(0, 2) = load_array_element(
30 119270 src_rows.at(window_row_offsets.c0(), window_col_offsets.c2())[index]);
31 119270 KernelWindow(0, 3) = load_array_element(
32 119270 src_rows.at(window_row_offsets.c0(), window_col_offsets.c3())[index]);
33 119270 KernelWindow(0, 4) = load_array_element(
34 119270 src_rows.at(window_row_offsets.c0(), window_col_offsets.c4())[index]);
35 119270 KernelWindow(1, 0) = load_array_element(
36 119270 src_rows.at(window_row_offsets.c1(), window_col_offsets.c0())[index]);
37 119270 KernelWindow(1, 1) = load_array_element(
38 119270 src_rows.at(window_row_offsets.c1(), window_col_offsets.c1())[index]);
39 119270 KernelWindow(1, 2) = load_array_element(
40 119270 src_rows.at(window_row_offsets.c1(), window_col_offsets.c2())[index]);
41 119270 KernelWindow(1, 3) = load_array_element(
42 119270 src_rows.at(window_row_offsets.c1(), window_col_offsets.c3())[index]);
43 119270 KernelWindow(1, 4) = load_array_element(
44 119270 src_rows.at(window_row_offsets.c1(), window_col_offsets.c4())[index]);
45 119270 KernelWindow(2, 0) = load_array_element(
46 119270 src_rows.at(window_row_offsets.c2(), window_col_offsets.c0())[index]);
47 119270 KernelWindow(2, 1) = load_array_element(
48 119270 src_rows.at(window_row_offsets.c2(), window_col_offsets.c1())[index]);
49 119270 KernelWindow(2, 2) = load_array_element(
50 119270 src_rows.at(window_row_offsets.c2(), window_col_offsets.c2())[index]);
51 119270 KernelWindow(2, 3) = load_array_element(
52 119270 src_rows.at(window_row_offsets.c2(), window_col_offsets.c3())[index]);
53 119270 KernelWindow(2, 4) = load_array_element(
54 119270 src_rows.at(window_row_offsets.c2(), window_col_offsets.c4())[index]);
55 119270 KernelWindow(3, 0) = load_array_element(
56 119270 src_rows.at(window_row_offsets.c3(), window_col_offsets.c0())[index]);
57 119270 KernelWindow(3, 1) = load_array_element(
58 119270 src_rows.at(window_row_offsets.c3(), window_col_offsets.c1())[index]);
59 119270 KernelWindow(3, 2) = load_array_element(
60 119270 src_rows.at(window_row_offsets.c3(), window_col_offsets.c2())[index]);
61 119270 KernelWindow(3, 3) = load_array_element(
62 119270 src_rows.at(window_row_offsets.c3(), window_col_offsets.c3())[index]);
63 119270 KernelWindow(3, 4) = load_array_element(
64 119270 src_rows.at(window_row_offsets.c3(), window_col_offsets.c4())[index]);
65 119270 KernelWindow(4, 0) = load_array_element(
66 119270 src_rows.at(window_row_offsets.c4(), window_col_offsets.c0())[index]);
67 119270 KernelWindow(4, 1) = load_array_element(
68 119270 src_rows.at(window_row_offsets.c4(), window_col_offsets.c1())[index]);
69 119270 KernelWindow(4, 2) = load_array_element(
70 119270 src_rows.at(window_row_offsets.c4(), window_col_offsets.c2())[index]);
71 119270 KernelWindow(4, 3) = load_array_element(
72 119270 src_rows.at(window_row_offsets.c4(), window_col_offsets.c3())[index]);
73 119270 KernelWindow(4, 4) = load_array_element(
74 119270 src_rows.at(window_row_offsets.c4(), window_col_offsets.c4())[index]);
75 119270 }
76 };
77 } // namespace KLEIDICV_TARGET_NAMESPACE
78
79 #endif // KLEIDICV_FILTER_2D_WINDOW_LOADER_5X5_H
80