@@ -12,16 +12,20 @@ using namespace sycl;
12
12
using namespace ext ::oneapi::experimental;
13
13
14
14
using annotated_ptr_t1 =
15
- annotated_ptr<int , decltype (properties(awidth<32 >, dwidth<32 >))>;
15
+ annotated_ptr<int , decltype (properties(buffer_location<0 >, awidth<32 >,
16
+ dwidth<32 >))>;
16
17
17
18
using annotated_ptr_t2 =
18
- annotated_ptr<int ,
19
- decltype (properties(conduit, register_map, alignment<8 >))>;
19
+ annotated_ptr<int , decltype (properties(buffer_location< 0 >, conduit,
20
+ register_map, alignment<8 >))>;
20
21
21
- using annotated_ptr_t3 = annotated_ptr<int , decltype (properties(awidth<32 >))>;
22
+ using annotated_ptr_t3 =
23
+ annotated_ptr<int , decltype (properties(buffer_location<0 >, awidth<32 >))>;
22
24
23
25
struct MyIP {
24
- annotated_ptr<int , decltype (properties(awidth<32 >, dwidth<32 >))> a;
26
+ annotated_ptr<int , decltype (properties(buffer_location<0 >, awidth<32 >,
27
+ dwidth<32 >))>
28
+ a;
25
29
26
30
int b;
27
31
@@ -38,7 +42,7 @@ struct MyIP {
38
42
39
43
template <typename T> T foo () {
40
44
auto raw = new int ;
41
- return annotated_ptr (raw, awidth<32 >);
45
+ return annotated_ptr (raw, buffer_location< 0 >, awidth<32 >);
42
46
}
43
47
44
48
void TestVectorAddWithAnnotatedMMHosts () {
@@ -60,33 +64,40 @@ void TestVectorAddWithAnnotatedMMHosts() {
60
64
// Construct from raw pointers
61
65
auto tmp11 = annotated_ptr (raw); // empty property list
62
66
// Construct from raw pointers and a property list
63
- auto tmp12 = annotated_ptr<int , decltype (properties{awidth<32 >})>(
64
- raw, properties{awidth<32 >});
65
- auto tmp14 = annotated_ptr (raw, properties{awidth<32 >}); // deduction guide
67
+ auto tmp12 =
68
+ annotated_ptr<int , decltype (properties{buffer_location<0 >, awidth<32 >})>(
69
+ raw, properties{buffer_location<0 >, awidth<32 >});
70
+ auto tmp14 = annotated_ptr (
71
+ raw, properties{buffer_location<0 >, awidth<32 >}); // deduction guide
66
72
static_assert (std::is_same<decltype (tmp14), annotated_ptr_t3>::value,
67
73
" deduction guide failed 1" );
68
74
// Construct from raw pointers and variadic properties
69
- auto tmp13 = annotated_ptr (raw, dwidth<32 >, awidth<32 >); // deduction guide
75
+ auto tmp13 = annotated_ptr (raw, buffer_location<0 >, dwidth<32 >,
76
+ awidth<32 >); // deduction guide
70
77
static_assert (std::is_same<decltype (tmp13), annotated_ptr_t1>::value,
71
78
" deduction guide failed 2" );
72
- auto tmp15 = annotated_ptr (raw, awidth<32 >);
79
+ auto tmp15 = annotated_ptr (raw, buffer_location< 0 >, awidth<32 >);
73
80
static_assert (std::is_same<decltype (tmp15), annotated_ptr_t3>::value,
74
81
" deduction guide failed 1" );
75
82
76
83
// Construct from another annotated_ptr
77
84
// templated copy constructor
78
- annotated_ptr<int , decltype (properties{awidth<32 >, dwidth<32 >})> arg11 (tmp11);
85
+ annotated_ptr<int , decltype (properties{buffer_location<0 >, awidth<32 >,
86
+ dwidth<32 >})>
87
+ arg11 (tmp11);
79
88
auto arg12 =
80
- annotated_ptr<int , decltype (properties{dwidth<32 >, awidth<32 >})>(tmp11);
89
+ annotated_ptr<int , decltype (properties{buffer_location<0 >, dwidth<32 >,
90
+ awidth<32 >})>(tmp11);
81
91
82
92
// default copy constructor
83
93
auto arg13 = annotated_ptr (tmp12);
84
94
static_assert (std::is_same<decltype (arg13), annotated_ptr_t3>::value,
85
95
" deduction guide failed 3" );
86
96
87
97
// Construct from another annotated_ptr and a property list
88
- annotated_ptr<int , decltype (properties{awidth<32 >, dwidth<32 >})> arg22 (
89
- tmp12, properties{dwidth<32 >});
98
+ annotated_ptr<int , decltype (properties{buffer_location<0 >, awidth<32 >,
99
+ dwidth<32 >})>
100
+ arg22 (tmp12, properties{dwidth<32 >});
90
101
auto arg23 = annotated_ptr (tmp12, properties{dwidth<32 >}); // deduction guide
91
102
static_assert (std::is_same<decltype (arg22), annotated_ptr_t1>::value,
92
103
" deduction guide failed 4" );
@@ -99,7 +110,7 @@ void TestVectorAddWithAnnotatedMMHosts() {
99
110
// properties{dwidth<32>}); // ERR
100
111
101
112
// Property merge
102
- auto arg31 = annotated_ptr_t3 (raw, awidth<32 >); // OK
113
+ auto arg31 = annotated_ptr_t3 (raw, buffer_location< 0 >, awidth<32 >); // OK
103
114
auto arg32 = annotated_ptr (arg31, properties{dwidth<32 >}); // OK
104
115
auto arg33 = annotated_ptr (arg32, properties{dwidth<32 >, awidth<32 >}); // OK
105
116
auto arg34 = annotated_ptr (arg32, properties{awidth<32 >, latency<22 >}); // OK
0 commit comments