diff options
author | Francisco Jerez <[email protected]> | 2016-05-17 16:03:13 +0200 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2016-07-11 20:34:34 -0700 |
commit | 1942490bae01d44a08f263ea2dc747d11c82acfe (patch) | |
tree | 4e68c0ea0ad27d8430e37db5359aef51dc5bb913 /src/gallium/state_trackers/clover/api | |
parent | 7f6a4a4342c1444990c55a77c60516c38738d203 (diff) |
clover: Unify program::build_* into a single method returning a struct.
This gets rid of the program::build_* query methods and replaces them
with the program::build() method that returns a single data structure
containing all parameters for the last build done on the given target
device (including build logs, options and the binary itself).
[ Serge Martin: Fix inverted opts and log build ctor args ]
Reviewed-by: Serge Martin <[email protected]>
Tested-by: Jan Vesely <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/clover/api')
-rw-r--r-- | src/gallium/state_trackers/clover/api/program.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/clover/api/program.cpp b/src/gallium/state_trackers/clover/api/program.cpp index 848d2d0329c..91a81dfcc85 100644 --- a/src/gallium/state_trackers/clover/api/program.cpp +++ b/src/gallium/state_trackers/clover/api/program.cpp @@ -287,7 +287,7 @@ clGetProgramInfo(cl_program d_prog, cl_program_info param, case CL_PROGRAM_BINARY_SIZES: buf.as_vector<size_t>() = map([&](const device &dev) { - return prog.binary(dev).size(); + return prog.build(dev).binary.size(); }, prog.devices()); break; @@ -296,7 +296,7 @@ clGetProgramInfo(cl_program d_prog, cl_program_info param, buf.as_matrix<unsigned char>() = map([&](const device &dev) { std::stringbuf bin; std::ostream s(&bin); - prog.binary(dev).serialize(s); + prog.build(dev).binary.serialize(s); return bin.str(); }, prog.devices()); @@ -335,15 +335,15 @@ clGetProgramBuildInfo(cl_program d_prog, cl_device_id d_dev, switch (param) { case CL_PROGRAM_BUILD_STATUS: - buf.as_scalar<cl_build_status>() = prog.build_status(dev); + buf.as_scalar<cl_build_status>() = prog.build(dev).status(); break; case CL_PROGRAM_BUILD_OPTIONS: - buf.as_string() = prog.build_opts(dev); + buf.as_string() = prog.build(dev).opts; break; case CL_PROGRAM_BUILD_LOG: - buf.as_string() = prog.build_log(dev); + buf.as_string() = prog.build(dev).log; break; default: |