VTK-m
2.0
vtkm
cont
cuda
internal
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
13
#include <
vtkm/cont/DeviceAdapterTag.h
>
14
15
// We always create the cuda tag when included, but we only mark it as a valid tag when
16
// VTKM_ENABLE_CUDA is true. This is for easier development of multi-backend systems.
17
//
18
// We usually mark the Cuda device as valid if VTKM_ENABLE_CUDA even if not compiling with Cuda.
19
// This is because you can still call a method in a different translation unit that is compiled
20
// with Cuda. However, if VTKM_NO_ERROR_ON_MIXED_CUDA_CXX_TAG is set and we are not compiling with
21
// Cuda, then the device is marked invalid. This is so you can specifically compile CPU stuff even
22
// if other units are using Cuda.
23
#if defined(VTKM_ENABLE_CUDA) && !defined(VTKM_NO_ERROR_ON_MIXED_CUDA_CXX_TAG)
24
VTKM_VALID_DEVICE_ADAPTER
(Cuda,
VTKM_DEVICE_ADAPTER_CUDA
);
25
#else
26
VTKM_INVALID_DEVICE_ADAPTER
(Cuda,
VTKM_DEVICE_ADAPTER_CUDA
);
27
#endif
28
29
#endif //vtk_m_cont_cuda_internal_DeviceAdapterTagCuda_h
VTKM_VALID_DEVICE_ADAPTER
VTKM_VALID_DEVICE_ADAPTER(Serial, VTKM_DEVICE_ADAPTER_SERIAL)
VTKM_DEVICE_ADAPTER_CUDA
#define VTKM_DEVICE_ADAPTER_CUDA
Definition:
DeviceAdapterTag.h:37
DeviceAdapterTag.h
VTKM_INVALID_DEVICE_ADAPTER
VTKM_INVALID_DEVICE_ADAPTER(Cuda, VTKM_DEVICE_ADAPTER_CUDA)
Generated by
1.8.17