22namespace shamalgs::atomic {
82 sycl::memory_order_relaxed,
83 sycl::memory_scope_device,
84 sycl::access::address_space::global_space>
142 :
buf_err(error_counter, sched) {
154 sycl::memory_order_relaxed,
155 sycl::memory_scope_device,
156 sycl::access::address_space::global_space>
158 atom.fetch_add(1_u32);
std::uint32_t u32
32 bit unsigned integer
A buffer allocated in USM (Unified Shared Memory)
void complete_event_state(sycl::event e) const
Complete the event state of the buffer.
T * get_write_access(sham::EventList &depends_list, SourceLocation src_loc=SourceLocation{})
Get a read-write pointer to the buffer's data.
void fill(T value, std::array< size_t, 2 > idx_range)
Fill a subpart of the buffer with a given value.
std::vector< T > copy_to_stdvec() const
Copy the content of the buffer to a std::vector.
Class to manage a list of SYCL events.
A struct to access the pointer associated to the buffer.
void set_error(u32 id) const
Increments the error count associated to the given id in the buffer.
u32 * ptr
The pointer to the buffer.
This class is used to check for errors in kernels. It is composed of a buffer of u32 that is used to ...
accessed get_write_access(sham::EventList &depends_list)
Get a write access to the buffer.
ErrorCheckCounter(sham::DeviceScheduler_ptr sched, u32 error_counter)
Constructor.
std::vector< u32 > get_outputs()
Get the resulting error counts.
void complete_event_state(sycl::event e)
Complete the event state.
sham::DeviceBuffer< u32 > buf_err
The buffer used to store the error counts.
A struct to access the pointer associated to the buffer.
u32 * ptr
The pointer to the buffer.
void set_flag_on(u32 flag_val) const
Set a flag on the error flags buffer atomically.
A utility class to check for errors on device, using a single uint to store all the error flags.
u32 get_output()
Get the resulting error flag.
sham::DeviceBuffer< u32 > buf_err
The buffer used to store the error flag.
ErrorCheckerFlags(sham::DeviceScheduler_ptr sched)
Constructor.
accessed get_write_access(sham::EventList &depends_list)
Get a write access to the buffer.
void complete_event_state(sycl::event e)
Complete the event state.