VTK  9.4.20241114
vtkDIYExplicitAssigner.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
22#ifndef vtkDIYExplicitAssigner_h
23#define vtkDIYExplicitAssigner_h
24
25#include "vtkObject.h"
26#include "vtkParallelDIYModule.h" // for export macros
27// clang-format off
28#include "vtk_diy2.h"
29#include VTK_DIY2(diy/mpi.hpp)
30#include VTK_DIY2(diy/assigner.hpp)
31// clang-format on
32
33#ifdef _WIN32
34#pragma warning(disable : 4275) /* non dll-interface class `diy::StaticAssigner` used as base for \
35 dll-interface class */
36#endif
37
38VTK_ABI_NAMESPACE_BEGIN
39class VTKPARALLELDIY_EXPORT vtkDIYExplicitAssigner : public diy::StaticAssigner
40{
41public:
43 diy::mpi::communicator comm, int local_blocks, bool force_power_of_two = false);
44
45 int rank(int gid) const override;
46 void local_gids(int rank, std::vector<int>& gids) const override;
47
48private:
49 std::vector<int> IScanBlockCounts;
50};
51
52VTK_ABI_NAMESPACE_END
53#endif
54// 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)