VTK  9.0.3
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 =========================================================================*/
31 #ifndef vtkDIYExplicitAssigner_h
32 #define vtkDIYExplicitAssigner_h
33 
34 #include "vtkObject.h"
35 #include "vtkParallelDIYModule.h" // for export macros
36 // clang-format off
37 #include "vtk_diy2.h"
38 #include VTK_DIY2(diy/mpi.hpp)
39 #include VTK_DIY2(diy/assigner.hpp)
40 // clang-format on
41 
42 #ifdef _WIN32
43 #pragma warning(disable : 4275) /* non dll-interface class `diy::StaticAssigner` used as base for \
44  dll-interface class */
45 #endif
46 
47 class VTKPARALLELDIY_EXPORT vtkDIYExplicitAssigner : public diy::StaticAssigner
48 {
49 public:
51  diy::mpi::communicator comm, int local_blocks, bool force_power_of_two = false);
52 
53  int rank(int gid) const override;
54  void local_gids(int rank, std::vector<int>& gids) const override;
55 
56 private:
57  std::vector<int> IScanBlockCounts;
58 };
59 
60 #endif
61 // VTK-HeaderTest-Exclude: vtkDIYExplicitAssigner.h
assigner for use with DIY
int rank(int gid) const override
void local_gids(int rank, std::vector< int > &gids) const override
vtkDIYExplicitAssigner(diy::mpi::communicator comm, int local_blocks, bool force_power_of_two=false)