summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/remote-sycl/.nix/adaptive-cpp.nix58
-rw-r--r--modules/remote-sycl/.nix/derivation.nix6
-rw-r--r--modules/remote-sycl/c++/rpc.hpp1
3 files changed, 59 insertions, 6 deletions
diff --git a/modules/remote-sycl/.nix/adaptive-cpp.nix b/modules/remote-sycl/.nix/adaptive-cpp.nix
new file mode 100644
index 0000000..6c70be0
--- /dev/null
+++ b/modules/remote-sycl/.nix/adaptive-cpp.nix
@@ -0,0 +1,58 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, makeWrapper
+, boost
+, llvmPackages
+, lld
+}:
+
+let
+ version = "25.02.0";
+in stdenv.mkDerivation {
+ pname = "adaptive-cpp-kel-custom";
+ inherit version;
+
+ src = fetchFromGitHub {
+ owner = "AdaptiveCpp";
+ repo = "AdaptiveCpp";
+ tag = "v${version}";
+ sha256 = "sha256-vXfw8+xn3/DYxUKp3QGdQ8sEbDwyk+8jDCyuvQOXigc=";
+ };
+
+ nativeBuildInputs = [
+ cmake
+ makeWrapper
+ ];
+
+ buildInputs = [
+ boost
+ llvmPackages.openmp
+ llvmPackages.libclang
+ llvmPackages.llvm
+ ];
+
+ cmakeFlags = [
+ "-DCLANG_INCLUDE_PATH=${llvmPackages.libclang.dev}/include"
+ ];
+
+ postInstall = ''
+ if [ -d "$out/include/AdaptiveCpp" ]; then
+ mv $out/include/AdaptiveCpp .hidden-fake
+ mv .hidden-fake/* $out/include/
+ rmdir .hidden-fake
+ fi
+ '';
+
+ postFixup = ''
+ wrapProgram $out/bin/syclcc-clang \
+ --prefix PATH : ${lib.makeBinPath [ lld ]} \
+ --add-flags "-L${llvmPackages.openmp}/lib" \
+ --add-flags "-I${llvmPackages.openmp.dev}/include" \
+ '';
+
+ postPatch = ''
+ patchShebangs .
+ '';
+}
diff --git a/modules/remote-sycl/.nix/derivation.nix b/modules/remote-sycl/.nix/derivation.nix
index bf40e89..45d2e8b 100644
--- a/modules/remote-sycl/.nix/derivation.nix
+++ b/modules/remote-sycl/.nix/derivation.nix
@@ -16,12 +16,6 @@
}:
let
- adaptivecpp_custom = (import ((builtins.fetchGit {
- url = "git@git.keldu.de:forstio/forstio";
- ref = "dev";
- }).outPath + "/default.nix"){
- inherit stdenv;
- });
in stdenv.mkDerivation {
pname = "forstio-remote-sycl";
inherit version;
diff --git a/modules/remote-sycl/c++/rpc.hpp b/modules/remote-sycl/c++/rpc.hpp
index bdc6d6c..3756a5e 100644
--- a/modules/remote-sycl/c++/rpc.hpp
+++ b/modules/remote-sycl/c++/rpc.hpp
@@ -234,6 +234,7 @@ public:
// storage_.maps
auto eov = data_server_->template find<typename FuncT::RequestT>(input.get_id());
if(eov.is_error()){
+#include <AdaptiveCpp/sycl/sycl.hpp>
return std::move(eov.get_error());
}
return eov.get_value();