MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCL-CLHPP / testEnqueueAcquireExternalMemObjects

Function testEnqueueAcquireExternalMemObjects

tests/test_openclhpp.cpp:5562–5582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5560}
5561
5562void testEnqueueAcquireExternalMemObjects(void)
5563{
5564 clGetCommandQueueInfo_StubWithCallback(clGetCommandQueueInfo_testCommandQueueGetDevice);
5565 clGetDeviceInfo_StubWithCallback(clGetDeviceInfo_platform);
5566 clGetPlatformInfo_StubWithCallback(clGetPlatformInfo_version_1_1);
5567
5568 clEnqueueAcquireExternalMemObjectsKHR_StubWithCallback(clEnqueueAcquireExternalMemObjectsKHR_testEnqueueAcquireExternalMemObjects);
5569
5570 VECTOR_CLASS<cl::Memory> mem_objects;
5571 mem_objects.emplace_back(make_mem(0), false);
5572 cl::Event event;
5573
5574 cl_int status = commandQueuePool[0].enqueueAcquireExternalMemObjects(mem_objects, nullptr, &event);
5575
5576 TEST_ASSERT_EQUAL(CL_SUCCESS, status);
5577 TEST_ASSERT_EQUAL_PTR(make_event(0), event());
5578
5579 // prevent destructor from interfering with the test
5580 event() = nullptr;
5581 mem_objects[0]() = nullptr;
5582}
5583
5584static cl_int clEnqueueReleaseExternalMemObjectsKHR_testEnqueueReleaseExternalMemObjects(
5585 cl_command_queue command_queue,

Callers

nothing calls this directly

Calls 3

make_memFunction · 0.85
make_eventFunction · 0.85

Tested by

no test coverage detected