Main Page | Namespace List | Class Hierarchy | Alphabetical List | 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:

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

[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, bool &isF_out, double &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::Interface & | evaluator
| Interface to object that computes the actual function evaluation.
bool | isFree
| Is the executor currently busy?
int | tag
| Tag of current point, if any.
bool | isF
| True if a function value exists.
double | f
| The function value.
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. References isFree.

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, isF, isFree, msg, tag, and APPSPACK::Vector.

int APPSPACK::Executor::Serial::recv | ( | int & | tag_out,
|  | bool & | isF_out,
|  | double & | 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
  | isF_out | - True if there was a valid, finite function value
  | f_out | - The function value (only has meaning if isF is true)
  | 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 f, isF, isFree, msg, and tag.

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 77 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 isWaiting(), 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 recv(), and spawn().

bool APPSPACK::Executor::Serial::isF`[private]`

| True if a function value exists. Definition at line 89 of file APPSPACK_Executor_Serial.hpp. Referenced by recv(), and spawn().

double APPSPACK::Executor::Serial::f`[private]`

| The function value. Definition at line 92 of file APPSPACK_Executor_Serial.hpp. Referenced by recv(), and spawn().

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

| The message. Definition at line 95 of file APPSPACK_Executor_Serial.hpp. Referenced by recv(), and spawn().

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

- APPSPACK_Executor_Serial.hpp
- APPSPACK_Executor_Serial.cpp

© Sandia Corporation | Site Contact | Privacy and Security

Generated on Wed Dec 14 18:41:05 2005 for APPSPACK 4.0.2 by 1.3.8 written by Dimitri van Heesch, © 1997-2002