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

Method createEnqueueBuffer

src/tests/BlasBase.cpp:260–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260cl_mem
261BlasBase::createEnqueueBuffer(
262 const void *data,
263 size_t matrSize,
264 size_t off,
265 cl_mem_flags mode)
266{
267 cl_int err;
268 cl_mem buf;
269 cl_uint i;
270
271 #ifdef DEBUG_CONTEXT
272 cl_uint refcnt;
273 printf("BLASBASE: createEnqBuff - Querying context %p\n", context_);
274 if (clGetContextInfo(context_, CL_CONTEXT_REFERENCE_COUNT, sizeof(cl_uint), &refcnt, NULL) != CL_SUCCESS)
275 {
276 printf("BLASBASE: clGetContextInfo FAILED\n");
277 } else {
278 printf("BLASBASE: REFCNT = %u\n", refcnt);
279 }
280 #endif
281 buf = clCreateBuffer(context_, mode, matrSize + off, NULL, &err);
282
283 if ( data != NULL ) {
284 if (err == CL_SUCCESS ) {
285 for (i = 0; i < numCommandQueues_; i++) {
286 err = clEnqueueWriteBuffer(commandQueues_[i], buf, CL_TRUE,
287 off, matrSize, data, 0, NULL, NULL);
288 if (err != CL_SUCCESS) {
289 clReleaseMemObject(buf);
290 return NULL;
291 }
292 }
293 }
294 }
295
296 return buf;
297}
298
299bool
300BlasBase::isDevSupportDoublePrecision(void)

Callers 15

herCorrectnessTestFunction · 0.80
swapCorrectnessTestFunction · 0.80
trmvCorrectnessTestFunction · 0.80
sprCorrectnessTestFunction · 0.80
scalCorrectnessTestFunction · 0.80
iamaxCorrectnessTestFunction · 0.80
trsvCorrectnessTestFunction · 0.80
gbmvCorrectnessTestFunction · 0.80
tpmvCorrectnessTestFunction · 0.80
syr2kCorrectnessTestFunction · 0.80
rotgCorrectnessTestFunction · 0.80
tbmvCorrectnessTestFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected