2014-11-26 17:19:46 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
2019-04-15 23:24:21 +00:00
|
|
|
//
|
2014-11-26 17:19:46 +00:00
|
|
|
// 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_cuda_internal_DeviceAdapterTagCuda_h
|
|
|
|
#define vtk_m_cont_cuda_internal_DeviceAdapterTagCuda_h
|
|
|
|
|
2019-04-03 20:28:31 +00:00
|
|
|
#include <vtkm/cont/DeviceAdapterTag.h>
|
2014-11-26 17:19:46 +00:00
|
|
|
|
2023-07-27 20:07:19 +00:00
|
|
|
/// @struct vtkm::cont::DeviceAdapterTagCuda
|
|
|
|
/// @brief Tag for a device adapter that uses a CUDA capable GPU device.
|
|
|
|
///
|
|
|
|
/// For this device to work, VTK-m must be configured to use CUDA and the code must
|
|
|
|
/// be compiled by the CUDA `nvcc` compiler. This tag is defined in
|
|
|
|
/// `vtkm/cont/cuda/DeviceAdapterCuda.h`.
|
|
|
|
|
2020-04-22 19:58:59 +00:00
|
|
|
// We always create the cuda tag when included, but we only mark it as a valid tag when
|
|
|
|
// VTKM_ENABLE_CUDA is true. This is for easier development of multi-backend systems.
|
|
|
|
//
|
|
|
|
// We usually mark the Cuda device as valid if VTKM_ENABLE_CUDA even if not compiling with Cuda.
|
|
|
|
// This is because you can still call a method in a different translation unit that is compiled
|
|
|
|
// with Cuda. However, if VTKM_NO_ERROR_ON_MIXED_CUDA_CXX_TAG is set and we are not compiling with
|
|
|
|
// Cuda, then the device is marked invalid. This is so you can specifically compile CPU stuff even
|
|
|
|
// if other units are using Cuda.
|
|
|
|
#if defined(VTKM_ENABLE_CUDA) && !defined(VTKM_NO_ERROR_ON_MIXED_CUDA_CXX_TAG)
|
2015-12-16 16:18:52 +00:00
|
|
|
VTKM_VALID_DEVICE_ADAPTER(Cuda, VTKM_DEVICE_ADAPTER_CUDA);
|
2015-09-16 20:59:28 +00:00
|
|
|
#else
|
2015-12-16 16:18:52 +00:00
|
|
|
VTKM_INVALID_DEVICE_ADAPTER(Cuda, VTKM_DEVICE_ADAPTER_CUDA);
|
2015-09-16 20:59:28 +00:00
|
|
|
#endif
|
2014-11-26 17:19:46 +00:00
|
|
|
|
|
|
|
#endif //vtk_m_cont_cuda_internal_DeviceAdapterTagCuda_h
|