summaryrefslogtreecommitdiff
path: root/modules/remote-hip/c++/device.hpp
blob: f7600246a56fd97faed52c8cd62ae8b297aba7c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once

#include "common.hpp"


#include "device.tmpl.hpp"
namespace saw {

/**
 * Represents a remote Sycl device.
 */
template<>
class device<rmt::Hip> final {
private:
public:
	device() = default;

	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>();
	}
};

}