|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectappl.parallel.spmd.SPMDServerController
appl.parallel.spmd.AdvancedSPMDServerController
public class AdvancedSPMDServerController
Performance optimizations can be made with this class. Allows heavy
multithreading. Because multiple threads may use this class concurrently
nearly all additional methods of this class are internally synchronized using a static variable.
Also allows preloading of partitions using SyncPoint
s.
Field Summary |
---|
Fields inherited from class appl.parallel.spmd.SPMDServerController |
---|
mapPosition |
Constructor Summary | |
---|---|
AdvancedSPMDServerController(PartitionDataManager dataManager,
int referenceResouceID)
same parameters as superclass |
Method Summary | |
---|---|
void |
clearSyncData()
You should call this method from time to time to clear all syncpoints and the associated threads out of the memory |
boolean |
isMasterThread()
If there are multiple processors on the machine and the current task supports multithreading there
are several threads created. |
void |
preloadMultiPartition(String multiPartition,
int idx,
SyncPoint s)
The partition is loaded in a separate thread into the local PartitionDataManager You must specify the partition name and a
SyncPoint . |
void |
preloadPartition(String partition,
SyncPoint s)
The partition is loaded in a separate thread into the local PartitionDataManager You must specify the partition name and a SyncPoint . |
void |
setMasterThread(boolean isMaster)
|
void |
synchronizeToSyncPoint(SyncPoint s)
Waits until the Thread with the specified SyncPoint finishes. |
Methods inherited from class appl.parallel.spmd.SPMDServerController |
---|
destroyMultiPartition, destroyPartition, getBaseParameter, getGlobalBounds, getLocalBounds, getLocalBounds, getLocalCalcMaxX, getLocalCalcMaxY, getLocalCalcMinX, getLocalCalcMinY, getLocalCalculationBounds, getLocalCalculationBounds, getMultiData, getMultiPartition, getMultiPartition, getPartition, setLocalCalculationBounds |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface appl.parallel.spmd.SPMDServerInterface |
---|
destroyMultiPartition, destroyPartition, getBaseParameter, getGlobalBounds, getLocalBounds, getLocalBounds, getLocalCalcMaxX, getLocalCalcMaxY, getLocalCalcMinX, getLocalCalcMinY, getLocalCalculationBounds, getLocalCalculationBounds, getMultiData, getMultiPartition, getMultiPartition, getPartition |
Constructor Detail |
---|
public AdvancedSPMDServerController(PartitionDataManager dataManager, int referenceResouceID)
SPMDServerController.SPMDServerController(PartitionDataManager, int)
Method Detail |
---|
public void preloadPartition(String partition, SyncPoint s)
PartitionDataManager
SyncPoint
.SyncPoint
.
preloadPartition
in interface AdvancedSPMDServerInterface
partition
- the name of the partition for identifications
- the associated SyncPoint
SPMDServerController.getPartition(String)
,
isMasterThread()
public void preloadMultiPartition(String multiPartition, int idx, SyncPoint s)
PartitionDataManager
You must specify the partition name and a
SyncPoint
. You can specify a priority for the thread in the
SyncPoint
preloadMultiPartition
in interface AdvancedSPMDServerInterface
multiPartition
- the name of the partition for identificationidx
- the index of the partition in the multidata objects
- the associated SyncPoint
AdvancedSPMDClientInterface.mergePartition(java.lang.Object,
appl.parallel.spmd.SyncPoint)
,
SPMDServerController.getPartition(String)
public void synchronizeToSyncPoint(SyncPoint s)
AdvancedSPMDServerInterface
synchronizeToSyncPoint
in interface AdvancedSPMDServerInterface
s
- the SyncPoint
public void clearSyncData()
clearSyncData
in interface AdvancedSPMDServerInterface
public boolean isMasterThread()
supports multithreading
there
are several threads created. Each thread uses a different
calculation area
. Now there might
be parts of the task code were multithreading is undesired, e.g. when
operations affect the whole partition. In this case you should use this
method to guarantee that only one thread has access to a code block.
isMasterThread
in interface AdvancedSPMDServerInterface
public void setMasterThread(boolean isMaster)
isMaster
- true, if this should be the master threadisMasterThread()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |