1.7 The first part of the global sum example—when each core adds its assigned co
ID: 3673645 • Letter: 1
Question
1.7 The first part of the global sum example—when each core adds its assigned computed values—is usually considered to be an example of data-parallelism, while the second part of the first global sum—when the cores send their partial sums to the master core, which adds them—could be considered to be an example of task-parallelism. What about the second part of the second global sum—when the cores use a tree structure to add their partial sums? Is this an example of data- or task-parallelism? Why?
Explanation / Answer
In case of second part of the second global sum, the cores use a tree structure to add their partial sums, As the tree structure is used to add their partial sum, its a task parallelism. Applications that uses the tree or the graph
structure basically using the task parallelism.
In case of tree structure, for adding their partial sum, we need to traverse through each node, that known as
traversing in the tree, that can be recursively performed, we can also do the parallel task to traverse
the tree, that is why its a task parallelism.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.