Skip to content

Commit 934454b

Browse files
committed
Fix variable name
1 parent d0f4578 commit 934454b

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

sycl/include/sycl/ext/oneapi/reduction.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ class reduction_impl_algo : public reduction_impl_common<T, BinaryOperation> {
565565
using rw_accessor_type = accessor<T, accessor_dim, access::mode::read_write,
566566
access::target::device, is_placeholder,
567567
ext::oneapi::accessor_property_list<>>;
568-
static constexpr bool has_atomic_add_float64 =
568+
static constexpr bool has_float64_atomics =
569569
IsReduOptForAtomic64Op<T, BinaryOperation>::value;
570570
static constexpr bool has_fast_atomics =
571571
IsReduOptForFastAtomicFetch<T, BinaryOperation>::value;
@@ -645,7 +645,7 @@ class reduction_impl_algo : public reduction_impl_common<T, BinaryOperation> {
645645
/// require initialization with identity value, then return user's read-write
646646
/// accessor. Otherwise, create global buffer with 'num_elements' initialized
647647
/// with identity value and return an accessor to that buffer.
648-
template <bool HasFastAtomics = (has_fast_atomics || has_atomic_add_float64)>
648+
template <bool HasFastAtomics = (has_fast_atomics || has_float64_atomics)>
649649
std::enable_if_t<HasFastAtomics, rw_accessor_type>
650650
getReadWriteAccessorToInitializedMem(handler &CGH) {
651651
if constexpr (is_rw_acc) {
@@ -2046,8 +2046,9 @@ template <typename KernelName, typename KernelType, int Dims, class Reduction>
20462046
void reduCGFuncAtomic64(handler &CGH, KernelType KernelFunc,
20472047
const nd_range<Dims> &Range, Reduction &Redu) {
20482048
auto Out = Redu.getReadWriteAccessorToInitializedMem(CGH);
2049-
static_assert(Reduction::has_atomic_add_float64,
2050-
"Only suitable for reductions that have FP64 atomic operations.");
2049+
static_assert(
2050+
Reduction::has_float64_atomics,
2051+
"Only suitable for reductions that have FP64 atomic operations.");
20512052
constexpr size_t NElements = Reduction::num_elements;
20522053
using Name =
20532054
__sycl_reduction_kernel<reduction::main_krn::NDRangeAtomic64, KernelName>;

sycl/include/sycl/handler.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,13 +1669,13 @@ class __SYCL_EXPORT handler {
16691669
void parallel_for(nd_range<Dims> Range, Reduction Redu,
16701670
_KERNELFUNCPARAM(KernelFunc)) {
16711671
if constexpr (!Reduction::has_fast_atomics &&
1672-
!Reduction::has_atomic_add_float64) {
1672+
!Reduction::has_float64_atomics) {
16731673
// The most basic implementation.
16741674
parallel_for_impl<KernelName>(Range, Redu, KernelFunc);
16751675
return;
16761676
} else { // Can't "early" return for "if constexpr".
16771677
std::shared_ptr<detail::queue_impl> QueueCopy = MQueue;
1678-
if constexpr (Reduction::has_atomic_add_float64) {
1678+
if constexpr (Reduction::has_float64_atomics) {
16791679
/// This version is a specialization for the add
16801680
/// operator. It performs runtime checks for device aspect "atomic64";
16811681
/// if found, fast sycl::atomic_ref operations are used to update the

0 commit comments

Comments
 (0)