#include #include #include namespace kel { namespace lbm { namespace sch { using namespace saw::schema; /** * struct lbm_data { * std::array, 64u*64u> dfs; * std::array info; * }; * * which leads to the form * * template * struct lbm_data { * std::array, Size*Size> dfs; * std::array info; * }; * * which transferred into sycl requires us to go to * * template * struct lbm_sycl_data { * std::array* dfs; * uint8_t* info; * }; * * in data form on host * * template * using LbmData = Struct< * Member, Size*Size>, "dfs">, * Member, "info"> * >; * * If we specialize the encode::Sycl data type, then we get * With a helper class we can copy single values back and forth and the whole block is guaranteed * to be allocated. And this one can be dynamic while the host definition might be compile time. * * template<...> * class data,encode::Sycl> final { * saw::data> meta; * saw::data>* dfs; * saw::data* info; * }; */ template using CellStruct = Struct< Member,Desc::D, "dfs">, Member, "dfs_old">, Member >; } template saw::error_or simulate(int argc, char** argv, const saw::data>& meta { constexpr auto cell_size = sizeof(saw::data>); auto lbm_data = saw::heap,Desc::D, 64u>>>{meta}; return saw::make_void(); } } saw::error_or lbm_main(int argc, char** argv){ using namespace lbm; return simulate(argc, argv); } } int main(int argc, char** argv){ auto eov = kel::lbm_main(argc, argv); if(eov.is_error()){ auto& err = eov.get_error(); auto err_msg = err.get_message(); std::cerr<<"[Error]: "<