Name (print *CLEARLY*): _________________________________________________
Student ID (print *CLEARLY*; 1 digit per underline): _____ _____ _____ _____ _____ _____
CSE 231s Quiz 18: Scan and ???
1) Calculate the sum scan of the input array below:
| |
[0] |
[1] |
[2] |
[3] |
[4] |
[5] |
[6] |
[7] |
| input: |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
| sum scan: |
|
|
|
|
|
|
|
|
2) Given an input array:
| |
[0] |
[1] |
[2] |
[3] |
[4] |
[5] |
[6] |
| input: |
Africa |
Asia |
SouthAmerica |
NorthAmerica |
Europe |
Australia |
Antarctica |
and a predicate:
(continentName) -> {
return continentName.contains("c");
}
and a process which when given this input and predicate produces:
| |
[0] |
[1] |
[2] |
[3] |
| output: |
Africa |
SouthAmerica |
NorthAmerica |
Antarctica |
*** 2a) What would you call this process?
_______________________________________________________________________________
*** 2b) What would difficult about parallelizing this process?
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________