|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.kccoder.fracture.Fracture
public class Fracture
This is the core class in the Fracture library. Here you can set/get the 'Core Mode' and execute
multi-core loops either synchronously or asynchronously.
This software is distributed WITHOUT ANY WARRANTY, without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Constructor Summary | |
---|---|
Fracture()
|
Method Summary | ||
---|---|---|
static void |
forEach(int start,
int end,
int increment,
IProcessor<java.lang.Integer> processor)
Essentially equivalent to for(int i = start; i < end; i+=increment) executed on N cores. |
|
static
|
forEach(java.lang.Iterable<T> iterable,
IProcessor<T> processor)
Process each element present in the iterable's iterator on N cores. |
|
static
|
forEach(java.util.Iterator<T> iterator,
IProcessor<T> processor)
Process each element present in the iterator on N cores. |
|
static
|
forEach(T[] elements,
IProcessor<T> processor)
Process each array element on N cores. |
|
static void |
forEachSync(int start,
int end,
int increment,
IProcessor<java.lang.Integer> processor)
Essentially equivalent to for(int i = start; i < end; i+=increment) executed on N cores. |
|
static
|
forEachSync(java.lang.Iterable<T> iterable,
IProcessor<T> processor)
Process each element present in the iterable's iterator on N cores. |
|
static
|
forEachSync(java.util.Iterator<T> iterator,
IProcessor<T> processor)
Process each element present in the iterator on N cores. |
|
static
|
forEachSync(T[] elements,
IProcessor<T> processor)
Process each array element on N cores. |
|
static CoreMode |
getCoreMode()
Get the currently configured CoreMode. |
|
static void |
setCoreMode(CoreMode coreMode)
Confiure the Fracture library CoreMode. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Fracture()
Method Detail |
---|
public static CoreMode getCoreMode()
public static void setCoreMode(CoreMode coreMode)
coreMode
- - the desired CoreModepublic static <T> void forEach(T[] elements, IProcessor<T> processor)
T
- Element typeelements
- Element arrayprocessor
- Processor to process each elementpublic static <T> void forEach(java.lang.Iterable<T> iterable, IProcessor<T> processor)
T
- Element typeiterable
- Elements to be processedprocessor
- Processor to process each elementpublic static <T> void forEach(java.util.Iterator<T> iterator, IProcessor<T> processor)
T
- Element typeiterator
- Elements to be processedprocessor
- Processor to process each elementpublic static void forEach(int start, int end, int increment, IProcessor<java.lang.Integer> processor)
start
- Starting valueend
- Ending valueincrement
- Increment valueprocessor
- Processor to process each integerpublic static <T> void forEachSync(T[] elements, IProcessor<T> processor)
T
- Element typeelements
- Element arrayprocessor
- Processor to process each elementpublic static <T> void forEachSync(java.lang.Iterable<T> iterable, IProcessor<T> processor)
T
- Element typeiterable
- Elements to be processedprocessor
- Processor to process each elementpublic static <T> void forEachSync(java.util.Iterator<T> iterator, IProcessor<T> processor)
T
- Element typeiterator
- Elements to be processedprocessor
- Processor to process each elementpublic static void forEachSync(int start, int end, int increment, IProcessor<java.lang.Integer> processor)
start
- Starting valueend
- Ending valueincrement
- Increment valueprocessor
- Processor to process each integer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |