public class PiParallel extends Pi
Note that to get any performance gain from running many threads in parallel, the JVM must be executing native threads. If the JVM is running in green threads mode, there is no advantage of having multiple threads, as the JVM will in fact execute just one thread and divide its time to multiple simulated threads.
Modifier and Type | Class and Description |
---|---|
protected static class |
PiParallel.ParallelBinarySplittingPiCalculator
Parallel version of the binary splitting algorithm.
|
static class |
PiParallel.ParallelChudnovskyPiCalculator
Class for calculating pi using the parallel Chudnovskys' binary splitting algorithm.
|
static class |
PiParallel.ParallelRamanujanPiCalculator
Class for calculating pi using the parallel Ramanujan's binary splitting algorithm.
|
protected static class |
PiParallel.ThreadLimitedOperation<T>
Class to execute operations while setting
ApfloatContext.setNumberOfProcessors(int)
to some value. |
Pi.AbstractBinarySplittingSeries, Pi.BinarySplittingPiCalculator, Pi.BinarySplittingProgressIndicator, Pi.BinarySplittingSeries, Pi.BorweinPiCalculator, Pi.ChudnovskyBinarySplittingSeries, Pi.ChudnovskyPiCalculator, Pi.GaussLegendrePiCalculator, Pi.RamanujanBinarySplittingSeries, Pi.RamanujanPiCalculator
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args)
Command-line entry point.
|
public static void main(String[] args) throws IOException, ApfloatRuntimeException
args
- Command-line parameters.IOException
- In case writing the output fails.ApfloatRuntimeException
Copyright © 2018. All rights reserved.