@@ -2024,16 +2024,17 @@ namespace main_krn {
20242024template <class KernelName > struct NDRangeAtomic64 ;
20252025} // namespace main_krn
20262026} // namespace reduction
2027+
20272028// Specialization for devices with the atomic64 aspect, which guarantees 64 (and
20282029// temporarily 32) bit floating point support for atomic add.
20292030// TODO 32 bit floating point atomics are eventually expected to be supported by
20302031// the has_fast_atomics specialization. Corresponding changes to
20312032// IsReduOptForAtomic64Add, as prescribed in its documentation, should then also
20322033// be made.
20332034template <typename KernelName, typename KernelType, int Dims, class Reduction >
2034- void reduCGFuncImplAtomic64 (handler &CGH, KernelType KernelFunc,
2035- const nd_range<Dims> &Range, Reduction &,
2036- typename Reduction::rw_accessor_type Out) {
2035+ void reduCGFuncAtomic64 (handler &CGH, KernelType KernelFunc,
2036+ const nd_range<Dims> &Range, Reduction &Redu) {
2037+ auto Out = Redu. getReadWriteAccessorToInitializedMem (CGH);
20372038 static_assert (Reduction::has_atomic_add_float64,
20382039 " Only suitable for reductions that have FP64 atomic add." );
20392040 constexpr size_t NElements = Reduction::num_elements;
@@ -2058,20 +2059,6 @@ void reduCGFuncImplAtomic64(handler &CGH, KernelType KernelFunc,
20582059 });
20592060}
20602061
2061- // Specialization for devices with the atomic64 aspect, which guarantees 64 (and
2062- // temporarily 32) bit floating point support for atomic add.
2063- // TODO 32 bit floating point atomics are eventually expected to be supported by
2064- // the has_fast_atomics specialization. Corresponding changes to
2065- // IsReduOptForAtomic64Add, as prescribed in its documentation, should then also
2066- // be made.
2067- template <typename KernelName, typename KernelType, int Dims, class Reduction >
2068- void reduCGFuncAtomic64 (handler &CGH, KernelType KernelFunc,
2069- const nd_range<Dims> &Range, Reduction &Redu) {
2070- auto Out = Redu.getReadWriteAccessorToInitializedMem (CGH);
2071- reduCGFuncImplAtomic64<KernelName, KernelType, Dims, Reduction>(
2072- CGH, KernelFunc, Range, Redu, Out);
2073- }
2074-
20752062template <typename ... Reductions, size_t ... Is>
20762063void associateReduAccsWithHandler (handler &CGH,
20772064 std::tuple<Reductions...> &ReduTuple,
0 commit comments