Question: Compute the inclusive scan using addition for the following array by using the Kogge-Stone kernel given in Figure 8.2 and Brent-Kung kernel given in Figure

 Compute the inclusive scan using addition for the following array by
using the Kogge-Stone kernel given in Figure 8.2 and Brent-Kung kernel given
in Figure 8.6: [3 2 0 1 6 5 4 2] Show

Compute the inclusive scan using addition for the following array by using the Kogge-Stone kernel given in Figure 8.2 and Brent-Kung kernel given in Figure 8.6: [3 2 0 1 6 5 4 2] Show each of the passes for both the algorithms using the above array as input. Compare the thread divergence, total number of memory accesses and additions required for both the algorithms. _global__ void Kogge-Stone_scan_kernel(float x,float *y, int InputSize) _ shared float XY (SECTION_SIZE]: int i - blockIdx.x*blockDim.x + threadIdx.x; if (i - stride)XY [ threadIdx.x] ++ XY[ threadIdx.x-stridel: > Y[i] - XY[ threadIdx,x); FIGURE 8.2 A Kogge-Stone kernel for inclusive scan. _global_ void Brent_Kung_scan_kernel (float x,float wY. int InputSize) { shared_float XY (SECTION_SIZE]: int i = 2*blockIdx.x*blockDim.x + threadIdx.x; if (i 0; stride /= 2) ( synethreads(); int index = (threadIdx.x+1)*stride 2 - 1; if(index + stride

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!