summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/clover/api
diff options
context:
space:
mode:
authorEdB <[email protected]>2015-04-23 20:13:51 +0200
committerTom Stellard <[email protected]>2015-04-29 14:25:42 +0000
commitd8f817ae7f4241a9ea23140805aaeb724a0ac851 (patch)
treefd6fc8f82eb32d3e4b0ba9955a0285a135b9073c /src/gallium/state_trackers/clover/api
parent5d4f085a43ccd1122301421f2013e42a3f0a7604 (diff)
clover: remove util/compat
Acked-by: Francisco Jerez <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/clover/api')
-rw-r--r--src/gallium/state_trackers/clover/api/program.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/clover/api/program.cpp b/src/gallium/state_trackers/clover/api/program.cpp
index 913d195a16f..e9b1f384344 100644
--- a/src/gallium/state_trackers/clover/api/program.cpp
+++ b/src/gallium/state_trackers/clover/api/program.cpp
@@ -23,6 +23,8 @@
#include "api/util.hpp"
#include "core/program.hpp"
+#include <sstream>
+
using namespace clover;
namespace {
@@ -94,12 +96,12 @@ clCreateProgramWithBinary(cl_context d_ctx, cl_uint n,
return { CL_INVALID_VALUE, {} };
try {
- compat::istream::buffer_t bin(p, l);
- compat::istream s(bin);
+ std::stringbuf bin( { (char*)p, l } );
+ std::istream s(&bin);
return { CL_SUCCESS, module::deserialize(s) };
- } catch (compat::istream::error &e) {
+ } catch (std::istream::failure &e) {
return { CL_INVALID_BINARY, {} };
}
},
@@ -279,10 +281,10 @@ clGetProgramInfo(cl_program d_prog, cl_program_info param,
case CL_PROGRAM_BINARIES:
buf.as_matrix<unsigned char>() = map([&](const device &dev) {
- compat::ostream::buffer_t bin;
- compat::ostream s(bin);
+ std::stringbuf bin;
+ std::ostream s(&bin);
prog.binary(dev).serialize(s);
- return bin;
+ return bin.str();
},
prog.devices());
break;