![]() |
Shamrock 2025.10.0
Astrophysical Code
|
A variant of MultiRef for optional buffers. More...
#include <shambackends/include/shambackends/kernel_call.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 141 of file kernel_call.hpp.
| using sham::MultiRefOpt< Targ >::storage_t = std::tuple<shambase::opt_ref<Targ>...> |
A tuple of optional references to the buffers.
Definition at line 143 of file kernel_call.hpp.
|
inline |
Constructor from a tuple of optional references to the buffers.
Definition at line 149 of file kernel_call.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 193 of file kernel_call.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 160 of file kernel_call.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 177 of file kernel_call.hpp.
| storage_t sham::MultiRefOpt< Targ >::storage |
The tuple of optional references to the buffers.
Definition at line 146 of file kernel_call.hpp.