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

Function testEnqueueReleaseExternalMemObjects

tests/test_openclhpp.cpp:5608–5628  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5606}
5607
5608void testEnqueueReleaseExternalMemObjects(void)
5609{
5610 clGetCommandQueueInfo_StubWithCallback(clGetCommandQueueInfo_testCommandQueueGetDevice);
5611 clGetDeviceInfo_StubWithCallback(clGetDeviceInfo_platform);
5612 clGetPlatformInfo_StubWithCallback(clGetPlatformInfo_version_1_1);
5613
5614 clEnqueueReleaseExternalMemObjectsKHR_StubWithCallback(clEnqueueReleaseExternalMemObjectsKHR_testEnqueueReleaseExternalMemObjects);
5615
5616 VECTOR_CLASS<cl::Memory> mem_objects;
5617 mem_objects.emplace_back(make_mem(0), false);
5618 cl::Event event;
5619
5620 cl_int status = commandQueuePool[0].enqueueReleaseExternalMemObjects(mem_objects, nullptr, &event);
5621
5622 TEST_ASSERT_EQUAL(CL_SUCCESS, status);
5623 TEST_ASSERT_EQUAL_PTR(make_event(0), event());
5624
5625 // prevent destructor from interfering with the test
5626 event() = nullptr;
5627 mem_objects[0]() = nullptr;
5628}
5629
5630#else
5631void testEnqueueAcquireExternalMemObjects(void) {}

Callers

nothing calls this directly

Calls 3

make_memFunction · 0.85
make_eventFunction · 0.85

Tested by

no test coverage detected