diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2024-04-11 18:24:47 +0200 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2024-04-11 18:24:47 +0200 |
commit | 204aeb03daf43e73546077c8f72538ad3b6ac75b (patch) | |
tree | 91525622dd7dddb9586ad176b298b579cbdf6a16 /modules/remote-opencl/c++/remote.hpp | |
parent | 5969e94c88f7db8cfe017190a27faf86b42b1a5f (diff) |
codec, remote-opencl: Trying out opencl and ammending parts of codec for
it
Diffstat (limited to 'modules/remote-opencl/c++/remote.hpp')
-rw-r--r-- | modules/remote-opencl/c++/remote.hpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/modules/remote-opencl/c++/remote.hpp b/modules/remote-opencl/c++/remote.hpp new file mode 100644 index 0000000..4ece821 --- /dev/null +++ b/modules/remote-opencl/c++/remote.hpp @@ -0,0 +1,40 @@ +#pragma once + +#include <CL/cl.hpp> + +namespace saw { +namespace rmt { +struct OpenCl {}; +} + +template<> +class remote_api<rmt::OpenCl> { +private: + SAW_FORBID_COPY(remote_ctx); + SAW_FORBID_MOVE(remote_ctx); +public: + remote_api(){} + + error_or<void> create_remote(){ + return remote<rmt::OpenCl>{*this}; + } +}; + +template<> +struct remote<rmt::OpenCl> { +private: + remote_ctx<rmt::OpenCl>* ctx_; + + SAW_FORBID_COPY(remote); + SAW_FORBID_MOVE(remote); +public: + remote(remote_ctx<rmt::OpenCl>& r_ctx): + ctx_{&r_ctx} + {} + + /* + template<typename Iface> + error_or<void> foo(); + */ +}; +} |