VM2D 1.14
Vortex methods for 2D flows simulation
Loading...
Searching...
No Matches
Task.h
Go to the documentation of this file.
1/*--------------------------------*- VM2D -*-----------------*---------------*\
2| ## ## ## ## #### ##### | | Version 1.14 |
3| ## ## ### ### ## ## ## ## | VM2D: Vortex Method | 2026/03/06 |
4| ## ## ## # ## ## ## ## | for 2D Flow Simulation *----------------*
5| #### ## ## ## ## ## | Open Source Code |
6| ## ## ## ###### ##### | https://www.github.com/vortexmethods/VM2D |
7| |
8| Copyright (C) 2017-2026 I. Marchevsky, K. Sokol, E. Ryatina, A. Kolganova |
9*-----------------------------------------------------------------------------*
10| File name: Task.h |
11| Info: Source code of VM2D |
12| |
13| This file is part of VM2D. |
14| VM2D is free software: you can redistribute it and/or modify it |
15| under the terms of the GNU General Public License as published by |
16| the Free Software Foundation, either version 3 of the License, or |
17| (at your option) any later version. |
18| |
19| VM2D is distributed in the hope that it will be useful, but WITHOUT |
20| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
21| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
22| for more details. |
23| |
24| You should have received a copy of the GNU General Public License |
25| along with VM2D. If not, see <http://www.gnu.org/licenses/>. |
26\*---------------------------------------------------------------------------*/
27
28
40#ifndef TASK_H
41#define TASK_H
42
43#include "PassportGen.h"
44
45namespace VMlib
46{
47
62 enum class TaskState
63 {
65 waiting = 0,
66
68 starting = 1,
69
71 running = 2,
72
74 finishing = 3,
75
77 done = 4
78 };
79
80
87 class Task
88 {
89 public:
90
94 //Task(std::unique_ptr<PassportGen> _passport)
95 //{
96 // passport = std::move(_passport);
97 //};
98
100 //~Task(){};
101
102 //далее - данные, требуемые для обработки задачи очередью
103
105 int nProc;
106
108 std::vector<int> proc;
109
112
114 std::pair<int, int> startEndKvant;
115
119 double wTime;
120
122 std::shared_ptr<PassportGen> passport;
123
124
126 {
127 return *passport;
128 }
129 };
130
131}//namespace VMlib
132
133#endif
Заголовочный файл с описанием класса PasportGen.
Абстрактный класс, опеделяющий паспорт задачи
Definition PassportGen.h:96
Класс, опеделяющий описание каждой задачи в смысле прохождения процесса ее решения
Definition Task.h:88
std::pair< int, int > startEndKvant
Номера квантов времени, в которых начался и завершился счет задачи
Definition Task.h:114
std::vector< int > proc
Номера процессоров, занятых решением данной задачи
Definition Task.h:108
std::shared_ptr< PassportGen > passport
Паспорт задачи
Definition Task.h:122
int nProc
Конструктор
Definition Task.h:105
double wTime
Время в секундах, потраченное на решение данной задачи
Definition Task.h:119
TaskState state
Флаг состояния задачи
Definition Task.h:111
const PassportGen & getPassport() const
Definition Task.h:125
TaskState
Тип-перечисление, опеделяющий состояние задачи в процессе работы программы
Definition Task.h:63
@ finishing
задача финиширует
@ starting
задача стартует
@ done
задача решена
@ running
задача решается
@ waiting
задача ожидает запуска