Viskores  1.0
DeviceAdapterTagCuda.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 #ifndef viskores_cont_cuda_internal_DeviceAdapterTagCuda_h
19 #define viskores_cont_cuda_internal_DeviceAdapterTagCuda_h
20 
22 
29 
30 // We always create the cuda tag when included, but we only mark it as a valid tag when
31 // VISKORES_ENABLE_CUDA is true. This is for easier development of multi-backend systems.
32 //
33 // We usually mark the Cuda device as valid if VISKORES_ENABLE_CUDA even if not compiling with Cuda.
34 // This is because you can still call a method in a different translation unit that is compiled
35 // with Cuda. However, if VISKORES_NO_ERROR_ON_MIXED_CUDA_CXX_TAG is set and we are not compiling with
36 // Cuda, then the device is marked invalid. This is so you can specifically compile CPU stuff even
37 // if other units are using Cuda.
38 #if defined(VISKORES_ENABLE_CUDA) && !defined(VISKORES_NO_ERROR_ON_MIXED_CUDA_CXX_TAG)
40 #else
42 #endif
43 
44 #endif //viskores_cont_cuda_internal_DeviceAdapterTagCuda_h
DeviceAdapterTag.h
VISKORES_DEVICE_ADAPTER_CUDA
#define VISKORES_DEVICE_ADAPTER_CUDA
Definition: DeviceAdapterTag.h:45
VISKORES_VALID_DEVICE_ADAPTER
#define VISKORES_VALID_DEVICE_ADAPTER(Name, Id)
Creates a tag named viskores::cont::DeviceAdapterTagName and associated MPL structures to use this ta...
Definition: DeviceAdapterTag.h:137
VISKORES_INVALID_DEVICE_ADAPTER
#define VISKORES_INVALID_DEVICE_ADAPTER(Name, Id)
Marks the tag named viskores::cont::DeviceAdapterTagName and associated structures as invalid to use.
Definition: DeviceAdapterTag.h:164