9. Consider the following CUDA kernel and the corresponding host function
that calls it:
01
N){
02
x;
03
04
05
06
07
08
09
b_d, N);
10
__global__ void foo_kernel(float a, float b, unsigned int
unsigned int i=blockIdx.x blockDim.x + threadIdx.
if(i , N) {
b[i]=2.7f a[i] - 4.3f;
}
}
void foo(float a_d, float b_d) {
unsigned int N=200000;
foo_kernel ,, , (N + 1281)/128, 128 .. . (a_d,
}
a. What is the number of threads per block?
b. What is the number of threads in the grid?
c. What is the number of blocks in the grid?
d. What is the number of threads that execute the code on line 02?
e. What is the number of threads that execute the code on line 04?