Name: _____________________________ 6 Digit StudentID: ___ ___ ___ ___ ___ ___

Worksheet 16: 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?

 

 

Post Lecture

Synthesize today's class session

 

 

What is unclear?