public interface HjFinishAccumulator
Parallel tasks asynchronously transmit their data to finish accumulators with put operations and retrieve the results by get operations. A finish accumulator, ac, is accessible to sub-tasks if and only if ac is associated with a finish statement and the sub-tasks are created within the finish scope. To ensure an absence of races, get operations by sub-tasks return the value at the beginning of the associated finish scope and are not affected by put operations within the same finish scope.
More details: Finish Accumulators: An Efficient Reduction Construct for Dynamic Task Parallelism. Jun Shirako, Vincent Cave, Jisheng Zhao, Vivek Sarkar. The 4th Workshop on Determinism and Correctness in Parallel Programming (WoDet), March 2013.
Modifier and Type | Method and Description |
---|---|
Number |
get()
Returns the result stored in the accumulator visible to the currently executing task.
|
HjOperator |
getOperator()
Returns the operator in use by the accumulator.
|
Class |
getType()
Returns the type of result stored by the accumulator.
|
void |
put(double val)
Transmits a double value for accumulation to the accumulator.
|
void |
put(int val)
Transmits an int value for accumulation to the accumulator.
|
void |
put(Number val)
Transmits a
Number value for accumulation to the accumulator. |
void put(Number val)
Number
value for accumulation to the accumulator.val
- The value to transmit.void put(int val)
val
- The value to transmit.void put(double val)
val
- The value to transmit.Number get()
Class getType()
HjOperator getOperator()
Copyright © 2015 Rice University - Department of Computer Science. All rights reserved.