| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | #include <vector> | ||
| 3 | |||
| 4 | #include "task/include/task.hpp" | ||
| 5 | #include "timur_a_cannon/common/include/common.hpp" | ||
| 6 | |||
| 7 | namespace timur_a_cannon { | ||
| 8 | |||
| 9 | class TimurACannonMatrixMultiplicationOMP : public BaseTask { | ||
| 10 | public: | ||
| 11 | static constexpr ppc::task::TypeOfTask GetStaticTypeOfTask() { | ||
| 12 | return ppc::task::TypeOfTask::kOMP; | ||
| 13 | } | ||
| 14 | |||
| 15 | TimurACannonMatrixMultiplicationOMP() = default; | ||
| 16 | explicit TimurACannonMatrixMultiplicationOMP(const InType &in); | ||
| 17 | 64 | ~TimurACannonMatrixMultiplicationOMP() override = default; | |
| 18 | |||
| 19 | private: | ||
| 20 | bool ValidationImpl() override; | ||
| 21 | bool PreProcessingImpl() override; | ||
| 22 | bool RunImpl() override; | ||
| 23 | bool PostProcessingImpl() override; | ||
| 24 | |||
| 25 | static void RotateBlocksA(std::vector<std::vector<std::vector<std::vector<double>>>> &blocks, int grid_sz); | ||
| 26 | static void RotateBlocksB(std::vector<std::vector<std::vector<std::vector<double>>>> &blocks, int grid_sz); | ||
| 27 | static void BlockMultiplyAccumulate(const std::vector<std::vector<double>> &a, | ||
| 28 | const std::vector<std::vector<double>> &b, std::vector<std::vector<double>> &c, | ||
| 29 | int b_size); | ||
| 30 | |||
| 31 | static void DistributeData(const std::vector<std::vector<double>> &src_a, | ||
| 32 | const std::vector<std::vector<double>> &src_b, | ||
| 33 | std::vector<std::vector<std::vector<std::vector<double>>>> &bl_a, | ||
| 34 | std::vector<std::vector<std::vector<std::vector<double>>>> &bl_b, int b_size, int grid_sz); | ||
| 35 | |||
| 36 | static void CollectResult(const std::vector<std::vector<std::vector<std::vector<double>>>> &bl_c, | ||
| 37 | std::vector<std::vector<double>> &res, int b_size, int grid_sz); | ||
| 38 | }; | ||
| 39 | |||
| 40 | } // namespace timur_a_cannon | ||
| 41 |