42 #include <initializer_list>
45 #define __CL_ENABLE_EXCEPTIONS
47 #undef __CL_ENABLE_EXCEPTIONS
49 #include <pvsutil/Logger.h>
51 #include "SkelCL/detail/Event.h"
63 Event::Event(
const std::vector<cl::Event>& events)
68 Event::Event(std::initializer_list<cl::Event> events)
69 : _events(events.begin(), events.end())
73 Event::Event(Event&& rhs)
74 : _events(std::move(rhs._events))
78 Event& Event::operator=(Event&& rhs)
80 _events = std::move(rhs._events);
84 void Event::insert(
const cl::Event& event)
86 _events.push_back(event);
93 std::for_each( _events.begin(), _events.end(),
94 std::mem_fn(&cl::Event::wait) );
95 }
catch (cl::Error& err) {
96 ABORT_WITH_ERROR(err);