| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include <cstddef> | ||
| 4 | #include <cstdint> | ||
| 5 | #include <vector> | ||
| 6 | |||
| 7 | #include "shemetov_d_gauss_filter_linear/common/include/common.hpp" | ||
| 8 | #include "task/include/task.hpp" | ||
| 9 | |||
| 10 | namespace shemetov_d_gauss_filter_linear { | ||
| 11 | |||
| 12 | ✗ | class GaussFilterMPI : public BaseTask { | |
| 13 | public: | ||
| 14 | static constexpr ppc::task::TypeOfTask GetStaticTypeOfTask() { | ||
| 15 | return ppc::task::TypeOfTask::kMPI; | ||
| 16 | } | ||
| 17 | |||
| 18 | explicit GaussFilterMPI(const InType &in); | ||
| 19 | |||
| 20 | private: | ||
| 21 | static Pixel ApplyKernel(const InType &in, int i, int j, const std::vector<std::vector<float>> &kernel); | ||
| 22 | static void ComputeLocalBlock(const InType &in, int start_row, std::vector<std::vector<Pixel>> &local_out); | ||
| 23 | static std::vector<uint8_t> SendColumns(const std::vector<std::vector<Pixel>> &local_out, size_t column); | ||
| 24 | static void RecieveColumns(std::vector<uint8_t> &recieve_columns, size_t column, | ||
| 25 | std::vector<std::vector<Pixel>> &out); | ||
| 26 | static void GatherResult(const std::vector<std::vector<Pixel>> &local_out, const InType &in, | ||
| 27 | std::vector<std::vector<Pixel>> &out); | ||
| 28 | |||
| 29 | bool ValidationImpl() override; | ||
| 30 | bool PreProcessingImpl() override; | ||
| 31 | bool RunImpl() override; | ||
| 32 | bool PostProcessingImpl() override; | ||
| 33 | |||
| 34 | inline static int rank = 0; | ||
| 35 | inline static int size = 0; | ||
| 36 | |||
| 37 | inline static int width = 0; | ||
| 38 | inline static int height = 0; | ||
| 39 | |||
| 40 | inline static int base_rows = 0; | ||
| 41 | inline static int extra_rows = 0; | ||
| 42 | inline static int local_rows = 0; | ||
| 43 | }; | ||
| 44 | |||
| 45 | } // namespace shemetov_d_gauss_filter_linear | ||
| 46 |