summaryrefslogtreecommitdiff
path: root/modules/remote-sycl/c++/remote.hpp
blob: 1df6249c2aadbd9f1cb0b68b12aa44138dc9e2f3 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#pragma once

#include <forstio/io_codec/rpc.hpp>

#include <CL/sycl.hpp>

namespace saw {
namespace rmt {
struct Sycl {};
}

template<typename Iface, typename Encode>
class rpc_server<Iface, Encode, rmt::Sycl> {
private:
	cl::sycl::queue cmd_queue_;
public:

};

template<>
class remote<rmt::Sycl> {
private:
	SAW_FORBID_COPY(remote);
	SAW_FORBID_MOVE(remote);

public:
	/**
	 * Default constructor
	 */
	remote(){}

	/**
	 * For now we don't need to specify the location since
	 * we just create a default.
	 */
	conveyor<remote_address<rmt::Sycl>> resolve_address(){
		return remote_address<rmt::Sycl>{*this};
	}

	/**
	 * Spin up a rpc server
	 */
	template<typename Iface, typename Encoding>
	conveyor<rpc_server<Iface, Encoding, rmt::Sycl>> listen(const remote_address<rmt::Sycl>&){
		
	}
};

template<>
struct remote_address<rmt::Sycl> {
private:
	remote<rmt::Sycl>* ctx_;

	SAW_FORBID_COPY(remote_address);
	SAW_FORBID_MOVE(remote_address);
public:
	remote_address(remote<rmt::Sycl>& r_ctx):
		ctx_{&r_ctx}
	{}

	/*
	template<typename Iface>
	error_or<void> foo();
	*/

	
};
}