@@ -987,9 +987,9 @@ class accessor :
987
987
988
988
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
989
989
typename TagT,
990
- typename = detail::enable_if_t <IsSameAsBuffer<T, Dims>() &&
991
- IsValidTag<TagT>() && IsPlaceH &&
992
- (IsGlobalBuf || IsConstantBuf)>>
990
+ typename = detail::enable_if_t <
991
+ IsSameAsBuffer<T, Dims>() && IsValidTag<TagT>() && IsPlaceH &&
992
+ (IsGlobalBuf || IsConstantBuf || IsHostBuf )>>
993
993
accessor (buffer<T, Dims, AllocatorT> &BufferRef, TagT,
994
994
const property_list &PropertyList = {})
995
995
: accessor (BufferRef, PropertyList) {}
@@ -1024,9 +1024,9 @@ class accessor :
1024
1024
1025
1025
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
1026
1026
typename TagT,
1027
- typename = detail::enable_if_t <IsSameAsBuffer<T, Dims>() &&
1028
- IsValidTag<TagT>() && !IsPlaceH &&
1029
- (IsGlobalBuf || IsConstantBuf)>>
1027
+ typename = detail::enable_if_t <
1028
+ IsSameAsBuffer<T, Dims>() && IsValidTag<TagT>() && !IsPlaceH &&
1029
+ (IsGlobalBuf || IsConstantBuf || IsHostBuf )>>
1030
1030
accessor (buffer<T, Dims, AllocatorT> &BufferRef, handler &CommandGroupHandler,
1031
1031
TagT, const property_list &PropertyList = {})
1032
1032
: accessor (BufferRef, CommandGroupHandler, PropertyList) {}
@@ -1058,9 +1058,9 @@ class accessor :
1058
1058
#endif
1059
1059
1060
1060
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
1061
- typename = detail::enable_if_t <IsSameAsBuffer<T, Dims>() &&
1062
- (!IsPlaceH &&
1063
- (IsGlobalBuf || IsConstantBuf))>>
1061
+ typename = detail::enable_if_t <
1062
+ IsSameAsBuffer<T, Dims>() &&
1063
+ (!IsPlaceH && (IsGlobalBuf || IsConstantBuf || IsHostBuf ))>>
1064
1064
accessor (buffer<T, Dims, AllocatorT> &BufferRef, handler &CommandGroupHandler,
1065
1065
range<Dimensions> AccessRange,
1066
1066
const property_list &PropertyList = {})
@@ -1071,9 +1071,9 @@ class accessor :
1071
1071
1072
1072
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
1073
1073
typename TagT,
1074
- typename = detail::enable_if_t <IsSameAsBuffer<T, Dims>() &&
1075
- IsValidTag<TagT>() && !IsPlaceH &&
1076
- (IsGlobalBuf || IsConstantBuf)>>
1074
+ typename = detail::enable_if_t <
1075
+ IsSameAsBuffer<T, Dims>() && IsValidTag<TagT>() && !IsPlaceH &&
1076
+ (IsGlobalBuf || IsConstantBuf || IsHostBuf )>>
1077
1077
accessor (buffer<T, Dims, AllocatorT> &BufferRef, handler &CommandGroupHandler,
1078
1078
range<Dimensions> AccessRange, TagT,
1079
1079
const property_list &PropertyList = {})
@@ -1123,9 +1123,9 @@ class accessor :
1123
1123
#endif
1124
1124
1125
1125
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
1126
- typename = detail::enable_if_t <IsSameAsBuffer<T, Dims>() &&
1127
- (!IsPlaceH &&
1128
- (IsGlobalBuf || IsConstantBuf))>>
1126
+ typename = detail::enable_if_t <
1127
+ IsSameAsBuffer<T, Dims>() &&
1128
+ (!IsPlaceH && (IsGlobalBuf || IsConstantBuf || IsHostBuf ))>>
1129
1129
accessor (buffer<T, Dims, AllocatorT> &BufferRef, handler &CommandGroupHandler,
1130
1130
range<Dimensions> AccessRange, id<Dimensions> AccessOffset,
1131
1131
const property_list &PropertyList = {})
@@ -1151,9 +1151,9 @@ class accessor :
1151
1151
1152
1152
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
1153
1153
typename TagT,
1154
- typename = detail::enable_if_t <IsSameAsBuffer<T, Dims>() &&
1155
- IsValidTag<TagT>() && !IsPlaceH &&
1156
- (IsGlobalBuf || IsConstantBuf)>>
1154
+ typename = detail::enable_if_t <
1155
+ IsSameAsBuffer<T, Dims>() && IsValidTag<TagT>() && !IsPlaceH &&
1156
+ (IsGlobalBuf || IsConstantBuf || IsHostBuf )>>
1157
1157
accessor (buffer<T, Dims, AllocatorT> &BufferRef, handler &CommandGroupHandler,
1158
1158
range<Dimensions> AccessRange, id<Dimensions> AccessOffset, TagT,
1159
1159
const property_list &PropertyList = {})
@@ -1675,8 +1675,6 @@ class host_accessor
1675
1675
// buffer | handler | range | id | | property_list
1676
1676
// buffer | handler | range | id | mode_tag | property_list
1677
1677
// -------+---------+-------+----+----------+--------------
1678
- // host_accessor with handler argument will be added later
1679
- // to facilitate non-blocking accessor use case
1680
1678
1681
1679
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
1682
1680
typename = typename detail::enable_if_t <
@@ -1699,6 +1697,24 @@ class host_accessor
1699
1697
mode_tag_t <AccessMode>, const property_list &PropertyList = {})
1700
1698
: host_accessor(BufferRef, PropertyList) {}
1701
1699
1700
+ #endif
1701
+
1702
+ template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
1703
+ typename = detail::enable_if_t <IsSameAsBuffer<T, Dims>()>>
1704
+ host_accessor (buffer<T, Dims, AllocatorT> &BufferRef,
1705
+ handler &CommandGroupHandler,
1706
+ const property_list &PropertyList = {})
1707
+ : AccessorT(BufferRef, CommandGroupHandler, PropertyList) {}
1708
+
1709
+ #if __cplusplus > 201402L
1710
+
1711
+ template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
1712
+ typename = detail::enable_if_t <IsSameAsBuffer<T, Dims>()>>
1713
+ host_accessor (buffer<DataT, Dimensions, AllocatorT> &BufferRef,
1714
+ handler &CommandGroupHandler, mode_tag_t <AccessMode>,
1715
+ const property_list &PropertyList = {})
1716
+ : host_accessor(BufferRef, CommandGroupHandler, PropertyList) {}
1717
+
1702
1718
#endif
1703
1719
1704
1720
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
@@ -1717,6 +1733,26 @@ class host_accessor
1717
1733
const property_list &PropertyList = {})
1718
1734
: host_accessor(BufferRef, AccessRange, {}, PropertyList) {}
1719
1735
1736
+ #endif
1737
+
1738
+ template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
1739
+ typename = detail::enable_if_t <IsSameAsBuffer<T, Dims>()>>
1740
+ host_accessor (buffer<DataT, Dimensions, AllocatorT> &BufferRef,
1741
+ handler &CommandGroupHandler, range<Dimensions> AccessRange,
1742
+ const property_list &PropertyList = {})
1743
+ : AccessorT(BufferRef, CommandGroupHandler, AccessRange, {},
1744
+ PropertyList) {}
1745
+
1746
+ #if __cplusplus > 201402L
1747
+
1748
+ template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
1749
+ typename = detail::enable_if_t <IsSameAsBuffer<T, Dims>()>>
1750
+ host_accessor (buffer<DataT, Dimensions, AllocatorT> &BufferRef,
1751
+ handler &CommandGroupHandler, range<Dimensions> AccessRange,
1752
+ mode_tag_t <AccessMode>, const property_list &PropertyList = {})
1753
+ : host_accessor(BufferRef, CommandGroupHandler, AccessRange, {},
1754
+ PropertyList) {}
1755
+
1720
1756
#endif
1721
1757
1722
1758
template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
@@ -1735,6 +1771,28 @@ class host_accessor
1735
1771
mode_tag_t <AccessMode>, const property_list &PropertyList = {})
1736
1772
: host_accessor(BufferRef, AccessRange, AccessOffset, PropertyList) {}
1737
1773
1774
+ #endif
1775
+
1776
+ template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
1777
+ typename = detail::enable_if_t <IsSameAsBuffer<T, Dims>()>>
1778
+ host_accessor (buffer<DataT, Dimensions, AllocatorT> &BufferRef,
1779
+ handler &CommandGroupHandler, range<Dimensions> AccessRange,
1780
+ id<Dimensions> AccessOffset,
1781
+ const property_list &PropertyList = {})
1782
+ : AccessorT(BufferRef, CommandGroupHandler, AccessRange, AccessOffset,
1783
+ PropertyList) {}
1784
+
1785
+ #if __cplusplus > 201402L
1786
+
1787
+ template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
1788
+ typename = detail::enable_if_t <IsSameAsBuffer<T, Dims>()>>
1789
+ host_accessor (buffer<DataT, Dimensions, AllocatorT> &BufferRef,
1790
+ handler &CommandGroupHandler, range<Dimensions> AccessRange,
1791
+ id<Dimensions> AccessOffset, mode_tag_t <AccessMode>,
1792
+ const property_list &PropertyList = {})
1793
+ : host_accessor(BufferRef, CommandGroupHandler, AccessRange, AccessOffset,
1794
+ PropertyList) {}
1795
+
1738
1796
#endif
1739
1797
};
1740
1798
@@ -1767,6 +1825,13 @@ host_accessor(buffer<DataT, Dimensions, AllocatorT>, Type1, Type2, Type3, Type4)
1767
1825
->host_accessor<DataT, Dimensions,
1768
1826
detail::deduceAccessMode<Type3, Type4>()>;
1769
1827
1828
+ template <typename DataT, int Dimensions, typename AllocatorT, typename Type1,
1829
+ typename Type2, typename Type3, typename Type4, typename Type5>
1830
+ host_accessor (buffer<DataT, Dimensions, AllocatorT>, Type1, Type2, Type3, Type4,
1831
+ Type5)
1832
+ ->host_accessor<DataT, Dimensions,
1833
+ detail::deduceAccessMode<Type4, Type5>()>;
1834
+
1770
1835
#endif
1771
1836
1772
1837
} // namespace sycl
0 commit comments