appl.parallel.spmd
Interface SPMDTask

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractSPMDTask, AverageNeighborhoodTestTask, AverageNeighborhoodTestTask_MultiGrid, AVNTask, AVNTunedTask, ClueTask, ClueTaskTuned

public interface SPMDTask
extends Serializable

A SPMDTask should be executed on servers using the SPMD-paradigm.
The Task provides access to the SPMDClientInterface and the AdvancedSPMDClientInterface.

Author:
Dominik Appl
See Also:
for more details

Method Summary
 AdvancedSPMDServerInterface getAdvancedSPMDServerController()
          Gives access the AdvancedSPMDServerInterface for advanced parallel programming, including performance optimizations like preloading.
 SPMDServerInterface getSPMDServerController()
          Gives access the SPMDServerInterface for parallel programming.
 void incomingUpdate(WritableGrid outgoingGrid, Rectangle location)
          Currently not used.
 void initialize()
          Initializes the task.
 boolean isInitialized()
           
 void outgoingUpdate(WritableGrid incomingGrid, Rectangle location)
          Currently not used.
 Object run(Object... parameters)
          Starts the task with the given parameters.
 void setSPMDServerController(AdvancedSPMDServerInterface controller)
          Associates the given SPMDController with the task.
 boolean supportsMultiThreading()
          If you want to support multiple processors, this method must return true.
 

Method Detail

getAdvancedSPMDServerController

AdvancedSPMDServerInterface getAdvancedSPMDServerController()
Gives access the AdvancedSPMDServerInterface for advanced parallel programming, including performance optimizations like preloading.

Returns:
the interface

getSPMDServerController

SPMDServerInterface getSPMDServerController()
Gives access the SPMDServerInterface for parallel programming.

Returns:
the interface

setSPMDServerController

void setSPMDServerController(AdvancedSPMDServerInterface controller)
Associates the given SPMDController with the task. Will be called e.g. by the XuluServer.

Parameters:
controller -

outgoingUpdate

void outgoingUpdate(WritableGrid incomingGrid,
                    Rectangle location)
Currently not used. May be used later when introducing write access on neighborhood regions.

Parameters:
incomingGrid -
location -

incomingUpdate

void incomingUpdate(WritableGrid outgoingGrid,
                    Rectangle location)
Currently not used. May be used later when introducing write access on neighborhood regions.

Parameters:
outgoingGrid -
location -

run

Object run(Object... parameters)
Starts the task with the given parameters. Overwrite this method to implement the task.

Parameters:
parameters -
Returns:
the result of the task computation (if any)

initialize

void initialize()
Initializes the task. Initializing is only done once!


isInitialized

boolean isInitialized()
Returns:
whether the task is initialized or initialize() must be called

supportsMultiThreading

boolean supportsMultiThreading()
If you want to support multiple processors, this method must return true.

Returns:
whether multithreading can be used by this task