MCPcopy Create free account
hub / github.com/clMathLibraries/clBLAS / waitForSuccessfulFinish

Function waitForSuccessfulFinish

src/library/tools/tune/tune.c:147–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145//////////////////////////////////////////////////////////////////
146
147cl_int
148waitForSuccessfulFinish(
149 cl_command_queue commandQueues,
150 cl_event *event)
151{
152 cl_int err, status;
153
154 err = clFinish(commandQueues);
155 if (err != CL_SUCCESS) {
156 return err;
157 }
158
159 if (event == NULL || *event == NULL) {
160 return CL_SUCCESS;
161 }
162
163 status = CL_COMPLETE;
164 err = clGetEventInfo(*event, CL_EVENT_COMMAND_EXECUTION_STATUS,
165 sizeof(status), &status, NULL);
166 if (err != CL_SUCCESS) {
167 return err;
168 }
169 if (status < 0) {
170 return -status;
171 }
172 return CL_SUCCESS;
173}
174
175cl_int
176flushAll(cl_command_queue commandQueue)

Callers 1

runKernelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected