diff options
author | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-09-11 13:43:18 +0200 |
---|---|---|
committer | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-09-11 13:43:18 +0200 |
commit | df7574bf64b014e152d100a224d29ecdda32a7b2 (patch) | |
tree | 8f500104d34504108690a82b600610b1ef1c7cfd /modules/remote-hip/c++/device.hpp | |
parent | 9c8f45cba18d284bcc8a5be10c43fe981e1a2cbc (diff) |
Remote Hip example work
Diffstat (limited to 'modules/remote-hip/c++/device.hpp')
-rw-r--r-- | modules/remote-hip/c++/device.hpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/remote-hip/c++/device.hpp b/modules/remote-hip/c++/device.hpp index 227ed1b..f760024 100644 --- a/modules/remote-hip/c++/device.hpp +++ b/modules/remote-hip/c++/device.hpp @@ -2,7 +2,10 @@ #include "common.hpp" + +#include "device.tmpl.hpp" namespace saw { + /** * Represents a remote Sycl device. */ @@ -14,6 +17,20 @@ public: SAW_FORBID_COPY(device); SAW_FORBID_MOVE(device); + + template<typename Schema, typename Encoding> + error_or<void> copy_to_device(data<Schema, Encoding>& from, data<Schema, encode::Hip<Encoding>>& to){ + + auto dev_data = to.get_device_data(); + + auto eov = impl::hip_copy_to_device<Schema,Encoding>::apply(from, dev_data); + return eov; + } + + template<typename Schema, typename Encoding> + error_or<void> copy_to_host(data<Schema,encode::Hip<Encoding>>& from, data<Schema,Encoding>& to){ + return make_error<err::not_implemented>(); + } }; } |