edu.bonn.cs.net.jbarrier.barrier
Interface GenericReductor
public interface GenericReductor
Interface for generic reductors. A call to reduce(int, int)
is meant
to perform an arbitrary binary reduction task between two parties. In order
to use a generic reductor, it is required to let the threads store the
intermediate results of each binary reduction as well as the final result of
the global reduction.
- Version:
- 1.0
- Author:
- Patrick Peschlow, Ivan Castilla Rodriguez
Method Summary |
void |
reduce(int threadId1,
int threadId2)
Performs a binary reduction for two threads participating in the barrier. |
reduce
void reduce(int threadId1,
int threadId2)
- Performs a binary reduction for two threads participating in the barrier.
The barrier implementations make the assumption that the first thread
receives the result of the reduction, i.e., the first (= the calling)
thread does not affect any local variable of the second thread.
- Parameters:
threadId1
- the ID of the first thread involved in the reductionthreadId2
- the ID of the second thread involved in the reduction
Copyright 2010 Patrick Peschlow