22#define XMAC_LIST_ENABLED_FIELD \
64 [nvar_loc = nvar, start_enque_loc = start_enque](
66 const u32 *__restrict acc_idxs,
67 const T *__restrict acc_curr,
68 T *__restrict acc_other) {
69 u32 idx_extr = acc_idxs[gid] * nvar_loc;
70 u32 idx_push = start_enque_loc + gid * nvar_loc;
72 for (u32 a = 0; a < nvar_loc; a++) {
73 acc_other[idx_push + a] = acc_curr[idx_extr + a];
80 template void append_subset_to<a>( \
81 const sham::DeviceBuffer<a> &buf, \
82 const sham::DeviceBuffer<u32> &idxs_buf, \
84 sham::DeviceBuffer<a> &buf_other, \
87 XMAC_LIST_ENABLED_FIELD
std::uint32_t u32
32 bit unsigned integer
std::uint64_t u64
64 bit unsigned integer
A buffer allocated in USM (Unified Shared Memory)
DeviceQueue & get_queue() const
Gets the DeviceQueue associated with the held allocation.
size_t get_size() const
Gets the number of elements in the buffer.
void kernel_call(sham::DeviceQueue &q, RefIn in, RefOut in_out, u32 n, Functor &&func, SourceLocation &&callsite=SourceLocation{})
Submit a kernel to a SYCL queue.
namespace for primitive algorithm (e.g. sort, scan, reductions, ...)
void append_subset_to(const sham::DeviceBuffer< T > &buf, const sham::DeviceBuffer< u32 > &idxs_buf, u32 nvar, sham::DeviceBuffer< T > &buf_other, u32 start_enque)
Appends a subset of elements from one buffer to another.
void throw_with_loc(std::string message, SourceLocation loc=SourceLocation{})
Throw an exception and append the source location to it.
Utilities for safe type narrowing conversions.
A class that references multiple buffers or similar objects.