![]() |
Shamrock 2025.10.0
Astrophysical Code
|
A variant of MultiRef for optional buffers. More...
#include <shambackends/include/shambackends/kernel_call/MultiRefOpt.hpp>
Public Types | |
| using | storage_t = std::tuple<shambase::opt_ref<Targ>...> |
| A tuple of optional references to the buffers. | |
Public Member Functions | |
| 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. | |
| auto | get_write_access (sham::EventList &depends_list) |
| Get a tuple of pointers to the data of the buffers, for writing. | |
| void | complete_event_state (sycl::event e) |
| Complete the event state of the buffers. | |
Public Attributes | |
| storage_t | storage |
| The tuple of optional references to the buffers. | |
A variant of MultiRef for optional buffers.
This class is equivalent to MultiRef but it allows optional buffers. Only DeviceBuffer are supported as optional buffers.
Definition at line 55 of file MultiRefOpt.hpp.
| using sham::MultiRefOpt< Targ >::storage_t = std::tuple<shambase::opt_ref<Targ>...> |
A tuple of optional references to the buffers.
Definition at line 57 of file MultiRefOpt.hpp.
|
inline |
Constructor from a tuple of optional references to the buffers.
Definition at line 63 of file MultiRefOpt.hpp.
|
inline |
Complete the event state of the buffers.
This function completes the event state of all the buffers in the MultiRefOpt by registering the event e in all the buffers.
| e | The SYCL event to register in the buffers. |
Definition at line 107 of file MultiRefOpt.hpp.
|
inline |
Get a tuple of pointers to the data of the buffers, for reading.
If a buffer is empty, a null pointer is returned. Otherwise, the read access of the buffer is requested and the depends_list is updated accordingly.
| depends_list | The list of events to wait for. |
Definition at line 74 of file MultiRefOpt.hpp.
|
inline |
Get a tuple of pointers to the data of the buffers, for writing.
If a buffer is empty, a null pointer is returned. Otherwise, the write access of the buffer is requested and the depends_list is updated accordingly.
| depends_list | The list of events to wait for. |
Definition at line 91 of file MultiRefOpt.hpp.
| storage_t sham::MultiRefOpt< Targ >::storage |
The tuple of optional references to the buffers.
Definition at line 60 of file MultiRefOpt.hpp.