48#ifndef GUM_SCHEDULER_SEQUENTIAL_H
49#define GUM_SCHEDULER_SEQUENTIAL_H
145 std::vector< UnexecutedOperation >& unexecuted_operations,
146 bool& unexecuted_deletions_sorted,
147 bool& unexecuted_operations_sorted,
157 std::vector< NodeId >& new_available_nodes)
const;
164 std::vector< NodeId >& new_available_nodes);
Generic doubly linked lists.
the base class for "low-level" operators used to schedule inferences
Class containing a schedule of operations to perform on multidims.
SchedulerSequential(SchedulerSequential &&from)
move constructor
void _simulateExecuteOneOperation_(const NodeId node, ScheduleOperator &op, DAG &dag, List< NodeId > &available_nodes, std::vector< NodeId > &new_available_nodes)
simulate the execution of one operation
SchedulerSequential * clone() const final
virtual copy constructor
void _setSchedule_(const Schedule &schedule)
sets a schedule and updates the set of operations if necessary
Size _addExecutableOps_(std::vector< UnexecutedOperation > &unexecuted_deletions, std::vector< UnexecutedOperation > &unexecuted_operations, bool &unexecuted_deletions_sorted, bool &unexecuted_operations_sorted, double memory_used, double max_memory, List< NodeId > &available_nodes) const
add the currently executable deletions into the set of available operations
SchedulerSequential(const SchedulerSequential &from)
copy constructor
SchedulerSequential(Size max_nb_threads=0, double max_megabyte_memory=0.0)
default constructor
std::vector< NodeId > _operations_
the sequence of operations to perform
Schedule * _schedule_
the schedule we wish to execute
void setMaxMemory(double megabytes) final
sets an upper bound on the memory consumption admissible
void _simulateExecution_()
simulate the execution of the whole schedule
double nbOperations(const Schedule &) final
returns an estimation of the number of elementary operations needed to perform a given schedule
std::pair< double, double > _memory_usage_
the memory usage for the sequence of operations;
void execute(Schedule &) final
execute all the operations of a given schedule
std::pair< double, double > memoryUsage(const Schedule &) final
returns the memory consumption used during the execution of a schedule
static bool _cmp_(const UnexecutedOperation &a, const UnexecutedOperation &b)
the comparison function used to sort unexecutable operations
bool _operations_up_to_date_
is the set of operations up to date
void _simulateDAGUpdate_(DAG &dag, const NodeId node, std::vector< NodeId > &new_available_nodes) const
simulate the update of the schedule's DAG resulting from the execution of an operation
Scheduler(Size nb_threads=0, double max_megabyte_memory=0.0)
default constructor
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size NodeId
Type for node ids.
gum is the global namespace for all aGrUM entities
a scheduler that executes any available operation (chosen aribtrarily)
the common interface of all the schedulers
a structure to keep informations about operations that could not be executed due to memory usage limi...