diff options
| -rw-r--r-- | default.nix | 5 | ||||
| -rw-r--r-- | examples/particles/particles_gpu.cpp | 1 | ||||
| -rw-r--r-- | examples/particles_gpu/.nix/derivation.nix (renamed from examples/particles/.nix/derivation.nix) | 0 | ||||
| -rw-r--r-- | examples/particles_gpu/SConscript (renamed from examples/particles/SConscript) | 0 | ||||
| -rw-r--r-- | examples/particles_gpu/SConstruct (renamed from examples/particles/SConstruct) | 0 | ||||
| -rw-r--r-- | examples/particles_gpu/particles_gpu.cpp | 42 |
6 files changed, 47 insertions, 1 deletions
diff --git a/default.nix b/default.nix index 8724de1..2f97e99 100644 --- a/default.nix +++ b/default.nix @@ -73,6 +73,11 @@ in rec { inherit kel-lbm; }; + particles_gpu = pkgs.callPackage ./examples/particles_gpu/.nix/derivation.nix { + inherit pname version stdenv forstio adaptive-cpp; + inherit kel-lbm; + }; + heterogeneous_computing = pkgs.callPackage ./examples/heterogeneous_computing/.nix/derivation.nix { inherit pname version stdenv forstio adaptive-cpp; inherit kel-lbm; diff --git a/examples/particles/particles_gpu.cpp b/examples/particles/particles_gpu.cpp deleted file mode 100644 index 8b13789..0000000 --- a/examples/particles/particles_gpu.cpp +++ /dev/null @@ -1 +0,0 @@ - diff --git a/examples/particles/.nix/derivation.nix b/examples/particles_gpu/.nix/derivation.nix index 227132f..227132f 100644 --- a/examples/particles/.nix/derivation.nix +++ b/examples/particles_gpu/.nix/derivation.nix diff --git a/examples/particles/SConscript b/examples/particles_gpu/SConscript index f22fdf2..f22fdf2 100644 --- a/examples/particles/SConscript +++ b/examples/particles_gpu/SConscript diff --git a/examples/particles/SConstruct b/examples/particles_gpu/SConstruct index fe206e1..fe206e1 100644 --- a/examples/particles/SConstruct +++ b/examples/particles_gpu/SConstruct diff --git a/examples/particles_gpu/particles_gpu.cpp b/examples/particles_gpu/particles_gpu.cpp new file mode 100644 index 0000000..2104a88 --- /dev/null +++ b/examples/particles_gpu/particles_gpu.cpp @@ -0,0 +1,42 @@ +#include <kel/lbm/lbm.hpp> +#include <AdaptiveCpp/sycl/sycl.hpp> + + +#include <kel/lbm/particle/geometry/circle.hpp> +#include <iostream> + +namespace kel{ +namespace lbm { +namespace sch { +using namespace saw::schema; +} +} + +saw::error_or<void> lbm_main(int argc, char** argv){ + (void) argc; + (void) argv; + + using namespace lbm; + using namespace acpp; + + saw::data<sch::Array<sch::Particle<sch::Float32,2u>>> particles{256u}; + + return saw::make_void(); +} +} + +int main(int argc, char** argv){ + auto eov = kel::lbm_main(argc, argv); + if(eov.is_error()){ + auto& err = eov.get_error(); + std::cerr<<"[Error] "<<err.get_category(); + auto err_msg = err.get_message(); + if(err_msg.size() > 0u){ + std::cerr<<" - "<<err_msg; + } + std::cerr<<std::endl; + return err.get_id(); + } + + return 0; +} |
