59 for (
auto &e : events) {
74 for (
auto &e : events) {
101 events.insert(events.end(), e.begin(), e.end());
115 events.insert(events.end(), e.events.begin(), e.events.end());
130 return shambase::format(
"events : {}, consumed : {}", events.size(), consumed);
138 : events(e), loc_build(loc) {}
150 inline std::vector<sycl::event> &
get_events() {
return events; }
153 inline const std::vector<sycl::event> &
get_events()
const {
return events; }
159 std::vector<sycl::event> events = {};
160 bool consumed =
false;
163 friend class DeviceQueue;
164 friend class details::BufferEventHandler;
Class to manage a list of SYCL events.
EventList(SourceLocation loc=SourceLocation{})
Default constructor for EventList with source location.
void add_event(sycl::event e)
Add an event to the list of events.
void add_events(sham::EventList &e)
Add all events from another EventList to this one.
void wait_and_throw()
Wait for all events in the list to be finished and throw an exception if one has occurred.
EventList(std::initializer_list< sycl::event > e, SourceLocation loc=SourceLocation{})
same constructor but with initializer list
const std::vector< sycl::event > & get_events() const
Get the list of events (const).
void set_consumed(bool consumed)
Set the consumed state of the EventList (to be used with interop).
std::string get_state()
Get a string representation of the EventList's state.
~EventList() noexcept(false)
Destructor for EventList.
void wait()
Wait for all events in the list to be finished.
std::vector< sycl::event > & get_events()
Get the list of events.
void apply_dependency(sycl::handler &h)
Apply all events in the list as dependancies to a SYCL command group.
void add_events(std::vector< sycl::event > &e)
Add multiple events to the list of events.
Class that manages the event state of a SYCL USM buffer.
namespace for backends this one is named only sham since shambackends is too long to write
This file contains the definition for the stacktrace related functionality.
shambase::details::BasicStackEntry StackEntry
Alias for shambase::details::BasicStackEntry.
provide information about the source location