summaryrefslogtreecommitdiff
path: root/modules/remote-sycl/tests/sycl_basics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/remote-sycl/tests/sycl_basics.cpp')
-rw-r--r--modules/remote-sycl/tests/sycl_basics.cpp31
1 files changed, 14 insertions, 17 deletions
diff --git a/modules/remote-sycl/tests/sycl_basics.cpp b/modules/remote-sycl/tests/sycl_basics.cpp
index 4ad3cf7..970f4d6 100644
--- a/modules/remote-sycl/tests/sycl_basics.cpp
+++ b/modules/remote-sycl/tests/sycl_basics.cpp
@@ -18,6 +18,14 @@ using Foo = Interface<
Member<Function<TestStruct, Void>, "foo">
>;
}
+SAW_TEST("SYCL Basics"){
+ using namespace saw;
+
+ acpp::sycl::queue q;
+ data<schema::TestStruct,encode::Sycl<encode::Native>> host_data;
+}
+
+/*
SAW_TEST("SYCL Test Setup"){
using namespace saw;
@@ -41,33 +49,21 @@ SAW_TEST("SYCL Test Setup"){
data<schema::TestStruct, encode::Sycl<encode::Native>> device_data{host_data};
- interface<schema::Foo, encode::Sycl<encode::Native>,cl::sycl::queue*> cl_iface {
-[&](data<schema::TestStruct, encode::Sycl<encode::Native>>& in, cl::sycl::queue* cmd) -> error_or<void> {
+ interface<schema::Foo, encode::Sycl<encode::Native>,acpp::sycl::queue*> cl_iface {
+[&](data<schema::TestStruct, encode::Sycl<encode::Native>>& in, acpp::sycl::queue* cmd) -> error_or<void> {
- cmd->submit([&](cl::sycl::handler& h){
+ cmd->submit([&](acpp::sycl::handler& h){
- auto acc_buff = in.template access<cl::sycl::access::mode::write>(h);
+ auto acc_buff = in.template access<acpp::sycl::access::mode::write>(h);
auto si = host_data.template get<"doubles">().size();
- h.parallel_for(cl::sycl::range<1>(si.get()), [=] (cl::sycl::id<1> it){
+ h.parallel_for(acpp::sycl::range<1>(si.get()), [=] (acpp::sycl::id<1> it){
acc_buff[0u].template get<"foo">() = acc_buff[0u].template get<"doubles">().size();
auto& dbls = acc_buff[0u].template get<"doubles">();
dbls.at(it[0u]) = it[0u] * 2.0;
});
});
- /*
- cmd->submit([&](cl::sycl::handler& h){
- auto acc_buff = in.template access<cl::sycl::access::mode::read>(h);
- h.copy(acc_buff, &host_data);
- });
- */
-
- /**
- cl::sycl::host_accessor result{in.get_handle()};
- std::cout<<result[0u].template get<"foo">().get()<<std::endl;
- std::cout<<result[0u].template get<"bar">().get()<<std::endl;
- **/
return saw::void_t{};
}
};
@@ -77,4 +73,5 @@ SAW_TEST("SYCL Test Setup"){
cl_iface.template call <"foo">(device_data, &(device.get_handle()));
device.get_handle().wait();
}
+*/
}