Changes

Jump to: navigation, search

GPU621/Analyzing False Sharing

1 byte added, 11:30, 1 December 2022
Byte alignment
}
In this program code, we can easily see that the Number struct has two member variables (num1 and num2). They are for loop in two different threads to execute the increment operator 1000000 times. This time we use Linux with multiple cores to compile (note that here we are not using any optimization).
g++ -std=c++11 -pthread false_sharing.cpp
118
edits

Navigation menu