#ifndef TASKS_H
#define TASKS_H

#include <boost/mpi/communicator.hpp>
#include <boost/mpi/collectives.hpp>

void task_zero(AGGenInstance &instance, std::deque<NetworkState> &localFrontier, double mem_threshold);

void task_one(AGGenInstance &instance, NetworkState &current_state,\
 std::vector<Exploit> &exploit_list, std::unordered_map<size_t, PermSet<size_t>> &od_map,\
 int alloc, int two_alloc, int reduc_factor, int num_tasks, boost::mpi::communicator &world,\
 boost::mpi::communicator &tcomm);

void task_two(AGGenInstance &instance, int alloc, int two_alloc, boost::mpi::communicator &world,\
    std::deque<NetworkState> &localFrontier, double mem_threshold, boost::mpi::communicator &ttwo_comm,\
    std::vector<std::string> ex_groups, std::unordered_map<size_t, int> &hash_map);

void task_three(AGGenInstance &instance, NetworkState &new_state, std::deque<NetworkState> &localFrontier,\
    double mem_threshold, boost::mpi::communicator &world, int alloc, int two_alloc, NetworkState &current_state,\
    Exploit &exploit, AssetGroup &assetGroup, std::unordered_map<size_t, int> &hash_map);

void task_four(NetworkState &new_state);

int send_check(boost::mpi::communicator &world, int curr_node);


#endif //TASKS_H
