build program with build options
| 471 | |
| 472 | //build program with build options |
| 473 | bool OpenCLRuntime::BuildProgram(const std::string &build_options, cl::Program *program) { |
| 474 | cl_int ret = program->build({*device_}, build_options.c_str()); |
| 475 | if (ret != CL_SUCCESS) { |
| 476 | if (program->getBuildInfo<CL_PROGRAM_BUILD_STATUS>(*device_) == CL_BUILD_ERROR) { |
| 477 | std::string build_log = program->getBuildInfo<CL_PROGRAM_BUILD_LOG>(*device_); |
| 478 | LOGE("Program build log: %s \n", build_log.c_str()); |
| 479 | } |
| 480 | LOGE("Build program failed ! \n"); |
| 481 | return false; |
| 482 | } |
| 483 | return true; |
| 484 | } |
| 485 | |
| 486 | Status OpenCLRuntime::LoadProgramCache() { |
| 487 | #ifdef __ANDROID__ |
no outgoing calls
no test coverage detected