diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-01-21 10:57:58 +0100 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-01-21 10:57:58 +0100 |
| commit | ec90ff981b016800a964135f049c9be53ba98615 (patch) | |
| tree | 6e702cdf5fb178f5275915b32fcb1c715c8339c8 /lib/sycl/c++ | |
| parent | 952940c3487856447bb80c819b61483b8028d027 (diff) | |
| download | libs-lbm-ec90ff981b016800a964135f049c9be53ba98615.tar.gz | |
More sycl things
Diffstat (limited to 'lib/sycl/c++')
| -rw-r--r-- | lib/sycl/c++/SConscript | 32 | ||||
| -rw-r--r-- | lib/sycl/c++/data.hpp | 6 |
2 files changed, 36 insertions, 2 deletions
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<uint64_t... Meta, typename... Sch, string_literal... Keys, typename Encode> +template<uint64_t Ghost, uint64_t... Meta, typename... Sch, string_literal... Keys, typename Encode> class data<schema::Struct<schema::Member<schema::Chunk<Sch,Ghost,Meta...>, Keys>...>, kel::lbm::encode::Sycl<Encode>> final { public: static constexpr data<schema::FixedArray meta = {{Meta...}}; - using StorageT = std::tuple<data<Members::Type::InnerSchema,Encode>*...>; + using StorageT = std::tuple<data<Sch,Encode>*...>; private: /** @@ -81,6 +81,8 @@ struct sycl_malloc_struct_helper<sch::Struct<Members...>, Encode> final { if constexpr (i < sizeof...(Members)){ using M = typename saw::parameter_pack_type<i,Members...>::type; auto& ptr = std::get<i>(storage); + + ptr = sycl::malloc_device<M::ValueType::InnerSchema>(,q); return allocate_on_device_member<i+1u>(storage,q); |
