54 template<
class... Targ>
57 using storage_t = std::tuple<shambase::opt_ref<Targ>...>;
134 template<
class... Targ>
const T * read_access_optional(shambase::opt_ref< sham::DeviceBuffer< T > > buffer, sham::EventList &depends_list)
Get a pointer to the data of an optional device buffer, for reading.
void complete_state_optional(sycl::event e, shambase::opt_ref< T > buffer)
Complete the event state of an optional device buffer.
T * write_access_optional(shambase::opt_ref< sham::DeviceBuffer< T > > buffer, sham::EventList &depends_list)
Get a pointer to the data of an optional device buffer, for writing.
Class to manage a list of SYCL events.
Namespace for internal details of the logs module.
namespace for backends this one is named only sham since shambackends is too long to write
shambase::opt_ref< T > to_opt_ref(T &t)
Converts a reference to a given object into an optional reference wrapper.
MultiRefOpt(Targ... arg) -> MultiRefOpt< typename details::mapper< Targ >::type... >
deduction guide to allow the MutliRefOpt to be build without the use of sham::to_opt_ref
auto empty_buf_ref()
Returns an empty optional containing a reference to a sham::DeviceBuffer<T>.
namespace for basic c++ utilities
std::optional< std::reference_wrapper< T > > opt_ref
Optional reference wrapper.
#define __shamrock_stack_entry()
Macro to create a stack entry.
A variant of MultiRef for optional buffers.
void complete_event_state(sycl::event e)
Complete the event state of the buffers.
auto get_write_access(sham::EventList &depends_list)
Get a tuple of pointers to the data of the buffers, for writing.
std::tuple< shambase::opt_ref< Targ >... > storage_t
A tuple of optional references to the buffers.
MultiRefOpt(shambase::opt_ref< Targ >... arg)
Constructor from a tuple of optional references to the buffers.
auto get_read_access(sham::EventList &depends_list)
Get a tuple of pointers to the data of the buffers, for reading.
storage_t storage
The tuple of optional references to the buffers.
internal_utility for MultiRef template deduction guide