Question: ? _ g l o b a l _ _ v o i d m y s g e m m ( b o o
if( transa) {
if( ( row< m) & & ( tile* T I L E _ S I Z E + t h r e a d I d x . x< k) ) { / / boundaryc o n d i t i o n f o r i n p u t m a t r i x A
A_ s[ threadIdx. y] [ threadIdx. x] = A[ ( tile* T I L E _ S I Z E + t h r e a d I d x . x) * m+ r o w ] ;
if( ( row< m) & & ( tile* TILE_ S I Z E + t h r e a d I d x . x< k) ) { / / boundaryc o n d i t i o n f o r i n p u t m a t r i x A
A_ s[ threadIdx. y] [ threadIdx. x] = A[ row* k+ t i l e * TILE_ S I Z E + t h r e a d I d x . x] ;
if( transb) {
if( ( col< n) & & ( tile* T I L E _ S I Z E + t h r e a d I d x . y< k) ) {
B_ s[ threadIdx. y] [ threadIdx. x] = B[ col* k+ t i l e * T I L E _ S I Z E + t h r e a d I d x . y] ;
if( ( col< n) & & ( tile* TILE_ S I Z E + t h r e a d I d x . y< k) ) { / / boundaryc o n d i t i o n f o r i n p u t m a t r i x B
B_ s[ threadIdx. y] [ threadIdx. x] = B[ ( tile* TILE_ S I Z E + t h r e a d I d x . y) * n+ c o l ] ;
if( tile= = n u m _ t i l e - 1 ) { / / toh a n d l e w h e n t h e t i l e v a r i a b l e i n d i c a t e s t h e l a s t t i l e ofi n p u t
limit= k- t i l e * TILE_ S I Z E ;
if( row< m& & c o l < n) { / / boundaryc o n d i t i o n f o r o u t p u t m a t r i x C
if( row
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
