E - The type of the elements in the collection.public class ParIteratorFactory<E>
extends java.lang.Object
ParIterator instance
depending on the respective parameters provided.| Modifier and Type | Method and Description |
|---|---|
static <E> ParIterator<E> |
createParIterator(java.util.Collection<E> collection,
int threadCount)
A convenience method for
createParIterator(Collection, int, ParIterator.Schedule, int). |
static <E> ParIterator<E> |
createParIterator(java.util.Collection<E> collection,
int threadCount,
ParIterator.Schedule schedulePol)
A convenience method for
createParIterator(Collection, int, ParIterator.Schedule, int). |
static <E> ParIterator<E> |
createParIterator(java.util.Collection<E> collection,
int threadCount,
ParIterator.Schedule schedulePol,
int chunksize)
Creates a Parallel Iterator for the specified
collection, using the specified schedule policy and chunk size. |
static <E> ParIterator<E> |
createParIterator(java.util.Collection<E> collection,
int threadCount,
ParIterator.Schedule schedulePol,
int chunksize,
boolean ignoreBarrier)
Creates a Parallel Iterator for the specified
collection, using the specified schedule policy and chunk size. |
static <E> ParIterator<E> |
createParIterator(E[] collection,
int threadCount,
ParIterator.Schedule schedulePol,
int chunksize,
boolean ignoreBarrier)
Returns a Parallel Iterator, where the collection is specified in the form of an array.
|
static ParIterator<java.lang.Integer> |
createParIterator(int start,
int size,
int increment,
int threadCount,
ParIterator.Schedule schedulePol,
int chunksize,
boolean ignoreBarrier)
Returns a Parallel Iterator, where the collection is specified in the
form of a uniform range of integers.
|
static <V> ParIterator |
getParDFSWorkStealingIterator(GraphAdapterInterface tree,
V root,
int numOfThreads)
Returns a DFS Parallel Iterator with Local Stacks and work stealing
mechanism.
|
static <V> ParIterator |
getTreeIteratorDFSonDAGBottomTop(GraphAdapterInterface tree,
V root,
int numOfThreads) |
static <V> ParIterator |
getTreeIteratorDFSonDAGs(GraphAdapterInterface tree,
V root,
int numOfThreads) |
static <V> ParIterator |
getTreeParIteratorDFSonDAGBottomTop(GraphAdapterInterface graph,
V root,
int numOfThreads)
Returns a DFS Parallel Iterator with Local Stacks and work stealing
mechanism.
|
static <V> ParIterator |
getTreeParIteratorDFSonDAGTopBottom(GraphAdapterInterface tree,
V root,
int numOfThreads)
Returns a DFS Parallel Iterator with Local Stacks and work stealing
mechanism.
|
public static <E> ParIterator<E> createParIterator(java.util.Collection<E> collection, int threadCount, ParIterator.Schedule schedulePol, int chunksize, boolean ignoreBarrier)
collection, using the specified schedule policy and chunk size.
The number of threads that will be accessing the Parallel Iterator must also be provided.collection - The collection that contains the elements to be shared amongst the threads.threadCount - The number of threads that will be sharing the Parallel Iterator.schedulePol - The schedule to use to distribute the elements.chunksize - The chunk size used in the scheduling policy.ignoreBarrier - If the implicit barrier should be turned off (default false.ParIterator.public static <E> ParIterator<E> createParIterator(java.util.Collection<E> collection, int threadCount, ParIterator.Schedule schedulePol, int chunksize)
collection, using the specified schedule policy and chunk size.
The number of threads that will be accessing the Parallel Iterator must also be provided.collection - The collection that contains the elements to be shared amongst the threads.threadCount - The number of threads that will be sharing the Parallel Iterator.schedulePol - The schedule to use to distribute the elements.chunksize - The chunk size used in the scheduling policy.ParIterator.public static <E> ParIterator<E> createParIterator(java.util.Collection<E> collection, int threadCount)
createParIterator(Collection, int, ParIterator.Schedule, int).
Returns a Parallel Iterator with a dynamic scheduling policy and chunk size of 1.
collection - The collection that contains the elements to be shared amongst the threads.threadCount - The number of threads that will be sharing the Parallel Iterator.ParIterator.public static <E> ParIterator<E> createParIterator(java.util.Collection<E> collection, int threadCount, ParIterator.Schedule schedulePol)
createParIterator(Collection, int, ParIterator.Schedule, int).
Chunk size used:
schedule is DYNAMIC or GUIDED.
schedule is STATIC.
collection - The collection that contains the elements to be shared amongst the threads.threadCount - The number of threads that will be sharing the Parallel Iterator.schedulePol - The schedule to use to distribute the elements.ParIterator.public static <E> ParIterator<E> createParIterator(E[] collection, int threadCount, ParIterator.Schedule schedulePol, int chunksize, boolean ignoreBarrier)
E - The type of the elements in the array.collection - The array containing the elements to be shared amongst the threads.threadCount - The number of threads that will be sharing the Parallel Iterator.schedulePol - The schedule to use to distribute the elements.chunksize - The chunk size used in the scheduling policy.ignoreBarrier - If the implicit barrier should be turned off (default false.ParIterator.public static ParIterator<java.lang.Integer> createParIterator(int start, int size, int increment, int threadCount, ParIterator.Schedule schedulePol, int chunksize, boolean ignoreBarrier)
start - The first value in the set.size - The number of elements to create.increment - The increment amongst the values.threadCount - The number of threads that will be sharing the Parallel Iterator.schedulePol - The schedule to use to distribute the elements.chunksize - The chunk size used in the scheduling policy.ignoreBarrier - If the implicit barrier should be turned off (default false.ParIterator.public static <V> ParIterator getParDFSWorkStealingIterator(GraphAdapterInterface tree, V root, int numOfThreads)
tree - The tree to be traversed in DFSroot - The starting node of the searchnumOfThreads - The number of threads that will be sharing
the DFS Parallel Iterator.ParIterator.public static <V> ParIterator getTreeParIteratorDFSonDAGTopBottom(GraphAdapterInterface tree, V root, int numOfThreads)
tree - The tree or DAG to be traversed in DFSroot - The starting node of the searchnumOfThreads - The number of threads that will be sharing
the DFS Parallel Iterator.ParIterator.public static <V> ParIterator getTreeParIteratorDFSonDAGBottomTop(GraphAdapterInterface graph, V root, int numOfThreads)
graph - The tree or DAG to be traversed in DFSroot - The starting node of the searchnumOfThreads - The number of threads that will be sharing
the DFS Parallel Iterator.ParIterator.public static <V> ParIterator getTreeIteratorDFSonDAGBottomTop(GraphAdapterInterface tree, V root, int numOfThreads)
public static <V> ParIterator getTreeIteratorDFSonDAGs(GraphAdapterInterface tree, V root, int numOfThreads)