Difference between revisions of "Scan"
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
=Background= | =Background= | ||
− | [https://en.wikipedia.org/wiki/Prefix_sum | + | [https://en.wikipedia.org/wiki/Prefix_sum Wikipedia Prefix Sum] |
+ | [https://en.wikipedia.org/wiki/Prefix_sum#Algorithm_1:_Shorter_span,_more_parallel|Hillis and Steele Algorithm] | ||
<youtube>RdfmxfZBHpo</youtube> | <youtube>RdfmxfZBHpo</youtube> | ||
+ | [https://en.wikipedia.org/wiki/Prefix_sum#Algorithm_2:_Work-efficient|Blelloch Algorithm] | ||
<youtube>mmYv3Haj6uc</youtube> | <youtube>mmYv3Haj6uc</youtube> | ||
Revision as of 04:27, 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.
Background
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 |