|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
Operation<T> | Interface for implementing arbitrary operations to be executed. |
OperationExecutor | Interface for implementing objects that can execute Operation s. |
Pi.BinarySplittingSeries | Terms for the binary splitting series. |
PiAWT.StatusIndicator | Interface to indicate an error status in the application. |
Class Summary | |
---|---|
ApfloatHolder | Simple JavaBean to hold one Apfloat . |
BackgroundOperation<T> | Class for running an Operation in the background in a separate thread. |
LocalOperationExecutor | Class to execute Operation s locally. |
OperationServer | Server for executing Operation s from remote calls. |
Pi | Calculates pi using four different algorithms. |
Pi.AbstractBinarySplittingSeries | Abstract base class for the binary splitting series. |
Pi.BinarySplittingPiCalculator | Class for implementing the binary splitting algorithm. |
Pi.BinarySplittingProgressIndicator | Indicates progress of the pi calculation using the binary splitting algorithm. |
Pi.BorweinPiCalculator | Calculates pi using the Borweins' quartic algorithm. |
Pi.ChudnovskyBinarySplittingSeries | Chudnovskys' algorithm terms for the binary splitting series. |
Pi.ChudnovskyPiCalculator | Basic class for calculating pi using the Chudnovskys' binary splitting algorithm. |
Pi.GaussLegendrePiCalculator | Calculates pi using the Gauss-Legendre algorithm. |
Pi.RamanujanBinarySplittingSeries | Ramanujan's algorithm terms for the binary splitting series. |
Pi.RamanujanPiCalculator | Basic class for calculating pi using the Ramanujan binary splitting algorithm. |
PiApplet | Applet for calculating pi using four different algorithms. |
PiAWT | Graphical AWT elements for calculating pi using four different algorithms. |
PiDistributed | Calculates pi using a cluster of servers. |
PiDistributed.DistributedBinarySplittingPiCalculator | Distributed version of the binary splitting algorithm. |
PiDistributed.DistributedChudnovskyPiCalculator | Class for calculating pi using the distributed Chudnovskys' binary splitting algorithm. |
PiDistributed.DistributedRamanujanPiCalculator | Class for calculating pi using the distributed Ramanujan's binary splitting algorithm. |
PiGUI | AWT client application for calculating pi using four different algorithms. |
PiParallel | Calculates pi using multiple threads in parallel. |
PiParallel.ParallelBinarySplittingPiCalculator | Parallel version of the binary splitting algorithm. |
PiParallel.ParallelChudnovskyPiCalculator | Class for calculating pi using the parallel Chudnovskys' binary splitting algorithm. |
PiParallel.ParallelRamanujanPiCalculator | Class for calculating pi using the parallel Ramanujan's binary splitting algorithm. |
PiParallel.ThreadLimitedOperation<T> | Class to execute operations while setting ApfloatContext.setNumberOfProcessors(int)
to some value. |
PiParallelApplet | Applet for calculating pi using multiple threads in parallel. |
PiParallelAWT | Graphical AWT elements for calculating pi using multiple threads in parallel. |
PiParallelGUI | AWT client application for calculating pi using multiple threads in parallel. |
RemoteOperationExecutor | Class to call an OperationServer to execute Operation s remotely. |
Sample applications demonstrating apfloat use.
Three different versions of an application for calculating π are
included. The simplest, Pi
runs on one
computer using one processor (and one thread) only. PiParallel
executes multiple threads in parallel and has vastly better performance
on symmetric multiprocessor (SMP) computers. Finally,
PiDistributed
can use multiple separate
computers for calculating pi for even greater calculating power.
As a curiosity, two applets are provided for running Pi
and PiParallel
through a graphical user
interface: PiApplet
and PiParallelApplet
,
correspondingly. These programs can also be run as stand-alone
Java applications: PiGUI
and PiParallelGUI
.
Compared to the C++ version of apfloat, the Java version pi calculation program does fairly well. It achieves roughly 50% of the performance of the assembler-optimized C++ versions of apfloat. But, compared to the plain ANSI C++ version the Java version can be as much as 25% faster. This truly shows that adaptive compilation from an intermediate binary executable format is a better solution than direct compilation to a single native format.
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |