#include "api/util.hpp"
#include "core/event.hpp"
-#include "core/resource.hpp"
+#include "core/memory.hpp"
using namespace clover;
validate_common(command_queue &q,
const ref_vector<event> &deps) {
if (any_of([&](const event &ev) {
- return &ev.ctx != &q.ctx;
+ return ev.context() != q.context();
}, deps))
throw error(CL_INVALID_CONTEXT);
}
void
validate_object(command_queue &q, buffer &mem, const vector_t &origin,
const vector_t &pitch, const vector_t ®ion) {
- if (mem.ctx != q.ctx)
+ if (mem.context() != q.context())
throw error(CL_INVALID_CONTEXT);
// The region must fit within the specified pitch,
const vector_t &orig, const vector_t ®ion) {
vector_t size = { img.width(), img.height(), img.depth() };
- if (img.ctx != q.ctx)
+ if (img.context() != q.context())
throw error(CL_INVALID_CONTEXT);
if (any_of(greater(), orig + region, size))