VTK  9.2.6
vtkDIYExplicitAssigner.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDIYExplicitAssigner.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
34 #ifndef vtkDIYExplicitAssigner_h
35 #define vtkDIYExplicitAssigner_h
36 
37 #include "vtkObject.h"
38 #include "vtkParallelDIYModule.h" // for export macros
39 // clang-format off
40 #include "vtk_diy2.h"
41 #include VTK_DIY2(diy/mpi.hpp)
42 #include VTK_DIY2(diy/assigner.hpp)
43 // clang-format on
44 
45 #ifdef _WIN32
46 #pragma warning(disable : 4275) /* non dll-interface class `diy::StaticAssigner` used as base for \
47  dll-interface class */
48 #endif
49 
50 class VTKPARALLELDIY_EXPORT vtkDIYExplicitAssigner : public diy::StaticAssigner
51 {
52 public:
54  diy::mpi::communicator comm, int local_blocks, bool force_power_of_two = false);
55 
56  int rank(int gid) const override;
57  void local_gids(int rank, std::vector<int>& gids) const override;
58 
59 private:
60  std::vector<int> IScanBlockCounts;
61 };
62 
63 #endif
64 // VTK-HeaderTest-Exclude: vtkDIYExplicitAssigner.h
assigner for use with DIY