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

Function testCompileProgramWithOptions

tests/test_openclhpp.cpp:2772–2796  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2770}
2771
2772void testCompileProgramWithOptions(void)
2773{
2774#if CL_HPP_TARGET_OPENCL_VERSION >= 120
2775 cl_program program = make_program(0);
2776
2777 clCompileProgram_StubWithCallback(clCompileProgram_basic);
2778
2779 // Compiling the program queries the program build log:
2780 clGetProgramInfo_StubWithCallback(clGetProgramInfo_forBuildLog);
2781 clGetDeviceInfo_StubWithCallback(clGetDeviceInfo_platform);
2782 clGetPlatformInfo_StubWithCallback(clGetPlatformInfo_version_1_2);
2783 clRetainDevice_ExpectAndReturn(make_device_id(0), CL_SUCCESS);
2784 clRetainDevice_ExpectAndReturn(make_device_id(0), CL_SUCCESS);
2785 clGetProgramBuildInfo_StubWithCallback(clGetProgramBuildInfo_testGetBuildInfo);
2786 clReleaseDevice_ExpectAndReturn(make_device_id(0), CL_SUCCESS);
2787 clReleaseDevice_ExpectAndReturn(make_device_id(0), CL_SUCCESS);
2788
2789 clReleaseProgram_ExpectAndReturn(program, CL_SUCCESS);
2790
2791 cl::Program prog(program);
2792 cl_int errcode = prog.compile("-cl-program-compile-options");
2793
2794 TEST_ASSERT_EQUAL(errcode, CL_SUCCESS);
2795#endif
2796}
2797
2798void testCompileProgramWithStringOptions(void)
2799{

Callers

nothing calls this directly

Calls 3

make_programFunction · 0.85
make_device_idFunction · 0.85
compileMethod · 0.80

Tested by

no test coverage detected