Google

class HostSet

A set of hosts in the PVM.

Inheritance:

HostSet


Public Methods

[more]Task Spawn (const std::string &Task) const
starts the task with name Task on one of the hosts in the set and returns the corresponding instance of Task.
[more]void Spawn (const std::string &Task, int Num, TaskSet &Result) const
starts Num instances of the task with name Task on the hosts in the set and returns the set of started tasks in Result.


Documentation

A set of hosts in the PVM.

This class represents a set of hosts in the PVM. As it is publically derived from the STL-set, all STL-features can be used. Here is a short example:

      // get all hosts except the one, I'm on.
      Pvm::HostSet AllHosts;
      Pvm::Pvm ().Hosts (AllHosts);
      AllHosts.erase (Pvm::Pvm ().I ().Host ());
      // start one task on all those hosts
      Pvm::TaskSet AllTasks;
      Pvm::HostSet::iterator Current; 
      for (Current = AllHosts.begin (); Current != AllHosts.end (); ++Current)
        { 
          // save all started tasks to AllTasks.
          AllTasks.insert (Current->Spawn (PROGNAME)); 
        }
      
ovoid Spawn(const std::string &Task, int Num, TaskSet &Result) const
starts Num instances of the task with name Task on the hosts in the set and returns the set of started tasks in Result. The PVM rules regarding the default search path apply. The tasks are distributed evenly, taking into account the speed (as set by PVM) of the hosts.

oTask Spawn(const std::string &Task) const
starts the task with name Task on one of the hosts in the set and returns the corresponding instance of Task. This function is not very useful actually, but only here because of consistency.


This class has no child classes.

Alphabetic index Hierarchy of classes



This page was generated with the help of DOC++.