@@ -987,9 +987,9 @@ class accessor :
987987
988988 template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
989989 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 )>>
993993 accessor (buffer<T, Dims, AllocatorT> &BufferRef, TagT,
994994 const property_list &PropertyList = {})
995995 : accessor (BufferRef, PropertyList) {}
@@ -1024,9 +1024,9 @@ class accessor :
10241024
10251025 template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
10261026 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 )>>
10301030 accessor (buffer<T, Dims, AllocatorT> &BufferRef, handler &CommandGroupHandler,
10311031 TagT, const property_list &PropertyList = {})
10321032 : accessor (BufferRef, CommandGroupHandler, PropertyList) {}
@@ -1058,9 +1058,9 @@ class accessor :
10581058#endif
10591059
10601060 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 ))>>
10641064 accessor (buffer<T, Dims, AllocatorT> &BufferRef, handler &CommandGroupHandler,
10651065 range<Dimensions> AccessRange,
10661066 const property_list &PropertyList = {})
@@ -1071,9 +1071,9 @@ class accessor :
10711071
10721072 template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
10731073 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 )>>
10771077 accessor (buffer<T, Dims, AllocatorT> &BufferRef, handler &CommandGroupHandler,
10781078 range<Dimensions> AccessRange, TagT,
10791079 const property_list &PropertyList = {})
@@ -1123,9 +1123,9 @@ class accessor :
11231123#endif
11241124
11251125 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 ))>>
11291129 accessor (buffer<T, Dims, AllocatorT> &BufferRef, handler &CommandGroupHandler,
11301130 range<Dimensions> AccessRange, id<Dimensions> AccessOffset,
11311131 const property_list &PropertyList = {})
@@ -1151,9 +1151,9 @@ class accessor :
11511151
11521152 template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
11531153 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 )>>
11571157 accessor (buffer<T, Dims, AllocatorT> &BufferRef, handler &CommandGroupHandler,
11581158 range<Dimensions> AccessRange, id<Dimensions> AccessOffset, TagT,
11591159 const property_list &PropertyList = {})
@@ -1675,8 +1675,6 @@ class host_accessor
16751675 // buffer | handler | range | id | | property_list
16761676 // buffer | handler | range | id | mode_tag | property_list
16771677 // -------+---------+-------+----+----------+--------------
1678- // host_accessor with handler argument will be added later
1679- // to facilitate non-blocking accessor use case
16801678
16811679 template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
16821680 typename = typename detail::enable_if_t <
@@ -1699,6 +1697,24 @@ class host_accessor
16991697 mode_tag_t <AccessMode>, const property_list &PropertyList = {})
17001698 : host_accessor(BufferRef, PropertyList) {}
17011699
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+
17021718#endif
17031719
17041720 template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
@@ -1717,6 +1733,26 @@ class host_accessor
17171733 const property_list &PropertyList = {})
17181734 : host_accessor(BufferRef, AccessRange, {}, PropertyList) {}
17191735
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+
17201756#endif
17211757
17221758 template <typename T = DataT, int Dims = Dimensions, typename AllocatorT,
@@ -1735,6 +1771,28 @@ class host_accessor
17351771 mode_tag_t <AccessMode>, const property_list &PropertyList = {})
17361772 : host_accessor(BufferRef, AccessRange, AccessOffset, PropertyList) {}
17371773
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+
17381796#endif
17391797};
17401798
@@ -1767,6 +1825,13 @@ host_accessor(buffer<DataT, Dimensions, AllocatorT>, Type1, Type2, Type3, Type4)
17671825 ->host_accessor<DataT, Dimensions,
17681826 detail::deduceAccessMode<Type3, Type4>()>;
17691827
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+
17701835#endif
17711836
17721837} // namespace sycl
0 commit comments