| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include <array> | ||
| 4 | #include <cstddef> | ||
| 5 | #include <cstdint> | ||
| 6 | #include <string> | ||
| 7 | #include <tuple> | ||
| 8 | #include <utility> | ||
| 9 | #include <vector> | ||
| 10 | |||
| 11 | #include "task/include/task.hpp" | ||
| 12 | |||
| 13 | namespace otcheskov_s_gauss_filter_vert_split { | ||
| 14 | |||
| 15 | struct ImageMetadata { | ||
| 16 | size_t height{}; | ||
| 17 | size_t width{}; | ||
| 18 | size_t channels{}; | ||
| 19 | |||
| 20 | bool operator==(const ImageMetadata &other) const { | ||
| 21 |
3/12✓ Branch 0 taken 90 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 90 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 90 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
|
90 | return height == other.height && width == other.width && channels == other.channels; |
| 22 | } | ||
| 23 | bool operator!=(const ImageMetadata &other) const { | ||
| 24 | return !(*this == other); | ||
| 25 | } | ||
| 26 | }; | ||
| 27 | |||
| 28 | using ImageData = std::vector<uint8_t>; | ||
| 29 | using Image = std::pair<ImageMetadata, ImageData>; | ||
| 30 | |||
| 31 | using InType = Image; | ||
| 32 | using OutType = Image; | ||
| 33 | using TestType = std::tuple<std::string, InType>; | ||
| 34 | using BaseTask = ppc::task::Task<InType, OutType>; | ||
| 35 | |||
| 36 | constexpr std::array<std::array<double, 3>, 3> kGaussianKernel = { | ||
| 37 | {{1.0 / 16, 2.0 / 16, 1.0 / 16}, {2.0 / 16, 4.0 / 16, 2.0 / 16}, {1.0 / 16, 2.0 / 16, 1.0 / 16}}}; | ||
| 38 | |||
| 39 | } // namespace otcheskov_s_gauss_filter_vert_split | ||
| 40 |