diff options
author | EdB <[email protected]> | 2014-08-05 19:09:38 +0200 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2014-08-17 23:34:11 +0300 |
commit | ce4d3f3104b01b6148ce7b1c7ecd354fd2f062c9 (patch) | |
tree | bab0454e9df2359f0966c16b438e3457a0cf042a /src/gallium/state_trackers | |
parent | ef130b6050fc91c12a220f19d8bdd659712f7fb9 (diff) |
clover: clGetProgramInfo support for OpenCL 1.2.
[ Francisco Jerez: Rework using fold() for conciseness. ]
Reviewed-by: Francisco Jerez <[email protected]>
Tested-by: EdB <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/clover/api/program.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/clover/api/program.cpp b/src/gallium/state_trackers/clover/api/program.cpp index b81ce69652f..8d9d3ac62d5 100644 --- a/src/gallium/state_trackers/clover/api/program.cpp +++ b/src/gallium/state_trackers/clover/api/program.cpp @@ -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); } |