vtk-m2/vtkm/cont/kokkos/DeviceAdapterKokkos.h
Kenneth Moreland d3503bfaba Implement AtomicInterfaceControl/Execution with free functions
Now that we have atomic free functions (e.g. `vtkm::AtomicAdd()`), we no
longer need special implementations for control and each execution
device. (Well, technically we do have special implementations for each,
but they are handled with compiler directives in the free functions.)

Convert the old atomic interface classes (`AtomicInterfaceControl` and
`AtomicInterfaceExecution`) to use the new atomic free functions. This
will allow us to test the new atomic functions everywhere that atomics
are used in VTK-m.

Once verified, we can deprecate the old atomic interface classes.
2020-08-20 13:40:44 -06:00

36 lines
1.5 KiB
C

//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notice for more information.
//============================================================================
#ifndef vtk_m_cont_kokkos_DeviceAdapterKokkos_h
#define vtk_m_cont_kokkos_DeviceAdapterKokkos_h
#include <vtkm/cont/kokkos/internal/DeviceAdapterTagKokkos.h>
#if defined(VTKM_ENABLE_KOKKOS)
#if !defined(VTKM_KOKKOS_CUDA) || defined(VTKM_CUDA)
#include <vtkm/cont/kokkos/internal/ArrayManagerExecutionKokkos.h>
#include <vtkm/cont/kokkos/internal/DeviceAdapterAlgorithmKokkos.h>
#include <vtkm/cont/kokkos/internal/DeviceAdapterMemoryManagerKokkos.h>
#include <vtkm/cont/kokkos/internal/DeviceAdapterRuntimeDetectorKokkos.h>
#include <vtkm/cont/kokkos/internal/VirtualObjectTransferKokkos.h>
#else // !defined(VTKM_KOKKOS_CUDA) || defined(VTKM_CUDA)
#if !defined(VTKM_NO_ERROR_ON_MIXED_CUDA_CXX_TAG)
#error When VTK-m is built with Kokkoas with CUDA enabled, all compilation units that include DeviceAdapterTagKokkos must use the cuda compiler
#endif // !defined(VTKM_NO_ERROR_ON_MIXED_CUDA_CXX_TAG)
#endif // !defined(VTKM_KOKKOS_CUDA) || defined(VTKM_CUDA)
#endif // defined(VTKM_ENABLE_KOKKOS)
#endif //vtk_m_cont_kokkos_DeviceAdapterKokkos_h