@@ -50,10 +50,6 @@ template <class T>
50
50
constexpr bool is_ann_ref_v =
51
51
is_ann_ref_impl<std::remove_reference_t <T>>::value;
52
52
53
- template <typename ... Ts>
54
- using contains_alignment =
55
- detail::ContainsProperty<alignment_key, std::tuple<Ts...>>;
56
-
57
53
// filter properties that are applied on annotations
58
54
template <typename PropertyListTy>
59
55
using annotation_filter = decltype (filter_properties<propagateToPtrAnnotation>(
@@ -392,69 +388,69 @@ __SYCL_TYPE(annotated_ptr) annotated_ptr<T, detail::properties_t<Props...>> {
392
388
// turned off for these operators to make sure the complete error notes are
393
389
// printed
394
390
// clang-format off
395
- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
391
+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
396
392
class = std::enable_if_t <!has_alignment>>
397
393
reference operator [](std::ptrdiff_t idx) const noexcept {
398
394
return reference (m_Ptr + idx);
399
395
}
400
396
401
- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
397
+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
402
398
class = std::enable_if_t <has_alignment>>
403
399
auto operator [](std::ptrdiff_t idx) const noexcept -> decltype (" operator[] is not available when alignment is specified!" ) = delete ;
404
400
405
- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
401
+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
406
402
class = std::enable_if_t <!has_alignment>>
407
403
annotated_ptr operator +(size_t offset) const noexcept {
408
404
return annotated_ptr (m_Ptr + offset);
409
405
}
410
406
411
- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
407
+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
412
408
class = std::enable_if_t <has_alignment>>
413
409
auto operator +(size_t offset) const noexcept -> decltype (" operator+ is not available when alignment is specified!" ) = delete ;
414
410
415
- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
411
+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
416
412
class = std::enable_if_t <!has_alignment>>
417
413
annotated_ptr &operator ++() noexcept {
418
414
m_Ptr += 1 ;
419
415
return *this ;
420
416
}
421
417
422
- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
418
+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
423
419
class = std::enable_if_t <has_alignment>>
424
420
auto operator ++() noexcept -> decltype (" operator++ is not available when alignment is specified!" ) = delete ;
425
421
426
- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
422
+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
427
423
class = std::enable_if_t <!has_alignment>>
428
424
annotated_ptr operator ++(int ) noexcept {
429
425
auto tmp = *this ;
430
426
m_Ptr += 1 ;
431
427
return tmp;
432
428
}
433
429
434
- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
430
+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
435
431
class = std::enable_if_t <has_alignment>>
436
432
auto operator ++(int ) noexcept -> decltype (" operator++ is not available when alignment is specified!" ) = delete ;
437
433
438
- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
434
+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
439
435
class = std::enable_if_t <!has_alignment>>
440
436
annotated_ptr &operator --() noexcept {
441
437
m_Ptr -= 1 ;
442
438
return *this ;
443
439
}
444
440
445
- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
441
+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
446
442
class = std::enable_if_t <has_alignment>>
447
443
auto operator --() noexcept -> decltype (" operator-- is not available when alignment is specified!" ) = delete ;
448
444
449
- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
445
+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
450
446
class = std::enable_if_t <!has_alignment>>
451
447
annotated_ptr operator --(int ) noexcept {
452
448
auto tmp = *this ;
453
449
m_Ptr -= 1 ;
454
450
return tmp;
455
451
}
456
452
457
- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
453
+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
458
454
class = std::enable_if_t <has_alignment>>
459
455
auto operator --(int ) noexcept -> decltype (" operator-- is not available when alignment is specified!" ) = delete ;
460
456
@@ -485,13 +481,13 @@ __SYCL_TYPE(annotated_ptr) annotated_ptr<T, detail::properties_t<Props...>> {
485
481
" The property list contains invalid property." );
486
482
// check the set if FPGA specificed properties are used
487
483
static constexpr bool hasValidFPGAProperties =
488
- detail::checkValidFPGAPropertySet<Props... >::value;
484
+ detail::checkValidFPGAPropertySet<property_list_t >::value;
489
485
static_assert (hasValidFPGAProperties,
490
486
" FPGA Interface properties (i.e. awidth, dwidth, etc.) "
491
487
" can only be set with BufferLocation together." );
492
488
// check if conduit and register_map properties are specified together
493
489
static constexpr bool hasConduitAndRegisterMapProperties =
494
- detail::checkHasConduitAndRegisterMap<Props... >::value;
490
+ detail::checkHasConduitAndRegisterMap<property_list_t >::value;
495
491
static_assert (hasConduitAndRegisterMapProperties,
496
492
" The properties conduit and register_map cannot be "
497
493
" specified at the same time." );
0 commit comments