Difference between revisions of "Iterative Averaging"
Jump to navigation
Jump to search
| Line 1: | Line 1: | ||
=Motivation= | =Motivation= | ||
X10/Habanero like Phasers have been added to Java since JDK7. We will gain some experience with using Phasers in a parallel for loop context. | X10/Habanero like Phasers have been added to Java since JDK7. We will gain some experience with using Phasers in a parallel for loop context. | ||
| + | |||
| + | =Background= | ||
| + | [https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Phaser.html Phaser Javadoc] | ||
| + | |||
| + | [http://www.baeldung.com/java-phaser Guide to the Java Phaser] | ||
=Mistakes To Avoid= | =Mistakes To Avoid= | ||
Revision as of 19:55, 5 March 2018
Contents
Motivation
X10/Habanero like Phasers have been added to Java since JDK7. We will gain some experience with using Phasers in a parallel for loop context.
Background
Mistakes To Avoid
Code to Implement
| class: | ForForallIterativeAverager.java | |
| methods: | iterativelyAverage | |
| package: | iterativeaveraging.studio | |
| source folder: | student/src/main/java |
method: public void iterativelyAverage(List<Slice<double[]>> slices, double[] a, double[] b, int iterationCount)
(parallel implementation required)
| class: | ForallForPhasedIterativeAverager.java | |
| methods: | iterativelyAverage | |
| package: | iterativeaveraging.studio | |
| source folder: | student/src/main/java |
method: public void iterativelyAverage(List<Slice<double[]>> slices, double[] a, double[] b, int iterationCount)
(parallel implementation required)
Testing Your Solution
Correctness
| class: | IterativeAveragingTestSuite.java | |
| package: | iterativeaveraging.studio | |
| source folder: | testing/src/test/java |
Performance
| class: | IterativeAveragingTiming.java | |
| package: | iterativeaveraging.studio | |
| source folder: | src/main/java |