VTK-m  2.0
AssignerPartitionedDataSet.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_cont_AssignerPartitionedDataSet_h
11 #define vtk_m_cont_AssignerPartitionedDataSet_h
12 
13 #include <vtkm/cont/vtkm_cont_export.h>
14 
15 #include <vtkm/Types.h>
17 #include <vtkm/thirdparty/diy/Configure.h>
18 
19 #include <vector>
20 
21 #include <vtkm/thirdparty/diy/diy.h>
22 
23 #ifdef VTKM_MSVC
24 #pragma warning(push)
25 // disable C4275: non-dll interface base class warnings
26 #pragma warning(disable : 4275)
27 #endif
28 
29 namespace vtkm
30 {
31 namespace cont
32 {
33 
34 class PartitionedDataSet;
35 
49 class VTKM_CONT_EXPORT AssignerPartitionedDataSet : public vtkmdiy::StaticAssigner
50 {
51 public:
55  VTKM_CONT
57 
58  VTKM_CONT
59  AssignerPartitionedDataSet(vtkm::Id num_partitions);
60 
61  VTKM_CONT
62  ~AssignerPartitionedDataSet() override;
63 
66  VTKM_CONT
67  void local_gids(int rank, std::vector<int>& gids) const override;
68 
69  VTKM_CONT
70  int rank(int gid) const override;
72 private:
73  std::vector<vtkm::Id> IScanPartitionCounts;
74 };
75 }
76 }
77 
78 #ifdef VTKM_MSVC
79 #pragma warning(pop)
80 #endif
81 
82 #endif
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
Types.h
vtkm::cont::AssignerPartitionedDataSet
Assigner for PartitionedDataSet partitions.
Definition: AssignerPartitionedDataSet.h:49
vtkm::Id
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
ExportMacros.h
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::cont::AssignerPartitionedDataSet::IScanPartitionCounts
std::vector< vtkm::Id > IScanPartitionCounts
Definition: AssignerPartitionedDataSet.h:73
vtkm::cont::PartitionedDataSet
Definition: PartitionedDataSet.h:25