30 if (tmp.get_obj_cnt() == 0) {
35 = tmp.get_field_buf_ref<Tvec>(sched.pdl_old().
get_field_idx<Tvec>(
"xyz"));
37 = tmp.get_field_buf_ref<Tvec>(sched.pdl_old().
get_field_idx<Tvec>(
"vxyz"));
39 auto &q = shamsys::instance::get_compute_scheduler().
get_queue();
41 Tvec positional_offset = this->positional_offset;
42 Tvec velocity_offset = this->velocity_offset;
50 velocity_offset](
u32 i, Tvec *__restrict__ xyz_a, Tvec *__restrict__ vxyz_a) {
51 xyz_a[i] += positional_offset;
52 vxyz_a[i] += velocity_offset;
std::uint32_t u32
32 bit unsigned integer
A buffer allocated in USM (Unified Shared Memory)
DeviceQueue & get_queue(u32 id=0)
Get a reference to a DeviceQueue.
shamrock::patch::PatchDataLayer next_n(u32 nmax)
This function generate patchdata with at most nmax per MPI ranks This function is always assumed as c...
u32 get_field_idx(const std::string &field_name) const
Get the field id if matching name & type.
PatchDataLayer container class, the layout is described in patchdata_layout.
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.
T & get_check_ref(const std::unique_ptr< T > &ptr, SourceLocation loc=SourceLocation())
Takes a std::unique_ptr and returns a reference to the object it holds. It throws a std::runtime_erro...
namespace for math utility
A class that references multiple buffers or similar objects.