VTK-m  2.1
DeviceAdapterTagCuda.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //============================================================================
10 #ifndef vtk_m_cont_cuda_internal_DeviceAdapterTagCuda_h
11 #define vtk_m_cont_cuda_internal_DeviceAdapterTagCuda_h
12 
14 
21 
22 // We always create the cuda tag when included, but we only mark it as a valid tag when
23 // VTKM_ENABLE_CUDA is true. This is for easier development of multi-backend systems.
24 //
25 // We usually mark the Cuda device as valid if VTKM_ENABLE_CUDA even if not compiling with Cuda.
26 // This is because you can still call a method in a different translation unit that is compiled
27 // with Cuda. However, if VTKM_NO_ERROR_ON_MIXED_CUDA_CXX_TAG is set and we are not compiling with
28 // Cuda, then the device is marked invalid. This is so you can specifically compile CPU stuff even
29 // if other units are using Cuda.
30 #if defined(VTKM_ENABLE_CUDA) && !defined(VTKM_NO_ERROR_ON_MIXED_CUDA_CXX_TAG)
32 #else
34 #endif
35 
36 #endif //vtk_m_cont_cuda_internal_DeviceAdapterTagCuda_h
VTKM_DEVICE_ADAPTER_CUDA
#define VTKM_DEVICE_ADAPTER_CUDA
Definition: DeviceAdapterTag.h:37
DeviceAdapterTag.h
VTKM_VALID_DEVICE_ADAPTER
#define VTKM_VALID_DEVICE_ADAPTER(Name, Id)
Creates a tag named vtkm::cont::DeviceAdapterTagName and associated MPL structures to use this tag.
Definition: DeviceAdapterTag.h:129
VTKM_INVALID_DEVICE_ADAPTER
#define VTKM_INVALID_DEVICE_ADAPTER(Name, Id)
Marks the tag named vtkm::cont::DeviceAdapterTagName and associated structures as invalid to use.
Definition: DeviceAdapterTag.h:153