From ec90ff981b016800a964135f049c9be53ba98615 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Wed, 21 Jan 2026 10:57:58 +0100 Subject: More sycl things --- lib/sycl/c++/SConscript | 32 ++++++++++++++++++++++++++++++++ lib/sycl/c++/data.hpp | 6 ++++-- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 lib/sycl/c++/SConscript (limited to 'lib/sycl/c++') diff --git a/lib/sycl/c++/SConscript b/lib/sycl/c++/SConscript new file mode 100644 index 0000000..85a078f --- /dev/null +++ b/lib/sycl/c++/SConscript @@ -0,0 +1,32 @@ +#!/bin/false + +import os +import os.path +import glob + + +Import('env') + +dir_path = Dir('.').abspath + +# Environment for base library +core_env = env.Clone(); + +core_env.sources = sorted(glob.glob(dir_path + "/*.cpp")); +core_env.headers = sorted(glob.glob(dir_path + "/*.hpp")); + +core_env.particle_headers = sorted(glob.glob(dir_path + "/particle/*.hpp")); +core_env.particle_geometry_headers = sorted(glob.glob(dir_path + "/particle/geometry/*.hpp")); + +env.sources += core_env.sources; +env.headers += core_env.headers; + +## Static lib +objects = [] +core_env.add_source_files(objects, core_env.sources, shared=False); +env.library_static = core_env.StaticLibrary('#build/kel-lbm', [objects]); + +env.Install('$prefix/lib/', env.library_static); +env.Install('$prefix/include/kel/lbm/', core_env.headers); +env.Install('$prefix/include/kel/lbm/particle/', core_env.particle_headers); +env.Install('$prefix/include/kel/lbm/particle/geometry/', core_env.particle_geometry_headers); diff --git a/lib/sycl/c++/data.hpp b/lib/sycl/c++/data.hpp index bba52d6..44bc5dc 100644 --- a/lib/sycl/c++/data.hpp +++ b/lib/sycl/c++/data.hpp @@ -18,11 +18,11 @@ struct struct_has_only_equal_dimension_array{}; } namespace saw { -template +template class data, Keys>...>, kel::lbm::encode::Sycl> final { public: static constexpr data*...>; + using StorageT = std::tuple*...>; private: /** @@ -81,6 +81,8 @@ struct sycl_malloc_struct_helper, Encode> final { if constexpr (i < sizeof...(Members)){ using M = typename saw::parameter_pack_type::type; auto& ptr = std::get(storage); + + ptr = sycl::malloc_device(,q); return allocate_on_device_member(storage,q); -- cgit v1.2.3