mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 01:49:02 +00:00
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:
commit
92b08967a2
6
docs/changelog/fix-old-cuda-atomics.md
Normal file
6
docs/changelog/fix-old-cuda-atomics.md
Normal file
@ -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
|
#if __CUDA_ARCH__ < 200
|
||||||
VTKM_EXEC_CONT inline vtkm::Float32 vtkmAtomicAddImpl(vtkm::Float32* address,
|
VTKM_EXEC_CONT inline vtkm::Float32 AtomicAddImpl(vtkm::Float32* address,
|
||||||
vtkm::Float32 value,
|
vtkm::Float32 value,
|
||||||
vtkm::MemoryOrder order)
|
vtkm::MemoryOrder order)
|
||||||
{
|
{
|
||||||
AtomicStoreFence(order);
|
AtomicStoreFence(order);
|
||||||
vtkm::UInt32 assumed;
|
vtkm::UInt32 assumed;
|
||||||
@ -245,7 +245,7 @@ VTKM_EXEC_CONT inline vtkm::Float32 vtkmAtomicAddImpl(vtkm::Float32* address,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if __CUDA_ARCH__ < 600
|
#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::Float64 value,
|
||||||
vtkm::MemoryOrder order)
|
vtkm::MemoryOrder order)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user