validate_object(q, ptr, {}, obj_pitch, region);
validate_object(q, mem, obj_origin, obj_pitch, region);
- hard_event *hev = new hard_event(
+ auto hev = create<hard_event>(
q, CL_COMMAND_READ_BUFFER, deps,
soft_copy_op(q, ptr, {}, obj_pitch,
&mem, obj_origin, obj_pitch,
validate_object(q, mem, obj_origin, obj_pitch, region);
validate_object(q, ptr, {}, obj_pitch, region);
- hard_event *hev = new hard_event(
+ auto hev = create<hard_event>(
q, CL_COMMAND_WRITE_BUFFER, deps,
soft_copy_op(q, &mem, obj_origin, obj_pitch,
ptr, {}, obj_pitch,
validate_object(q, ptr, host_origin, host_pitch, region);
validate_object(q, mem, obj_origin, obj_pitch, region);
- hard_event *hev = new hard_event(
+ auto hev = create<hard_event>(
q, CL_COMMAND_READ_BUFFER_RECT, deps,
soft_copy_op(q, ptr, host_origin, host_pitch,
&mem, obj_origin, obj_pitch,
validate_object(q, mem, obj_origin, obj_pitch, region);
validate_object(q, ptr, host_origin, host_pitch, region);
- hard_event *hev = new hard_event(
+ auto hev = create<hard_event>(
q, CL_COMMAND_WRITE_BUFFER_RECT, deps,
soft_copy_op(q, &mem, obj_origin, obj_pitch,
ptr, host_origin, host_pitch,
validate_copy(q, dst_mem, dst_origin, dst_pitch,
src_mem, src_origin, src_pitch, region);
- hard_event *hev = new hard_event(
+ auto hev = create<hard_event>(
q, CL_COMMAND_COPY_BUFFER, deps,
hard_copy_op(q, &dst_mem, dst_origin,
&src_mem, src_origin, region));
validate_copy(q, dst_mem, dst_origin, dst_pitch,
src_mem, src_origin, src_pitch, region);
- hard_event *hev = new hard_event(
+ auto hev = create<hard_event>(
q, CL_COMMAND_COPY_BUFFER_RECT, deps,
soft_copy_op(q, &dst_mem, dst_origin, dst_pitch,
&src_mem, src_origin, src_pitch,
validate_object(q, ptr, {}, dst_pitch, region);
validate_object(q, img, src_origin, region);
- hard_event *hev = new hard_event(
+ auto hev = create<hard_event>(
q, CL_COMMAND_READ_IMAGE, deps,
soft_copy_op(q, ptr, {}, dst_pitch,
&img, src_origin, src_pitch,
validate_object(q, img, dst_origin, region);
validate_object(q, ptr, {}, src_pitch, region);
- hard_event *hev = new hard_event(
+ auto hev = create<hard_event>(
q, CL_COMMAND_WRITE_IMAGE, deps,
soft_copy_op(q, &img, dst_origin, dst_pitch,
ptr, {}, src_pitch,
validate_object(q, src_img, src_origin, region);
validate_copy(q, dst_img, dst_origin, src_img, src_origin, region);
- hard_event *hev = new hard_event(
+ auto hev = create<hard_event>(
q, CL_COMMAND_COPY_IMAGE, deps,
hard_copy_op(q, &dst_img, dst_origin,
&src_img, src_origin,
validate_object(q, dst_mem, dst_origin, dst_pitch, region);
validate_object(q, src_img, src_origin, region);
- hard_event *hev = new hard_event(
+ auto hev = create<hard_event>(
q, CL_COMMAND_COPY_IMAGE_TO_BUFFER, deps,
soft_copy_op(q, &dst_mem, dst_origin, dst_pitch,
&src_img, src_origin, src_pitch,
validate_object(q, dst_img, dst_origin, region);
validate_object(q, src_mem, src_origin, src_pitch, region);
- hard_event *hev = new hard_event(
+ auto hev = create<hard_event>(
q, CL_COMMAND_COPY_BUFFER_TO_IMAGE, deps,
soft_copy_op(q, &dst_img, dst_origin, dst_pitch,
&src_mem, src_origin, src_pitch,
void *map = mem.resource(q).add_map(q, flags, blocking, obj_origin, region);
- ret_object(rd_ev, new hard_event(q, CL_COMMAND_MAP_BUFFER, deps));
+ ret_object(rd_ev, create<hard_event>(q, CL_COMMAND_MAP_BUFFER, deps));
ret_error(r_errcode, CL_SUCCESS);
return map;
void *map = img.resource(q).add_map(q, flags, blocking, origin, region);
- ret_object(rd_ev, new hard_event(q, CL_COMMAND_MAP_IMAGE, deps));
+ ret_object(rd_ev, create<hard_event>(q, CL_COMMAND_MAP_IMAGE, deps));
ret_error(r_errcode, CL_SUCCESS);
return map;
validate_common(q, deps);
- hard_event *hev = new hard_event(
+ auto hev = create<hard_event>(
q, CL_COMMAND_UNMAP_MEM_OBJECT, deps,
[=, &q, &mem](event &) {
mem.resource(q).del_map(ptr);