Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

9 . Consider the following CUDA kernel and the corresponding host function that calls it: 0 1 N ) { 0 2 x; 0 3

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?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server T-SQL Recipes

Authors: David Dye, Jason Brimhall

4th Edition

1484200616, 9781484200612

More Books

Students also viewed these Databases questions

Question

Explain the sources of recruitment.

Answered: 1 week ago

Question

Differentiate sin(5x+2)

Answered: 1 week ago

Question

Compute the derivative f(x)=1/ax+bx

Answered: 1 week ago

Question

What is job enlargement ?

Answered: 1 week ago