DefaultTypes.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 
11 // The intention of the header file is to configure VTK-m to compile its algorithms
12 // and filters for some set of types and data storage. You can customize the types
13 // for which VTK-m is compiled for by setting the VTKm_DEFAULT_TYPES_HEADER CMake
14 // variable. This CMake variable can be set to a header file that defines one or
15 // more of the following macros:
16 //
17 // VTKM_FIELD_TYPE_LIST - a vtkm::List of value types for fields that filters
18 // should directly operate on (where applicable).
19 // VTKM_FIELD_STORAGE_LIST - a vtkm::List of storage tags for fields that
20 // filters should directly operate on.
21 // VTKM_DEFAULT_CELL_SET_LIST_STRUCTURED - a vtkm::List of vtkm::cont::CellSet types
22 // that filters should operate on as a strutured cell set.
23 // VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED - a vtkm::List of vtkm::cont::CellSet types
24 // that filters should operate on as an unstrutured cell set.
25 // VTKM_DEFAULT_CELL_SET_LIST - a vtkm::List of vtkm::cont::CellSet types that filters
26 // should operate on (where applicable). The default of
27 // vtkm::ListAppend<VTKM_STRUCTURED_CELL_SET_LIST, VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED>
28 // is usually correct.
29 //
30 // Note that if you specify VTKm_DEFAULT_TYPES_HEADER, that file will be copied
31 // to the VTK-m build directory. Thus, be careful about editing the file included
32 // by this one (if it exists).
33 
34 #ifndef vtk_m_cont_DefaultTypes_h
35 #define vtk_m_cont_DefaultTypes_h
36 
37 #define VTK_M_HAS_DEFAULT_TYPES_HEADER
38 
39 #ifdef VTK_M_HAS_DEFAULT_TYPES_HEADER
41 #endif
42 
43 #ifndef VTKM_DEFAULT_TYPE_LIST
44 #include <vtkm/TypeList.h>
45 #define VTKM_DEFAULT_TYPE_LIST ::vtkm::TypeListCommon
46 #endif //VTKM_DEFAULT_TYPE_LIST
47 
48 #ifndef VTKM_DEFAULT_STORAGE_LIST
49 #include <vtkm/cont/ArrayHandleCartesianProduct.h>
50 #include <vtkm/cont/ArrayHandleUniformPointCoordinates.h>
51 #include <vtkm/cont/StorageList.h>
52 namespace vtkm
53 {
54 namespace cont
55 {
56 namespace internal
57 {
58 
59 using StorageListField = vtkm::ListAppend<
60  vtkm::cont::StorageListBasic,
61  vtkm::List<
62  vtkm::cont::ArrayHandleUniformPointCoordinates::StorageTag,
63  vtkm::cont::ArrayHandleCartesianProduct<vtkm::cont::ArrayHandle<vtkm::Float32>,
64  vtkm::cont::ArrayHandle<vtkm::Float32>,
65  vtkm::cont::ArrayHandle<vtkm::Float32>>::StorageTag,
66  vtkm::cont::ArrayHandleCartesianProduct<vtkm::cont::ArrayHandle<vtkm::Float64>,
67  vtkm::cont::ArrayHandle<vtkm::Float64>,
68  vtkm::cont::ArrayHandle<vtkm::Float64>>::StorageTag>>;
69 
70 }
71 }
72 } // namespace vtkm::cont
73 
74 #define VTKM_DEFAULT_STORAGE_LIST ::vtkm::cont::internal::StorageListField
75 #endif // VTKM_FIELD_STORAGE_LIST
76 
77 #ifndef VTKM_DEFAULT_CELL_SET_LIST_STRUCTURED
78 #include <vtkm/cont/CellSetList.h>
79 #define VTKM_DEFAULT_CELL_SET_LIST_STRUCTURED ::vtkm::cont::CellSetListStructured
80 #endif // VTKM_DEFAULT_CELL_SET_LIST_STRUCTURED
81 
82 #ifndef VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED
83 #include <vtkm/cont/CellSetList.h>
84 #define VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED ::vtkm::cont::CellSetListUnstructured
85 #endif // VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED
86 
87 #ifndef VTKM_DEFAULT_CELL_SET_LIST
88 namespace vtkm
89 {
90 namespace cont
91 {
92 namespace internal
93 {
94 
95 using CellSetList = vtkm::ListAppend<VTKM_DEFAULT_CELL_SET_LIST_STRUCTURED, VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED>;
96 
97 }
98 }
99 } // namespace vtkm::cont::internal
100 
101 #define VTKM_DEFAULT_CELL_SET_LIST ::vtkm::cont::internal::CellSetList
102 #endif // VTKM_CELL_SET_LIST
103 
104 #endif //vtk_m_cont_DefaultTypes_h
vtkm::ListAppend< VTKM_DEFAULT_CELL_SET_LIST_STRUCTURED, VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED > CellSetList
Definition: DefaultTypes.h:95
vtkm::ListAppend< vtkm::cont::StorageListBasic, vtkm::List< vtkm::cont::ArrayHandleUniformPointCoordinates::StorageTag, vtkm::cont::ArrayHandleCartesianProduct< vtkm::cont::ArrayHandle< vtkm::Float32 >, vtkm::cont::ArrayHandle< vtkm::Float32 >, vtkm::cont::ArrayHandle< vtkm::Float32 > >::StorageTag, vtkm::cont::ArrayHandleCartesianProduct< vtkm::cont::ArrayHandle< vtkm::Float64 >, vtkm::cont::ArrayHandle< vtkm::Float64 >, vtkm::cont::ArrayHandle< vtkm::Float64 > >::StorageTag > > StorageListField
Definition: DefaultTypes.h:68