Commit ce4d3f31 authored by Serge Martin's avatar Serge Martin Committed by Francisco Jerez
Browse files

clover: clGetProgramInfo support for OpenCL 1.2.



[ Francisco Jerez: Rework using fold() for conciseness. ]
Reviewed-by: Francisco Jerez's avatarFrancisco Jerez <currojerez@riseup.net>
Tested-by: Serge Martin's avatarEdB <edb+mesa@sigluy.net>
parent ef130b60
......@@ -232,6 +232,17 @@ clGetProgramInfo(cl_program d_prog, cl_program_info param,
prog.devices());
break;
case CL_PROGRAM_NUM_KERNELS:
buf.as_scalar<cl_uint>() = prog.symbols().size();
break;
case CL_PROGRAM_KERNEL_NAMES:
buf.as_string() = fold([](const std::string &a, const module::symbol &s) {
return ((a.empty() ? "" : a + ";") +
std::string(s.name.begin(), s.name.size()));
}, std::string(), prog.symbols());
break;
default:
throw error(CL_INVALID_VALUE);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment