UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Attributes | List of all members
dcf::Manager Class Referenceabstract

#include <manager.hpp>

Inheritance diagram for dcf::Manager:
dcf::ThreadManager

Public Member Functions

 Manager ()
 
virtual ~Manager ()
 
virtual Managerclone () const =0
 
virtual size_t getUnitsCount () const =0
 
virtual dcf::error_t unitAlloc (int unit_id)=0
 
virtual dcf::error_t unitFree (int unit_id)=0
 
virtual dcf::error_t unitsFree ()=0
 
virtual dcf::error_t isAllocatedUnit (int unit_id, bool &is_allocated) const =0
 
virtual dcf::error_t unitPower (int unit_id, double &power) const =0
 
dcf::mantype_t type () const
 

Protected Attributes

dcf::mantype_t m_type
 

Detailed Description

Distributed computing resource manager interface.

Constructor & Destructor Documentation

dcf::Manager::Manager ( )

Default constructor without any resource allocation.

virtual dcf::Manager::~Manager ( )
virtual

Destructs object.

Member Function Documentation

virtual Manager* dcf::Manager::clone ( ) const
pure virtual

Clones this object and returns pointer of copy.

Implemented in dcf::ThreadManager.

virtual size_t dcf::Manager::getUnitsCount ( ) const
pure virtual

Returns number of computing units.

Implemented in dcf::ThreadManager.

virtual dcf::error_t dcf::Manager::isAllocatedUnit ( int  unit_id,
bool &  is_allocated 
) const
pure virtual
Check if unit with provided id is allocated. 

Returns error if no units with provided id.

Implemented in dcf::ThreadManager.

dcf::mantype_t dcf::Manager::type ( ) const
inline

Type of manager.

virtual dcf::error_t dcf::Manager::unitAlloc ( int  unit_id)
pure virtual

Allocates unit with provided id. Returns error if id is incorrect.

Implemented in dcf::ThreadManager.

virtual dcf::error_t dcf::Manager::unitFree ( int  unit_id)
pure virtual
Deallocates unit with provided id. Returns error if unit id is incorrect, 

or if such unit is not allocated.

Implemented in dcf::ThreadManager.

virtual dcf::error_t dcf::Manager::unitPower ( int  unit_id,
double &  power 
) const
pure virtual
Unit with provided id relative power estimation. Power can be from 0 to 1. 

Unit with power equal to 1 is the most powerfull unit. Returns error if incorrect unit id provided.

Implemented in dcf::ThreadManager.

virtual dcf::error_t dcf::Manager::unitsFree ( )
pure virtual

Deallocates all allocated units. Returns error if no allocated devices.

Implemented in dcf::ThreadManager.

Member Data Documentation

dcf::mantype_t dcf::Manager::m_type
protected

Type of manager.


The documentation for this class was generated from the following file: