Sandia Home Sandia Home
Main Page | Publications | Downloads | Configuration | Running the Code | Solver Parameters | FAQ | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

APPSPACK::Executor::Serial Class Reference

#include <APPSPACK_Executor_Serial.hpp>

Inheritance diagram for APPSPACK::Executor::Serial:

Inheritance graph
[legend]
Collaboration diagram for APPSPACK::Executor::Serial:

Collaboration graph
[legend]
List of all members.

Detailed Description

Serial Executor.

Serial implementation of the Executor::Interface. Mainly useful for testing. There are no workers; instead, each evaluations is performed when the spawn() function is called and stored until the recv() function is called to retrieve the result.

Definition at line 55 of file APPSPACK_Executor_Serial.hpp.

Public Member Functions

 Serial (Evaluator::Interface &evaluator_in)
 Constructor.
virtual ~Serial ()
 Destructor.
virtual bool isWaiting () const
 Return true if the executor is waiting for more points to be spawned.
virtual bool spawn (const Vector &x_in, int tag_in)
 Start a function evaluation for the given point with the given integer tag.
virtual int recv (int &tag_out, Vector &f_out, string &msg_out)
 Check to see if any function evaluations have finished and return the relevant information.
virtual void print () const
 Optional print function to print out information about the executor.

Private Attributes

Evaluator::Interfaceevaluator
 Interface to object that computes the actual function evaluation.
bool isFree
 Is the executor currently busy?
int tag
 Tag of current point, if any.
Vector f
 The function values.
string msg
 The message.


Constructor & Destructor Documentation

APPSPACK::Executor::Serial::Serial Evaluator::Interface evaluator_in  ) 
 

Constructor.

Definition at line 40 of file APPSPACK_Executor_Serial.cpp.

virtual APPSPACK::Executor::Serial::~Serial  )  [inline, virtual]
 

Destructor.

Definition at line 63 of file APPSPACK_Executor_Serial.hpp.


Member Function Documentation

bool APPSPACK::Executor::Serial::isWaiting  )  const [virtual]
 

Return true if the executor is waiting for more points to be spawned.

Implements APPSPACK::Executor::Interface.

Definition at line 46 of file APPSPACK_Executor_Serial.cpp.

bool APPSPACK::Executor::Serial::spawn const Vector x_in,
int  tag_in
[virtual]
 

Start a function evaluation for the given point with the given integer tag.

This function should not be called without checking isNotFull() first. However, if it is called but the executor is already full, this method will return false.

Implements APPSPACK::Executor::Interface.

Definition at line 51 of file APPSPACK_Executor_Serial.cpp.

References evaluator, f, isFree, msg, and tag.

int APPSPACK::Executor::Serial::recv int &  tag_out,
Vector f_out,
string &  msg_out
[virtual]
 

Check to see if any function evaluations have finished and return the relevant information.

If a function evaluation has completed, fill in the references that are passed to the function as follows.

Parameters:
tag_out - The tag corresponding to the x-vector that was evaluated
f_out - Vector of function values. An empty vector means that there is no value. Or use dne() as a vector entry to say that a particular value does not exist.
msg_out - Message about function evaluation
Return values:
Returns 0 (zero) if no function value is received. Otherwise, returns the worker id (any positive integer).

Implements APPSPACK::Executor::Interface.

Definition at line 63 of file APPSPACK_Executor_Serial.cpp.

References isFree.

void APPSPACK::Executor::Serial::print  )  const [virtual]
 

Optional print function to print out information about the executor.

Reimplemented from APPSPACK::Executor::Interface.

Definition at line 76 of file APPSPACK_Executor_Serial.cpp.

References evaluator, and APPSPACK::Evaluator::Interface::print().


Member Data Documentation

Evaluator::Interface& APPSPACK::Executor::Serial::evaluator [private]
 

Interface to object that computes the actual function evaluation.

Definition at line 80 of file APPSPACK_Executor_Serial.hpp.

Referenced by print(), and spawn().

bool APPSPACK::Executor::Serial::isFree [private]
 

Is the executor currently busy?

Definition at line 83 of file APPSPACK_Executor_Serial.hpp.

Referenced by recv(), and spawn().

int APPSPACK::Executor::Serial::tag [private]
 

Tag of current point, if any.

Definition at line 86 of file APPSPACK_Executor_Serial.hpp.

Referenced by spawn().

Vector APPSPACK::Executor::Serial::f [private]
 

The function values.

Definition at line 89 of file APPSPACK_Executor_Serial.hpp.

Referenced by spawn().

string APPSPACK::Executor::Serial::msg [private]
 

The message.

Definition at line 92 of file APPSPACK_Executor_Serial.hpp.

Referenced by spawn().


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

 

© Sandia Corporation | Site Contact | Privacy and Security

Generated on Fri Feb 16 10:33:36 2007 for APPSPACK 5.0.1 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2002