Nicol 2D

Defined in algorithms/nicol2d.hpp

namespace sarma::nicol2d

Functions

template<class Ordinal, class Value, bool use_indices = true>
auto partition(const Matrix<Ordinal, Value> &A, const std::vector<Ordinal> &p, const Ordinal Q, const bool p_is_rows = true, int max_iteration = 0)
template<class Ordinal, class Value, bool use_indices = true>
auto partition(const Matrix<Ordinal, Value> &A, const Ordinal P, const Ordinal Q, const int max_iteration = 0)

Implements the rectilinear partitioning algorithm with iterative refinement described in “David Nicol, Rectilinear Partitioning of Irregular Data Parallel Computations, JPDC, 1994”.

Return

two cut vectors as a pair

Parameters
  • A: Matrix

  • P: number of parts

  • Q: number of parts in the other dimension

  • max_iteration: limit on refinement iterations