Viskores  1.0
ThreadIndicesBasic.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_exec_arg_ThreadIndicesBasic_h
19 #define viskores_exec_arg_ThreadIndicesBasic_h
20 
22 
23 namespace viskores
24 {
25 namespace exec
26 {
27 namespace arg
28 {
29 
44 {
45 public:
48  viskores::Id inIndex,
49  viskores::IdComponent visitIndex,
50  viskores::Id outIndex)
51  : ThreadIndex(threadIndex)
52  , InputIndex(inIndex)
53  , OutputIndex(outIndex)
54  , VisitIndex(visitIndex)
55  {
56  }
57 
65  viskores::Id GetThreadIndex() const { return this->ThreadIndex; }
66 
74  viskores::Id GetInputIndex() const { return this->InputIndex; }
75 
85  viskores::Id3 GetInputIndex3D() const { return viskores::Id3(this->GetInputIndex(), 0, 0); }
86 
94  viskores::Id GetOutputIndex() const { return this->OutputIndex; }
95 
103 
104 private:
109 };
110 }
111 }
112 } // namespace viskores::exec::arg
113 
114 #endif //viskores_exec_arg_ThreadIndicesBasic_h
viskores::exec::arg::ThreadIndicesBasic::GetThreadIndex
viskores::Id GetThreadIndex() const
The index of the thread or work invocation.
Definition: ThreadIndicesBasic.h:65
viskores::exec::arg::ThreadIndicesBasic::GetVisitIndex
viskores::IdComponent GetVisitIndex() const
The visit index.
Definition: ThreadIndicesBasic.h:102
viskores::exec::arg::ThreadIndicesBasic::GetInputIndex
viskores::Id GetInputIndex() const
The index into the input domain.
Definition: ThreadIndicesBasic.h:74
viskores::IdComponent
viskores::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:202
viskores::exec::arg::ThreadIndicesBasic::InputIndex
viskores::Id InputIndex
Definition: ThreadIndicesBasic.h:106
viskores::exec::arg::ThreadIndicesBasic::GetOutputIndex
viskores::Id GetOutputIndex() const
The index into the output domain.
Definition: ThreadIndicesBasic.h:94
viskores::exec::arg::ThreadIndicesBasic
Basic container for thread indices in a worklet invocation.
Definition: ThreadIndicesBasic.h:43
viskores::exec::arg::ThreadIndicesBasic::ThreadIndex
viskores::Id ThreadIndex
Definition: ThreadIndicesBasic.h:105
viskores::exec::arg::VisitIndex
The ExecutionSignature tag to use to get the visit index.
Definition: VisitIndex.h:54
viskores::Id
viskores::Int64 Id
Base type to use to index arrays.
Definition: Types.h:235
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::exec::arg::OutputIndex
The ExecutionSignature tag to use to get the output index.
Definition: OutputIndex.h:52
viskores::Id3
viskores::Vec< viskores::Id, 3 > Id3
Id3 corresponds to a 3-dimensional index for 3d arrays.
Definition: Types.h:1053
viskores::exec::arg::ThreadIndicesBasic::VisitIndex
viskores::IdComponent VisitIndex
Definition: ThreadIndicesBasic.h:108
viskores::exec::arg::ThreadIndicesBasic::ThreadIndicesBasic
ThreadIndicesBasic(viskores::Id threadIndex, viskores::Id inIndex, viskores::IdComponent visitIndex, viskores::Id outIndex)
Definition: ThreadIndicesBasic.h:47
viskores::exec::arg::ThreadIndicesBasic::OutputIndex
viskores::Id OutputIndex
Definition: ThreadIndicesBasic.h:107
Invocation.h
viskores::exec::arg::ThreadIndicesBasic::GetInputIndex3D
viskores::Id3 GetInputIndex3D() const
The 3D index into the input domain.
Definition: ThreadIndicesBasic.h:85
viskores::Vec< viskores::Id, 3 >
VISKORES_EXEC
#define VISKORES_EXEC
Definition: ExportMacros.h:59
viskores::exec::arg::InputIndex
The ExecutionSignature tag to use to get the input index.
Definition: InputIndex.h:51