MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCL-CTS / GetDataVectorString

Function GetDataVectorString

test_common/harness/errorHelpers.cpp:301–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299}
300
301const char *GetDataVectorString(void *dataBuffer, size_t typeSize,
302 size_t vecSize, char *buffer)
303{
304 static char scratch[1024];
305 size_t i, j;
306
307 if (buffer == NULL) buffer = scratch;
308
309 unsigned char *p = (unsigned char *)dataBuffer;
310 char *bPtr;
311
312 buffer[0] = 0;
313 bPtr = buffer;
314 for (i = 0; i < vecSize; i++)
315 {
316 if (i > 0)
317 {
318 bPtr[0] = ' ';
319 bPtr++;
320 }
321 for (j = 0; j < typeSize; j++)
322 {
323 sprintf(bPtr, "%02x", (unsigned int)p[typeSize - j - 1]);
324 bPtr += 2;
325 }
326 p += typeSize;
327 }
328 bPtr[0] = 0;
329
330 return buffer;
331}
332
333const char *GetQueuePropertyName(cl_command_queue_properties property)
334{

Callers 7

test_buffer_kernelFunction · 0.85
helpers.cppFile · 0.85
test_vloadFunction · 0.85
test_vstoreFunction · 0.85
test_astype_setFunction · 0.85
test_buffer_kernelFunction · 0.85
helpers.cppFile · 0.85

Calls

no outgoing calls

Tested by 5

test_buffer_kernelFunction · 0.68
test_vloadFunction · 0.68
test_vstoreFunction · 0.68
test_astype_setFunction · 0.68
test_buffer_kernelFunction · 0.68