VTK-m  2.0
ThreadIndicesBasic.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_exec_arg_ThreadIndicesBasic_h
11 #define vtk_m_exec_arg_ThreadIndicesBasic_h
12 
14 
15 namespace vtkm
16 {
17 namespace exec
18 {
19 namespace arg
20 {
21 
36 {
37 public:
38  VTKM_EXEC
40  vtkm::Id inIndex,
41  vtkm::IdComponent visitIndex,
42  vtkm::Id outIndex)
43  : ThreadIndex(threadIndex)
44  , InputIndex(inIndex)
45  , OutputIndex(outIndex)
46  , VisitIndex(visitIndex)
47  {
48  }
49 
56  VTKM_EXEC
57  vtkm::Id GetThreadIndex() const { return this->ThreadIndex; }
58 
65  VTKM_EXEC
66  vtkm::Id GetInputIndex() const { return this->InputIndex; }
67 
76  VTKM_EXEC
77  vtkm::Id3 GetInputIndex3D() const { return vtkm::Id3(this->GetInputIndex(), 0, 0); }
78 
85  VTKM_EXEC
86  vtkm::Id GetOutputIndex() const { return this->OutputIndex; }
87 
93  VTKM_EXEC
94  vtkm::IdComponent GetVisitIndex() const { return this->VisitIndex; }
95 
96 private:
101 };
102 }
103 }
104 } // namespace vtkm::exec::arg
105 
106 #endif //vtk_m_exec_arg_ThreadIndicesBasic_h
vtkm::exec::arg::ThreadIndicesBasic::GetOutputIndex
VTKM_EXEC vtkm::Id GetOutputIndex() const
The index into the output domain.
Definition: ThreadIndicesBasic.h:86
vtkm::exec::arg::ThreadIndicesBasic::GetInputIndex
VTKM_EXEC vtkm::Id GetInputIndex() const
The index into the input domain.
Definition: ThreadIndicesBasic.h:66
VTKM_EXEC
#define VTKM_EXEC
Definition: ExportMacros.h:51
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::exec::arg::ThreadIndicesBasic
Basic container for thread indices in a worklet invocation.
Definition: ThreadIndicesBasic.h:35
vtkm::exec::arg::ThreadIndicesBasic::ThreadIndex
vtkm::Id ThreadIndex
Definition: ThreadIndicesBasic.h:97
vtkm::IdComponent
vtkm::Int32 IdComponent
Represents a component ID (index of component in a vector).
Definition: Types.h:168
vtkm::exec::arg::OutputIndex
The ExecutionSignature tag to use to get the output index.
Definition: OutputIndex.h:42
vtkm::Id
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
vtkm::exec::arg::ThreadIndicesBasic::GetVisitIndex
VTKM_EXEC vtkm::IdComponent GetVisitIndex() const
The visit index.
Definition: ThreadIndicesBasic.h:94
vtkm::exec::arg::ThreadIndicesBasic::VisitIndex
vtkm::IdComponent VisitIndex
Definition: ThreadIndicesBasic.h:100
vtkm::exec::arg::ThreadIndicesBasic::GetInputIndex3D
VTKM_EXEC vtkm::Id3 GetInputIndex3D() const
The 3D index into the input domain.
Definition: ThreadIndicesBasic.h:77
vtkm::Id3
vtkm::Vec< vtkm::Id, 3 > Id3
Id3 corresponds to a 3-dimensional index for 3d arrays.
Definition: Types.h:1003
vtkm::Vec< vtkm::Id, 3 >
vtkm::exec::arg::ThreadIndicesBasic::GetThreadIndex
VTKM_EXEC vtkm::Id GetThreadIndex() const
The index of the thread or work invocation.
Definition: ThreadIndicesBasic.h:57
vtkm::exec::arg::ThreadIndicesBasic::ThreadIndicesBasic
VTKM_EXEC ThreadIndicesBasic(vtkm::Id threadIndex, vtkm::Id inIndex, vtkm::IdComponent visitIndex, vtkm::Id outIndex)
Definition: ThreadIndicesBasic.h:39
vtkm::exec::arg::ThreadIndicesBasic::OutputIndex
vtkm::Id OutputIndex
Definition: ThreadIndicesBasic.h:99
vtkm::exec::arg::ThreadIndicesBasic::InputIndex
vtkm::Id InputIndex
Definition: ThreadIndicesBasic.h:98
Invocation.h
vtkm::exec::arg::VisitIndex
The ExecutionSignature tag to use to get the visit index.
Definition: VisitIndex.h:43
vtkm::exec::arg::InputIndex
The ExecutionSignature tag to use to get the input index.
Definition: InputIndex.h:42