@@ -99,6 +99,7 @@ in the group.
99
99
* Value type of `InputIteratorT` must be convertible to `OutputT`.
100
100
* Value type of `InputIteratorT` and `OutputT` must be trivially copyable
101
101
and default constructible.
102
+ * `Properties` is an instance of `sycl::ext::oneapi::experimental::properties`
102
103
103
104
_Effects_: Loads single element from `in_iter` to `out` by using the `g` group
104
105
object to identify memory location as `in_iter` + `g.get_local_linear_id()`.
@@ -129,6 +130,7 @@ in the group.
129
130
* Value type of `InputIteratorT` must be convertible to `OutputT`.
130
131
* Value type of `InputIteratorT` and `OutputT` must be trivially copyable
131
132
and default constructible.
133
+ * `Properties` is an instance of `sycl::ext::oneapi::experimental::properties`
132
134
133
135
_Effects_: Loads `N` elements from `in_iter` to `out`
134
136
using the `g` group object.
@@ -165,6 +167,7 @@ work-group or sub-group.
165
167
* Value type of `InputIteratorT` must be convertible to `OutputT`.
166
168
* Value type of `InputIteratorT` and `OutputT` must be trivially copyable
167
169
and default constructible.
170
+ * `Properties` is an instance of `sycl::ext::oneapi::experimental::properties`
168
171
169
172
_Effects_: Loads `ElementsPerWorkItem` elements from `in_iter` to `out`
170
173
using the `g` group object.
@@ -204,6 +207,7 @@ in the group.
204
207
* `InputT` must be convertible to value type of `OutputIteratorT`.
205
208
* `InputT` and value type of `OutputIteratorT` must be trivially copyable
206
209
and default constructible.
210
+ * `Properties` is an instance of `sycl::ext::oneapi::experimental::properties`
207
211
208
212
_Effects_: Stores single element `in` to `out_iter` by using the `g` group
209
213
object to identify memory location as `out_iter` + `g.get_local_linear_id()`
@@ -235,6 +239,7 @@ in the group.
235
239
* `InputT` must be convertible to value type of `OutputIteratorT`.
236
240
* `InputT` and value type of `OutputIteratorT` must be trivially copyable
237
241
and default constructible.
242
+ * `Properties` is an instance of `sycl::ext::oneapi::experimental::properties`
238
243
239
244
_Effects_: Stores `N` elements from `in` vec to `out_iter`
240
245
using the `g` group object.
@@ -273,6 +278,7 @@ work-group or sub-group.
273
278
* `InputT` must be convertible to value type of `OutputIteratorT`.
274
279
* `InputT` and value type of `OutputIteratorT` must be trivially copyable
275
280
and default constructible.
281
+ * `Properties` is an instance of `sycl::ext::oneapi::experimental::properties`
276
282
277
283
_Effects_: Stores `ElementsPerWorkItem` elements from `in` span to `out_iter`
278
284
using the `g` group object.
@@ -370,7 +376,7 @@ Specifies data layout used in group_load/store for `sycl::vec` or fixed-size
370
376
arrays functions.
371
377
372
378
Example:
373
- `group_load(g, input, output_span, data_placement_blocked);`
379
+ `group_load(g, input, output_span, properties{ data_placement_blocked} );`
374
380
375
381
=== Optimization Properties
376
382
@@ -398,7 +404,7 @@ inline constexpr contiguous_memory_key::value_t contiguous_memory;
398
404
----
399
405
400
406
For example, we can assert that `input` is a contiguous iterator:
401
- `group_load(g, input, output_span, contiguous_memory);`
407
+ `group_load(g, input, output_span, properties{ contiguous_memory} );`
402
408
403
409
If `input` isn't a contiguous iterator, the behavior is undefined.
404
410
@@ -432,7 +438,7 @@ inline constexpr full_group_key::value_t full_group;
432
438
433
439
For example, we can assert that there is no uneven group partition,
434
440
so the implementation can rely on `get_max_local_range()` range size:
435
- `group_load(sg, input, output_span, full_group);`
441
+ `group_load(sg, input, output_span, properties{ full_group} );`
436
442
437
443
If partition is uneven the behavior is undefined.
438
444
@@ -466,11 +472,13 @@ q.submit([&](sycl::handler& cgh) {
466
472
auto offset = g.get_group_id(0) * g.get_local_range(0) *
467
473
items_per_thread;
468
474
469
- sycl_exp::group_load(g, input + offset, sycl::span{ data }, sycl_exp::contiguous_memory);
475
+ auto props = sycl_exp::properties{sycl_exp::contiguous_memory};
476
+
477
+ sycl_exp::group_load(g, input + offset, sycl::span{ data }, props);
470
478
471
479
// Work with data...
472
480
473
- sycl_exp::group_store(g, output + offset, sycl::span{ data }, sycl_exp::contiguous_memory );
481
+ sycl_exp::group_store(g, output + offset, sycl::span{ data }, props );
474
482
});
475
483
});
476
484
----
@@ -546,11 +554,13 @@ q.submit([&](sycl::handler& cgh) {
546
554
sycl_exp::group_with_scratchpad gh{ g,
547
555
sycl::span{ buf_ptr, temp_memory_size } };
548
556
549
- sycl_exp::group_load(gh, input + offset, sycl::span{ data }, sycl_exp::contiguous_memory);
557
+ auto props = sycl_exp::properties{sycl_exp::contiguous_memory};
558
+
559
+ sycl_exp::group_load(gh, input + offset, sycl::span{ data }, props);
550
560
551
561
// Work with data...
552
562
553
- sycl_exp::group_store(gh, output + offset, sycl::span{ data }, sycl_exp::contiguous_memory );
563
+ sycl_exp::group_store(gh, output + offset, sycl::span{ data }, props );
554
564
});
555
565
});
556
566
----
@@ -583,11 +593,13 @@ q.submit([&](sycl::handler& cgh) {
583
593
sycl_exp::group_with_scratchpad gh{ g,
584
594
sycl::span{ buf_ptr, temp_memory_size } };
585
595
586
- sycl_exp::group_load(gh, input + offset, sycl::span{ data }, sycl_exp::data_placement_striped);
596
+ auto striped = sycl_exp::properties{sycl_exp::data_placement_striped};
597
+
598
+ sycl_exp::group_load(gh, input + offset, sycl::span{ data }, striped);
587
599
588
600
// Work with data...
589
601
590
- sycl_exp::group_store(gh, output + offset, sycl::span{ data }, sycl_exp::data_placement_striped );
602
+ sycl_exp::group_store(gh, output + offset, sycl::span{ data }, striped );
591
603
});
592
604
});
593
605
----
0 commit comments