@@ -2032,16 +2032,17 @@ namespace main_krn {
20322032template <class KernelName > struct NDRangeAtomic64 ;
20332033} // namespace main_krn
20342034} // namespace reduction
2035+
20352036// Specialization for devices with the atomic64 aspect, which guarantees 64 (and
20362037// temporarily 32) bit floating point support for atomic add.
20372038// TODO 32 bit floating point atomics are eventually expected to be supported by
20382039// the has_fast_atomics specialization. Corresponding changes to
20392040// IsReduOptForAtomic64Add, as prescribed in its documentation, should then also
20402041// be made.
20412042template <typename KernelName, typename KernelType, int Dims, class Reduction >
2042- void reduCGFuncImplAtomic64 (handler &CGH, KernelType KernelFunc,
2043- const nd_range<Dims> &Range, Reduction &,
2044- typename Reduction::rw_accessor_type Out) {
2043+ void reduCGFuncAtomic64 (handler &CGH, KernelType KernelFunc,
2044+ const nd_range<Dims> &Range, Reduction &Redu) {
2045+ auto Out = Redu. getReadWriteAccessorToInitializedMem (CGH);
20452046 static_assert (Reduction::has_atomic_add_float64,
20462047 " Only suitable for reductions that have FP64 atomic add." );
20472048 constexpr size_t NElements = Reduction::num_elements;
@@ -2066,20 +2067,6 @@ void reduCGFuncImplAtomic64(handler &CGH, KernelType KernelFunc,
20662067 });
20672068}
20682069
2069- // Specialization for devices with the atomic64 aspect, which guarantees 64 (and
2070- // temporarily 32) bit floating point support for atomic add.
2071- // TODO 32 bit floating point atomics are eventually expected to be supported by
2072- // the has_fast_atomics specialization. Corresponding changes to
2073- // IsReduOptForAtomic64Add, as prescribed in its documentation, should then also
2074- // be made.
2075- template <typename KernelName, typename KernelType, int Dims, class Reduction >
2076- void reduCGFuncAtomic64 (handler &CGH, KernelType KernelFunc,
2077- const nd_range<Dims> &Range, Reduction &Redu) {
2078- auto Out = Redu.getReadWriteAccessorToInitializedMem (CGH);
2079- reduCGFuncImplAtomic64<KernelName, KernelType, Dims, Reduction>(
2080- CGH, KernelFunc, Range, Redu, Out);
2081- }
2082-
20832070template <typename ... Reductions, size_t ... Is>
20842071void associateReduAccsWithHandler (handler &CGH,
20852072 std::tuple<Reductions...> &ReduTuple,
0 commit comments