blob: abea738115d5f26673688718c8f45a421e7d0aa8 (
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
|
#include "./sycl_basic.hpp"
int main(){
saw::remote<saw::rmt::Sycl> remote_ctx;
saw::own<saw::remote_address<saw::rmt::Sycl>> rmt_addr{};
saw::event_loop loop;
saw::wait_scope wait{loop};
remote_ctx.resolve_address().then([&](auto addr){
rmt_addr = std::move(addr);
}).detach();
wait.poll();
if(!rmt_addr){
return -1;
}
auto rpc_server = listen_basic_sycl(remote_ctx, *rmt_addr);
{
auto eov = rpc_server.template call<"increment">(saw::id<schema::UInt64>{1u});
if(eov.is_error()){
return -2;
}
auto& val = eov.get_value();
// std::cout<<"Value: "<<val<<std::endl;
}
return 0;
}
|