|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object DPJRuntime.RuntimeState
public class RuntimeState
This class stores the program state maintained by the DPJ runtime.
Field Summary | |
---|---|
static int |
dpjForeachCutoff
The minimum number of foreach iterations to be
allocated to a single task. |
static int |
dpjForeachSplit
The number of ways to split a foreach loop. |
static int |
dpjNumThreads
The number of worker threads. |
static boolean |
insideParallelTask
Flag indicating whether we are inside a task forked by a DPJ cobegin or foreach construct. |
static jsr166y.forkjoin.ForkJoinPool |
pool
The ForkJoinPool that the runtime uses to launch ForkJoinTask s. |
Constructor Summary | |
---|---|
RuntimeState()
|
Method Summary | |
---|---|
static java.lang.String[] |
initialize(java.lang.String[] args)
Processes command-line arguments and initializes the runtime parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean insideParallelTask
cobegin
or foreach
construct. This is
necessary because the ForkJoinTask
framework requires
that we handle the outermost invocation of a cobegin
or
foreach
differently from one nested inside another.
This variable is set only by the DPJ compiler and should never be set by user code.
public static jsr166y.forkjoin.ForkJoinPool pool
ForkJoinPool
that the runtime uses to launch ForkJoinTask
s.
This variable is set only by the DPJ compiler and should never be set by user code.
public static int dpjForeachCutoff
foreach
iterations to be
allocated to a single task. Beyond this point, no more
parallel splitting of a foreach
loop occurs. The
default is 128.
This variable may be set to value n at the start of
program execution by passing --dpj-foreach-cutoff=
n as a command-line argument to
the DPJ program. All DPJ command-line arguments must come
first. This variable may also be set directly in the DPJ
program, if a different cutoff is desired for different foreach
loops.
public static int dpjForeachSplit
foreach
loop. The loop
is recursively split into this many branches, until the dpjForeachCutoff
is reached. The default is 2.
This variable may be set to value n at the start of
program execution by passing --dpj-foreach-split=
n as a command-line argument to the
DPJ program. All DPJ command-line arguments must come first.
This variable may also be set directly in the DPJ program, if a
different splitting factor is desired for different foreach
loops.
public static int dpjNumThreads
This variable may be set to value n at the start of
program execution by passing --dpj-foreach-split=
n as a command-line argument to the
DPJ program. Thereafter it may not be changed.
Constructor Detail |
---|
public RuntimeState() [unknown]
Method Detail |
---|
public static java.lang.String[] initialize(java.lang.String[] args) writes Root : *
--dpj-foreach-split=
n: SetdpjForeachSplit
to n.--dpj-foreach-cutoff=
n: SetdpjForeachCutoff
to n.--dpj-num-threads=
n: SetdpjNumThreads
to n.
The DPJ options may appear in any order, but they must precede any command-line arguments to the program. The rest of the arguments are passed to the DPJ program to be processed by it.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |