summaryrefslogtreecommitdiff
path: root/modules/device-hip/c++/rpc.h
blob: 0bcda0cbd5b7fbf9b242d9d87d434aa15d35604c (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
37
38
39
40
41
42
43
44
45
46
47
#pragma once

#include <hip.h>

namespace saw {
namespace rmt {
struct DeviceHip {};
}

template<>
class remote<rmt::DeviceHip> {
private:
public:
	template<typename Iface>
	error_or<rpc_client<rmt::DeviceHip, Iface>> connect(){
		return make_error<err::not_implemented>();
	}
};

error_or<remote<rmt::DeviceHip>> create_remote(){
	auto rc = hipInit(0);

	return make_error<err::not_implemented>();
}

template<typename Iface>
class rpc_client<rmt::DeviceHip, Iface> {
public:
	template<typename... T>
	struct request {
		std::tuple<id<T>...> ids;

		error_or<data<schema::Tuple<T...>>> wait();
	};
};

template<typename Iface>
class rpc_server<rmt::DeviceHip, Iface> {
private:
	/**
	 * Needs a variant ptr of all possible return types
	 */
	struct data_storage {
	};
	
};
}