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
|
#include <forstio/test/suite.hpp>
#include "../c++/lbm.hpp"
namespace {
namespace sch {
using namespace kel::lbm::sch;
using TestObjSchema = Tuple<
Member<FixedArray<UInt64,2u,2u>, "foo">,
Member<Array<Float32>, "bar">,
Member<
Array<
Struct<
Member<FixedArray<Float32,2u>,"pos">
>
>,
"baz"
>
>;
}
SAW_TEST("Sycl Data Compilation"){
acpp::sycl::queue q;
saw::data<
saw::schema::Struct<
saw::schema::Member<
kel::lbm::sch::Chunk<saw::schema::UInt8,1u,1u,1u>,
"test"
>
>,
kel::lbm::encode::Sycl<saw::encode::Native>
> dat{q};
auto& test_f = dat.template get<"test">();
// test_f.at({}).set(1);
// SAW_EXPECT(test_f.at({}).get() == 1, "Value check failed");
}
SAW_TEST("Sycl Data Array of Struct"){
acpp::sycl::queue q;
saw::data<sch::Array<sch::Float64>, kel::lbm::encode::Sycl<saw::encode::Native>> a{{{2u}},q};
}
/*
SAW_TEST("Sycl Data Compilation for Particle Similacrum"){
acpp::sycl::queue q;
saw::data<
sch::TestObjSchema
> a;
}
*/
}
|