From 45ebf7411d687ab5530431ab1bcc74edb0499c69 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Wed, 22 Apr 2026 16:48:50 +0200 Subject: Working on equalizing poiseulle_particle channel methods --- lib/core/c++/write_vtk.hpp | 4 ++-- lib/sycl/c++/data.hpp | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/core/c++/write_vtk.hpp b/lib/core/c++/write_vtk.hpp index f925361..e852172 100644 --- a/lib/core/c++/write_vtk.hpp +++ b/lib/core/c++/write_vtk.hpp @@ -136,7 +136,7 @@ struct lbm_vtk_writer> { template struct lbm_vtk_writer> { static saw::error_or apply_header(std::ostream& vtk_file, std::string_view name){ - vtk_file<<"SCALARS "<, if constexpr (sizeof...(MemberT) > 0u){ // POINT DATA { - vtk_file << "POINT_DATA " << pd_size.get() <<"\n"; + vtk_file << "\nPOINT_DATA " << pd_size.get() <<"\n"; } // HEADER TO BODY diff --git a/lib/sycl/c++/data.hpp b/lib/sycl/c++/data.hpp index 71627de..9f43848 100644 --- a/lib/sycl/c++/data.hpp +++ b/lib/sycl/c++/data.hpp @@ -381,7 +381,7 @@ public: return data,Encode>{{Sides...}}; } - auto flat_data(){ + auto flat_data() const { return values_.flat_data(); } @@ -741,8 +741,10 @@ struct sycl_copy_helper, Encode> final { static_assert(sizeof(std::decay_t) == sizeof(std::decay_t), "Unequal size"); + auto flat_size = host_data.flat_size(); + q.submit([&](acpp::sycl::handler& h){ - h.copy(sycl_ptr,host_ptr, saw::ct_multiply::value); + h.copy(sycl_ptr,host_ptr, flat_size.get()); }).wait(); return saw::make_void(); } @@ -753,8 +755,10 @@ struct sycl_copy_helper, Encode> final { static_assert(sizeof(std::decay_t) == sizeof(std::decay_t), "Unequal size"); + auto flat_size = host_data.flat_size(); + q.submit([&](acpp::sycl::handler& h){ - h.copy(host_ptr,sycl_ptr, saw::ct_multiply::value); + h.copy(host_ptr,sycl_ptr, flat_size.get()); }).wait(); return saw::make_void(); } -- cgit v1.2.3