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

Function testCompileProgramWithStringOptions

tests/test_openclhpp.cpp:2798–2823  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2796}
2797
2798void testCompileProgramWithStringOptions(void)
2799{
2800#if CL_HPP_TARGET_OPENCL_VERSION >= 120
2801 cl_program program = make_program(0);
2802
2803 clCompileProgram_StubWithCallback(clCompileProgram_basic);
2804
2805 // Compiling the program queries the program build log:
2806 clGetProgramInfo_StubWithCallback(clGetProgramInfo_forBuildLog);
2807 clGetDeviceInfo_StubWithCallback(clGetDeviceInfo_platform);
2808 clGetPlatformInfo_StubWithCallback(clGetPlatformInfo_version_1_2);
2809 clRetainDevice_ExpectAndReturn(make_device_id(0), CL_SUCCESS);
2810 clRetainDevice_ExpectAndReturn(make_device_id(0), CL_SUCCESS);
2811 clGetProgramBuildInfo_StubWithCallback(clGetProgramBuildInfo_testGetBuildInfo);
2812 clReleaseDevice_ExpectAndReturn(make_device_id(0), CL_SUCCESS);
2813 clReleaseDevice_ExpectAndReturn(make_device_id(0), CL_SUCCESS);
2814
2815 clReleaseProgram_ExpectAndReturn(program, CL_SUCCESS);
2816
2817 cl::Program prog(program);
2818 cl::string options("-cl-program-compile-options");
2819 cl_int errcode = prog.compile(options);
2820
2821 TEST_ASSERT_EQUAL(errcode, CL_SUCCESS);
2822#endif
2823}
2824
2825static cl_int clCompileProgram_headers(
2826 cl_program program,

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