Open main menu

CDOT Wiki β

Changes

GPU621/Group 2

413 bytes added, 14:09, 31 March 2023
m
no edit summary
Any rows that match the search query will be displayed, with the specific information matching the search criteria highlighted.
= Live Demo Code =
 
This is the code that will be used for our live demo:
<syntaxhighlight>
// debugTest.c
#include <stdio.h>
#include <omp.h>
#define I 100000
 
int main() {
unsigned int i, pSum = 0, sum = 0;
 
#pragma omp parallel private(pSum) shared(sum)
{
#pragma omp for
for (i = 0; i < I; i++)
pSum += 1;
 
#pragma omp critical
{
sum += pSum;
}
}
 
printf("%d", sum);
}
</syntaxhighlight>
= Sources =
https://learn.microsoft.com/en-ca/previous-versions/visualstudio/visual-studio-2015/debugger/debug-multithreaded-applications-in-visual-studio?view=vs-2015
33
edits