mammut::task::Task Class Referenceabstract
Inheritance diagram for mammut::task::Task:
mammut::task::ProcessHandler mammut::task::ThreadHandler

Public Member Functions

virtual bool getCoreUsage (double &coreUsage) const =0
 
virtual bool resetCoreUsage ()=0
 
virtual bool getPriority (uint &priority) const =0
 
virtual bool setPriority (uint priority) const =0
 
virtual bool getVirtualCoreId (topology::VirtualCoreId &virtualCoreId) const =0
 
virtual bool move (const topology::Cpu *cpu) const =0
 
virtual bool move (const topology::PhysicalCore *physicalCore) const =0
 
virtual bool move (const topology::VirtualCore *virtualCore) const =0
 
virtual bool move (topology::VirtualCoreId virtualCoreId) const =0
 
virtual bool move (const std::vector< const topology::VirtualCore * > virtualCores) const =0
 
virtual bool move (const std::vector< topology::VirtualCoreId > virtualCoresIds) const =0
 

Member Function Documentation

virtual bool mammut::task::Task::getCoreUsage ( double &  coreUsage) const
pure virtual

Returns the percentage of time spent by this execution unit on a processing core. The percentage is computed over a period of time spanning from the last call of resetCoreUsage (or from the creation of this object) to the moment of this call.

Parameters
coreUsageThe percentage of time spent by this execution unit on a processing core.
Returns
If false is returned, this execution unit is no more active and the call failed. Otherwise, true is returned.
virtual bool mammut::task::Task::getPriority ( uint &  priority) const
pure virtual

Gets the current priority of this execution unit.

Parameters
priorityThe current priority of this execution unit. The higher is the value, the higher is the priority. It will be in the range [MAMMUT_PROCESS_PRIORITY_MIN, MAMMUT_PROCESS_PRIORITY_MAX]
Returns
If false is returned, this execution unit is no more active and the call failed. Otherwise, true is returned.
virtual bool mammut::task::Task::getVirtualCoreId ( topology::VirtualCoreId &  virtualCoreId) const
pure virtual

Gets the identifier of the virtual core on which this unit is currently running.

Parameters
virtualCoreIdThe identifier of the virtual core on which this unit is currently running.
Returns
If false is returned, this execution unit is no more active and the call failed. Otherwise, true is returned.
virtual bool mammut::task::Task::move ( const topology::Cpu cpu) const
pure virtual

Move this execution unit on a specified CPU. NOTE: If executed on a process, all its threads will be moved too.

Parameters
cpuThe CPU on which this execution unit must be moved.
Returns
If false is returned, this execution unit is no more active and the call failed. Otherwise, true is returned.
virtual bool mammut::task::Task::move ( const topology::PhysicalCore physicalCore) const
pure virtual

Move this execution unit on a specified physical core. NOTE: If executed on a process, all its threads will be moved too.

Parameters
physicalCoreThe physical core on which this execution unit must be moved.
Returns
If false is returned, this execution unit is no more active and the call failed. Otherwise, true is returned.
virtual bool mammut::task::Task::move ( const topology::VirtualCore virtualCore) const
pure virtual

Move this execution unit on a specified virtual core. NOTE: If executed on a process, all its threads will be moved too.

Parameters
virtualCoreThe virtual core on which this execution unit must be moved.
Returns
If false is returned, this execution unit is no more active and the call failed. Otherwise, true is returned.
virtual bool mammut::task::Task::move ( topology::VirtualCoreId  virtualCoreId) const
pure virtual

Move this execution unit on a specified virtual core. NOTE: If executed on a process, all its threads will be moved too.

Parameters
virtualCoreIdThe identifier of the virtual core on which this execution unit must be moved.
Returns
If false is returned, this execution unit is no more active and the call failed. Otherwise, true is returned.
virtual bool mammut::task::Task::move ( const std::vector< const topology::VirtualCore * >  virtualCores) const
pure virtual

Move this execution unit on a set of specified virtual cores.

Parameters
virtualCoresThe virtual cores on which this execution unit must be moved.
Returns
If false is returned, this execution unit is no more active and the call failed. Otherwise, true is returned.
virtual bool mammut::task::Task::move ( const std::vector< topology::VirtualCoreId >  virtualCoresIds) const
pure virtual

Move this execution unit on a set of specified virtual cores.

Parameters
virtualCoresIdsThe identifiers of the virtual cores on which this execution unit must be moved.
Returns
If false is returned, this execution unit is no more active and the call failed. Otherwise, true is returned.
virtual bool mammut::task::Task::resetCoreUsage ( )
pure virtual

Resets the counter for core usage percentage computation.

Returns
If false is returned, this execution unit is no more active and the call failed. Otherwise, true is returned.
virtual bool mammut::task::Task::setPriority ( uint  priority) const
pure virtual

Sets the priority of this execution unit. NOTE: If executed on a process, the priority of all its thread will be changed too. NOTE: It may require privileged rights.

Parameters
priorityThe priority of this execution unit. The higher is the value, the higher is the priority. It must be in the range [MAMMUT_PROCESS_PRIORITY_MIN, MAMMUT_PROCESS_PRIORITY_MAX]
Returns
If false is returned, the priority value is outside the allowed range or this execution unit is no more active and the call failed. Otherwise, true is returned.

The documentation for this class was generated from the following file:
  • /home/daniele/Code/Mammut/mammut/task/task.hpp