MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / barrierWait

Function barrierWait

cpp/3_CUDA_Features/memMapIPCDrv/memMapIpc.cpp:101–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99CUfunction _memMapIpc_kernel;
100
101static void barrierWait(volatile int *barrier, volatile int *sense, unsigned int n)
102{
103 int count;
104
105 // Check-in
106 count = cpu_atomic_add32(barrier, 1);
107 if (count == n) { // Last one in
108 *sense = 1;
109 }
110 while (!*sense)
111 ;
112
113 // Check-out
114 count = cpu_atomic_add32(barrier, -1);
115 if (count == 0) { // Last one out
116 *sense = 0;
117 }
118 while (*sense)
119 ;
120}
121
122// Windows-specific LPSECURITYATTRIBUTES
123void getDefaultSecurityDescriptor(CUmemAllocationProp *prop)

Callers 2

childProcessFunction · 0.85
parentProcessFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected