VTK-m  2.2
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 
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 
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_WORKLET_EXPORT
#define VTKM_WORKLET_EXPORT
Definition: vtkm_worklet_export.h:44
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::worklet::MaskSelect::GetThreadRange
vtkm::Id GetThreadRange(RangeType) const
Definition: MaskSelect.h:48
vtkm::cont::UnknownArrayHandle
An ArrayHandle of an unknown value type and storage.
Definition: UnknownArrayHandle.h:430
vtkm::worklet::MaskSelect::ThreadToOutputMap
ThreadToOutputMapType ThreadToOutputMap
Definition: MaskSelect.h:60
vtkm::worklet::MaskSelect::GetThreadToOutputMap
ThreadToOutputMapType GetThreadToOutputMap(RangeType) const
Definition: MaskSelect.h:54
UnknownArrayHandle.h
vtkm_worklet_export.h
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::Id
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
vtkm::worklet::MaskSelect
Mask using arrays to select specific elements to suppress.
Definition: MaskSelect.h:33
vtkm::cont::DeviceAdapterTagAny
Tag for a device adapter used to specify that any device may be used for an operation.
Definition: DeviceAdapterTag.h:180
vtkmNotUsed
#define vtkmNotUsed(parameter_name)
Simple macro to identify a parameter as unused.
Definition: ExportMacros.h:128
vtkm::cont::DeviceAdapterId
An object used to specify a device.
Definition: DeviceAdapterTag.h:58
vtkm::List
A template used to hold a list of types.
Definition: List.h:39