Difference between revisions of "Scan"
Line 33: | Line 33: | ||
:[https://www.cse.wustl.edu/~cosgroved/courses/cse231/s18/apidocs/scan/core/ArraysHolder.html#nextSrcAndDst-- nextSrcAndDst()] | :[https://www.cse.wustl.edu/~cosgroved/courses/cse231/s18/apidocs/scan/core/ArraysHolder.html#nextSrcAndDst-- nextSrcAndDst()] | ||
− | class [https://www.cse.wustl.edu/~cosgroved/courses/cse231/s18/apidocs/scan/core/PowersOfTwoLessThan.html PowersOfTwoLessThan] | + | class [https://www.cse.wustl.edu/~cosgroved/courses/cse231/s18/apidocs/scan/core/PowersOfTwoLessThan.html PowersOfTwoLessThan] implements [https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html Iterable<Integer>] |
=Code To Implement= | =Code To Implement= |
Revision as of 05:46, 5 April 2018
Contents
Motivation
Scan, also known as parallel prefix, is a fundamental and useful operation in parallel programming. We will gain experience in building Hillis & Steele scan with an optional work efficient Blellock scan.
Further, the dependencies in scan:
make it seem to have little hope for parallelism. However, simple yet clever approaches can achieve critical path lengths.
While we will simply implement prefix sum, scan can be used for other associative operations.
Background
Required
Optional
Code To Investigate
class ArraysHolder
class PowersOfTwoLessThan implements Iterable<Integer>
Code To Implement
Sequential Scan
class: | SequentialScan.java | |
methods: | sumScan | |
package: | scan.studio | |
source folder: | student/src/main/java |
method: public int[] sumScan(int[] data)
(sequential implementation only)
Hillis and Steele Parallel Scan
class: | ParallelScan.java | |
methods: | sumScan | |
package: | scan.studio | |
source folder: | student/src/main/java |
method: public int[] sumScan(int[] data)
(sequential implementation only)
(Optional) Blelloch Work Efficient Scan
class: | WorkEfficientScan.java | |
methods: | sumScan | |
package: | scan.challenge | |
source folder: | student/src/main/java |
method: public int[] sumScan(int[] data)
(sequential implementation only)
Testing Your Solution
Correctness
Required
class: | ScanTestSuite.java | |
package: | scan.studio | |
source folder: | testing/src/test/java |
Optional Work Efficient
class: | WorkEfficientScanTestSuite.java | |
package: | scan.challenge | |
source folder: | testing/src/test/java |