Skip to content
This repository was archived by the owner on Mar 14, 2023. It is now read-only.

Comments

Assignment3#42

Open
amal-majunu wants to merge 3 commits intoIEEE-NITK:Cuda_C++_SMPfrom
amal-majunu:Cuda_C++_SMP
Open

Assignment3#42
amal-majunu wants to merge 3 commits intoIEEE-NITK:Cuda_C++_SMPfrom
amal-majunu:Cuda_C++_SMP

Conversation

@amal-majunu
Copy link

Pls verify if its correct.

Copy link

@niranjansy niranjansy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Amal! Since you are swapping elements of the matrix with their diagonal reflection for taking transpose, you have to make sure that it is done only for one half of the elements in the matrix.

int id2 = j+max*i;
__syncthreads();

if(i<max && j<max)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to include another condition in the if statement to check if i<j (or i>j, any one of those). Because you need to operate only on one half of the matrix. You are swapping elements in one half with those in the other half, so only half the threads should perform this operation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants