Changes

Jump to: navigation, search

GPU621/False Sharing

186 bytes added, 17:21, 26 November 2021
Synchronization
=== Synchronization ===
 
 
 
<pre>
for (int i = id; i < n; i = i + num_threads)
{
x = ((double)i + 0.5f) * step;
sum += 1.0f / (1.0f + x * x);
}
 
#pragma omp critical
{
pi += 4 * sum * step;
}
</pre>
== Conclusion ==
83
edits

Navigation menu