MCPcopy Create free account
hub / github.com/AdvancedCompiler/AdvancedCompiler / sync_left

Function sync_left

code/Chapter9/9-30.c:10–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8int isync[256],mthreadnum,iam;
9#pragma omp threadprivate(mthreadnum,iam)
10void sync_left()
11{
12 int neighbour;
13 if(iam>0&&iam<=mthreadnum)
14 {
15 neighbour=iam-1;
16 while(isync[neighbour]==0)
17 {
18 #pragma omp flush(isync)
19 }
20 isync[neighbour]=0;
21 #pragma omp flush(isync,a)
22 }
23}
24void sync_right()
25{
26 if(iam<mthreadnum)

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected