Merge topic 'fix-old-cuda-atomics' into release-2.0

78e06d5dc Fix old cuda atomics

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3209
This commit is contained in:
Kenneth Moreland 2024-05-15 19:42:30 +00:00 committed by Kitware Robot
commit 92b08967a2
2 changed files with 10 additions and 4 deletions

@ -0,0 +1,6 @@
# Fix old cuda atomics
There are some overloads for atomic adds of floating point numbers for
older versions of cuda that do not include them directly. These were
misnamed and thus not properly overloading the generic implementation.
This caused compile errors with older versions of cuda.

@ -226,9 +226,9 @@ VTKM_EXEC_CONT inline bool AtomicCompareExchangeImpl(T* addr,
}
}
#if __CUDA_ARCH__ < 200
VTKM_EXEC_CONT inline vtkm::Float32 vtkmAtomicAddImpl(vtkm::Float32* address,
vtkm::Float32 value,
vtkm::MemoryOrder order)
VTKM_EXEC_CONT inline vtkm::Float32 AtomicAddImpl(vtkm::Float32* address,
vtkm::Float32 value,
vtkm::MemoryOrder order)
{
AtomicStoreFence(order);
vtkm::UInt32 assumed;
@ -245,7 +245,7 @@ VTKM_EXEC_CONT inline vtkm::Float32 vtkmAtomicAddImpl(vtkm::Float32* address,
}
#endif
#if __CUDA_ARCH__ < 600
VTKM_EXEC_CONT inline vtkm::Float64 vtkmAtomicAdd(vtkm::Float64* address,
VTKM_EXEC_CONT inline vtkm::Float64 AtomicAddImpl(vtkm::Float64* address,
vtkm::Float64 value,
vtkm::MemoryOrder order)
{