22template<
class Tvec,
class Tgr
idVec>
27 using namespace shamrock::patch;
38 return storage.merged_patchdata_ghost.get().get(id).total_elements;
49 MergedPDat &mpdat = storage.merged_patchdata_ghost.get().get(p.id_patch);
61 auto eint = buf_eint.get_read_access(depends_list);
64 auto e = q.submit(depends_list, [&](sycl::handler &cgh) {
65 Tscal gamma = solver_config.eos_gamma;
67 shambase::parallel_for(
68 cgh, mpdat.total_elements * Block::block_size,
"compute pressure", [=](
u64 id_a) {
69 pressure[id_a] = (gamma - 1) * eint[id_a];
74 buf_eint.complete_event_state(e);
std::uint32_t u32
32 bit unsigned integer
std::uint64_t u64
64 bit unsigned integer
A buffer allocated in USM (Unified Shared Memory)
void complete_event_state(sycl::event e) const
Complete the event state of the buffer.
T * get_write_access(sham::EventList &depends_list, SourceLocation src_loc=SourceLocation{})
Get a read-write pointer to the buffer's data.
const T * get_read_access(sham::EventList &depends_list, SourceLocation src_loc=SourceLocation{}) const
Get a read-only pointer to the buffer's data.
A SYCL queue associated with a device and a context.
DeviceQueue & get_queue(u32 id=0)
Get a reference to a DeviceQueue.
Class to manage a list of SYCL events.
ComputeField< T > make_compute_field(std::string new_name, u32 nvar)
create a compute field and init it to zeros
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.
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
namespace for the main framework
This file contains the definition for the stacktrace related functionality.
utility class to handle AMR blocks
Patch object that contain generic patch information.