diff options
Diffstat (limited to 'modules/remote-sycl/c++/device.hpp')
-rw-r--r-- | modules/remote-sycl/c++/device.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/remote-sycl/c++/device.hpp b/modules/remote-sycl/c++/device.hpp index ae19524..3561da7 100644 --- a/modules/remote-sycl/c++/device.hpp +++ b/modules/remote-sycl/c++/device.hpp @@ -25,6 +25,11 @@ public: error_or<data<Schema, Encoding, rmt::Sycl>> copy_to_device(const data<Schema, Encoding, Storage>& host_data){ return data<Schema, Encoding, rmt::Sycl>{host_data}; } + + template<typename Schema, typename Encoding, typename Storage> + error_or<data<Schema, Encoding, rmt::Sycl>> allocate_on_device(const data<typename meta_schema<Schema>::MetaSchema, Encoding, Storage>& host_meta){ + return copy_to_device(data<Schema, Encoding, Storage>{host_meta}); + } /** * Copy data to host |