50 template<
class T, USMKindTarget target, USMKindTarget orgin_target>
68 : mirrored_buffer(mirrored_buffer), mirror(mirrored_buffer.template copy_to<target>()) {
85 T *
data()
const {
return ptr_mirror; }
92 u32 size()
const {
return mirrored_buffer.size(); }
std::uint32_t u32
32 bit unsigned integer
A class template for creating a mirrored buffer.
BufferMirror(DeviceBuffer< T, orgin_target > &mirrored_buffer)
Constructs a BufferMirror.
T * data() const
Provides access to the mirrored data.
T & operator[](u32 i) const
Accesses the mirrored data at a given index.
~BufferMirror()
Destructor.
u32 size() const
Returns the size of the mirrored buffer.
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 copy_from(const DeviceBuffer< T, new_target > &other, size_t copy_size)
Copies the content of another buffer to this one.
Class to manage a list of SYCL events.
void wait()
Wait for all events in the list to be finished.
namespace for backends this one is named only sham since shambackends is too long to write