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

Function testCommandQueueGetDevice1_2

tests/test_openclhpp.cpp:914–929  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

912}
913
914void testCommandQueueGetDevice1_2(void)
915{
916 cl_device_id expected = make_device_id(0);
917 int refcount = 1;
918
919 clGetDeviceInfo_StubWithCallback(clGetDeviceInfo_platform);
920 clGetPlatformInfo_StubWithCallback(clGetPlatformInfo_version_1_2);
921 clGetCommandQueueInfo_StubWithCallback(clGetCommandQueueInfo_testCommandQueueGetDevice);
922 prepare_deviceRefcounts(1, &expected, &refcount);
923
924 cl::Device device = commandQueuePool[0].getInfo<CL_QUEUE_DEVICE>();
925 TEST_ASSERT_EQUAL_PTR(expected, device());
926 TEST_ASSERT_EQUAL(2, refcount);
927
928 device() = nullptr;
929}
930
931#if CL_HPP_TARGET_OPENCL_VERSION < 200
932// stub for clCreateCommandQueue - returns queue zero

Callers

nothing calls this directly

Calls 1

make_device_idFunction · 0.85

Tested by

no test coverage detected