56 template<
class LambdaCFL>
57 inline static flt basic_cfl(shamrock::patch::PatchData &pdat, LambdaCFL &&lambda_internal) {
59 u32 npart_patch = pdat.get_obj_cnt();
61 std::unique_ptr<sycl::buffer<flt>> buf_cfl
62 = std::make_unique<sycl::buffer<flt>>(npart_patch);
64 sycl::range<1> range_npart{npart_patch};
66 auto ker_reduc_step_mincfl = [&](sycl::handler &cgh) {
67 auto arr = buf_cfl->template get_access<sycl::access::mode::discard_write>(cgh);
69 lambda_internal(cgh, *buf_cfl, range_npart);
72 shamsys::instance::get_compute_queue().submit(ker_reduc_step_mincfl);
75 = syclalg::get_min<flt>(shamsys::instance::get_compute_queue(), buf_cfl, npart_patch);