@@ -375,10 +375,10 @@ template <typename T> void testAlign(sycl::queue &q, unsigned align) {
375
375
// 2),
376
376
// nullptr is returned
377
377
,
378
- [&]() { return TDevice (q, properties{alignment<5 >}); },
379
- [&]() { return TDevice (dev, Ctx, properties{alignment<10 >}); },
380
- [&]() { return THost (q, properties{alignment<25 >}); },
381
- [&]() { return THost (Ctx, properties{alignment<50 >}); },
378
+ [&]() { return TDevice (q, properties{alignment<75 >}); },
379
+ [&]() { return TDevice (dev, Ctx, properties{alignment<100 >}); },
380
+ [&]() { return THost (q, properties{alignment<205 >}); },
381
+ [&]() { return THost (Ctx, properties{alignment<500 >}); },
382
382
[&]() {
383
383
return TAnnotated (q, alloc::device, properties{alignment<127 >});
384
384
},
@@ -405,18 +405,23 @@ template <typename T> void testAlign(sycl::queue &q, unsigned align) {
405
405
// alignment
406
406
// argument is not a power of 2, the result is nullptr
407
407
,
408
- [&]() { return ATDevice (3 , q); },
409
- [&]() { return ATDevice (7 , dev, Ctx); },
410
- [&]() { return ATHost (7 , q); },
411
- [&]() { return ATHost (9 , Ctx); },
412
- [&]() { return ATAnnotated (15 , q, alloc::device); },
413
- [&]() { return ATAnnotated (17 , dev, Ctx, alloc::host); }});
408
+ [&]() { return ATDevice (65 , q); },
409
+ [&]() { return ATDevice (70 , dev, Ctx); },
410
+ [&]() { return ATHost (174 , q); },
411
+ [&]() { return ATHost (299 , Ctx); },
412
+ [&]() { return ATAnnotated (550 , q, alloc::device); },
413
+ [&]() { return ATAnnotated (1700 , dev, Ctx, alloc::host); }});
414
414
}
415
415
416
+ struct alignas (64 ) MyStruct {
417
+ int x;
418
+ };
419
+
416
420
int main () {
417
421
sycl::queue q;
418
422
testAlign<char >(q, 4 );
419
423
testAlign<int >(q, 128 );
420
424
testAlign<std::complex<double >>(q, 4 );
425
+ testAlign<MyStruct>(q, 4 );
421
426
return 0 ;
422
427
}
0 commit comments