Open main menu

CDOT Wiki β

Changes

Avengers

58 bytes added, 22:06, 15 February 2019
Jaideep - Array Processing
[[File:Array_Processing_-_Call_Graph.jpeg]]
From the call graph file, it is evident that the generateRandom() function is an obvious hotspot. It is hogging 100% of the execution time. The function consists of 2 for loops, one nested in the other, which makes the function have a Big-O notation of O(n^2). In a serial manner, the function accesses each element in the array and assigns a random number to it.
The computations involved with each element in the array is independent from the rest of the elements, and therefore this function is a deserving candidate for parallelization. Additionally, the array elements can be evenly distributed into subarrays and a process can be assigned to each subarray.
46
edits