Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
sham::MultiRef< Targ > Struct Template Reference

A class that references multiple buffers or similar objects. More...

#include <shambackends/include/shambackends/kernel_call.hpp>

Public Types

using storage_t = std::tuple< Targ &... >
 A tuple of references to the buffers.
 

Public Member Functions

 MultiRef (Targ &...arg)
 Constructor.
 
auto get_read_access (sham::EventList &depends_list)
 
auto get_write_access (sham::EventList &depends_list)
 
void complete_event_state (sycl::event e)
 

Public Attributes

storage_t storage
 A tuple of references to the buffers.
 

Detailed Description

template<class... Targ>
struct sham::MultiRef< Targ >

A class that references multiple buffers or similar objects.

This class serves as a means to pass multiple buffers or objects with similar accessor patterns to a kernel. It provides methods to obtain read and write access to these entities and to complete their event state.

A version of this class is also available for optional references to the buffers or similar objects,

See also
MultiRefOpt.

Definition at line 234 of file kernel_call.hpp.

Member Typedef Documentation

◆ storage_t

template<class... Targ>
using sham::MultiRef< Targ >::storage_t = std::tuple<Targ &...>

A tuple of references to the buffers.

Definition at line 236 of file kernel_call.hpp.

Constructor & Destructor Documentation

◆ MultiRef()

template<class... Targ>
sham::MultiRef< Targ >::MultiRef ( Targ &...  arg)
inline

Constructor.

Definition at line 242 of file kernel_call.hpp.

Member Function Documentation

◆ complete_event_state()

template<class... Targ>
void sham::MultiRef< Targ >::complete_event_state ( sycl::event  e)
inline

Complete the event state of the buffers.

Parameters
eThe SYCL event to register in the buffers.

Definition at line 268 of file kernel_call.hpp.

◆ get_read_access()

template<class... Targ>
auto sham::MultiRef< Targ >::get_read_access ( sham::EventList depends_list)
inline

Get a tuple of pointers to the data of the buffers, for reading. Register also the depedancies in depends_list.

Definition at line 246 of file kernel_call.hpp.

◆ get_write_access()

template<class... Targ>
auto sham::MultiRef< Targ >::get_write_access ( sham::EventList depends_list)
inline

Get a tuple of pointers to the data of the buffers, for writing. Register also the depedancies in depends_list.

Definition at line 257 of file kernel_call.hpp.

Member Data Documentation

◆ storage

template<class... Targ>
storage_t sham::MultiRef< Targ >::storage

A tuple of references to the buffers.

Definition at line 239 of file kernel_call.hpp.


The documentation for this struct was generated from the following file: