From 0a8dd2541e20f59812db21e8bad069b50cf8ebaf Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Fri, 23 Jan 2026 12:04:35 +0100 Subject: Preparing for SYCL accesors --- lib/core/c++/chunk.hpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'lib/core/c++/chunk.hpp') diff --git a/lib/core/c++/chunk.hpp b/lib/core/c++/chunk.hpp index ad7de34..6b028ba 100644 --- a/lib/core/c++/chunk.hpp +++ b/lib/core/c++/chunk.hpp @@ -47,7 +47,7 @@ public: data& ghost_at(const data>& index){ return values_.at(index); } - + const data& ghost_at(const data>& index) const { return values_.at(index); } @@ -55,7 +55,7 @@ public: static constexpr auto get_ghost_dims() { return data::get_dims(); } - + data& at(const data>& index){ std::decay_t ind; for(uint64_t i = 0u; i < sizeof...(Sides); ++i){ @@ -63,7 +63,7 @@ public: } return values_.at(ind); } - + const data& at(const data>& index) const { std::decay_t ind; for(uint64_t i = 0u; i < sizeof...(Sides); ++i){ @@ -75,6 +75,14 @@ public: static constexpr auto get_dims(){ return data,Encode>{{Sides...}}; } + + auto flat_data(){ + return values_.flat_data(); + } + + static constexpr auto flat_size() { + return data::flat_size(); + } }; template -- cgit v1.2.3