@@ -1688,64 +1688,64 @@ class __SYCL_SPECIAL_CLASS accessor :
1688
1688
1689
1689
template <int Dims = Dimensions>
1690
1690
operator typename detail::enable_if_t <Dims == 0 &&
1691
- #ifdef __ENABLE_USM_ADDR_SPACE__
1692
1691
AccessMode == access ::mode::atomic,
1693
- atomic<DataT>>() const {
1692
+ #ifdef __ENABLE_USM_ADDR_SPACE__
1693
+ atomic<DataT>
1694
1694
#else
1695
- AccessMode == access ::mode::atomic,
1696
- atomic<DataT, AS>>() const {
1695
+ atomic<DataT, AS>
1697
1696
#endif
1698
- const size_t LinearIndex = getLinearIndex (id<AdjustedDim>());
1699
- return atomic<DataT, AS>(
1700
- multi_ptr<DataT, AS>(getQualifiedPtr () + LinearIndex));
1701
- }
1697
+ >() const {
1698
+ const size_t LinearIndex = getLinearIndex (id<AdjustedDim>());
1699
+ return atomic<DataT, AS>(
1700
+ multi_ptr<DataT, AS>(getQualifiedPtr () + LinearIndex));
1701
+ }
1702
1702
1703
- template <int Dims = Dimensions>
1704
- typename detail::enable_if_t <(Dims > 0 ) && AccessMode == access ::mode::atomic,
1705
- atomic<DataT, AS>>
1706
- operator [](id<Dimensions> Index) const {
1707
- const size_t LinearIndex = getLinearIndex (Index);
1708
- return atomic<DataT, AS>(
1709
- multi_ptr<DataT, AS>(getQualifiedPtr () + LinearIndex));
1710
- }
1703
+ template <int Dims = Dimensions>
1704
+ typename detail::enable_if_t <(Dims > 0 ) && AccessMode == access ::mode::atomic,
1705
+ atomic<DataT, AS>>
1706
+ operator [](id<Dimensions> Index) const {
1707
+ const size_t LinearIndex = getLinearIndex (Index);
1708
+ return atomic<DataT, AS>(
1709
+ multi_ptr<DataT, AS>(getQualifiedPtr () + LinearIndex));
1710
+ }
1711
1711
1712
- template <int Dims = Dimensions>
1713
- typename detail::enable_if_t <Dims == 1 && AccessMode == access ::mode::atomic,
1714
- atomic<DataT, AS>>
1715
- operator [](size_t Index) const {
1716
- const size_t LinearIndex = getLinearIndex (id<AdjustedDim>(Index));
1717
- return atomic<DataT, AS>(
1718
- multi_ptr<DataT, AS>(getQualifiedPtr () + LinearIndex));
1719
- }
1720
- template <int Dims = Dimensions, typename = detail::enable_if_t <(Dims > 1 )>>
1721
- typename AccessorCommonT::template AccessorSubscript<Dims - 1 >
1722
- operator [](size_t Index) const {
1723
- return AccessorSubscript<Dims - 1 >(*this , Index);
1724
- }
1712
+ template <int Dims = Dimensions>
1713
+ typename detail::enable_if_t <Dims == 1 && AccessMode == access ::mode::atomic,
1714
+ atomic<DataT, AS>>
1715
+ operator [](size_t Index) const {
1716
+ const size_t LinearIndex = getLinearIndex (id<AdjustedDim>(Index));
1717
+ return atomic<DataT, AS>(
1718
+ multi_ptr<DataT, AS>(getQualifiedPtr () + LinearIndex));
1719
+ }
1720
+ template <int Dims = Dimensions, typename = detail::enable_if_t <(Dims > 1 )>>
1721
+ typename AccessorCommonT::template AccessorSubscript<Dims - 1 >
1722
+ operator [](size_t Index) const {
1723
+ return AccessorSubscript<Dims - 1 >(*this , Index);
1724
+ }
1725
1725
1726
- template <access ::target AccessTarget_ = AccessTarget,
1727
- typename =
1728
- detail:: enable_if_t <AccessTarget_ == access ::target::host_buffer>>
1729
- DataT *get_pointer () const {
1730
- return getPointerAdjusted ();
1731
- }
1726
+ template <access ::target AccessTarget_ = AccessTarget,
1727
+ typename = detail:: enable_if_t <AccessTarget_ = =
1728
+ access ::target::host_buffer>>
1729
+ DataT *get_pointer () const {
1730
+ return getPointerAdjusted ();
1731
+ }
1732
1732
1733
- template <
1734
- access ::target AccessTarget_ = AccessTarget,
1735
- typename = detail::enable_if_t <AccessTarget_ == access ::target::device>>
1736
- global_ptr<DataT> get_pointer () const {
1737
- return global_ptr<DataT>(getPointerAdjusted ());
1738
- }
1733
+ template <
1734
+ access ::target AccessTarget_ = AccessTarget,
1735
+ typename = detail::enable_if_t <AccessTarget_ == access ::target::device>>
1736
+ global_ptr<DataT> get_pointer () const {
1737
+ return global_ptr<DataT>(getPointerAdjusted ());
1738
+ }
1739
1739
1740
- template <access ::target AccessTarget_ = AccessTarget,
1741
- typename = detail::enable_if_t <AccessTarget_ ==
1742
- access ::target::constant_buffer>>
1743
- constant_ptr<DataT> get_pointer () const {
1744
- return constant_ptr<DataT>(getPointerAdjusted ());
1745
- }
1740
+ template <access ::target AccessTarget_ = AccessTarget,
1741
+ typename = detail::enable_if_t <AccessTarget_ ==
1742
+ access ::target::constant_buffer>>
1743
+ constant_ptr<DataT> get_pointer () const {
1744
+ return constant_ptr<DataT>(getPointerAdjusted ());
1745
+ }
1746
1746
1747
- bool operator ==(const accessor &Rhs) const { return impl == Rhs.impl ; }
1748
- bool operator !=(const accessor &Rhs) const { return !(*this == Rhs); }
1747
+ bool operator ==(const accessor &Rhs) const { return impl == Rhs.impl ; }
1748
+ bool operator !=(const accessor &Rhs) const { return !(*this == Rhs); }
1749
1749
1750
1750
private:
1751
1751
// supporting function for get_pointer()
@@ -1768,7 +1768,7 @@ bool operator!=(const accessor &Rhs) const { return !(*this == Rhs); }
1768
1768
" buffer size must be greater than zero." ,
1769
1769
PI_INVALID_VALUE);
1770
1770
}
1771
- }; // namespace sycl
1771
+ };
1772
1772
1773
1773
#if __cplusplus > 201402L
1774
1774
0 commit comments