diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2024-04-15 16:30:04 +0200 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2024-04-15 16:30:04 +0200 |
commit | 6debd8a04fc37975a9f2a981b993955a30c69b8b (patch) | |
tree | 91236b8009a17c5026a54ca573f0485852a97ea5 | |
parent | 24d83f549a6fba7b23a0c048e1512d00ed704e0d (diff) |
io_codec: Fixed rpc issues and removed includes for opencl in headers
-rw-r--r-- | modules/io_codec/c++/rpc.hpp | 16 | ||||
-rw-r--r-- | modules/remote-opencl/.nix/derivation.nix | 1 | ||||
-rw-r--r-- | modules/remote-opencl/SConstruct | 3 | ||||
-rw-r--r-- | modules/remote-opencl/c++/remote.hpp | 10 |
4 files changed, 15 insertions, 15 deletions
diff --git a/modules/io_codec/c++/rpc.hpp b/modules/io_codec/c++/rpc.hpp index 3caa808..547eea3 100644 --- a/modules/io_codec/c++/rpc.hpp +++ b/modules/io_codec/c++/rpc.hpp @@ -34,7 +34,7 @@ public: /** * Client RPC reference structure */ -template<typename Iface, typename Remote> +template<typename Iface, typename Encode, typename Remote> class rpc_client { /** * request the data from the remote @@ -58,12 +58,12 @@ class rpc_client { /** * Implementation of a remote server on the backend */ -template<typename Iface, typename Remote> +template<typename Iface, typename Encode, typename Remote> class rpc_server { private: - interface<Iface> iface_; + interface<Iface, Encode> iface_; public: - rpc_server(interface<Iface> iface): + rpc_server(interface<Iface, Encode> iface): iface_{std::move(iface)} {} }; @@ -94,13 +94,13 @@ class remote { /** * Connect to a remote */ - template<typename Iface> - conveyor<rpc_client<Iface, Remote>> connect(const remote_address<Remote>& addr); + template<typename Iface, typename Encode> + conveyor<rpc_client<Iface, Encode, Remote>> connect(const remote_address<Remote>& addr); /** * Start listening */ - template<typename Iface> - rpc_server<Iface, Remote> listen(); + template<typename Iface, typename Encode> + rpc_server<Iface, Encode, Remote> listen(); }; } diff --git a/modules/remote-opencl/.nix/derivation.nix b/modules/remote-opencl/.nix/derivation.nix index 8c14796..2d095df 100644 --- a/modules/remote-opencl/.nix/derivation.nix +++ b/modules/remote-opencl/.nix/derivation.nix @@ -26,6 +26,7 @@ in stdenv.mkDerivation { forstio.codec forstio.async forstio.io + forstio.io_codec opencl-clhpp ]; diff --git a/modules/remote-opencl/SConstruct b/modules/remote-opencl/SConstruct index e344f75..2734d6e 100644 --- a/modules/remote-opencl/SConstruct +++ b/modules/remote-opencl/SConstruct @@ -50,7 +50,8 @@ env=Environment(ENV=os.environ, variables=env_vars, CPPPATH=[], 'forstio-core', 'forstio-codec', 'forstio-async', - 'forstio-io' + 'forstio-io', + 'forstio-io_codec' ] ); env.__class__.add_source_files = add_kel_source_files diff --git a/modules/remote-opencl/c++/remote.hpp b/modules/remote-opencl/c++/remote.hpp index 7ede933..3073b23 100644 --- a/modules/remote-opencl/c++/remote.hpp +++ b/modules/remote-opencl/c++/remote.hpp @@ -1,8 +1,6 @@ #pragma once -#include <CL/opencl.hpp> - -#include <forstio/codec/rpc.hpp> +#include <forstio/io_codec/rpc.hpp> namespace saw { namespace rmt { @@ -15,7 +13,7 @@ private: SAW_FORBID_COPY(remote); SAW_FORBID_MOVE(remote); public: - remote_api(){} + remote(){} /* error_or<void> create_remote(){ @@ -27,12 +25,12 @@ public: template<> struct remote_address<rmt::OpenCl> { private: - remote_ctx<rmt::OpenCl>* ctx_; + remote<rmt::OpenCl>* ctx_; SAW_FORBID_COPY(remote_address); SAW_FORBID_MOVE(remote_address); public: - remote(remote_ctx<rmt::OpenCl>& r_ctx): + remote_address(remote<rmt::OpenCl>& r_ctx): ctx_{&r_ctx} {} |