|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object MasterPI
public class MasterPI
Uses many tasks to calculate PI. This is an adaptation of the cpi.c
program developed using the MPI - Message-passing interface concurrent
programming approach.
Field Summary | |
---|---|
static int |
N_intervals
Number of intervals used to calculate PI. |
static int |
N_tasks
Number of slaves used to calculate PI concurrently. |
static Semaphore |
reduce
Semaphore used to tell when all the slaves are done. |
Constructor Summary | |
---|---|
MasterPI()
|
Method Summary | |
---|---|
static void |
main(String[] args)
Main program. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int N_intervals
public static final int N_tasks
public static Semaphore reduce
Constructor Detail |
---|
public MasterPI()
Method Detail |
---|
public static void main(String[] args)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |