org.objectweb.proactive.calcium.skeletons
Class DaC<T>
java.lang.Object
org.objectweb.proactive.calcium.skeletons.DaC<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- java.io.Serializable, Instruction<T>, Skeleton<T>
- Direct Known Subclasses:
- Map
public class DaC<T>
- extends java.lang.Object
- implements Skeleton<T>, Instruction<T>
This skeleton represents Divide and Conquer parallelism (data parallelism).
To function, a Divide, Condition, and Conquer objects must
be passed as parameter.
If the Condition is met, a Task will be divided using the Divide object.
If the Condition is not met, the child skeleton will be executed.
If the task has subchilds, then the Conquer object will be used to conquer
the child tasks into the parent task.
- Author:
- The ProActive Team (mleyton)
- See Also:
- Serialized Form
Fields inherited from interface org.objectweb.proactive.calcium.interfaces.Skeleton |
logger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DaC
public DaC(Divide<T> div,
Condition<T> cond,
Skeleton<T> child,
Conquer<T> conq)
- Creates a Divide and Conquer skeleton structure
- Parameters:
div
- Divides a task into subtaskscond
- True if divide should be applied to the task. False if it should be solved.child
- The skeleton that should be applied to the subtasks.conq
- Conqueres the computed subtasks into a single task.
getInstructionStack
public java.util.Vector<Instruction<T>> getInstructionStack()
- Specified by:
getInstructionStack
in interface Skeleton<T>
compute
public Task<T> compute(Task<T> t)
throws EnvironmentException
- Specified by:
compute
in interface Instruction<T>
- Throws:
EnvironmentException
execute
protected Task<T> execute(Task<T> t)
divide
protected Task<T> divide(Task<T> parent)
throws EnvironmentException
- Throws:
EnvironmentException
conquer
protected Task<T> conquer(Task<T> parent)
throws EnvironmentException
- Throws:
EnvironmentException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright 2001-2007 INRIA All Rights Reserved.