Fixing compiler errors and scheduler interface

This commit is contained in:
Ian Roddis
2021-06-16 10:08:00 -03:00
parent e44b7c4e8f
commit 46118ce503
3 changed files with 4 additions and 3 deletions

View File

@@ -7,6 +7,7 @@
#include <unordered_set> #include <unordered_set>
#include <iterator> #include <iterator>
#include <functional> #include <functional>
#include <optional>
/* /*
The DAG structure in daggy is just to ensure that tasks are run The DAG structure in daggy is just to ensure that tasks are run

View File

@@ -18,13 +18,13 @@ namespace daggy {
, size_t maxParallelTasks , size_t maxParallelTasks
); );
void runTasks(std::vector<Task> tasks void runTasks(std::vector<Task> tasks
, std::unordered_map<std::string, ParameterValue> parameters) , std::unordered_map<std::string, ParameterValue> parameters
, DAG dag = {} // Allows for loading of an existing DAG , DAG dag = {} // Allows for loading of an existing DAG
); );
private: private:
std::unordered_map<std::string, std::shared_ptr<Executor>> executors_; std::unordered_map<std::string, std::shared_ptr<Executor>> executors_;
std::unordered_map<std::string, std::vector<std::future<TaskResult>>> jobs_; std::unordered_map<std::string, std::vector<std::future<AttemptRecord>>> jobs_;
std::unordered_map<std::string, ParameterValue> parameters_; std::unordered_map<std::string, ParameterValue> parameters_;
}; };
} }

View File

@@ -1,4 +1,4 @@
#pragma once #include <daggy/Scheduler.hpp>
namespace daggy { namespace daggy {
void Scheduler::registerExecutor(std::shared_ptr<Executor> executor, size_t maxParallelTasks) { void Scheduler::registerExecutor(std::shared_ptr<Executor> executor, size_t maxParallelTasks) {