Open main menu

CDOT Wiki β

Changes

GPU621/Analyzing False Sharing

176 bytes removed, 12:30, 4 December 2022
Use local variables for each thread
When we ran the program again, we came to this conclusion:
 
[[File:newBlockOutput(1).jpg|400px]]<br />
[[File:newBlockOutput(2).jpg|400px]]<br />
 
[[File:newBlockOutput(3).jpg|400px]]<br />
 
[[File:newBlockOutput(4).jpg|400px]]<br />
 
[[File:newBlockOutput(5).jpg|400px]]<br />
We can see that the Local variable block is already much faster than the Thread block, and even comparable to the Serial block is almost the same. But overall the Serial block is still the least time-consuming because the Local variable block still needs to incur extra overhead for thread creation and scheduling.
118
edits