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

Function testLinkProgramWithStringOptions

tests/test_openclhpp.cpp:4291–4317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4289}
4290
4291void testLinkProgramWithStringOptions(void)
4292{
4293#if CL_HPP_TARGET_OPENCL_VERSION >= 120
4294 cl_int errcode;
4295 int refcount[] = {1,1};
4296
4297 // verify if class cl::Program was not modified
4298 TEST_ASSERT_EQUAL(sizeof(cl_program), sizeof(cl::Program));
4299
4300 clGetProgramInfo_StubWithCallback(clGetProgramInfo_testProgramGetContext);
4301 clLinkProgram_StubWithCallback(clLinkProgram_testLinkProgram);
4302
4303 clRetainContext_ExpectAndReturn(make_context(0), CL_SUCCESS);
4304 clReleaseContext_ExpectAndReturn(make_context(0), CL_SUCCESS);
4305 prepare_programRefcounts(2, reinterpret_cast<cl_program *>(programPool), refcount);
4306
4307 cl::string options("-cl-program-link-options");
4308 cl::Program prog = cl::linkProgram(
4309 cl::Program(make_program(0)), cl::Program(make_program(1)),
4310 options, nullptr, nullptr, &errcode);
4311
4312 TEST_ASSERT_EQUAL_PTR(prog(), make_program(0));
4313 TEST_ASSERT_EQUAL(errcode, CL_SUCCESS);
4314
4315 prog() = nullptr;
4316#endif
4317}
4318
4319void testLinkProgramWithVectorProgramInput(void)
4320{

Callers

nothing calls this directly

Calls 4

make_contextFunction · 0.85
linkProgramFunction · 0.85
ProgramClass · 0.85
make_programFunction · 0.85

Tested by

no test coverage detected