public abstract class Parallel
extends java.lang.Object
Constructor and Description |
---|
Parallel(int size)
Creates a new Parallel process.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
coreProcess(int idx)
Carries out the processing of a given thread.
|
int |
getX(int idx,
int width)
Converts a 1D array index to a 2D array index and returns the first
index.
|
int |
getY(int idx,
int width)
Converts a 1D array index to a 2D array index and returns the last index.
|
void |
start()
This procedure starts the parallel processing and returns when all
threads are finished.
|
public Parallel(int size)
size
- sets the number of processed elements.public void start()
public int getX(int idx, int width)
idx
- 1D indexwidth
- width of 2D arraypublic int getY(int idx, int width)
idx
- 1D indexwidth
- width of 2D arraypublic abstract void coreProcess(int idx)
idx
- index of given thread.