43#ifndef DOXYGEN_SHOULD_SKIP_THIS
71 return _node2op_.first(
const_cast< ScheduleOperator*
>(&op));
76 std::vector< NodeId >& new_available_nodes,
80 if (!
_node2op_.existsSecond(
const_cast< ScheduleOperator*
>(&op))) {
82 "the schedule cannot be updated because Operation "
83 << op.toString() <<
" that has been executed does not belong to its DAG.");
The Table-agnostic base class of scheduleMultiDim.
the base class for "low-level" operators used to schedule inferences
Class containing a schedule of operations to perform on multidims.
static std::atomic< Idx > _overall_version_number_
void updateAfterExecution(const NodeId exec_node, std::vector< NodeId > &new_available_nodes, const bool check=false)
updates the schedule after a given operation has been executed
const ScheduleOperator & operation(const NodeId id) const
returns the scheduleOperation corresponding to an id in the DAG
Idx versionNumber() const
returns the version number of the schedule
Schedule(const Size nb_ops=256)
default constructor (construct an empty sequence)
NodeId nodeId(const ScheduleOperator &) const
returns the id of the node corresponding to a given ScheduleOperator
const DAG & dag() const
returns a DAG indicating in which order the operations can be performed
bool operator==(const Schedule &) const
operator ==
Bijection< const IScheduleMultiDim *, Idx > _multidim2id_
a bijection between pointers to IScheduleMultiDim and their Ids
Idx _version_number_
a number that identifies the current version of the schedule
const IScheduleMultiDim * scheduleMultiDim(const NodeId id) const
returns the ScheduleMultiDim corresponding to a given id
bool existsScheduleMultiDim(const NodeId id) const
indicates whether the schedule contains a given ScheduleMultiDim
static Idx _newVersionNumber_()
returns a new distinct version for each schedule
NodeId scheduleMultiDimId(const IScheduleMultiDim *multidim) const
returns the id of a given IScheduleMultiDim
Bijection< NodeId, ScheduleOperator * > _node2op_
a mapping between the ids of the operations and their pointer
virtual Schedule * clone() const
virtual copy constructor
const ScheduleOperator * scheduleMultiDimCreator(const NodeId id) const
returns the operation, if any, that created a given scheduleMultiDim
DAG _dag_
the DAG of the operations to perform
HashTable< const IScheduleMultiDim *, std::pair< ScheduleOperator *, Idx > > _multidim_location_
a structure to indicate precisely where a ScheduleMultiDim comes from
bool operator!=(const Schedule &) const
operator !=
#define GUM_ERROR(type, msg)
Size Idx
Type for indexes.
Size NodeId
Type for node ids.
gum is the global namespace for all aGrUM entities
Class containing a schedule of operations to perform on multidims.