VTK-m  2.0
MaskSelect.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_worklet_MaskSelect_h
11 #define vtk_m_worklet_MaskSelect_h
12 
14 #include <vtkm/worklet/vtkm_worklet_export.h>
15 
17 
18 namespace vtkm
19 {
20 namespace worklet
21 {
22 
33 class VTKM_WORKLET_EXPORT MaskSelect : public internal::MaskBase
34 {
35  using MaskTypes =
37 
38 public:
40 
42  vtkm::cont::DeviceAdapterId device = vtkm::cont::DeviceAdapterTagAny())
43  {
44  this->ThreadToOutputMap = this->Build(maskArray, device);
45  }
46 
47  template <typename RangeType>
48  vtkm::Id GetThreadRange(RangeType vtkmNotUsed(outputRange)) const
49  {
50  return this->ThreadToOutputMap.GetNumberOfValues();
51  }
52 
53  template <typename RangeType>
55  {
56  return this->ThreadToOutputMap;
57  }
58 
59 private:
61 
64 };
65 }
66 } // namespace vtkm::worklet
67 
68 #endif //vtk_m_worklet_MaskSelect_h
MaskBase.h
vtkm::cont::ArrayHandle< vtkm::Id >
vtkm::worklet::MaskSelect::MaskSelect
MaskSelect(const vtkm::cont::UnknownArrayHandle &maskArray, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny())
Definition: MaskSelect.h:41
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::cont::UnknownArrayHandle
An ArrayHandle of an unknown value type and storage.
Definition: UnknownArrayHandle.h:406
vtkm::worklet::MaskSelect::ThreadToOutputMap
ThreadToOutputMapType ThreadToOutputMap
Definition: MaskSelect.h:60
vtkm::Id
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
UnknownArrayHandle.h
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::worklet::MaskSelect
Mask using arrays to select specific elements to suppress.
Definition: MaskSelect.h:33
vtkmNotUsed
#define vtkmNotUsed(parameter_name)
Simple macro to identify a parameter as unused.
Definition: ExportMacros.h:128
vtkm::worklet::MaskSelect::GetThreadToOutputMap
ThreadToOutputMapType GetThreadToOutputMap(RangeType vtkmNotUsed(outputRange)) const
Definition: MaskSelect.h:54
vtkm::cont::DeviceAdapterId
Definition: DeviceAdapterTag.h:52
vtkm::List
Definition: List.h:34
vtkm::worklet::MaskSelect::GetThreadRange
vtkm::Id GetThreadRange(RangeType vtkmNotUsed(outputRange)) const
Definition: MaskSelect.h:48