Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

? _ g l o b a l _ _ v o i d f o o d _ k e r n e l

?_global__voidfood_kernel(float*a,float*b,unsignedintM,unsignedintN){
unsigned int n row = blockIdx.y*blockDim.y+ threadIdx.y;
unsigned int col = blockIdx.x*blockDim.x+ threadId.x;
if(row<M && col <N){
b[row*N+ col]=a[row*N+ col]??2.1f+4.8f;
}
unsigned int N=300;
dim3bd(16,32);
dim3gdN-116+1,M-132+1;
fookernel <<>>(ad,bd,M,N);
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 05?

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

Step: 3

blur-text-image

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

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

More Books

Students also viewed these Databases questions

Question

(1), 4761.

Answered: 1 week ago